From cd465b899a3197ef8a75b80744d5c24e07689434 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 30 May 2023 19:08:16 +0000 Subject: [PATCH 1/2] chore: upgrading Protobuf to 23.1 and gRPC to 1.55.0 in code generation PiperOrigin-RevId: 534084593 Source-Link: https://github.com/googleapis/googleapis/commit/aa4559a97f79225fc57c9f70b5f84fe620e8292e Source-Link: https://github.com/googleapis/googleapis-gen/commit/370325af8236732f5885f5940e0ef481fee83003 Copy-Tag: eyJwIjoiVmlkZW9MaXZlU3RyZWFtLy5Pd2xCb3QueWFtbCIsImgiOiIzNzAzMjVhZjgyMzY3MzJmNTg4NWY1OTQwZTBlZjQ4MWZlZTgzMDAzIn0= Copy-Tag: eyJwIjoiVmlkZW9TdGl0Y2hlci8uT3dsQm90LnlhbWwiLCJoIjoiMzcwMzI1YWY4MjM2NzMyZjU4ODVmNTk0MGUwZWY0ODFmZWU4MzAwMyJ9 Copy-Tag: eyJwIjoiVmlkZW9UcmFuc2NvZGVyLy5Pd2xCb3QueWFtbCIsImgiOiIzNzAzMjVhZjgyMzY3MzJmNTg4NWY1OTQwZTBlZjQ4MWZlZTgzMDAzIn0= Copy-Tag: eyJwIjoiVmlzaW9uLy5Pd2xCb3QueWFtbCIsImgiOiIzNzAzMjVhZjgyMzY3MzJmNTg4NWY1OTQwZTBlZjQ4MWZlZTgzMDAzIn0= Copy-Tag: eyJwIjoiVm1NaWdyYXRpb24vLk93bEJvdC55YW1sIiwiaCI6IjM3MDMyNWFmODIzNjczMmY1ODg1ZjU5NDBlMGVmNDgxZmVlODMwMDMifQ== Copy-Tag: eyJwIjoiVm13YXJlRW5naW5lLy5Pd2xCb3QueWFtbCIsImgiOiIzNzAzMjVhZjgyMzY3MzJmNTg4NWY1OTQwZTBlZjQ4MWZlZTgzMDAzIn0= Copy-Tag: eyJwIjoiVnBjQWNjZXNzLy5Pd2xCb3QueWFtbCIsImgiOiIzNzAzMjVhZjgyMzY3MzJmNTg4NWY1OTQwZTBlZjQ4MWZlZTgzMDAzIn0= Copy-Tag: eyJwIjoiV2ViUmlzay8uT3dsQm90LnlhbWwiLCJoIjoiMzcwMzI1YWY4MjM2NzMyZjU4ODVmNTk0MGUwZWY0ODFmZWU4MzAwMyJ9 Copy-Tag: eyJwIjoiV2ViU2VjdXJpdHlTY2FubmVyLy5Pd2xCb3QueWFtbCIsImgiOiIzNzAzMjVhZjgyMzY3MzJmNTg4NWY1OTQwZTBlZjQ4MWZlZTgzMDAzIn0= Copy-Tag: eyJwIjoiV29ya2Zsb3dzLy5Pd2xCb3QueWFtbCIsImgiOiIzNzAzMjVhZjgyMzY3MzJmNTg4NWY1OTQwZTBlZjQ4MWZlZTgzMDAzIn0= --- .../Cloud/Video/Livestream/V1/Outputs.php | Bin 0 -> 3859 bytes .../Cloud/Video/Livestream/V1/Resources.php | Bin 0 -> 7282 bytes .../Cloud/Video/Livestream/V1/Service.php | 170 + .../Cloud/Video/LiveStream/V1/AudioFormat.php | 135 + .../Cloud/Video/LiveStream/V1/AudioStream.php | 327 ++ .../V1/AudioStream/AudioMapping.php | 246 + .../LiveStream/V1/AudioStreamProperty.php | 111 + .../Cloud/Video/LiveStream/V1/Channel.php | 745 +++ .../Video/LiveStream/V1/Channel/Output.php | 70 + .../LiveStream/V1/Channel/StreamingState.php | 104 + .../V1/ChannelOperationResponse.php | 33 + .../LiveStream/V1/CreateChannelRequest.php | 252 + .../LiveStream/V1/CreateEventRequest.php | 252 + .../LiveStream/V1/CreateInputRequest.php | 252 + .../LiveStream/V1/DeleteChannelRequest.php | 206 + .../LiveStream/V1/DeleteEventRequest.php | 160 + .../LiveStream/V1/DeleteInputRequest.php | 160 + .../Video/LiveStream/V1/ElementaryStream.php | 177 + .../Cloud/Video/LiveStream/V1/Encryption.php | 261 + .../V1/Encryption/Aes128Encryption.php | 36 + .../LiveStream/V1/Encryption/Clearkey.php | 36 + .../LiveStream/V1/Encryption/DrmSystems.php | 213 + .../LiveStream/V1/Encryption/Fairplay.php | 36 + .../V1/Encryption/MpegCommonEncryption.php | 78 + .../LiveStream/V1/Encryption/Playready.php | 36 + .../V1/Encryption/SampleAesEncryption.php | 36 + .../V1/Encryption/SecretManagerSource.php | 74 + .../LiveStream/V1/Encryption/Widevine.php | 36 + .../Cloud/Video/LiveStream/V1/Event.php | 568 ++ .../Video/LiveStream/V1/Event/AdBreakTask.php | 80 + .../LiveStream/V1/Event/InputSwitchTask.php | 78 + .../Video/LiveStream/V1/Event/MuteTask.php | 84 + .../V1/Event/ReturnToProgramTask.php | 37 + .../Cloud/Video/LiveStream/V1/Event/State.php | 92 + .../Video/LiveStream/V1/Event/UnmuteTask.php | 37 + .../Video/LiveStream/V1/GetChannelRequest.php | 86 + .../Video/LiveStream/V1/GetEventRequest.php | 86 + .../Video/LiveStream/V1/GetInputRequest.php | 86 + .../Cloud/Video/LiveStream/V1/Input.php | 460 ++ .../LiveStream/V1/Input/SecurityRule.php | 80 + .../Cloud/Video/LiveStream/V1/Input/Tier.php | 71 + .../Cloud/Video/LiveStream/V1/Input/Type.php | 64 + .../Video/LiveStream/V1/InputAttachment.php | 149 + .../V1/InputAttachment/AutomaticFailover.php | 82 + .../Cloud/Video/LiveStream/V1/InputConfig.php | 67 + .../V1/InputConfig/InputSwitchMode.php | 72 + .../LiveStream/V1/InputStreamProperty.php | 149 + .../LiveStream/V1/ListChannelsRequest.php | 242 + .../LiveStream/V1/ListChannelsResponse.php | 139 + .../Video/LiveStream/V1/ListEventsRequest.php | 242 + .../LiveStream/V1/ListEventsResponse.php | 139 + .../Video/LiveStream/V1/ListInputsRequest.php | 242 + .../LiveStream/V1/ListInputsResponse.php | 139 + .../V1/LivestreamServiceGrpcClient.php | 282 + .../Cloud/Video/LiveStream/V1/LogConfig.php | 70 + .../LiveStream/V1/LogConfig/LogSeverity.php | 92 + .../Cloud/Video/LiveStream/V1/Manifest.php | 327 ++ .../LiveStream/V1/Manifest/ManifestType.php | 64 + .../Cloud/Video/LiveStream/V1/MuxStream.php | 249 + .../Video/LiveStream/V1/OperationMetadata.php | 273 + .../LiveStream/V1/PreprocessingConfig.php | 165 + .../V1/PreprocessingConfig/Audio.php | 106 + .../V1/PreprocessingConfig/Crop.php | 173 + .../LiveStream/V1/PreprocessingConfig/Pad.php | 173 + .../Video/LiveStream/V1/SegmentSettings.php | 105 + .../Cloud/Video/LiveStream/V1/SpriteSheet.php | 367 ++ .../LiveStream/V1/StartChannelRequest.php | 160 + .../LiveStream/V1/StopChannelRequest.php | 160 + .../Cloud/Video/LiveStream/V1/TextStream.php | 79 + .../Video/LiveStream/V1/TimecodeConfig.php | 150 + .../V1/TimecodeConfig/TimecodeSource.php | 64 + .../LiveStream/V1/UpdateChannelRequest.php | 293 + .../LiveStream/V1/UpdateInputRequest.php | 253 + .../Cloud/Video/LiveStream/V1/VideoFormat.php | 169 + .../Cloud/Video/LiveStream/V1/VideoStream.php | 75 + .../V1/VideoStream/H264CodecSettings.php | 743 +++ .../LiveStream/V1/VideoStreamProperty.php | 111 + .../create_channel.php | 95 + .../LivestreamServiceClient/create_event.php | 82 + .../LivestreamServiceClient/create_input.php | 91 + .../delete_channel.php | 81 + .../LivestreamServiceClient/delete_event.php | 75 + .../LivestreamServiceClient/delete_input.php | 81 + .../LivestreamServiceClient/get_channel.php | 72 + .../V1/LivestreamServiceClient/get_event.php | 77 + .../V1/LivestreamServiceClient/get_input.php | 72 + .../LivestreamServiceClient/get_location.php | 57 + .../LivestreamServiceClient/list_channels.php | 77 + .../LivestreamServiceClient/list_events.php | 77 + .../LivestreamServiceClient/list_inputs.php | 77 + .../list_locations.php | 62 + .../LivestreamServiceClient/start_channel.php | 85 + .../LivestreamServiceClient/stop_channel.php | 85 + .../update_channel.php | 74 + .../LivestreamServiceClient/update_input.php | 71 + .../LivestreamServiceBaseClient.php | 802 +++ .../src/V1/Client/LivestreamServiceClient.php | 40 + .../V1/Gapic/LivestreamServiceGapicClient.php | 1799 ++++++ .../v1/src/V1/LivestreamServiceClient.php | 34 + .../v1/src/V1/gapic_metadata.json | 108 + .../livestream_service_client_config.json | 134 + .../livestream_service_descriptor_config.php | 323 ++ .../livestream_service_rest_client_config.php | 274 + .../V1/Client/LivestreamServiceClientTest.php | 1869 ++++++ .../Unit/V1/LivestreamServiceClientTest.php | 1693 ++++++ .../Cloud/Video/Stitcher/V1/AdTagDetails.php | 52 + .../Cloud/Video/Stitcher/V1/CdnKeys.php | Bin 0 -> 1437 bytes .../Cloud/Video/Stitcher/V1/Companions.php | Bin 0 -> 1738 bytes .../Google/Cloud/Video/Stitcher/V1/Events.php | Bin 0 -> 1464 bytes .../Cloud/Video/Stitcher/V1/LiveConfigs.php | Bin 0 -> 2066 bytes .../Cloud/Video/Stitcher/V1/Sessions.php | Bin 0 -> 3688 bytes .../Google/Cloud/Video/Stitcher/V1/Slates.php | 37 + .../Cloud/Video/Stitcher/V1/StitchDetails.php | 45 + .../Stitcher/V1/VideoStitcherService.php | 200 + .../Cloud/Video/Stitcher/V1/AdRequest.php | 155 + .../Video/Stitcher/V1/AdStitchDetail.php | 213 + .../Cloud/Video/Stitcher/V1/AdTracking.php | 63 + .../Cloud/Video/Stitcher/V1/AkamaiCdnKey.php | 67 + .../Google/Cloud/Video/Stitcher/V1/CdnKey.php | 219 + .../Cloud/Video/Stitcher/V1/Companion.php | 455 ++ .../Cloud/Video/Stitcher/V1/CompanionAds.php | 101 + .../V1/CompanionAds/DisplayRequirement.php | 71 + .../Video/Stitcher/V1/CreateCdnKeyRequest.php | 189 + .../Stitcher/V1/CreateLiveConfigRequest.php | 242 + .../Stitcher/V1/CreateLiveSessionRequest.php | 132 + .../Video/Stitcher/V1/CreateSlateRequest.php | 257 + .../Stitcher/V1/CreateVodSessionRequest.php | 132 + .../Video/Stitcher/V1/DeleteCdnKeyRequest.php | 86 + .../Stitcher/V1/DeleteLiveConfigRequest.php | 86 + .../Video/Stitcher/V1/DeleteSlateRequest.php | 86 + .../Google/Cloud/Video/Stitcher/V1/Event.php | 179 + .../Video/Stitcher/V1/Event/EventType.php | 218 + .../Cloud/Video/Stitcher/V1/GamLiveConfig.php | 135 + .../Video/Stitcher/V1/GetCdnKeyRequest.php | 86 + .../Stitcher/V1/GetLiveAdTagDetailRequest.php | 86 + .../Stitcher/V1/GetLiveConfigRequest.php | 91 + .../Stitcher/V1/GetLiveSessionRequest.php | 86 + .../Video/Stitcher/V1/GetSlateRequest.php | 86 + .../Stitcher/V1/GetVodAdTagDetailRequest.php | 91 + .../Stitcher/V1/GetVodSessionRequest.php | 86 + .../Stitcher/V1/GetVodStitchDetailRequest.php | 91 + .../Cloud/Video/Stitcher/V1/GoogleCdnKey.php | 101 + .../Video/Stitcher/V1/HtmlAdResource.php | 67 + .../Video/Stitcher/V1/IframeAdResource.php | 67 + .../Cloud/Video/Stitcher/V1/Interstitials.php | 111 + .../Video/Stitcher/V1/ListCdnKeysRequest.php | 226 + .../Video/Stitcher/V1/ListCdnKeysResponse.php | 135 + .../V1/ListLiveAdTagDetailsRequest.php | 154 + .../V1/ListLiveAdTagDetailsResponse.php | 101 + .../Stitcher/V1/ListLiveConfigsRequest.php | 234 + .../Stitcher/V1/ListLiveConfigsResponse.php | 135 + .../Video/Stitcher/V1/ListSlatesRequest.php | 226 + .../Video/Stitcher/V1/ListSlatesResponse.php | 135 + .../V1/ListVodAdTagDetailsRequest.php | 154 + .../V1/ListVodAdTagDetailsResponse.php | 101 + .../V1/ListVodStitchDetailsRequest.php | 154 + .../V1/ListVodStitchDetailsResponse.php | 101 + .../Video/Stitcher/V1/LiveAdTagDetail.php | 105 + .../Cloud/Video/Stitcher/V1/LiveConfig.php | 391 ++ .../Video/Stitcher/V1/LiveConfig/State.php | 71 + .../V1/LiveConfig/StitchingPolicy.php | 66 + .../Cloud/Video/Stitcher/V1/LiveSession.php | 302 + .../Stitcher/V1/LiveSession/GamSettings.php | 72 + .../Video/Stitcher/V1/ManifestOptions.php | 109 + .../V1/ManifestOptions/OrderPolicy.php | 64 + .../Cloud/Video/Stitcher/V1/MediaCdnKey.php | 101 + .../Video/Stitcher/V1/OperationMetadata.php | 189 + .../Video/Stitcher/V1/PrefetchConfig.php | 131 + .../Cloud/Video/Stitcher/V1/ProgressEvent.php | 128 + .../Video/Stitcher/V1/RenditionFilter.php | 109 + .../Video/Stitcher/V1/RequestMetadata.php | 77 + .../Video/Stitcher/V1/ResponseMetadata.php | 257 + .../Google/Cloud/Video/Stitcher/V1/Slate.php | 153 + .../Video/Stitcher/V1/Slate/GamSlate.php | 105 + .../Video/Stitcher/V1/StaticAdResource.php | 101 + .../Video/Stitcher/V1/UpdateCdnKeyRequest.php | 146 + .../Video/Stitcher/V1/UpdateSlateRequest.php | 136 + .../V1/VideoStitcherServiceGrpcClient.php | 406 ++ .../Video/Stitcher/V1/VodAdTagDetail.php | 105 + .../Cloud/Video/Stitcher/V1/VodSession.php | 451 ++ .../Stitcher/V1/VodSession/GamSettings.php | 105 + .../Cloud/Video/Stitcher/V1/VodSessionAd.php | 171 + .../Video/Stitcher/V1/VodSessionAdBreak.php | 189 + .../Video/Stitcher/V1/VodSessionContent.php | 81 + .../Video/Stitcher/V1/VodStitchDetail.php | 105 + .../create_cdn_key.php | 94 + .../create_live_config.php | 108 + .../create_live_session.php | 89 + .../create_slate.php | 92 + .../create_vod_session.php | 96 + .../delete_cdn_key.php | 81 + .../delete_live_config.php | 85 + .../delete_slate.php | 81 + .../get_cdn_key.php | 72 + .../get_live_ad_tag_detail.php | 77 + .../get_live_config.php | 78 + .../get_live_session.php | 76 + .../VideoStitcherServiceClient/get_slate.php | 72 + .../get_vod_ad_tag_detail.php | 78 + .../get_vod_session.php | 77 + .../get_vod_stitch_detail.php | 78 + .../list_cdn_keys.php | 77 + .../list_live_ad_tag_details.php | 81 + .../list_live_configs.php | 78 + .../list_slates.php | 77 + .../list_vod_ad_tag_details.php | 81 + .../list_vod_stitch_details.php | 82 + .../update_cdn_key.php | 75 + .../update_slate.php | 74 + .../VideoStitcherServiceBaseClient.php | 1052 ++++ .../V1/Client/VideoStitcherServiceClient.php | 40 + .../Gapic/VideoStitcherServiceGapicClient.php | 2057 +++++++ .../v1/src/V1/VideoStitcherServiceClient.php | 34 + .../v1/src/V1/gapic_metadata.json | 138 + .../video_stitcher_service_client_config.json | 164 + ...deo_stitcher_service_descriptor_config.php | 413 ++ ...eo_stitcher_service_rest_client_config.php | 344 ++ .../Client/VideoStitcherServiceClientTest.php | 2363 ++++++++ .../V1/VideoStitcherServiceClientTest.php | 2147 +++++++ .../Cloud/Video/Transcoder/V1/Resources.php | Bin 0 -> 9456 bytes .../Cloud/Video/Transcoder/V1/Services.php | 90 + .../Cloud/Video/Transcoder/V1/AdBreak.php | 81 + .../Cloud/Video/Transcoder/V1/AudioStream.php | 389 ++ .../V1/AudioStream/AudioMapping.php | 248 + .../Video/Transcoder/V1/CreateJobRequest.php | 132 + .../V1/CreateJobTemplateRequest.php | 184 + .../Video/Transcoder/V1/DeleteJobRequest.php | 124 + .../V1/DeleteJobTemplateRequest.php | 124 + .../Cloud/Video/Transcoder/V1/EditAtom.php | 209 + .../Video/Transcoder/V1/ElementaryStream.php | 177 + .../Video/Transcoder/V1/GetJobRequest.php | 86 + .../Transcoder/V1/GetJobTemplateRequest.php | 91 + .../Cloud/Video/Transcoder/V1/Input.php | 165 + .../Google/Cloud/Video/Transcoder/V1/Job.php | 588 ++ .../Transcoder/V1/Job/ProcessingMode.php | 67 + .../Transcoder/V1/Job/ProcessingState.php | 79 + .../Cloud/Video/Transcoder/V1/JobConfig.php | 405 ++ .../Cloud/Video/Transcoder/V1/JobTemplate.php | 157 + .../Transcoder/V1/ListJobTemplatesRequest.php | 234 + .../V1/ListJobTemplatesResponse.php | 135 + .../Video/Transcoder/V1/ListJobsRequest.php | 230 + .../Video/Transcoder/V1/ListJobsResponse.php | 135 + .../Cloud/Video/Transcoder/V1/Manifest.php | 155 + .../Transcoder/V1/Manifest/ManifestType.php | 64 + .../Cloud/Video/Transcoder/V1/MuxStream.php | 261 + .../Cloud/Video/Transcoder/V1/Output.php | 79 + .../Cloud/Video/Transcoder/V1/Overlay.php | 115 + .../Video/Transcoder/V1/Overlay/Animation.php | 144 + .../Transcoder/V1/Overlay/AnimationEnd.php | 82 + .../Transcoder/V1/Overlay/AnimationFade.php | 222 + .../Transcoder/V1/Overlay/AnimationStatic.php | 140 + .../Video/Transcoder/V1/Overlay/FadeType.php | 64 + .../Video/Transcoder/V1/Overlay/Image.php | 168 + .../V1/Overlay/NormalizedCoordinate.php | 104 + .../Transcoder/V1/PreprocessingConfig.php | 341 ++ .../V1/PreprocessingConfig/Audio.php | 182 + .../V1/PreprocessingConfig/Color.php | 163 + .../V1/PreprocessingConfig/Crop.php | 173 + .../V1/PreprocessingConfig/Deblock.php | 113 + .../V1/PreprocessingConfig/Deinterlace.php | 111 + .../Deinterlace/BwdifConfig.php | 178 + .../Deinterlace/YadifConfig.php | 216 + .../V1/PreprocessingConfig/Denoise.php | 121 + .../Transcoder/V1/PreprocessingConfig/Pad.php | 173 + .../Video/Transcoder/V1/PubsubDestination.php | 71 + .../Video/Transcoder/V1/SegmentSettings.php | 123 + .../Cloud/Video/Transcoder/V1/SpriteSheet.php | 575 ++ .../Cloud/Video/Transcoder/V1/TextStream.php | 209 + .../Transcoder/V1/TextStream/TextMapping.php | 142 + .../V1/TranscoderServiceGrpcClient.php | 160 + .../Cloud/Video/Transcoder/V1/VideoStream.php | 141 + .../V1/VideoStream/H264CodecSettings.php | 994 ++++ .../V1/VideoStream/H265CodecSettings.php | 1008 ++++ .../V1/VideoStream/Vp9CodecSettings.php | 570 ++ .../V1/TranscoderServiceClient/create_job.php | 74 + .../create_job_template.php | 81 + .../V1/TranscoderServiceClient/delete_job.php | 70 + .../delete_job_template.php | 74 + .../V1/TranscoderServiceClient/get_job.php | 72 + .../get_job_template.php | 77 + .../list_job_templates.php | 77 + .../V1/TranscoderServiceClient/list_jobs.php | 76 + .../TranscoderServiceBaseClient.php | 459 ++ .../src/V1/Client/TranscoderServiceClient.php | 40 + .../V1/Gapic/TranscoderServiceGapicClient.php | 751 +++ .../v1/src/V1/TranscoderServiceClient.php | 34 + .../v1/src/V1/gapic_metadata.json | 58 + .../transcoder_service_client_config.json | 84 + .../transcoder_service_descriptor_config.php | 125 + .../transcoder_service_rest_client_config.php | 102 + .../V1/Client/TranscoderServiceClientTest.php | 670 +++ .../Unit/V1/TranscoderServiceClientTest.php | 583 ++ .../Google/Cloud/Vision/V1/Geometry.php | 40 + .../Google/Cloud/Vision/V1/ImageAnnotator.php | Bin 0 -> 11157 bytes .../Google/Cloud/Vision/V1/ProductSearch.php | 55 + .../Cloud/Vision/V1/ProductSearchService.php | Bin 0 -> 9855 bytes .../Google/Cloud/Vision/V1/TextAnnotation.php | Bin 0 -> 2489 bytes .../Google/Cloud/Vision/V1/WebDetection.php | 51 + .../V1/AddProductToProductSetRequest.php | 140 + .../Cloud/Vision/V1/AnnotateFileRequest.php | 225 + .../Cloud/Vision/V1/AnnotateFileResponse.php | 198 + .../Cloud/Vision/V1/AnnotateImageRequest.php | 156 + .../Cloud/Vision/V1/AnnotateImageResponse.php | 617 ++ .../Vision/V1/AsyncAnnotateFileRequest.php | 199 + .../Vision/V1/AsyncAnnotateFileResponse.php | 77 + .../V1/AsyncBatchAnnotateFilesRequest.php | 143 + .../V1/AsyncBatchAnnotateFilesResponse.php | 71 + .../V1/AsyncBatchAnnotateImagesRequest.php | 188 + .../V1/AsyncBatchAnnotateImagesResponse.php | 77 + .../Vision/V1/BatchAnnotateFilesRequest.php | 147 + .../Vision/V1/BatchAnnotateFilesResponse.php | 71 + .../Vision/V1/BatchAnnotateImagesRequest.php | 142 + .../Vision/V1/BatchAnnotateImagesResponse.php | 67 + .../Vision/V1/BatchOperationMetadata.php | 161 + .../V1/BatchOperationMetadata/State.php | 81 + .../src/Google/Cloud/Vision/V1/Block.php | 279 + .../Cloud/Vision/V1/Block/BlockType.php | 85 + .../Google/Cloud/Vision/V1/BoundingPoly.php | 101 + .../src/Google/Cloud/Vision/V1/ColorInfo.php | 150 + .../Cloud/Vision/V1/CreateProductRequest.php | 189 + .../Vision/V1/CreateProductSetRequest.php | 184 + .../Vision/V1/CreateReferenceImageRequest.php | 194 + .../src/Google/Cloud/Vision/V1/CropHint.php | 153 + .../Cloud/Vision/V1/CropHintsAnnotation.php | 67 + .../Cloud/Vision/V1/CropHintsParams.php | 87 + .../Cloud/Vision/V1/DeleteProductRequest.php | 92 + .../Vision/V1/DeleteProductSetRequest.php | 92 + .../Vision/V1/DeleteReferenceImageRequest.php | 92 + .../Vision/V1/DominantColorsAnnotation.php | 67 + .../Cloud/Vision/V1/EntityAnnotation.php | 422 ++ .../Google/Cloud/Vision/V1/FaceAnnotation.php | 627 ++ .../Vision/V1/FaceAnnotation/Landmark.php | 114 + .../V1/FaceAnnotation/Landmark/Type.php | 305 + .../src/Google/Cloud/Vision/V1/Feature.php | 153 + .../Google/Cloud/Vision/V1/Feature/Type.php | 139 + .../Google/Cloud/Vision/V1/GcsDestination.php | 135 + .../src/Google/Cloud/Vision/V1/GcsSource.php | 71 + .../Cloud/Vision/V1/GetProductRequest.php | 92 + .../Cloud/Vision/V1/GetProductSetRequest.php | 92 + .../Vision/V1/GetReferenceImageRequest.php | 92 + .../src/Google/Cloud/Vision/V1/Image.php | 135 + .../Vision/V1/ImageAnnotationContext.php | 106 + .../Vision/V1/ImageAnnotatorGrpcClient.php | 116 + .../Google/Cloud/Vision/V1/ImageContext.php | 315 + .../Cloud/Vision/V1/ImageProperties.php | 77 + .../Google/Cloud/Vision/V1/ImageSource.php | 169 + .../Vision/V1/ImportProductSetsGcsSource.php | 252 + .../V1/ImportProductSetsInputConfig.php | 78 + .../Vision/V1/ImportProductSetsRequest.php | 133 + .../Vision/V1/ImportProductSetsResponse.php | 120 + .../Google/Cloud/Vision/V1/InputConfig.php | 165 + .../Google/Cloud/Vision/V1/LatLongRect.php | 121 + .../src/Google/Cloud/Vision/V1/Likelihood.php | 83 + .../Vision/V1/ListProductSetsRequest.php | 155 + .../Vision/V1/ListProductSetsResponse.php | 105 + .../V1/ListProductsInProductSetRequest.php | 160 + .../V1/ListProductsInProductSetResponse.php | 105 + .../Cloud/Vision/V1/ListProductsRequest.php | 160 + .../Cloud/Vision/V1/ListProductsResponse.php | 105 + .../Vision/V1/ListReferenceImagesRequest.php | 168 + .../Vision/V1/ListReferenceImagesResponse.php | 135 + .../Vision/V1/LocalizedObjectAnnotation.php | 221 + .../Google/Cloud/Vision/V1/LocationInfo.php | 77 + .../Cloud/Vision/V1/NormalizedVertex.php | 103 + .../Cloud/Vision/V1/OperationMetadata.php | 155 + .../Vision/V1/OperationMetadata/State.php | 78 + .../Google/Cloud/Vision/V1/OutputConfig.php | 143 + .../proto/src/Google/Cloud/Vision/V1/Page.php | 221 + .../src/Google/Cloud/Vision/V1/Paragraph.php | 245 + .../src/Google/Cloud/Vision/V1/Position.php | 137 + .../src/Google/Cloud/Vision/V1/Product.php | 271 + .../Cloud/Vision/V1/Product/KeyValue.php | 112 + .../Vision/V1/ProductSearchGrpcClient.php | 470 ++ .../Cloud/Vision/V1/ProductSearchParams.php | 239 + .../Cloud/Vision/V1/ProductSearchResults.php | 165 + .../V1/ProductSearchResults/GroupedResult.php | 149 + .../ProductSearchResults/ObjectAnnotation.php | 180 + .../Vision/V1/ProductSearchResults/Result.php | 156 + .../src/Google/Cloud/Vision/V1/ProductSet.php | 231 + .../Cloud/Vision/V1/ProductSetPurgeConfig.php | 75 + .../src/Google/Cloud/Vision/V1/Property.php | 135 + .../Cloud/Vision/V1/PurgeProductsRequest.php | 203 + .../Google/Cloud/Vision/V1/ReferenceImage.php | 176 + .../V1/RemoveProductFromProductSetRequest.php | 140 + .../Cloud/Vision/V1/SafeSearchAnnotation.php | 233 + .../src/Google/Cloud/Vision/V1/Symbol.php | 245 + .../Google/Cloud/Vision/V1/TextAnnotation.php | 107 + .../V1/TextAnnotation/DetectedBreak.php | 104 + .../DetectedBreak/BreakType.php | 86 + .../V1/TextAnnotation/DetectedLanguage.php | 112 + .../Vision/V1/TextAnnotation/TextProperty.php | 114 + .../Cloud/Vision/V1/TextDetectionParams.php | 110 + .../Cloud/Vision/V1/UpdateProductRequest.php | 161 + .../Vision/V1/UpdateProductSetRequest.php | 151 + .../src/Google/Cloud/Vision/V1/Vertex.php | 102 + .../Google/Cloud/Vision/V1/WebDetection.php | 253 + .../Vision/V1/WebDetection/WebEntity.php | 142 + .../Cloud/Vision/V1/WebDetection/WebImage.php | 104 + .../Cloud/Vision/V1/WebDetection/WebLabel.php | 112 + .../Cloud/Vision/V1/WebDetection/WebPage.php | 222 + .../Cloud/Vision/V1/WebDetectionParams.php | 67 + .../proto/src/Google/Cloud/Vision/V1/Word.php | 249 + .../async_batch_annotate_files.php | 74 + .../async_batch_annotate_images.php | 79 + .../batch_annotate_files.php | 63 + .../batch_annotate_images.php | 57 + .../add_product_to_product_set.php | 80 + .../V1/ProductSearchClient/create_product.php | 79 + .../create_product_set.php | 76 + .../create_reference_image.php | 95 + .../V1/ProductSearchClient/delete_product.php | 71 + .../delete_product_set.php | 70 + .../delete_reference_image.php | 78 + .../V1/ProductSearchClient/get_product.php | 73 + .../ProductSearchClient/get_product_set.php | 73 + .../get_reference_image.php | 78 + .../import_product_sets.php | 94 + .../ProductSearchClient/list_product_sets.php | 78 + .../V1/ProductSearchClient/list_products.php | 78 + .../list_products_in_product_set.php | 80 + .../list_reference_images.php | 80 + .../V1/ProductSearchClient/purge_products.php | 100 + .../remove_product_from_product_set.php | 75 + .../V1/ProductSearchClient/update_product.php | 70 + .../update_product_set.php | 63 + .../BaseClient/ImageAnnotatorBaseClient.php | 376 ++ .../BaseClient/ProductSearchBaseClient.php | 945 +++ .../V1/src/V1/Client/ImageAnnotatorClient.php | 40 + .../V1/src/V1/Client/ProductSearchClient.php | 40 + .../V1/Gapic/ImageAnnotatorGapicClient.php | 614 ++ .../src/V1/Gapic/ProductSearchGapicClient.php | 1590 +++++ .../Vision/V1/src/V1/ImageAnnotatorClient.php | 34 + .../Vision/V1/src/V1/ProductSearchClient.php | 34 + .../Vision/V1/src/V1/gapic_metadata.json | 142 + .../image_annotator_client_config.json | 55 + .../image_annotator_descriptor_config.php | 73 + .../image_annotator_rest_client_config.php | 132 + .../product_search_client_config.json | 140 + .../product_search_descriptor_config.php | 290 + .../product_search_rest_client_config.php | 256 + .../V1/Client/ImageAnnotatorClientTest.php | 509 ++ .../V1/Client/ProductSearchClientTest.php | 1540 +++++ .../Unit/V1/ImageAnnotatorClientTest.php | 423 ++ .../tests/Unit/V1/ProductSearchClientTest.php | 1403 +++++ .../Cloud/Vmmigration/V1/Vmmigration.php | Bin 0 -> 37746 bytes .../Cloud/VMMigration/V1/AdaptingOSStep.php | 33 + .../V1/AddGroupMigrationRequest.php | 115 + .../V1/AddGroupMigrationResponse.php | 33 + .../Cloud/VMMigration/V1/ApplianceVersion.php | 169 + .../Cloud/VMMigration/V1/AppliedLicense.php | 101 + .../VMMigration/V1/AppliedLicense/Type.php | 71 + .../Cloud/VMMigration/V1/AvailableUpdates.php | 137 + .../Cloud/VMMigration/V1/AwsSecurityGroup.php | 101 + .../Cloud/VMMigration/V1/AwsSourceDetails.php | 348 ++ .../AwsSourceDetails/AccessKeyCredentials.php | 104 + .../VMMigration/V1/AwsSourceDetails/State.php | 74 + .../VMMigration/V1/AwsSourceDetails/Tag.php | 104 + .../VMMigration/V1/AwsSourceVmDetails.php | 101 + .../V1/AwsSourceVmDetails/Firmware.php | 64 + .../Cloud/VMMigration/V1/AwsVmDetails.php | 645 +++ .../V1/AwsVmDetails/BootOption.php | 64 + .../V1/AwsVmDetails/PowerState.php | 79 + .../V1/AwsVmDetails/VmArchitecture.php | 78 + .../V1/AwsVmDetails/VmVirtualizationType.php | 64 + .../Cloud/VMMigration/V1/AwsVmsDetails.php | 67 + .../VMMigration/V1/CancelCloneJobRequest.php | 81 + .../VMMigration/V1/CancelCloneJobResponse.php | 33 + .../V1/CancelCutoverJobRequest.php | 81 + .../V1/CancelCutoverJobResponse.php | 33 + .../Google/Cloud/VMMigration/V1/CloneJob.php | 370 ++ .../Cloud/VMMigration/V1/CloneJob/State.php | 100 + .../Google/Cloud/VMMigration/V1/CloneStep.php | 229 + .../V1/ComputeEngineBootOption.php | 61 + .../VMMigration/V1/ComputeEngineDiskType.php | 69 + .../V1/ComputeEngineLicenseType.php | 61 + .../V1/ComputeEngineTargetDefaults.php | 674 +++ .../V1/ComputeEngineTargetDetails.php | 670 +++ .../VMMigration/V1/ComputeScheduling.php | 206 + .../ComputeScheduling/OnHostMaintenance.php | 62 + .../V1/ComputeScheduling/RestartType.php | 67 + .../VMMigration/V1/CreateCloneJobRequest.php | 237 + .../V1/CreateCutoverJobRequest.php | 237 + .../V1/CreateDatacenterConnectorRequest.php | 252 + .../VMMigration/V1/CreateGroupRequest.php | 237 + .../V1/CreateMigratingVmRequest.php | 237 + .../VMMigration/V1/CreateSourceRequest.php | 237 + .../V1/CreateTargetProjectRequest.php | 237 + .../V1/CreateUtilizationReportRequest.php | 258 + .../Cloud/VMMigration/V1/CutoverJob.php | 435 ++ .../Cloud/VMMigration/V1/CutoverJob/State.php | 100 + .../Cloud/VMMigration/V1/CutoverStep.php | 295 + .../Google/Cloud/VMMigration/V1/CycleStep.php | 229 + .../VMMigration/V1/DatacenterConnector.php | 620 ++ .../V1/DatacenterConnector/State.php | 81 + .../V1/DeleteDatacenterConnectorRequest.php | 155 + .../VMMigration/V1/DeleteGroupRequest.php | 155 + .../V1/DeleteMigratingVmRequest.php | 81 + .../VMMigration/V1/DeleteSourceRequest.php | 155 + .../V1/DeleteTargetProjectRequest.php | 155 + .../V1/DeleteUtilizationReportRequest.php | 155 + .../VMMigration/V1/FetchInventoryRequest.php | 120 + .../VMMigration/V1/FetchInventoryResponse.php | 157 + .../V1/FinalizeMigrationRequest.php | 81 + .../V1/FinalizeMigrationResponse.php | 33 + .../VMMigration/V1/GetCloneJobRequest.php | 81 + .../VMMigration/V1/GetCutoverJobRequest.php | 81 + .../V1/GetDatacenterConnectorRequest.php | 81 + .../Cloud/VMMigration/V1/GetGroupRequest.php | 81 + .../VMMigration/V1/GetMigratingVmRequest.php | 115 + .../V1/GetReplicationCycleRequest.php | 81 + .../Cloud/VMMigration/V1/GetSourceRequest.php | 81 + .../V1/GetTargetProjectRequest.php | 81 + .../V1/GetUtilizationReportRequest.php | 119 + .../src/Google/Cloud/VMMigration/V1/Group.php | 224 + .../V1/InitializingReplicationStep.php | 33 + .../V1/InstantiatingMigratedVMStep.php | 33 + .../VMMigration/V1/ListCloneJobsRequest.php | 241 + .../VMMigration/V1/ListCloneJobsResponse.php | 139 + .../VMMigration/V1/ListCutoverJobsRequest.php | 241 + .../V1/ListCutoverJobsResponse.php | 139 + .../V1/ListDatacenterConnectorsRequest.php | 245 + .../V1/ListDatacenterConnectorsResponse.php | 139 + .../VMMigration/V1/ListGroupsRequest.php | 241 + .../VMMigration/V1/ListGroupsResponse.php | 139 + .../V1/ListMigratingVmsRequest.php | 275 + .../V1/ListMigratingVmsResponse.php | 139 + .../V1/ListReplicationCyclesRequest.php | 241 + .../V1/ListReplicationCyclesResponse.php | 139 + .../VMMigration/V1/ListSourcesRequest.php | 241 + .../VMMigration/V1/ListSourcesResponse.php | 139 + .../V1/ListTargetProjectsRequest.php | 241 + .../V1/ListTargetProjectsResponse.php | 139 + .../V1/ListUtilizationReportsRequest.php | 279 + .../V1/ListUtilizationReportsResponse.php | 139 + .../Cloud/VMMigration/V1/MigratingVm.php | 796 +++ .../VMMigration/V1/MigratingVm/State.php | 133 + .../Cloud/VMMigration/V1/MigratingVmView.php | 63 + .../Cloud/VMMigration/V1/MigrationError.php | 239 + .../V1/MigrationError/ErrorCode.php | 115 + .../Cloud/VMMigration/V1/NetworkInterface.php | 177 + .../VMMigration/V1/OperationMetadata.php | 307 + .../VMMigration/V1/PauseMigrationRequest.php | 67 + .../VMMigration/V1/PauseMigrationResponse.php | 33 + .../VMMigration/V1/PostProcessingStep.php | 33 + .../VMMigration/V1/PreparingVMDisksStep.php | 33 + .../V1/RemoveGroupMigrationRequest.php | 115 + .../V1/RemoveGroupMigrationResponse.php | 33 + .../Cloud/VMMigration/V1/ReplicatingStep.php | 177 + .../Cloud/VMMigration/V1/ReplicationCycle.php | 393 ++ .../VMMigration/V1/ReplicationCycle/State.php | 79 + .../Cloud/VMMigration/V1/ReplicationSync.php | 81 + .../VMMigration/V1/ResumeMigrationRequest.php | 67 + .../V1/ResumeMigrationResponse.php | 33 + .../Cloud/VMMigration/V1/SchedulePolicy.php | 119 + .../VMMigration/V1/SchedulingNodeAffinity.php | 141 + .../V1/SchedulingNodeAffinity/Operator.php | 65 + .../V1/ShuttingDownSourceVMStep.php | 33 + .../Google/Cloud/VMMigration/V1/Source.php | 299 + .../VMMigration/V1/StartMigrationRequest.php | 81 + .../VMMigration/V1/StartMigrationResponse.php | 33 + .../Cloud/VMMigration/V1/TargetProject.php | 228 + .../VMMigration/V1/UpdateGroupRequest.php | 230 + .../V1/UpdateMigratingVmRequest.php | 230 + .../VMMigration/V1/UpdateSourceRequest.php | 230 + .../V1/UpdateTargetProjectRequest.php | 230 + .../V1/UpgradeApplianceRequest.php | 141 + .../V1/UpgradeApplianceResponse.php | 33 + .../Cloud/VMMigration/V1/UpgradeStatus.php | 223 + .../VMMigration/V1/UpgradeStatus/State.php | 71 + .../VMMigration/V1/UtilizationReport.php | 446 ++ .../V1/UtilizationReport/State.php | 71 + .../V1/UtilizationReport/TimeFrame.php | 71 + .../VMMigration/V1/UtilizationReportView.php | 64 + .../VMMigration/V1/VmMigrationGrpcClient.php | 754 +++ .../VMMigration/V1/VmUtilizationInfo.php | 153 + .../VMMigration/V1/VmUtilizationMetrics.php | 313 + .../VMMigration/V1/VmwareSourceDetails.php | 174 + .../Cloud/VMMigration/V1/VmwareVmDetails.php | 453 ++ .../V1/VmwareVmDetails/BootOption.php | 64 + .../V1/VmwareVmDetails/PowerState.php | 71 + .../Cloud/VMMigration/V1/VmwareVmsDetails.php | 67 + .../VmMigrationClient/add_group_migration.php | 83 + .../V1/VmMigrationClient/cancel_clone_job.php | 89 + .../VmMigrationClient/cancel_cutover_job.php | 89 + .../V1/VmMigrationClient/create_clone_job.php | 93 + .../VmMigrationClient/create_cutover_job.php | 95 + .../create_datacenter_connector.php | 93 + .../V1/VmMigrationClient/create_group.php | 88 + .../VmMigrationClient/create_migrating_vm.php | 88 + .../V1/VmMigrationClient/create_source.php | 88 + .../create_target_project.php | 91 + .../create_utilization_report.php | 95 + .../delete_datacenter_connector.php | 85 + .../V1/VmMigrationClient/delete_group.php | 80 + .../VmMigrationClient/delete_migrating_vm.php | 85 + .../V1/VmMigrationClient/delete_source.php | 80 + .../delete_target_project.php | 87 + .../delete_utilization_report.php | 85 + .../V1/VmMigrationClient/fetch_inventory.php | 75 + .../VmMigrationClient/finalize_migration.php | 89 + .../V1/VmMigrationClient/get_clone_job.php | 77 + .../V1/VmMigrationClient/get_cutover_job.php | 77 + .../get_datacenter_connector.php | 76 + .../V1/VmMigrationClient/get_group.php | 71 + .../V1/VmMigrationClient/get_location.php | 57 + .../V1/VmMigrationClient/get_migrating_vm.php | 76 + .../get_replication_cycle.php | 77 + .../V1/VmMigrationClient/get_source.php | 71 + .../VmMigrationClient/get_target_project.php | 78 + .../get_utilization_report.php | 76 + .../V1/VmMigrationClient/list_clone_jobs.php | 87 + .../VmMigrationClient/list_cutover_jobs.php | 87 + .../list_datacenter_connectors.php | 82 + .../V1/VmMigrationClient/list_groups.php | 82 + .../V1/VmMigrationClient/list_locations.php | 62 + .../VmMigrationClient/list_migrating_vms.php | 82 + .../list_replication_cycles.php | 87 + .../V1/VmMigrationClient/list_sources.php | 82 + .../list_target_projects.php | 85 + .../list_utilization_reports.php | 82 + .../V1/VmMigrationClient/pause_migration.php | 90 + .../remove_group_migration.php | 83 + .../V1/VmMigrationClient/resume_migration.php | 91 + .../V1/VmMigrationClient/start_migration.php | 89 + .../V1/VmMigrationClient/update_group.php | 71 + .../VmMigrationClient/update_migrating_vm.php | 71 + .../V1/VmMigrationClient/update_source.php | 71 + .../update_target_project.php | 74 + .../VmMigrationClient/upgrade_appliance.php | 89 + .../BaseClient/VmMigrationBaseClient.php | 1729 ++++++ .../v1/src/V1/Client/VmMigrationClient.php | 40 + .../src/V1/Gapic/VmMigrationGapicClient.php | 4092 +++++++++++++ .../v1/src/V1/VmMigrationClient.php | 34 + .../VmMigration/v1/src/V1/gapic_metadata.json | 258 + .../resources/vm_migration_client_config.json | 292 + .../vm_migration_descriptor_config.php | 871 +++ .../vm_migration_rest_client_config.php | 662 +++ .../Unit/V1/Client/VmMigrationClientTest.php | 5156 +++++++++++++++++ .../tests/Unit/V1/VmMigrationClientTest.php | 4806 +++++++++++++++ .../Cloud/Vmwareengine/V1/Vmwareengine.php | Bin 0 -> 14986 bytes .../Vmwareengine/V1/VmwareengineResources.php | Bin 0 -> 6992 bytes .../Google/Cloud/VmwareEngine/V1/Cluster.php | 319 + .../Cloud/VmwareEngine/V1/Cluster/State.php | 87 + .../VmwareEngine/V1/CreateClusterRequest.php | 306 + .../V1/CreateHcxActivationKeyRequest.php | 313 + .../V1/CreateNetworkPolicyRequest.php | 318 + .../V1/CreatePrivateCloudRequest.php | 306 + .../V1/CreateVmwareEngineNetworkRequest.php | 333 ++ .../Cloud/VmwareEngine/V1/Credentials.php | 101 + .../VmwareEngine/V1/DeleteClusterRequest.php | 140 + .../V1/DeleteNetworkPolicyRequest.php | 180 + .../V1/DeletePrivateCloudRequest.php | 262 + .../V1/DeleteVmwareEngineNetworkRequest.php | 226 + .../VmwareEngine/V1/GetClusterRequest.php | 102 + .../V1/GetHcxActivationKeyRequest.php | 101 + .../V1/GetNetworkPolicyRequest.php | 102 + .../VmwareEngine/V1/GetNodeTypeRequest.php | 102 + .../V1/GetPrivateCloudRequest.php | 102 + .../V1/GetVmwareEngineNetworkRequest.php | 102 + .../src/Google/Cloud/VmwareEngine/V1/Hcx.php | 169 + .../Cloud/VmwareEngine/V1/Hcx/State.php | 64 + .../VmwareEngine/V1/HcxActivationKey.php | 236 + .../V1/HcxActivationKey/State.php | 71 + .../VmwareEngine/V1/ListClustersRequest.php | 322 + .../VmwareEngine/V1/ListClustersResponse.php | 144 + .../V1/ListHcxActivationKeysRequest.php | 203 + .../V1/ListHcxActivationKeysResponse.php | 144 + .../V1/ListNetworkPoliciesRequest.php | 361 ++ .../V1/ListNetworkPoliciesResponse.php | 144 + .../VmwareEngine/V1/ListNodeTypesRequest.php | 312 + .../VmwareEngine/V1/ListNodeTypesResponse.php | 144 + .../V1/ListPrivateCloudsRequest.php | 362 ++ .../V1/ListPrivateCloudsResponse.php | 144 + .../VmwareEngine/V1/ListSubnetsRequest.php | 199 + .../VmwareEngine/V1/ListSubnetsResponse.php | 106 + .../V1/ListVmwareEngineNetworksRequest.php | 357 ++ .../V1/ListVmwareEngineNetworksResponse.php | 140 + .../Cloud/VmwareEngine/V1/NetworkConfig.php | 214 + .../Cloud/VmwareEngine/V1/NetworkPolicy.php | 470 ++ .../V1/NetworkPolicy/NetworkService.php | 112 + .../V1/NetworkPolicy/NetworkService/State.php | 72 + .../Google/Cloud/VmwareEngine/V1/NodeType.php | 329 ++ .../Cloud/VmwareEngine/V1/NodeTypeConfig.php | 113 + .../src/Google/Cloud/VmwareEngine/V1/Nsx.php | 169 + .../Cloud/VmwareEngine/V1/Nsx/State.php | 64 + .../VmwareEngine/V1/OperationMetadata.php | 311 + .../Cloud/VmwareEngine/V1/PrivateCloud.php | 601 ++ .../V1/PrivateCloud/ManagementCluster.php | 136 + .../VmwareEngine/V1/PrivateCloud/State.php | 94 + .../V1/ResetNsxCredentialsRequest.php | 185 + .../V1/ResetVcenterCredentialsRequest.php | 185 + .../V1/ShowNsxCredentialsRequest.php | 107 + .../V1/ShowVcenterCredentialsRequest.php | 107 + .../Google/Cloud/VmwareEngine/V1/Subnet.php | 228 + .../Cloud/VmwareEngine/V1/Subnet/State.php | 78 + .../V1/UndeletePrivateCloudRequest.php | 140 + .../VmwareEngine/V1/UpdateClusterRequest.php | 233 + .../V1/UpdateNetworkPolicyRequest.php | 235 + .../V1/UpdatePrivateCloudRequest.php | 195 + .../V1/UpdateVmwareEngineNetworkRequest.php | 240 + .../Google/Cloud/VmwareEngine/V1/Vcenter.php | 169 + .../Cloud/VmwareEngine/V1/Vcenter/State.php | 64 + .../V1/VmwareEngineGrpcClient.php | 566 ++ .../VmwareEngine/V1/VmwareEngineNetwork.php | 396 ++ .../V1/VmwareEngineNetwork/State.php | 78 + .../V1/VmwareEngineNetwork/Type.php | 59 + .../V1/VmwareEngineNetwork/VpcNetwork.php | 117 + .../VmwareEngineNetwork/VpcNetwork/Type.php | 76 + .../V1/VmwareEngineClient/create_cluster.php | 111 + .../create_hcx_activation_key.php | 108 + .../create_network_policy.php | 115 + .../create_private_cloud.php | 139 + .../create_vmware_engine_network.php | 118 + .../V1/VmwareEngineClient/delete_cluster.php | 92 + .../delete_network_policy.php | 90 + .../delete_private_cloud.php | 101 + .../delete_vmware_engine_network.php | 91 + .../V1/VmwareEngineClient/get_cluster.php | 80 + .../get_hcx_activation_key.php | 80 + .../V1/VmwareEngineClient/get_iam_policy.php | 72 + .../V1/VmwareEngineClient/get_location.php | 57 + .../VmwareEngineClient/get_network_policy.php | 79 + .../V1/VmwareEngineClient/get_node_type.php | 75 + .../VmwareEngineClient/get_private_cloud.php | 75 + .../get_vmware_engine_network.php | 82 + .../V1/VmwareEngineClient/list_clusters.php | 84 + .../list_hcx_activation_keys.php | 85 + .../V1/VmwareEngineClient/list_locations.php | 62 + .../list_network_policies.php | 79 + .../V1/VmwareEngineClient/list_node_types.php | 80 + .../list_private_clouds.php | 80 + .../V1/VmwareEngineClient/list_subnets.php | 85 + .../list_vmware_engine_networks.php | 79 + .../reset_nsx_credentials.php | 92 + .../reset_vcenter_credentials.php | 92 + .../V1/VmwareEngineClient/set_iam_policy.php | 77 + .../show_nsx_credentials.php | 80 + .../show_vcenter_credentials.php | 80 + .../test_iam_permissions.php | 84 + .../undelete_private_cloud.php | 90 + .../V1/VmwareEngineClient/update_cluster.php | 83 + .../update_network_policy.php | 101 + .../update_private_cloud.php | 118 + .../update_vmware_engine_network.php | 90 + .../BaseClient/VmwareEngineBaseClient.php | 1408 +++++ .../v1/src/V1/Client/VmwareEngineClient.php | 40 + .../src/V1/Gapic/VmwareEngineGapicClient.php | 3417 +++++++++++ .../v1/src/V1/VmwareEngineClient.php | 34 + .../v1/src/V1/gapic_metadata.json | 198 + .../vmware_engine_client_config.json | 224 + .../vmware_engine_descriptor_config.php | 635 ++ .../vmware_engine_rest_client_config.php | 523 ++ .../Unit/V1/Client/VmwareEngineClientTest.php | 3818 ++++++++++++ .../tests/Unit/V1/VmwareEngineClientTest.php | 3525 +++++++++++ .../Google/Cloud/Vpcaccess/V1/VpcAccess.php | Bin 0 -> 3596 bytes .../Google/Cloud/VpcAccess/V1/Connector.php | 421 ++ .../Cloud/VpcAccess/V1/Connector/State.php | 85 + .../Cloud/VpcAccess/V1/Connector/Subnet.php | 124 + .../VpcAccess/V1/CreateConnectorRequest.php | 168 + .../VpcAccess/V1/DeleteConnectorRequest.php | 81 + .../VpcAccess/V1/GetConnectorRequest.php | 81 + .../VpcAccess/V1/ListConnectorsRequest.php | 149 + .../VpcAccess/V1/ListConnectorsResponse.php | 101 + .../Cloud/VpcAccess/V1/OperationMetadata.php | 197 + .../V1/VpcAccessServiceGrpcClient.php | 99 + .../create_connector.php | 84 + .../delete_connector.php | 76 + .../VpcAccessServiceClient/get_connector.php | 67 + .../list_connectors.php | 71 + .../VpcAccessServiceClient/list_locations.php | 58 + .../BaseClient/VpcAccessServiceBaseClient.php | 398 ++ .../src/V1/Client/VpcAccessServiceClient.php | 40 + .../V1/Gapic/VpcAccessServiceGapicClient.php | 662 +++ .../v1/src/V1/VpcAccessServiceClient.php | 34 + .../VpcAccess/v1/src/V1/gapic_metadata.json | 43 + .../vpc_access_service_client_config.json | 70 + .../vpc_access_service_descriptor_config.php | 103 + .../vpc_access_service_rest_client_config.php | 94 + .../V1/Client/VpcAccessServiceClientTest.php | 646 +++ .../Unit/V1/VpcAccessServiceClientTest.php | 531 ++ .../Google/Cloud/Webrisk/V1/Webrisk.php | Bin 0 -> 6405 bytes .../Cloud/WebRisk/V1/CompressionType.php | 61 + .../V1/ComputeThreatListDiffRequest.php | 193 + .../Constraints.php | 154 + .../V1/ComputeThreatListDiffResponse.php | 315 + .../Checksum.php | 74 + .../ResponseType.php | 66 + .../WebRisk/V1/CreateSubmissionRequest.php | 132 + .../src/Google/Cloud/WebRisk/V1/RawHashes.php | 123 + .../Google/Cloud/WebRisk/V1/RawIndices.php | 67 + .../Cloud/WebRisk/V1/RiceDeltaEncoding.php | 190 + .../Cloud/WebRisk/V1/SearchHashesRequest.php | 137 + .../Cloud/WebRisk/V1/SearchHashesResponse.php | 117 + .../V1/SearchHashesResponse/ThreatHash.php | 160 + .../Cloud/WebRisk/V1/SearchUrisRequest.php | 122 + .../Cloud/WebRisk/V1/SearchUrisResponse.php | 75 + .../V1/SearchUrisResponse/ThreatUri.php | 118 + .../Google/Cloud/WebRisk/V1/Submission.php | 113 + .../Cloud/WebRisk/V1/SubmitUriMetadata.php | 156 + .../WebRisk/V1/SubmitUriMetadata/State.php | 85 + .../Cloud/WebRisk/V1/SubmitUriRequest.php | 203 + .../Cloud/WebRisk/V1/ThreatDiscovery.php | 105 + .../WebRisk/V1/ThreatDiscovery/Platform.php | 78 + .../Cloud/WebRisk/V1/ThreatEntryAdditions.php | 124 + .../Cloud/WebRisk/V1/ThreatEntryRemovals.php | 133 + .../Google/Cloud/WebRisk/V1/ThreatInfo.php | 157 + .../Cloud/WebRisk/V1/ThreatInfo/AbuseType.php | 71 + .../WebRisk/V1/ThreatInfo/Confidence.php | 117 + .../ThreatInfo/Confidence/ConfidenceLevel.php | 71 + .../V1/ThreatInfo/ThreatJustification.php | 104 + .../JustificationLabel.php | 71 + .../Google/Cloud/WebRisk/V1/ThreatType.php | 77 + .../WebRisk/V1/WebRiskServiceGrpcClient.php | 139 + .../compute_threat_list_diff.php | 77 + .../create_submission.php | 80 + .../V1/WebRiskServiceClient/search_hashes.php | 74 + .../V1/WebRiskServiceClient/search_uris.php | 76 + .../V1/WebRiskServiceClient/submit_uri.php | 95 + .../BaseClient/WebRiskServiceBaseClient.php | 403 ++ .../v1/src/V1/Client/WebRiskServiceClient.php | 40 + .../V1/Gapic/WebRiskServiceGapicClient.php | 575 ++ .../v1/src/V1/WebRiskServiceClient.php | 34 + .../WebRisk/v1/src/V1/gapic_metadata.json | 43 + .../web_risk_service_client_config.json | 70 + .../web_risk_service_descriptor_config.php | 54 + .../web_risk_service_rest_client_config.php | 92 + .../V1/Client/WebRiskServiceClientTest.php | 515 ++ .../Unit/V1/WebRiskServiceClientTest.php | 449 ++ .../Google/Cloud/Webrisk/V1Beta1/Webrisk.php | Bin 0 -> 4188 bytes .../Cloud/WebRisk/V1beta1/CompressionType.php | 61 + .../V1beta1/ComputeThreatListDiffRequest.php | 149 + .../Constraints.php | 154 + .../V1beta1/ComputeThreatListDiffResponse.php | 307 + .../Checksum.php | 74 + .../ResponseType.php | 66 + .../Cloud/WebRisk/V1beta1/RawHashes.php | 119 + .../Cloud/WebRisk/V1beta1/RawIndices.php | 67 + .../WebRisk/V1beta1/RiceDeltaEncoding.php | 190 + .../WebRisk/V1beta1/SearchHashesRequest.php | 105 + .../WebRisk/V1beta1/SearchHashesResponse.php | 117 + .../SearchHashesResponse/ThreatHash.php | 160 + .../WebRisk/V1beta1/SearchUrisRequest.php | 101 + .../WebRisk/V1beta1/SearchUrisResponse.php | 75 + .../V1beta1/SearchUrisResponse/ThreatUri.php | 118 + .../WebRisk/V1beta1/ThreatEntryAdditions.php | 124 + .../WebRisk/V1beta1/ThreatEntryRemovals.php | 133 + .../Cloud/WebRisk/V1beta1/ThreatType.php | 69 + .../WebRiskServiceV1Beta1GrpcClient.php | 86 + .../compute_threat_list_diff.php | 70 + .../search_hashes.php | 73 + .../search_uris.php | 71 + .../WebRiskServiceV1Beta1GapicClient.php | 304 + .../V1beta1/WebRiskServiceV1Beta1Client.php | 36 + .../v1beta1/src/V1beta1/gapic_metadata.json | 33 + ...b_risk_service_v1_beta1_client_config.json | 50 + ...isk_service_v1_beta1_descriptor_config.php | 7 + ...sk_service_v1_beta1_rest_client_config.php | 21 + .../WebRiskServiceV1Beta1ClientTest.php | 249 + .../Websecurityscanner/V1/CrawledUrl.php | 32 + .../Cloud/Websecurityscanner/V1/Finding.php | Bin 0 -> 2209 bytes .../Websecurityscanner/V1/FindingAddon.php | Bin 0 -> 2062 bytes .../V1/FindingTypeStats.php | 30 + .../Websecurityscanner/V1/ScanConfig.php | Bin 0 -> 2823 bytes .../Websecurityscanner/V1/ScanConfigError.php | Bin 0 -> 2476 bytes .../Cloud/Websecurityscanner/V1/ScanRun.php | Bin 0 -> 1981 bytes .../V1/ScanRunErrorTrace.php | Bin 0 -> 1453 bytes .../Websecurityscanner/V1/ScanRunLog.php | 39 + .../V1/ScanRunWarningTrace.php | Bin 0 -> 1256 bytes .../V1/WebSecurityScanner.php | 107 + .../WebSecurityScanner/V1/CrawledUrl.php | 141 + .../V1/CreateScanConfigRequest.php | 115 + .../V1/DeleteScanConfigRequest.php | 71 + .../Cloud/WebSecurityScanner/V1/Finding.php | 764 +++ .../V1/Finding/Severity.php | 78 + .../V1/FindingTypeStats.php | 102 + .../Cloud/WebSecurityScanner/V1/Form.php | 101 + .../V1/GetFindingRequest.php | 75 + .../V1/GetScanConfigRequest.php | 71 + .../V1/GetScanRunRequest.php | 75 + .../V1/ListCrawledUrlsRequest.php | 159 + .../V1/ListCrawledUrlsResponse.php | 105 + .../V1/ListFindingTypeStatsRequest.php | 75 + .../V1/ListFindingTypeStatsResponse.php | 67 + .../V1/ListFindingsRequest.php | 205 + .../V1/ListFindingsResponse.php | 105 + .../V1/ListScanConfigsRequest.php | 155 + .../V1/ListScanConfigsResponse.php | 105 + .../V1/ListScanRunsRequest.php | 155 + .../V1/ListScanRunsResponse.php | 105 + .../WebSecurityScanner/V1/OutdatedLibrary.php | 135 + .../WebSecurityScanner/V1/ScanConfig.php | 535 ++ .../V1/ScanConfig/Authentication.php | 149 + .../Authentication/CustomAccount.php | 142 + .../Authentication/GoogleAccount.php | 109 + .../Authentication/IapCredential.php | 81 + .../IapTestServiceAccountInfo.php | 75 + .../ExportToSecurityCommandCenter.php | 65 + .../V1/ScanConfig/RiskLevel.php | 66 + .../V1/ScanConfig/Schedule.php | 126 + .../V1/ScanConfig/UserAgent.php | 71 + .../WebSecurityScanner/V1/ScanConfigError.php | 116 + .../V1/ScanConfigError/Code.php | 355 ++ .../Cloud/WebSecurityScanner/V1/ScanRun.php | 486 ++ .../V1/ScanRun/ExecutionState.php | 72 + .../V1/ScanRun/ResultState.php | 72 + .../V1/ScanRunErrorTrace.php | 162 + .../V1/ScanRunErrorTrace/Code.php | 99 + .../WebSecurityScanner/V1/ScanRunLog.php | 291 + .../V1/ScanRunWarningTrace.php | 69 + .../V1/ScanRunWarningTrace/Code.php | 92 + .../V1/StartScanRunRequest.php | 71 + .../V1/StopScanRunRequest.php | 75 + .../V1/UpdateScanConfigRequest.php | 137 + .../V1/ViolatingResource.php | 102 + .../V1/VulnerableHeaders.php | 101 + .../V1/VulnerableHeaders/Header.php | 104 + .../V1/VulnerableParameters.php | 67 + .../V1/WebSecurityScannerGrpcClient.php | 233 + .../Cloud/WebSecurityScanner/V1/Xss.php | 169 + .../V1/Xss/AttackVector.php | 156 + .../Cloud/WebSecurityScanner/V1/Xxe.php | 105 + .../WebSecurityScanner/V1/Xxe/Location.php | 57 + .../create_scan_config.php | 57 + .../delete_scan_config.php | 55 + .../WebSecurityScannerClient/get_finding.php | 57 + .../get_scan_config.php | 57 + .../WebSecurityScannerClient/get_scan_run.php | 57 + .../list_crawled_urls.php | 62 + .../list_finding_type_stats.php | 57 + .../list_findings.php | 62 + .../list_scan_configs.php | 62 + .../list_scan_runs.php | 63 + .../start_scan_run.php | 57 + .../stop_scan_run.php | 57 + .../update_scan_config.php | 57 + .../WebSecurityScannerBaseClient.php | 503 ++ .../V1/Client/WebSecurityScannerClient.php | 40 + .../v1/src/V1/gapic_metadata.json | 83 + .../web_security_scanner_client_config.json | 110 + ...web_security_scanner_descriptor_config.php | 197 + ...eb_security_scanner_rest_client_config.php | 157 + .../Client/WebSecurityScannerClientTest.php | 944 +++ .../Websecurityscanner/V1Beta/CrawledUrl.php | 32 + .../Websecurityscanner/V1Beta/Finding.php | 49 + .../V1Beta/FindingAddon.php | 49 + .../V1Beta/FindingTypeStats.php | 30 + .../Websecurityscanner/V1Beta/ScanConfig.php | Bin 0 -> 3047 bytes .../V1Beta/ScanConfigError.php | Bin 0 -> 2516 bytes .../Websecurityscanner/V1Beta/ScanRun.php | Bin 0 -> 2280 bytes .../V1Beta/ScanRunErrorTrace.php | Bin 0 -> 1501 bytes .../V1Beta/ScanRunWarningTrace.php | Bin 0 -> 1252 bytes .../V1Beta/WebSecurityScanner.php | 121 + .../WebSecurityScanner/V1beta/CrawledUrl.php | 141 + .../V1beta/CreateScanConfigRequest.php | 115 + .../V1beta/DeleteScanConfigRequest.php | 71 + .../WebSecurityScanner/V1beta/Finding.php | 686 +++ .../V1beta/FindingTypeStats.php | 102 + .../Cloud/WebSecurityScanner/V1beta/Form.php | 101 + .../V1beta/GetFindingRequest.php | 75 + .../V1beta/GetScanConfigRequest.php | 71 + .../V1beta/GetScanRunRequest.php | 75 + .../V1beta/ListCrawledUrlsRequest.php | 159 + .../V1beta/ListCrawledUrlsResponse.php | 105 + .../V1beta/ListFindingTypeStatsRequest.php | 75 + .../V1beta/ListFindingTypeStatsResponse.php | 67 + .../V1beta/ListFindingsRequest.php | 205 + .../V1beta/ListFindingsResponse.php | 105 + .../V1beta/ListScanConfigsRequest.php | 155 + .../V1beta/ListScanConfigsResponse.php | 105 + .../V1beta/ListScanRunsRequest.php | 155 + .../V1beta/ListScanRunsResponse.php | 105 + .../V1beta/OutdatedLibrary.php | 135 + .../WebSecurityScanner/V1beta/ScanConfig.php | 507 ++ .../V1beta/ScanConfig/Authentication.php | 111 + .../Authentication/CustomAccount.php | 142 + .../Authentication/GoogleAccount.php | 108 + .../ExportToSecurityCommandCenter.php | 65 + .../V1beta/ScanConfig/RiskLevel.php | 66 + .../V1beta/ScanConfig/Schedule.php | 126 + .../V1beta/ScanConfig/TargetPlatform.php | 65 + .../V1beta/ScanConfig/UserAgent.php | 71 + .../V1beta/ScanConfigError.php | 116 + .../V1beta/ScanConfigError/Code.php | 355 ++ .../WebSecurityScanner/V1beta/ScanRun.php | 486 ++ .../V1beta/ScanRun/ExecutionState.php | 72 + .../V1beta/ScanRun/ResultState.php | 72 + .../V1beta/ScanRunErrorTrace.php | 162 + .../V1beta/ScanRunErrorTrace/Code.php | 99 + .../V1beta/ScanRunWarningTrace.php | 69 + .../V1beta/ScanRunWarningTrace/Code.php | 85 + .../V1beta/StartScanRunRequest.php | 71 + .../V1beta/StopScanRunRequest.php | 75 + .../V1beta/UpdateScanConfigRequest.php | 137 + .../V1beta/ViolatingResource.php | 102 + .../V1beta/VulnerableHeaders.php | 101 + .../V1beta/VulnerableHeaders/Header.php | 104 + .../V1beta/VulnerableParameters.php | 67 + .../V1beta/WebSecurityScannerGrpcClient.php | 234 + .../Cloud/WebSecurityScanner/V1beta/Xss.php | 101 + .../create_scan_config.php | 80 + .../delete_scan_config.php | 65 + .../WebSecurityScannerClient/get_finding.php | 73 + .../get_scan_config.php | 67 + .../WebSecurityScannerClient/get_scan_run.php | 68 + .../list_crawled_urls.php | 77 + .../list_finding_type_stats.php | 72 + .../list_findings.php | 82 + .../list_scan_configs.php | 72 + .../list_scan_runs.php | 73 + .../start_scan_run.php | 67 + .../stop_scan_run.php | 68 + .../update_scan_config.php | 77 + .../Gapic/WebSecurityScannerGapicClient.php | 1057 ++++ .../src/V1beta/WebSecurityScannerClient.php | 36 + .../v1beta/src/V1beta/gapic_metadata.json | 83 + .../web_security_scanner_client_config.json | 110 + ...web_security_scanner_descriptor_config.php | 48 + ...eb_security_scanner_rest_client_config.php | 163 + .../V1beta/WebSecurityScannerClientTest.php | 960 +++ .../Workflows/Executions/V1/Executions.php | Bin 0 -> 4267 bytes .../Executions/V1/CancelExecutionRequest.php | 93 + .../Executions/V1/CreateExecutionRequest.php | 139 + .../Workflows/Executions/V1/Execution.php | 406 ++ .../Executions/V1/Execution/CallLogLevel.php | 66 + .../Executions/V1/Execution/Error.php | 148 + .../Executions/V1/Execution/StackTrace.php | 70 + .../V1/Execution/StackTraceElement.php | 148 + .../Execution/StackTraceElement/Position.php | 144 + .../Executions/V1/Execution/State.php | 79 + .../Workflows/Executions/V1/ExecutionView.php | 63 + .../Executions/V1/ExecutionsGrpcClient.php | 99 + .../Executions/V1/GetExecutionRequest.php | 131 + .../Executions/V1/ListExecutionsRequest.php | 222 + .../Executions/V1/ListExecutionsResponse.php | 107 + .../V1/ExecutionsClient/cancel_execution.php | 78 + .../V1/ExecutionsClient/create_execution.php | 75 + .../V1/ExecutionsClient/get_execution.php | 78 + .../V1/ExecutionsClient/list_executions.php | 80 + .../BaseClient/ExecutionsBaseClient.php | 341 ++ .../v1/src/V1/Client/ExecutionsClient.php | 40 + .../Executions/v1/src/V1/gapic_metadata.json | 38 + .../resources/executions_client_config.json | 42 + .../executions_descriptor_config.php | 68 + .../executions_rest_client_config.php | 54 + .../Unit/V1/Client/ExecutionsClientTest.php | 389 ++ .../Executions/V1Beta/Executions.php | Bin 0 -> 3803 bytes .../V1beta/CancelExecutionRequest.php | 77 + .../V1beta/CreateExecutionRequest.php | 121 + .../Workflows/Executions/V1beta/Execution.php | 359 ++ .../Executions/V1beta/Execution/Error.php | 104 + .../Executions/V1beta/Execution/State.php | 79 + .../Executions/V1beta/ExecutionView.php | 63 + .../V1beta/ExecutionsGrpcClient.php | 99 + .../Executions/V1beta/GetExecutionRequest.php | 115 + .../V1beta/ListExecutionsRequest.php | 207 + .../V1beta/ListExecutionsResponse.php | 107 + .../ExecutionsClient/cancel_execution.php | 73 + .../ExecutionsClient/create_execution.php | 71 + .../V1beta/ExecutionsClient/get_execution.php | 73 + .../ExecutionsClient/list_executions.php | 75 + .../v1beta/src/V1beta/ExecutionsClient.php | 36 + .../V1beta/Gapic/ExecutionsGapicClient.php | 516 ++ .../v1beta/src/V1beta/gapic_metadata.json | 38 + .../resources/executions_client_config.json | 46 + .../executions_descriptor_config.php | 18 + .../executions_rest_client_config.php | 54 + .../Unit/V1beta/ExecutionsClientTest.php | 332 ++ .../Google/Cloud/Workflows/V1/Workflows.php | Bin 0 -> 3985 bytes .../Workflows/V1/CreateWorkflowRequest.php | 201 + .../Workflows/V1/DeleteWorkflowRequest.php | 88 + .../Cloud/Workflows/V1/GetWorkflowRequest.php | 87 + .../Workflows/V1/ListWorkflowsRequest.php | 260 + .../Workflows/V1/ListWorkflowsResponse.php | 141 + .../Cloud/Workflows/V1/OperationMetadata.php | 223 + .../Workflows/V1/UpdateWorkflowRequest.php | 143 + .../Google/Cloud/Workflows/V1/Workflow.php | 503 ++ .../Cloud/Workflows/V1/Workflow/State.php | 58 + .../Workflows/V1/WorkflowsGrpcClient.php | 121 + .../V1/WorkflowsClient/create_workflow.php | 98 + .../V1/WorkflowsClient/delete_workflow.php | 83 + .../V1/WorkflowsClient/get_workflow.php | 72 + .../V1/WorkflowsClient/list_workflows.php | 78 + .../V1/WorkflowsClient/update_workflow.php | 75 + .../Client/BaseClient/WorkflowsBaseClient.php | 405 ++ .../v1/src/V1/Client/WorkflowsClient.php | 40 + .../Workflows/v1/src/V1/gapic_metadata.json | 43 + .../V1/resources/workflows_client_config.json | 47 + .../resources/workflows_descriptor_config.php | 102 + .../workflows_rest_client_config.php | 129 + .../Unit/V1/Client/WorkflowsClientTest.php | 693 +++ .../Cloud/Workflows/V1Beta/Workflows.php | Bin 0 -> 4084 bytes .../V1beta/CreateWorkflowRequest.php | 175 + .../V1beta/DeleteWorkflowRequest.php | 73 + .../Workflows/V1beta/GetWorkflowRequest.php | 72 + .../Workflows/V1beta/ListWorkflowsRequest.php | 245 + .../V1beta/ListWorkflowsResponse.php | 141 + .../Workflows/V1beta/OperationMetadata.php | 223 + .../V1beta/UpdateWorkflowRequest.php | 127 + .../Cloud/Workflows/V1beta/Workflow.php | 503 ++ .../Cloud/Workflows/V1beta/Workflow/State.php | 58 + .../Workflows/V1beta/WorkflowsGrpcClient.php | 121 + .../WorkflowsClient/create_workflow.php | 93 + .../WorkflowsClient/delete_workflow.php | 78 + .../V1beta/WorkflowsClient/get_workflow.php | 67 + .../V1beta/WorkflowsClient/list_workflows.php | 73 + .../WorkflowsClient/update_workflow.php | 72 + .../src/V1beta/Gapic/WorkflowsGapicClient.php | 714 +++ .../v1beta/src/V1beta/WorkflowsClient.php | 36 + .../v1beta/src/V1beta/gapic_metadata.json | 43 + .../resources/workflows_client_config.json | 47 + .../resources/workflows_descriptor_config.php | 48 + .../workflows_rest_client_config.php | 129 + .../tests/Unit/V1beta/WorkflowsClientTest.php | 582 ++ 1113 files changed, 207996 insertions(+) create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Outputs.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Resources.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Service.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioFormat.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream/AudioMapping.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStreamProperty.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/Output.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/StreamingState.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ChannelOperationResponse.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateChannelRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateEventRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateInputRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteChannelRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteEventRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteInputRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ElementaryStream.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Aes128Encryption.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Clearkey.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/DrmSystems.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Fairplay.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/MpegCommonEncryption.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Playready.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SampleAesEncryption.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SecretManagerSource.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Widevine.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/AdBreakTask.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/InputSwitchTask.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/MuteTask.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/ReturnToProgramTask.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/State.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/UnmuteTask.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetChannelRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetEventRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetInputRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/SecurityRule.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Tier.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Type.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment/AutomaticFailover.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig/InputSwitchMode.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputStreamProperty.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsResponse.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsResponse.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsResponse.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LivestreamServiceGrpcClient.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig/LogSeverity.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest/ManifestType.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/MuxStream.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/OperationMetadata.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Audio.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Crop.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Pad.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SegmentSettings.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SpriteSheet.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StartChannelRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StopChannelRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TextStream.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig/TimecodeSource.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateChannelRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateInputRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoFormat.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream/H264CodecSettings.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStreamProperty.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_channel.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_event.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_input.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_channel.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_event.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_input.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_channel.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_event.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_input.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_location.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_channels.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_events.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_inputs.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_locations.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/start_channel.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/stop_channel.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_channel.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_input.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/Client/BaseClient/LivestreamServiceBaseClient.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/Client/LivestreamServiceClient.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/Gapic/LivestreamServiceGapicClient.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/LivestreamServiceClient.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_client_config.json create mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_descriptor_config.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_rest_client_config.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/tests/Unit/V1/Client/LivestreamServiceClientTest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/tests/Unit/V1/LivestreamServiceClientTest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/AdTagDetails.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/CdnKeys.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Companions.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Events.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/LiveConfigs.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Sessions.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Slates.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/StitchDetails.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/VideoStitcherService.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdStitchDetail.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdTracking.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AkamaiCdnKey.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CdnKey.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Companion.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds/DisplayRequirement.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateCdnKeyRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveConfigRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveSessionRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateSlateRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodSessionRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteCdnKeyRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteLiveConfigRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteSlateRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event/EventType.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamLiveConfig.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetCdnKeyRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveAdTagDetailRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveConfigRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveSessionRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetSlateRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodAdTagDetailRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodSessionRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodStitchDetailRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GoogleCdnKey.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/HtmlAdResource.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/IframeAdResource.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Interstitials.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysResponse.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsResponse.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsResponse.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesResponse.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsResponse.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsResponse.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveAdTagDetail.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/State.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/StitchingPolicy.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession/GamSettings.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions/OrderPolicy.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/OperationMetadata.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/PrefetchConfig.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ProgressEvent.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RenditionFilter.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RequestMetadata.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ResponseMetadata.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate/GamSlate.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/StaticAdResource.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateCdnKeyRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateSlateRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VideoStitcherServiceGrpcClient.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodAdTagDetail.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession/GamSettings.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAd.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAdBreak.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionContent.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodStitchDetail.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_cdn_key.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_config.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_session.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_slate.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_session.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_cdn_key.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_live_config.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_slate.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_cdn_key.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_ad_tag_detail.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_config.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_session.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_slate.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_ad_tag_detail.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_session.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_stitch_detail.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_cdn_keys.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_ad_tag_details.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_configs.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_slates.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_ad_tag_details.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_stitch_details.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_cdn_key.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_slate.php create mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/Client/BaseClient/VideoStitcherServiceBaseClient.php create mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/Client/VideoStitcherServiceClient.php create mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/Gapic/VideoStitcherServiceGapicClient.php create mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/VideoStitcherServiceClient.php create mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_client_config.json create mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_descriptor_config.php create mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_rest_client_config.php create mode 100644 owl-bot-staging/VideoStitcher/v1/tests/Unit/V1/Client/VideoStitcherServiceClientTest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/tests/Unit/V1/VideoStitcherServiceClientTest.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/GPBMetadata/Google/Cloud/Video/Transcoder/V1/Resources.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/GPBMetadata/Google/Cloud/Video/Transcoder/V1/Services.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AdBreak.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream/AudioMapping.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobRequest.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobTemplateRequest.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobRequest.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobTemplateRequest.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/EditAtom.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ElementaryStream.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobRequest.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobTemplateRequest.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Input.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingMode.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingState.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobConfig.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobTemplate.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesRequest.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesResponse.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsRequest.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsResponse.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/ManifestType.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/MuxStream.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Output.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Animation.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationEnd.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationFade.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationStatic.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/FadeType.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Image.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/NormalizedCoordinate.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Audio.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Color.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Crop.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deblock.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/BwdifConfig.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/YadifConfig.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Denoise.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Pad.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PubsubDestination.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SegmentSettings.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SpriteSheet.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream/TextMapping.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TranscoderServiceGrpcClient.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H264CodecSettings.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H265CodecSettings.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/Vp9CodecSettings.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job_template.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job_template.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job_template.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_job_templates.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_jobs.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/Client/BaseClient/TranscoderServiceBaseClient.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/Client/TranscoderServiceClient.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/Gapic/TranscoderServiceGapicClient.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/TranscoderServiceClient.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_client_config.json create mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_descriptor_config.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_rest_client_config.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/Client/TranscoderServiceClientTest.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/TranscoderServiceClientTest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/Geometry.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ImageAnnotator.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearch.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearchService.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/TextAnnotation.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/WebDetection.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AddProductToProductSetRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata/State.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block/BlockType.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BoundingPoly.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ColorInfo.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductSetRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateReferenceImageRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHint.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsAnnotation.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsParams.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductSetRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteReferenceImageRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DominantColorsAnnotation.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/EntityAnnotation.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark/Type.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature/Type.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsDestination.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsSource.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductSetRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetReferenceImageRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Image.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotationContext.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotatorGrpcClient.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageContext.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageProperties.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageSource.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsGcsSource.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsInputConfig.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/InputConfig.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LatLongRect.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Likelihood.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocalizedObjectAnnotation.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocationInfo.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/NormalizedVertex.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata/State.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OutputConfig.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Page.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Paragraph.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Position.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product/KeyValue.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchGrpcClient.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchParams.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/GroupedResult.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/ObjectAnnotation.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/Result.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSet.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSetPurgeConfig.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Property.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/PurgeProductsRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ReferenceImage.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/RemoveProductFromProductSetRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/SafeSearchAnnotation.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Symbol.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak/BreakType.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedLanguage.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/TextProperty.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextDetectionParams.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductSetRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Vertex.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebEntity.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebImage.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebLabel.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebPage.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetectionParams.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Word.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_files.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_images.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_files.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_images.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/add_product_to_product_set.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product_set.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_reference_image.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product_set.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_reference_image.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product_set.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_reference_image.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/import_product_sets.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_product_sets.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products_in_product_set.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_reference_images.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/purge_products.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/remove_product_from_product_set.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product_set.php create mode 100644 owl-bot-staging/Vision/V1/src/V1/Client/BaseClient/ImageAnnotatorBaseClient.php create mode 100644 owl-bot-staging/Vision/V1/src/V1/Client/BaseClient/ProductSearchBaseClient.php create mode 100644 owl-bot-staging/Vision/V1/src/V1/Client/ImageAnnotatorClient.php create mode 100644 owl-bot-staging/Vision/V1/src/V1/Client/ProductSearchClient.php create mode 100644 owl-bot-staging/Vision/V1/src/V1/Gapic/ImageAnnotatorGapicClient.php create mode 100644 owl-bot-staging/Vision/V1/src/V1/Gapic/ProductSearchGapicClient.php create mode 100644 owl-bot-staging/Vision/V1/src/V1/ImageAnnotatorClient.php create mode 100644 owl-bot-staging/Vision/V1/src/V1/ProductSearchClient.php create mode 100644 owl-bot-staging/Vision/V1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_client_config.json create mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_descriptor_config.php create mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_rest_client_config.php create mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/product_search_client_config.json create mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/product_search_descriptor_config.php create mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/product_search_rest_client_config.php create mode 100644 owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ImageAnnotatorClientTest.php create mode 100644 owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ProductSearchClientTest.php create mode 100644 owl-bot-staging/Vision/V1/tests/Unit/V1/ImageAnnotatorClientTest.php create mode 100644 owl-bot-staging/Vision/V1/tests/Unit/V1/ProductSearchClientTest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/GPBMetadata/Google/Cloud/Vmmigration/V1/Vmmigration.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AdaptingOSStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ApplianceVersion.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense/Type.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AvailableUpdates.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSecurityGroup.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/AccessKeyCredentials.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/State.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/Tag.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails/Firmware.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/BootOption.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/PowerState.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmArchitecture.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmVirtualizationType.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmsDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob/State.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineBootOption.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDiskType.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineLicenseType.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDefaults.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/OnHostMaintenance.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/RestartType.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCloneJobRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCutoverJobRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateDatacenterConnectorRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateGroupRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateMigratingVmRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateSourceRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateTargetProjectRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateUtilizationReportRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob/State.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CycleStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector/State.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteDatacenterConnectorRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteGroupRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteMigratingVmRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteSourceRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteTargetProjectRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteUtilizationReportRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCloneJobRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCutoverJobRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetDatacenterConnectorRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetGroupRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetMigratingVmRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetReplicationCycleRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetSourceRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetTargetProjectRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetUtilizationReportRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InitializingReplicationStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InstantiatingMigratedVMStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/State.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVmView.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError/ErrorCode.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/NetworkInterface.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/OperationMetadata.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PostProcessingStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PreparingVMDisksStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicatingStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle/State.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationSync.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulePolicy.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity/Operator.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShuttingDownSourceVMStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Source.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/TargetProject.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateGroupRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateMigratingVmRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateSourceRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateTargetProjectRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus/State.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/State.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/TimeFrame.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReportView.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmMigrationGrpcClient.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationInfo.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationMetrics.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/BootOption.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/PowerState.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmsDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/add_group_migration.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_clone_job.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_cutover_job.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_clone_job.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_cutover_job.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_datacenter_connector.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_group.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_migrating_vm.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_source.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_target_project.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_utilization_report.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_datacenter_connector.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_group.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_migrating_vm.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_source.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_target_project.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_utilization_report.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/fetch_inventory.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/finalize_migration.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_clone_job.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_cutover_job.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_datacenter_connector.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_group.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_location.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_migrating_vm.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_replication_cycle.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_source.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_target_project.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_utilization_report.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_clone_jobs.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_cutover_jobs.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_datacenter_connectors.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_groups.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_locations.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_migrating_vms.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_replication_cycles.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_sources.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_target_projects.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_utilization_reports.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/pause_migration.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/remove_group_migration.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/resume_migration.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/start_migration.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_group.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_migrating_vm.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_source.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_target_project.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/upgrade_appliance.php create mode 100644 owl-bot-staging/VmMigration/v1/src/V1/Client/BaseClient/VmMigrationBaseClient.php create mode 100644 owl-bot-staging/VmMigration/v1/src/V1/Client/VmMigrationClient.php create mode 100644 owl-bot-staging/VmMigration/v1/src/V1/Gapic/VmMigrationGapicClient.php create mode 100644 owl-bot-staging/VmMigration/v1/src/V1/VmMigrationClient.php create mode 100644 owl-bot-staging/VmMigration/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_client_config.json create mode 100644 owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_descriptor_config.php create mode 100644 owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_rest_client_config.php create mode 100644 owl-bot-staging/VmMigration/v1/tests/Unit/V1/Client/VmMigrationClientTest.php create mode 100644 owl-bot-staging/VmMigration/v1/tests/Unit/V1/VmMigrationClientTest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/GPBMetadata/Google/Cloud/Vmwareengine/V1/Vmwareengine.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/GPBMetadata/Google/Cloud/Vmwareengine/V1/VmwareengineResources.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateClusterRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateHcxActivationKeyRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPolicyRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateCloudRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateVmwareEngineNetworkRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Credentials.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteClusterRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPolicyRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateCloudRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteVmwareEngineNetworkRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetClusterRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetHcxActivationKeyRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPolicyRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeTypeRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateCloudRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetVmwareEngineNetworkRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkConfig.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeTypeConfig.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/OperationMetadata.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/ManagementCluster.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetNsxCredentialsRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetVcenterCredentialsRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowNsxCredentialsRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowVcenterCredentialsRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UndeletePrivateCloudRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateClusterRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPolicyRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateCloudRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateVmwareEngineNetworkRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineGrpcClient.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/Type.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork/Type.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_cluster.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_hcx_activation_key.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_policy.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_cloud.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_vmware_engine_network.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_cluster.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_policy.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_cloud.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_vmware_engine_network.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_cluster.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_hcx_activation_key.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_iam_policy.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_location.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_policy.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node_type.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_cloud.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_vmware_engine_network.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_clusters.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_hcx_activation_keys.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_locations.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_policies.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_node_types.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_clouds.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_subnets.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_vmware_engine_networks.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_nsx_credentials.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_vcenter_credentials.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/set_iam_policy.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_nsx_credentials.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_vcenter_credentials.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/test_iam_permissions.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/undelete_private_cloud.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_cluster.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_policy.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_cloud.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_vmware_engine_network.php create mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/Client/BaseClient/VmwareEngineBaseClient.php create mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/Client/VmwareEngineClient.php create mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/Gapic/VmwareEngineGapicClient.php create mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/VmwareEngineClient.php create mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_client_config.json create mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_descriptor_config.php create mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_rest_client_config.php create mode 100644 owl-bot-staging/VmwareEngine/v1/tests/Unit/V1/Client/VmwareEngineClientTest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/tests/Unit/V1/VmwareEngineClientTest.php create mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/GPBMetadata/Google/Cloud/Vpcaccess/V1/VpcAccess.php create mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector.php create mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/State.php create mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/Subnet.php create mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/CreateConnectorRequest.php create mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/DeleteConnectorRequest.php create mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/GetConnectorRequest.php create mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsRequest.php create mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsResponse.php create mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/OperationMetadata.php create mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/VpcAccessServiceGrpcClient.php create mode 100644 owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/create_connector.php create mode 100644 owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/delete_connector.php create mode 100644 owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/get_connector.php create mode 100644 owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_connectors.php create mode 100644 owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_locations.php create mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/Client/BaseClient/VpcAccessServiceBaseClient.php create mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/Client/VpcAccessServiceClient.php create mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/Gapic/VpcAccessServiceGapicClient.php create mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/VpcAccessServiceClient.php create mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_client_config.json create mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_descriptor_config.php create mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_rest_client_config.php create mode 100644 owl-bot-staging/VpcAccess/v1/tests/Unit/V1/Client/VpcAccessServiceClientTest.php create mode 100644 owl-bot-staging/VpcAccess/v1/tests/Unit/V1/VpcAccessServiceClientTest.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/GPBMetadata/Google/Cloud/Webrisk/V1/Webrisk.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/CompressionType.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffRequest.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffRequest/Constraints.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse/Checksum.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse/ResponseType.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/CreateSubmissionRequest.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RawHashes.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RawIndices.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RiceDeltaEncoding.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesRequest.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesResponse.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesResponse/ThreatHash.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisRequest.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisResponse.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisResponse/ThreatUri.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/Submission.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriMetadata.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriMetadata/State.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriRequest.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatDiscovery.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatDiscovery/Platform.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatEntryAdditions.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatEntryRemovals.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/AbuseType.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/Confidence.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/Confidence/ConfidenceLevel.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/ThreatJustification.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/ThreatJustification/JustificationLabel.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatType.php create mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/WebRiskServiceGrpcClient.php create mode 100644 owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/compute_threat_list_diff.php create mode 100644 owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/create_submission.php create mode 100644 owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/search_hashes.php create mode 100644 owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/search_uris.php create mode 100644 owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/submit_uri.php create mode 100644 owl-bot-staging/WebRisk/v1/src/V1/Client/BaseClient/WebRiskServiceBaseClient.php create mode 100644 owl-bot-staging/WebRisk/v1/src/V1/Client/WebRiskServiceClient.php create mode 100644 owl-bot-staging/WebRisk/v1/src/V1/Gapic/WebRiskServiceGapicClient.php create mode 100644 owl-bot-staging/WebRisk/v1/src/V1/WebRiskServiceClient.php create mode 100644 owl-bot-staging/WebRisk/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/WebRisk/v1/src/V1/resources/web_risk_service_client_config.json create mode 100644 owl-bot-staging/WebRisk/v1/src/V1/resources/web_risk_service_descriptor_config.php create mode 100644 owl-bot-staging/WebRisk/v1/src/V1/resources/web_risk_service_rest_client_config.php create mode 100644 owl-bot-staging/WebRisk/v1/tests/Unit/V1/Client/WebRiskServiceClientTest.php create mode 100644 owl-bot-staging/WebRisk/v1/tests/Unit/V1/WebRiskServiceClientTest.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/GPBMetadata/Google/Cloud/Webrisk/V1Beta1/Webrisk.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/CompressionType.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffRequest.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffRequest/Constraints.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse/Checksum.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse/ResponseType.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RawHashes.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RawIndices.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RiceDeltaEncoding.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesRequest.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesResponse.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesResponse/ThreatHash.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisRequest.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisResponse.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisResponse/ThreatUri.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatEntryAdditions.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatEntryRemovals.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatType.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/WebRiskServiceV1Beta1GrpcClient.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/compute_threat_list_diff.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/search_hashes.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/search_uris.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/src/V1beta1/Gapic/WebRiskServiceV1Beta1GapicClient.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/src/V1beta1/WebRiskServiceV1Beta1Client.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/src/V1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/WebRisk/v1beta1/src/V1beta1/resources/web_risk_service_v1_beta1_client_config.json create mode 100644 owl-bot-staging/WebRisk/v1beta1/src/V1beta1/resources/web_risk_service_v1_beta1_descriptor_config.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/src/V1beta1/resources/web_risk_service_v1_beta1_rest_client_config.php create mode 100644 owl-bot-staging/WebRisk/v1beta1/tests/Unit/V1beta1/WebRiskServiceV1Beta1ClientTest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/CrawledUrl.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/Finding.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/FindingAddon.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/FindingTypeStats.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanConfig.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanConfigError.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanRun.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanRunErrorTrace.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanRunLog.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanRunWarningTrace.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/WebSecurityScanner.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/CrawledUrl.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/CreateScanConfigRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/DeleteScanConfigRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Finding.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Finding/Severity.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/FindingTypeStats.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Form.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/GetFindingRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/GetScanConfigRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/GetScanRunRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListCrawledUrlsRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListCrawledUrlsResponse.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingTypeStatsRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingTypeStatsResponse.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingsRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingsResponse.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanConfigsRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanConfigsResponse.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanRunsRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanRunsResponse.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/OutdatedLibrary.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/CustomAccount.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/GoogleAccount.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/IapCredential.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/IapCredential/IapTestServiceAccountInfo.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/ExportToSecurityCommandCenter.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/RiskLevel.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Schedule.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/UserAgent.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfigError.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfigError/Code.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRun.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRun/ExecutionState.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRun/ResultState.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunErrorTrace.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunErrorTrace/Code.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunLog.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunWarningTrace.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunWarningTrace/Code.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/StartScanRunRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/StopScanRunRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/UpdateScanConfigRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ViolatingResource.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/VulnerableHeaders.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/VulnerableHeaders/Header.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/VulnerableParameters.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/WebSecurityScannerGrpcClient.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xss.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xss/AttackVector.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xxe.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xxe/Location.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/create_scan_config.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/delete_scan_config.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/get_finding.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/get_scan_config.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/get_scan_run.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_crawled_urls.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_finding_type_stats.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_findings.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_scan_configs.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_scan_runs.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/start_scan_run.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/stop_scan_run.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/update_scan_config.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/src/V1/Client/BaseClient/WebSecurityScannerBaseClient.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/src/V1/Client/WebSecurityScannerClient.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/WebSecurityScanner/v1/src/V1/resources/web_security_scanner_client_config.json create mode 100644 owl-bot-staging/WebSecurityScanner/v1/src/V1/resources/web_security_scanner_descriptor_config.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/src/V1/resources/web_security_scanner_rest_client_config.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1/tests/Unit/V1/Client/WebSecurityScannerClientTest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/CrawledUrl.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/Finding.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/FindingAddon.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/FindingTypeStats.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/ScanConfig.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/ScanConfigError.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/ScanRun.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/ScanRunErrorTrace.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/ScanRunWarningTrace.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/WebSecurityScanner.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/CrawledUrl.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/CreateScanConfigRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/DeleteScanConfigRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Finding.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/FindingTypeStats.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Form.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetFindingRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetScanConfigRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetScanRunRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListCrawledUrlsRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListCrawledUrlsResponse.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingTypeStatsRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingTypeStatsResponse.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingsRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingsResponse.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanConfigsRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanConfigsResponse.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanRunsRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanRunsResponse.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/OutdatedLibrary.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication/CustomAccount.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication/GoogleAccount.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/ExportToSecurityCommandCenter.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/RiskLevel.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Schedule.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/TargetPlatform.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/UserAgent.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfigError.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfigError/Code.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun/ExecutionState.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun/ResultState.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunErrorTrace.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunErrorTrace/Code.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunWarningTrace.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunWarningTrace/Code.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/StartScanRunRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/StopScanRunRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/UpdateScanConfigRequest.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ViolatingResource.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableHeaders.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableHeaders/Header.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableParameters.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/WebSecurityScannerGrpcClient.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Xss.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/create_scan_config.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/delete_scan_config.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_finding.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_scan_config.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_scan_run.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_crawled_urls.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_finding_type_stats.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_findings.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_scan_configs.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_scan_runs.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/start_scan_run.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/stop_scan_run.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/update_scan_config.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/Gapic/WebSecurityScannerGapicClient.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/WebSecurityScannerClient.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/gapic_metadata.json create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/resources/web_security_scanner_client_config.json create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/resources/web_security_scanner_descriptor_config.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/resources/web_security_scanner_rest_client_config.php create mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/tests/Unit/V1beta/WebSecurityScannerClientTest.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/proto/src/GPBMetadata/Google/Cloud/Workflows/Executions/V1/Executions.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/CancelExecutionRequest.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/CreateExecutionRequest.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/CallLogLevel.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/Error.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/StackTrace.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/StackTraceElement.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/StackTraceElement/Position.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/State.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ExecutionView.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ExecutionsGrpcClient.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/GetExecutionRequest.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ListExecutionsRequest.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ListExecutionsResponse.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/cancel_execution.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/create_execution.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/get_execution.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/list_executions.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/src/V1/Client/BaseClient/ExecutionsBaseClient.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/src/V1/Client/ExecutionsClient.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Workflows/Executions/v1/src/V1/resources/executions_client_config.json create mode 100644 owl-bot-staging/Workflows/Executions/v1/src/V1/resources/executions_descriptor_config.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/src/V1/resources/executions_rest_client_config.php create mode 100644 owl-bot-staging/Workflows/Executions/v1/tests/Unit/V1/Client/ExecutionsClientTest.php create mode 100644 owl-bot-staging/Workflows/Executions/v1beta/proto/src/GPBMetadata/Google/Cloud/Workflows/Executions/V1Beta/Executions.php create mode 100644 owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/CancelExecutionRequest.php create mode 100644 owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/CreateExecutionRequest.php create mode 100644 owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution.php create mode 100644 owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution/Error.php create mode 100644 owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution/State.php create mode 100644 owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ExecutionView.php create mode 100644 owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ExecutionsGrpcClient.php create mode 100644 owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/GetExecutionRequest.php create mode 100644 owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ListExecutionsRequest.php create mode 100644 owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ListExecutionsResponse.php create mode 100644 owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/cancel_execution.php create mode 100644 owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/create_execution.php create mode 100644 owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/get_execution.php create mode 100644 owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/list_executions.php create mode 100644 owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/ExecutionsClient.php create mode 100644 owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/Gapic/ExecutionsGapicClient.php create mode 100644 owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/gapic_metadata.json create mode 100644 owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_client_config.json create mode 100644 owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_descriptor_config.php create mode 100644 owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_rest_client_config.php create mode 100644 owl-bot-staging/Workflows/Executions/v1beta/tests/Unit/V1beta/ExecutionsClientTest.php create mode 100644 owl-bot-staging/Workflows/v1/proto/src/GPBMetadata/Google/Cloud/Workflows/V1/Workflows.php create mode 100644 owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/CreateWorkflowRequest.php create mode 100644 owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/DeleteWorkflowRequest.php create mode 100644 owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/GetWorkflowRequest.php create mode 100644 owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/ListWorkflowsRequest.php create mode 100644 owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/ListWorkflowsResponse.php create mode 100644 owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/OperationMetadata.php create mode 100644 owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/UpdateWorkflowRequest.php create mode 100644 owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/Workflow.php create mode 100644 owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/Workflow/State.php create mode 100644 owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/WorkflowsGrpcClient.php create mode 100644 owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/create_workflow.php create mode 100644 owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/delete_workflow.php create mode 100644 owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/get_workflow.php create mode 100644 owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/list_workflows.php create mode 100644 owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/update_workflow.php create mode 100644 owl-bot-staging/Workflows/v1/src/V1/Client/BaseClient/WorkflowsBaseClient.php create mode 100644 owl-bot-staging/Workflows/v1/src/V1/Client/WorkflowsClient.php create mode 100644 owl-bot-staging/Workflows/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Workflows/v1/src/V1/resources/workflows_client_config.json create mode 100644 owl-bot-staging/Workflows/v1/src/V1/resources/workflows_descriptor_config.php create mode 100644 owl-bot-staging/Workflows/v1/src/V1/resources/workflows_rest_client_config.php create mode 100644 owl-bot-staging/Workflows/v1/tests/Unit/V1/Client/WorkflowsClientTest.php create mode 100644 owl-bot-staging/Workflows/v1beta/proto/src/GPBMetadata/Google/Cloud/Workflows/V1Beta/Workflows.php create mode 100644 owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/CreateWorkflowRequest.php create mode 100644 owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/DeleteWorkflowRequest.php create mode 100644 owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/GetWorkflowRequest.php create mode 100644 owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/ListWorkflowsRequest.php create mode 100644 owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/ListWorkflowsResponse.php create mode 100644 owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/OperationMetadata.php create mode 100644 owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/UpdateWorkflowRequest.php create mode 100644 owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/Workflow.php create mode 100644 owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/Workflow/State.php create mode 100644 owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/WorkflowsGrpcClient.php create mode 100644 owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/create_workflow.php create mode 100644 owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/delete_workflow.php create mode 100644 owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/get_workflow.php create mode 100644 owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/list_workflows.php create mode 100644 owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/update_workflow.php create mode 100644 owl-bot-staging/Workflows/v1beta/src/V1beta/Gapic/WorkflowsGapicClient.php create mode 100644 owl-bot-staging/Workflows/v1beta/src/V1beta/WorkflowsClient.php create mode 100644 owl-bot-staging/Workflows/v1beta/src/V1beta/gapic_metadata.json create mode 100644 owl-bot-staging/Workflows/v1beta/src/V1beta/resources/workflows_client_config.json create mode 100644 owl-bot-staging/Workflows/v1beta/src/V1beta/resources/workflows_descriptor_config.php create mode 100644 owl-bot-staging/Workflows/v1beta/src/V1beta/resources/workflows_rest_client_config.php create mode 100644 owl-bot-staging/Workflows/v1beta/tests/Unit/V1beta/WorkflowsClientTest.php diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Outputs.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Outputs.php new file mode 100644 index 0000000000000000000000000000000000000000..8a26de1c8668a6254604bc3301994b7281d4e22f GIT binary patch literal 3859 zcmcInTW=dh6prmUv5ynS*)+v*1#C^ErqHgH6mfAV5MOeEy0NfZiDI-`ugCVP>)q|{ zY#JB!842-AfEV6*<%M5?#1n}B0B2@)*G`i(p%QtCcV^Bv=X~>>Gjl%r#2Gs9mb^zS z;%b!iNya<*wiF6Ia&lkz<&|Rb;t#DBnM9%k|np`#PF>w(shsEDvmZ zV3Lw<+J3KeWb}w#GL0kRQI}|=($Qwg_Nn7jPvOu2mNp`uqv=H6YgQVBYCVl=ojs1y zsWOz#Lx$417ol_>Zf*nUrsjF_p+JLgK*m4E@0x}#dsL(NZ{6@z!!oF$nZ`4W>8{+@ zOpl=L>9u{|(y3uvGBY@|bh2?%7MN`9x?>{;cjeHpCZh!@=^R*;xRz#iYQ)oB!=bj@ z#HHo(fY69cHnMRu*p|T=eR)IpST3J(@~%u>pG@yA%Pyh5Yi)DC8Nl=CSLY1Yb{wO# zYY?+nAw%uRu-$Tb64eCcEYm2knvXg_J}z(C9y_E{L-9~!M9wzjG~WK$2uR!M^&*aT zQB@mJR4m3D@N*uN|0X9Xke|Zkr*Qcx6Zt7en}s(5L@qx(!cs4YR0y(A2<9nkEt=VLgU*}5HsalTs$*SJ93 zpJ6bX-!tqGCVp9%9cC55R3SsjF%3}?9Oc%<&a}}e1gWgRGKpdipo%}nAl>kf#iEb` z7HnEthO}-YK?atRJlirY6+k)#;UQxQockPd9vLu7RgX|=SOYJg}X3^wgN+G z6&8u5yJLq*S2cS1IktcCmpG&vnq~B{3^D)uC^nT99)3P)=`)yR$DL<1XSd$Jc;66A z34bv0R}#PP#HBoBM*eZYlZOOgkYZ*HmPZ=S1kviYZ&5Crr1Sx-hQp5uanw+g0TXMX zN12?Jt{k^}+pC zvtB*eJ*d}mGtxXH_V2ZFF)0PJwVl>}E?)d22AP)Q8kDq#git99bA8(#X*8e@L*|S+ zF6kS`oW&qy8CE=Qs6I7%bf`MUF)EIFi|V32{p>|HQ|OfsXSjW?lR>0V_?HAjLZI zJk(*;w)(~Z#gXK>807MHcoyfD808EUg(s%853{;!JDj4-R{7PSs)!)%Lc-B{oXO1A zhpz_I)Ov+gND9{$VAk~e9*;6s=yYI~?;`{%HGsa01xRJDEq;ozsC;w{%0|_$!)hclD`u`jRx?eM zyzLN69iWPs>QmAhEa8VL;6#Qn@h9;b*@Oi)6;%@^^p_IvT#A|;V>0%z=4Wu2Ujtp$8Do%Gh8J)s#dUMS&qWS^y3wBS zf@uxtFrUT2n1tzxnaIjYeu?9uKBw^qx+-ycN{WPH=&e+ z6jEw=SeSXTr=&$la+^s7n`WJ#kzgI8(}$X65i=+?Le_W~;jpQV@ktxqX7eM>aj<$| z=}sWom&oxcPeqw%2n0sDr;QxEtGFJ9#HG*pp(hL9#bANkg=?=u+OY6lt+KZWzx5(L ziE$)Af6NO{pr-;XikTpg>8gAUvf`PphLcl5#G@JD?XLE^{CbKNWq`?x0h4-~TJA-0 z7nWYUs_#th{YanUwRC>bF8&mUY&*E>g7SO_bE5U&N15HaM1G${P{Pj^?_i`7fKPSR z?)ULM5>)E*UBZ-k8`A9hRiD`?PbQDd)@oQ}*t3Ff@CYaOXNq4>{13K!6Rx!n8ujX7 zt**8XAAC`L@j_mKr3N-xJ1Se&YVS0fcsZ}aa=lTh*J|||A7|#dcx4eEe9RT$eC5v= ztYgO(I&4l z+BosVRahG*o{h@G&ELW$ouJhVdOhCkiB%o!_Wp{m3#4+HLzT7GFdW+K&hhur aof}afaZB`4Q?1vzZ5LlDnxp6N9N=FVNuR?2 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Resources.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Resources.php new file mode 100644 index 0000000000000000000000000000000000000000..dee3a328b2b712b78ec69ac9299cd86e1c82d085 GIT binary patch literal 7282 zcmc&(OLN=S6%I*}5)bvDAiJTNwuV_v?Zh@|$w}p=_cJ0qCCZo_n6(z4zx| zI0FZMB5x6kxSCJ;^1+Gh4~Xozwr}gUDIbgu4~Z-5_Ruj*;udAO+LU*jUAb1RckiL7 zXOCQ+l;tDaJ~By3H|NQ8cGxELYP@!e3BMe4# z$afI!8W>c*HguxPwjI6K!KfKsqbdu4$GrQ;BC%zBqL{o4Z1c|FIa)@(?4r)ED*^|G#_j|9)Up zG2lZnz;*NzjpdQZ>B4_gkgQwib!i@EXnyBna_m7``V=xc)&ZZW6e<_TkD2vAZw`uj z6hr52B>tr&sMN^8q9CLa(WEMnGPMI@dbt@nfzvz{=DFUsMW%9bhe_2e-#wAaFyo&% zB$vcF7uO#}h3KLTlQoE&TfCtx%1BvAj9ep^LeVrgLI-X+E;;hqVeU0!)~#K7SA9&rP)qX~R)n%{oGzW9Z*>{xM`GJ(q#R8*(DzZUK_V znmOVTmoCSj#|l4#8Rn&1knO&1)zrP+PODa_Z`Nzo><7{Uq}$y_OKt6SwzDye;<-+{ z%irRK&rp;)iHg>1?F*tQh&N<~8i>#{{VW#^+>Op}xE*ibQ%c9X-&O z_ca=yacLJMViKyR=AMZ7_j14#UY`zG3uSrmOJ71}IC>WXWf;)I=|GLqJAv>L(nHNM z4zUZ;tfm$4lL+!cM5@Aq=U`nRsy846Ar=_KG1k)Yp;uCa|M>dA!@DNZnm>C(hooyf81?~!AaDAw$p94T3EYNtXOxIHbu+M@;Ce! zeVZ#EoGB{YyS@Ym1+*Ns2o0?F zy_WBBPQo3=pF0etfgpviV2MpM{v_RlA2AE6omcg4Wm|1Ds~3&`5q!9*)OVWu*t%Nn z+9vy{H9;-OXn9Z?rwnzEaw|)Wv^H z;1ZHNUjCOToW)>;o9G;=kefT^w1NRES51QC$FTb39rIX{mJYsxL)#r{z98WdN(aN< zWI`BunTc1VOG#SabY4M_7|p*m`u;$5jCYiPQ=XrcZo|TW7)Jv?_)Lj>5|bYeUECrd zo5S`ngWqCwC08tvPIF-;+DTp)DSglOY zKNkOEg^EgmwJD(Tz5B3y=__>%(^W+tEl76Z-&`0%c zx|uq{G(jFl-Tq>_+c|8Tof>s*EICws621mA!x5$&-RP*6i9NmnZcop>k*0@ zU)u!5{3#?kvE)1A>xgB3^;{38tC8sDlR;%LwXrE3|9)iy^bX=>pTcsWRJew=qXNvj063HAV)zNH`HqDp$T8YqT zL;}ZtPd8F{orFBx}XWO}17NTDU zPQ9Mqjb|w00SBTrI9P`rr(;R^HDvnkQ1wncpA0=w^`q3OaI;XXy2B0^=bASmr4es! z{W2~Tf0;y#zm1I)d` zON(Q}BJ>$st?M9F$Y&tk!e1=){S*3+ib*sV11JCIIKbFZ(iY4ig<|reLPVgL<3$#O z$te(01~$2%dN%_KG?(g-rYm5Yi!l8BM$QP=O?A@6x0Ku(23irg+$d zeY+L=ZI#ype*DLd{*LU+cV!q^cwIK$t2zfSCSSgZ%UkS@tXQFUWJSiui#vGA#kU2; z{k6XbLwe#KO0SEhgWH5@l}pgE;FcdnPHX7V=(-*c93Gd>FNFOqT><2rkc3b UqFvX}uei}-Bl*44DVzfQAFp&HdH?_b literal 0 HcmV?d00001 diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Service.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Service.php new file mode 100644 index 000000000000..8dde8ea46e77 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Service.php @@ -0,0 +1,170 @@ +internalAddGeneratedFile( + ' +�4 +.google/cloud/video/livestream/v1/service.proto google.cloud.video.livestream.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto0google/cloud/video/livestream/v1/resources.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"� +CreateChannelRequest9 +parent ( B)�A�A#!livestream.googleapis.com/Channel? +channel ( 2).google.cloud.video.livestream.v1.ChannelB�A + +channel_id ( B�A + +request_id ( "� +ListChannelsRequest9 +parent ( B)�A�A#!livestream.googleapis.com/Channel + page_size ( + +page_token (  +filter (  +order_by ( "� +ListChannelsResponse; +channels ( 2).google.cloud.video.livestream.v1.Channel +next_page_token (  + unreachable ( "L +GetChannelRequest7 +name ( B)�A�A# +!livestream.googleapis.com/Channel"r +DeleteChannelRequest7 +name ( B)�A�A# +!livestream.googleapis.com/Channel + +request_id (  +force ("� +UpdateChannelRequest/ + update_mask ( 2.google.protobuf.FieldMask? +channel ( 2).google.cloud.video.livestream.v1.ChannelB�A + +request_id ( "b +StartChannelRequest7 +name ( B)�A�A# +!livestream.googleapis.com/Channel + +request_id ( "a +StopChannelRequest7 +name ( B)�A�A# +!livestream.googleapis.com/Channel + +request_id ( "� +CreateInputRequest7 +parent ( B\'�A�A!livestream.googleapis.com/Input; +input ( 2\'.google.cloud.video.livestream.v1.InputB�A +input_id ( B�A + +request_id ( "� +ListInputsRequest7 +parent ( B\'�A�A!livestream.googleapis.com/Input + page_size ( + +page_token (  +filter (  +order_by ( "{ +ListInputsResponse7 +inputs ( 2\'.google.cloud.video.livestream.v1.Input +next_page_token (  + unreachable ( "H +GetInputRequest5 +name ( B\'�A�A! +livestream.googleapis.com/Input"_ +DeleteInputRequest5 +name ( B\'�A�A! +livestream.googleapis.com/Input + +request_id ( "� +UpdateInputRequest/ + update_mask ( 2.google.protobuf.FieldMask; +input ( 2\'.google.cloud.video.livestream.v1.InputB�A + +request_id ( "� +CreateEventRequest7 +parent ( B\'�A�A!livestream.googleapis.com/Event; +event ( 2\'.google.cloud.video.livestream.v1.EventB�A +event_id ( B�A + +request_id ( "� +ListEventsRequest7 +parent ( B\'�A�A!livestream.googleapis.com/Event + page_size ( + +page_token (  +filter (  +order_by ( "{ +ListEventsResponse7 +events ( 2\'.google.cloud.video.livestream.v1.Event +next_page_token (  + unreachable ( "H +GetEventRequest5 +name ( B\'�A�A! +livestream.googleapis.com/Event"_ +DeleteEventRequest5 +name ( B\'�A�A! +livestream.googleapis.com/Event + +request_id ( " +ChannelOperationResponse"� +OperationMetadata4 + create_time ( 2.google.protobuf.TimestampB�A1 +end_time ( 2.google.protobuf.TimestampB�A +target ( B�A +verb ( B�A# +requested_cancellation (B�A + api_version ( B�A2� +LivestreamService� + CreateChannel6.google.cloud.video.livestream.v1.CreateChannelRequest.google.longrunning.Operation"x���7",/v1/{parent=projects/*/locations/*}/channels:channel�Aparent,channel,channel_id�A +ChannelOperationMetadata� + ListChannels5.google.cloud.video.livestream.v1.ListChannelsRequest6.google.cloud.video.livestream.v1.ListChannelsResponse"=���.,/v1/{parent=projects/*/locations/*}/channels�Aparent� + +GetChannel3.google.cloud.video.livestream.v1.GetChannelRequest).google.cloud.video.livestream.v1.Channel";���.,/v1/{name=projects/*/locations/*/channels/*}�Aname� + DeleteChannel6.google.cloud.video.livestream.v1.DeleteChannelRequest.google.longrunning.Operation"h���.*,/v1/{name=projects/*/locations/*/channels/*}�Aname�A* +google.protobuf.EmptyOperationMetadata� + UpdateChannel6.google.cloud.video.livestream.v1.UpdateChannelRequest.google.longrunning.Operation"z���?24/v1/{channel.name=projects/*/locations/*/channels/*}:channel�Achannel,update_mask�A +ChannelOperationMetadata� + StartChannel5.google.cloud.video.livestream.v1.StartChannelRequest.google.longrunning.Operation"t���7"2/v1/{name=projects/*/locations/*/channels/*}:start:*�Aname�A- +ChannelOperationResponseOperationMetadata� + StopChannel4.google.cloud.video.livestream.v1.StopChannelRequest.google.longrunning.Operation"s���6"1/v1/{name=projects/*/locations/*/channels/*}:stop:*�Aname�A- +ChannelOperationResponseOperationMetadata� + CreateInput4.google.cloud.video.livestream.v1.CreateInputRequest.google.longrunning.Operation"n���3"*/v1/{parent=projects/*/locations/*}/inputs:input�Aparent,input,input_id�A +InputOperationMetadata� + +ListInputs3.google.cloud.video.livestream.v1.ListInputsRequest4.google.cloud.video.livestream.v1.ListInputsResponse";���,*/v1/{parent=projects/*/locations/*}/inputs�Aparent� +GetInput1.google.cloud.video.livestream.v1.GetInputRequest\'.google.cloud.video.livestream.v1.Input"9���,*/v1/{name=projects/*/locations/*/inputs/*}�Aname� + DeleteInput4.google.cloud.video.livestream.v1.DeleteInputRequest.google.longrunning.Operation"f���,**/v1/{name=projects/*/locations/*/inputs/*}�Aname�A* +google.protobuf.EmptyOperationMetadata� + UpdateInput4.google.cloud.video.livestream.v1.UpdateInputRequest.google.longrunning.Operation"p���920/v1/{input.name=projects/*/locations/*/inputs/*}:input�Ainput,update_mask�A +InputOperationMetadata� + CreateEvent4.google.cloud.video.livestream.v1.CreateEventRequest\'.google.cloud.video.livestream.v1.Event"\\���>"5/v1/{parent=projects/*/locations/*/channels/*}/events:event�Aparent,event,event_id� + +ListEvents3.google.cloud.video.livestream.v1.ListEventsRequest4.google.cloud.video.livestream.v1.ListEventsResponse"F���75/v1/{parent=projects/*/locations/*/channels/*}/events�Aparent� +GetEvent1.google.cloud.video.livestream.v1.GetEventRequest\'.google.cloud.video.livestream.v1.Event"D���75/v1/{name=projects/*/locations/*/channels/*/events/*}�Aname� + DeleteEvent4.google.cloud.video.livestream.v1.DeleteEventRequest.google.protobuf.Empty"D���7*5/v1/{name=projects/*/locations/*/channels/*/events/*}�AnameM�Alivestream.googleapis.com�A.https://www.googleapis.com/auth/cloud-platformB� +$com.google.cloud.video.livestream.v1B ServiceProtoPZDcloud.google.com/go/video/livestream/apiv1/livestreampb;livestreampb� Google.Cloud.Video.LiveStream.V1� Google\\Cloud\\Video\\LiveStream\\V1�$Google::Cloud::Video::LiveStream::V1�Ad +*secretmanager.googleapis.com/SecretVersion6projects/{project}/secrets/{secret}/versions/{version}bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioFormat.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioFormat.php new file mode 100644 index 000000000000..183a21001565 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioFormat.php @@ -0,0 +1,135 @@ +google.cloud.video.livestream.v1.AudioFormat + */ +class AudioFormat extends \Google\Protobuf\Internal\Message +{ + /** + * Audio codec used in this audio stream. + * + * Generated from protobuf field string codec = 1; + */ + protected $codec = ''; + /** + * The number of audio channels. + * + * Generated from protobuf field int32 channel_count = 2; + */ + protected $channel_count = 0; + /** + * A list of channel names specifying the layout of the audio channels. + * + * Generated from protobuf field repeated string channel_layout = 3; + */ + private $channel_layout; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $codec + * Audio codec used in this audio stream. + * @type int $channel_count + * The number of audio channels. + * @type array|\Google\Protobuf\Internal\RepeatedField $channel_layout + * A list of channel names specifying the layout of the audio channels. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Audio codec used in this audio stream. + * + * Generated from protobuf field string codec = 1; + * @return string + */ + public function getCodec() + { + return $this->codec; + } + + /** + * Audio codec used in this audio stream. + * + * Generated from protobuf field string codec = 1; + * @param string $var + * @return $this + */ + public function setCodec($var) + { + GPBUtil::checkString($var, True); + $this->codec = $var; + + return $this; + } + + /** + * The number of audio channels. + * + * Generated from protobuf field int32 channel_count = 2; + * @return int + */ + public function getChannelCount() + { + return $this->channel_count; + } + + /** + * The number of audio channels. + * + * Generated from protobuf field int32 channel_count = 2; + * @param int $var + * @return $this + */ + public function setChannelCount($var) + { + GPBUtil::checkInt32($var); + $this->channel_count = $var; + + return $this; + } + + /** + * A list of channel names specifying the layout of the audio channels. + * + * Generated from protobuf field repeated string channel_layout = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChannelLayout() + { + return $this->channel_layout; + } + + /** + * A list of channel names specifying the layout of the audio channels. + * + * Generated from protobuf field repeated string channel_layout = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChannelLayout($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->channel_layout = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream.php new file mode 100644 index 000000000000..004559384953 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream.php @@ -0,0 +1,327 @@ +google.cloud.video.livestream.v1.AudioStream + */ +class AudioStream extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies whether pass through (transmuxing) is enabled or not. + * If set to `true`, the rest of the settings, other than `mapping`, will be + * ignored. The default is `false`. + * + * Generated from protobuf field bool transmux = 8; + */ + protected $transmux = false; + /** + * The codec for this audio stream. The default is `aac`. + * Supported audio codecs: + * - `aac` + * + * Generated from protobuf field string codec = 1; + */ + protected $codec = ''; + /** + * Required. Audio bitrate in bits per second. Must be between 1 and + * 10,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bitrate_bps = 0; + /** + * Number of audio channels. Must be between 1 and 6. The default is 2. + * + * Generated from protobuf field int32 channel_count = 3; + */ + protected $channel_count = 0; + /** + * A list of channel names specifying layout of the audio channels. + * This only affects the metadata embedded in the container headers, if + * supported by the specified format. The default is `[fl, fr]`. + * Supported channel names: + * - `fl` - Front left channel + * - `fr` - Front right channel + * - `sl` - Side left channel + * - `sr` - Side right channel + * - `fc` - Front center channel + * - `lfe` - Low frequency + * + * Generated from protobuf field repeated string channel_layout = 4; + */ + private $channel_layout; + /** + * The mapping for the input streams and audio channels. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStream.AudioMapping mapping = 5; + */ + private $mapping; + /** + * The audio sample rate in Hertz. The default is 48000 Hertz. + * + * Generated from protobuf field int32 sample_rate_hertz = 6; + */ + protected $sample_rate_hertz = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $transmux + * Specifies whether pass through (transmuxing) is enabled or not. + * If set to `true`, the rest of the settings, other than `mapping`, will be + * ignored. The default is `false`. + * @type string $codec + * The codec for this audio stream. The default is `aac`. + * Supported audio codecs: + * - `aac` + * @type int $bitrate_bps + * Required. Audio bitrate in bits per second. Must be between 1 and + * 10,000,000. + * @type int $channel_count + * Number of audio channels. Must be between 1 and 6. The default is 2. + * @type array|\Google\Protobuf\Internal\RepeatedField $channel_layout + * A list of channel names specifying layout of the audio channels. + * This only affects the metadata embedded in the container headers, if + * supported by the specified format. The default is `[fl, fr]`. + * Supported channel names: + * - `fl` - Front left channel + * - `fr` - Front right channel + * - `sl` - Side left channel + * - `sr` - Side right channel + * - `fc` - Front center channel + * - `lfe` - Low frequency + * @type array<\Google\Cloud\Video\LiveStream\V1\AudioStream\AudioMapping>|\Google\Protobuf\Internal\RepeatedField $mapping + * The mapping for the input streams and audio channels. + * @type int $sample_rate_hertz + * The audio sample rate in Hertz. The default is 48000 Hertz. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * Specifies whether pass through (transmuxing) is enabled or not. + * If set to `true`, the rest of the settings, other than `mapping`, will be + * ignored. The default is `false`. + * + * Generated from protobuf field bool transmux = 8; + * @return bool + */ + public function getTransmux() + { + return $this->transmux; + } + + /** + * Specifies whether pass through (transmuxing) is enabled or not. + * If set to `true`, the rest of the settings, other than `mapping`, will be + * ignored. The default is `false`. + * + * Generated from protobuf field bool transmux = 8; + * @param bool $var + * @return $this + */ + public function setTransmux($var) + { + GPBUtil::checkBool($var); + $this->transmux = $var; + + return $this; + } + + /** + * The codec for this audio stream. The default is `aac`. + * Supported audio codecs: + * - `aac` + * + * Generated from protobuf field string codec = 1; + * @return string + */ + public function getCodec() + { + return $this->codec; + } + + /** + * The codec for this audio stream. The default is `aac`. + * Supported audio codecs: + * - `aac` + * + * Generated from protobuf field string codec = 1; + * @param string $var + * @return $this + */ + public function setCodec($var) + { + GPBUtil::checkString($var, True); + $this->codec = $var; + + return $this; + } + + /** + * Required. Audio bitrate in bits per second. Must be between 1 and + * 10,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getBitrateBps() + { + return $this->bitrate_bps; + } + + /** + * Required. Audio bitrate in bits per second. Must be between 1 and + * 10,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setBitrateBps($var) + { + GPBUtil::checkInt32($var); + $this->bitrate_bps = $var; + + return $this; + } + + /** + * Number of audio channels. Must be between 1 and 6. The default is 2. + * + * Generated from protobuf field int32 channel_count = 3; + * @return int + */ + public function getChannelCount() + { + return $this->channel_count; + } + + /** + * Number of audio channels. Must be between 1 and 6. The default is 2. + * + * Generated from protobuf field int32 channel_count = 3; + * @param int $var + * @return $this + */ + public function setChannelCount($var) + { + GPBUtil::checkInt32($var); + $this->channel_count = $var; + + return $this; + } + + /** + * A list of channel names specifying layout of the audio channels. + * This only affects the metadata embedded in the container headers, if + * supported by the specified format. The default is `[fl, fr]`. + * Supported channel names: + * - `fl` - Front left channel + * - `fr` - Front right channel + * - `sl` - Side left channel + * - `sr` - Side right channel + * - `fc` - Front center channel + * - `lfe` - Low frequency + * + * Generated from protobuf field repeated string channel_layout = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChannelLayout() + { + return $this->channel_layout; + } + + /** + * A list of channel names specifying layout of the audio channels. + * This only affects the metadata embedded in the container headers, if + * supported by the specified format. The default is `[fl, fr]`. + * Supported channel names: + * - `fl` - Front left channel + * - `fr` - Front right channel + * - `sl` - Side left channel + * - `sr` - Side right channel + * - `fc` - Front center channel + * - `lfe` - Low frequency + * + * Generated from protobuf field repeated string channel_layout = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChannelLayout($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->channel_layout = $arr; + + return $this; + } + + /** + * The mapping for the input streams and audio channels. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStream.AudioMapping mapping = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMapping() + { + return $this->mapping; + } + + /** + * The mapping for the input streams and audio channels. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStream.AudioMapping mapping = 5; + * @param array<\Google\Cloud\Video\LiveStream\V1\AudioStream\AudioMapping>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMapping($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\AudioStream\AudioMapping::class); + $this->mapping = $arr; + + return $this; + } + + /** + * The audio sample rate in Hertz. The default is 48000 Hertz. + * + * Generated from protobuf field int32 sample_rate_hertz = 6; + * @return int + */ + public function getSampleRateHertz() + { + return $this->sample_rate_hertz; + } + + /** + * The audio sample rate in Hertz. The default is 48000 Hertz. + * + * Generated from protobuf field int32 sample_rate_hertz = 6; + * @param int $var + * @return $this + */ + public function setSampleRateHertz($var) + { + GPBUtil::checkInt32($var); + $this->sample_rate_hertz = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream/AudioMapping.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream/AudioMapping.php new file mode 100644 index 000000000000..032ef41bd53a --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream/AudioMapping.php @@ -0,0 +1,246 @@ +google.cloud.video.livestream.v1.AudioStream.AudioMapping + */ +class AudioMapping extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `Channel` + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * that identifies the input that this audio mapping applies to. If an + * active input doesn't have an audio mapping, the primary audio track in + * the input stream will be selected. + * + * Generated from protobuf field string input_key = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_key = ''; + /** + * Required. The zero-based index of the track in the input stream. + * All [mapping][google.cloud.video.livestream.v1.AudioStream.mapping]s in + * the same [AudioStream][google.cloud.video.livestream.v1.AudioStream] must + * have the same input track. + * + * Generated from protobuf field int32 input_track = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_track = 0; + /** + * Required. The zero-based index of the channel in the input stream. + * + * Generated from protobuf field int32 input_channel = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_channel = 0; + /** + * Required. The zero-based index of the channel in the output audio stream. + * Must be consistent with the + * [input_channel][google.cloud.video.livestream.v1.AudioStream.AudioMapping.input_channel]. + * + * Generated from protobuf field int32 output_channel = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $output_channel = 0; + /** + * Audio volume control in dB. Negative values decrease volume, + * positive values increase. The default is 0. + * + * Generated from protobuf field double gain_db = 5; + */ + protected $gain_db = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $input_key + * Required. The `Channel` + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * that identifies the input that this audio mapping applies to. If an + * active input doesn't have an audio mapping, the primary audio track in + * the input stream will be selected. + * @type int $input_track + * Required. The zero-based index of the track in the input stream. + * All [mapping][google.cloud.video.livestream.v1.AudioStream.mapping]s in + * the same [AudioStream][google.cloud.video.livestream.v1.AudioStream] must + * have the same input track. + * @type int $input_channel + * Required. The zero-based index of the channel in the input stream. + * @type int $output_channel + * Required. The zero-based index of the channel in the output audio stream. + * Must be consistent with the + * [input_channel][google.cloud.video.livestream.v1.AudioStream.AudioMapping.input_channel]. + * @type float $gain_db + * Audio volume control in dB. Negative values decrease volume, + * positive values increase. The default is 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `Channel` + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * that identifies the input that this audio mapping applies to. If an + * active input doesn't have an audio mapping, the primary audio track in + * the input stream will be selected. + * + * Generated from protobuf field string input_key = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInputKey() + { + return $this->input_key; + } + + /** + * Required. The `Channel` + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * that identifies the input that this audio mapping applies to. If an + * active input doesn't have an audio mapping, the primary audio track in + * the input stream will be selected. + * + * Generated from protobuf field string input_key = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInputKey($var) + { + GPBUtil::checkString($var, True); + $this->input_key = $var; + + return $this; + } + + /** + * Required. The zero-based index of the track in the input stream. + * All [mapping][google.cloud.video.livestream.v1.AudioStream.mapping]s in + * the same [AudioStream][google.cloud.video.livestream.v1.AudioStream] must + * have the same input track. + * + * Generated from protobuf field int32 input_track = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getInputTrack() + { + return $this->input_track; + } + + /** + * Required. The zero-based index of the track in the input stream. + * All [mapping][google.cloud.video.livestream.v1.AudioStream.mapping]s in + * the same [AudioStream][google.cloud.video.livestream.v1.AudioStream] must + * have the same input track. + * + * Generated from protobuf field int32 input_track = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setInputTrack($var) + { + GPBUtil::checkInt32($var); + $this->input_track = $var; + + return $this; + } + + /** + * Required. The zero-based index of the channel in the input stream. + * + * Generated from protobuf field int32 input_channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getInputChannel() + { + return $this->input_channel; + } + + /** + * Required. The zero-based index of the channel in the input stream. + * + * Generated from protobuf field int32 input_channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setInputChannel($var) + { + GPBUtil::checkInt32($var); + $this->input_channel = $var; + + return $this; + } + + /** + * Required. The zero-based index of the channel in the output audio stream. + * Must be consistent with the + * [input_channel][google.cloud.video.livestream.v1.AudioStream.AudioMapping.input_channel]. + * + * Generated from protobuf field int32 output_channel = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getOutputChannel() + { + return $this->output_channel; + } + + /** + * Required. The zero-based index of the channel in the output audio stream. + * Must be consistent with the + * [input_channel][google.cloud.video.livestream.v1.AudioStream.AudioMapping.input_channel]. + * + * Generated from protobuf field int32 output_channel = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setOutputChannel($var) + { + GPBUtil::checkInt32($var); + $this->output_channel = $var; + + return $this; + } + + /** + * Audio volume control in dB. Negative values decrease volume, + * positive values increase. The default is 0. + * + * Generated from protobuf field double gain_db = 5; + * @return float + */ + public function getGainDb() + { + return $this->gain_db; + } + + /** + * Audio volume control in dB. Negative values decrease volume, + * positive values increase. The default is 0. + * + * Generated from protobuf field double gain_db = 5; + * @param float $var + * @return $this + */ + public function setGainDb($var) + { + GPBUtil::checkDouble($var); + $this->gain_db = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AudioMapping::class, \Google\Cloud\Video\LiveStream\V1\AudioStream_AudioMapping::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStreamProperty.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStreamProperty.php new file mode 100644 index 000000000000..320aecc20086 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStreamProperty.php @@ -0,0 +1,111 @@ +google.cloud.video.livestream.v1.AudioStreamProperty + */ +class AudioStreamProperty extends \Google\Protobuf\Internal\Message +{ + /** + * Index of this audio stream. + * + * Generated from protobuf field int32 index = 1; + */ + protected $index = 0; + /** + * Properties of the audio format. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; + */ + protected $audio_format = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $index + * Index of this audio stream. + * @type \Google\Cloud\Video\LiveStream\V1\AudioFormat $audio_format + * Properties of the audio format. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Index of this audio stream. + * + * Generated from protobuf field int32 index = 1; + * @return int + */ + public function getIndex() + { + return $this->index; + } + + /** + * Index of this audio stream. + * + * Generated from protobuf field int32 index = 1; + * @param int $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkInt32($var); + $this->index = $var; + + return $this; + } + + /** + * Properties of the audio format. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; + * @return \Google\Cloud\Video\LiveStream\V1\AudioFormat|null + */ + public function getAudioFormat() + { + return $this->audio_format; + } + + public function hasAudioFormat() + { + return isset($this->audio_format); + } + + public function clearAudioFormat() + { + unset($this->audio_format); + } + + /** + * Properties of the audio format. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; + * @param \Google\Cloud\Video\LiveStream\V1\AudioFormat $var + * @return $this + */ + public function setAudioFormat($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\AudioFormat::class); + $this->audio_format = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel.php new file mode 100644 index 000000000000..e776a7a3ec77 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel.php @@ -0,0 +1,745 @@ +google.cloud.video.livestream.v1.Channel + */ +class Channel extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the channel, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * User-defined key/value metadata. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * A list of input attachments that this channel uses. + * One channel can have multiple inputs as the input sources. Only one + * input can be selected as the input source at one time. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.InputAttachment input_attachments = 16; + */ + private $input_attachments; + /** + * Output only. The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * that serves as the current input source. The first input in the + * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments] + * is the initial input source. + * + * Generated from protobuf field string active_input = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $active_input = ''; + /** + * Required. Information about the output (that is, the Cloud Storage bucket + * to store the generated live stream). + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.Output output = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $output = null; + /** + * List of elementary streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.ElementaryStream elementary_streams = 10; + */ + private $elementary_streams; + /** + * List of multiplexing settings for output streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.MuxStream mux_streams = 11; + */ + private $mux_streams; + /** + * List of output manifests. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Manifest manifests = 12; + */ + private $manifests; + /** + * List of output sprite sheets. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.SpriteSheet sprite_sheets = 13; + */ + private $sprite_sheets; + /** + * Output only. State of the streaming operation. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.StreamingState streaming_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $streaming_state = 0; + /** + * Output only. A description of the reason for the streaming error. This + * property is always present when + * [streaming_state][google.cloud.video.livestream.v1.Channel.streaming_state] + * is + * [STREAMING_ERROR][google.cloud.video.livestream.v1.Channel.StreamingState.STREAMING_ERROR]. + * + * Generated from protobuf field .google.rpc.Status streaming_error = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $streaming_error = null; + /** + * Configuration of platform logs for this channel. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig log_config = 19; + */ + protected $log_config = null; + /** + * Configuration of timecode for this channel. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig timecode_config = 21; + */ + protected $timecode_config = null; + /** + * Encryption configurations for this channel. Each configuration has an ID + * which is referred to by each MuxStream to indicate which configuration is + * used for that output. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Encryption encryptions = 24; + */ + private $encryptions; + /** + * The configuration for input sources defined in + * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments]. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig input_config = 25; + */ + protected $input_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the channel, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update time. + * @type array|\Google\Protobuf\Internal\MapField $labels + * User-defined key/value metadata. + * @type array<\Google\Cloud\Video\LiveStream\V1\InputAttachment>|\Google\Protobuf\Internal\RepeatedField $input_attachments + * A list of input attachments that this channel uses. + * One channel can have multiple inputs as the input sources. Only one + * input can be selected as the input source at one time. + * @type string $active_input + * Output only. The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * that serves as the current input source. The first input in the + * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments] + * is the initial input source. + * @type \Google\Cloud\Video\LiveStream\V1\Channel\Output $output + * Required. Information about the output (that is, the Cloud Storage bucket + * to store the generated live stream). + * @type array<\Google\Cloud\Video\LiveStream\V1\ElementaryStream>|\Google\Protobuf\Internal\RepeatedField $elementary_streams + * List of elementary streams. + * @type array<\Google\Cloud\Video\LiveStream\V1\MuxStream>|\Google\Protobuf\Internal\RepeatedField $mux_streams + * List of multiplexing settings for output streams. + * @type array<\Google\Cloud\Video\LiveStream\V1\Manifest>|\Google\Protobuf\Internal\RepeatedField $manifests + * List of output manifests. + * @type array<\Google\Cloud\Video\LiveStream\V1\SpriteSheet>|\Google\Protobuf\Internal\RepeatedField $sprite_sheets + * List of output sprite sheets. + * @type int $streaming_state + * Output only. State of the streaming operation. + * @type \Google\Rpc\Status $streaming_error + * Output only. A description of the reason for the streaming error. This + * property is always present when + * [streaming_state][google.cloud.video.livestream.v1.Channel.streaming_state] + * is + * [STREAMING_ERROR][google.cloud.video.livestream.v1.Channel.StreamingState.STREAMING_ERROR]. + * @type \Google\Cloud\Video\LiveStream\V1\LogConfig $log_config + * Configuration of platform logs for this channel. + * @type \Google\Cloud\Video\LiveStream\V1\TimecodeConfig $timecode_config + * Configuration of timecode for this channel. + * @type array<\Google\Cloud\Video\LiveStream\V1\Encryption>|\Google\Protobuf\Internal\RepeatedField $encryptions + * Encryption configurations for this channel. Each configuration has an ID + * which is referred to by each MuxStream to indicate which configuration is + * used for that output. + * @type \Google\Cloud\Video\LiveStream\V1\InputConfig $input_config + * The configuration for input sources defined in + * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the channel, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the channel, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * User-defined key/value metadata. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * User-defined key/value metadata. + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * A list of input attachments that this channel uses. + * One channel can have multiple inputs as the input sources. Only one + * input can be selected as the input source at one time. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.InputAttachment input_attachments = 16; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInputAttachments() + { + return $this->input_attachments; + } + + /** + * A list of input attachments that this channel uses. + * One channel can have multiple inputs as the input sources. Only one + * input can be selected as the input source at one time. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.InputAttachment input_attachments = 16; + * @param array<\Google\Cloud\Video\LiveStream\V1\InputAttachment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInputAttachments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\InputAttachment::class); + $this->input_attachments = $arr; + + return $this; + } + + /** + * Output only. The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * that serves as the current input source. The first input in the + * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments] + * is the initial input source. + * + * Generated from protobuf field string active_input = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getActiveInput() + { + return $this->active_input; + } + + /** + * Output only. The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * that serves as the current input source. The first input in the + * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments] + * is the initial input source. + * + * Generated from protobuf field string active_input = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setActiveInput($var) + { + GPBUtil::checkString($var, True); + $this->active_input = $var; + + return $this; + } + + /** + * Required. Information about the output (that is, the Cloud Storage bucket + * to store the generated live stream). + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.Output output = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\LiveStream\V1\Channel\Output|null + */ + public function getOutput() + { + return $this->output; + } + + public function hasOutput() + { + return isset($this->output); + } + + public function clearOutput() + { + unset($this->output); + } + + /** + * Required. Information about the output (that is, the Cloud Storage bucket + * to store the generated live stream). + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.Output output = 9 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\LiveStream\V1\Channel\Output $var + * @return $this + */ + public function setOutput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Channel\Output::class); + $this->output = $var; + + return $this; + } + + /** + * List of elementary streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.ElementaryStream elementary_streams = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getElementaryStreams() + { + return $this->elementary_streams; + } + + /** + * List of elementary streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.ElementaryStream elementary_streams = 10; + * @param array<\Google\Cloud\Video\LiveStream\V1\ElementaryStream>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setElementaryStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\ElementaryStream::class); + $this->elementary_streams = $arr; + + return $this; + } + + /** + * List of multiplexing settings for output streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.MuxStream mux_streams = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMuxStreams() + { + return $this->mux_streams; + } + + /** + * List of multiplexing settings for output streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.MuxStream mux_streams = 11; + * @param array<\Google\Cloud\Video\LiveStream\V1\MuxStream>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMuxStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\MuxStream::class); + $this->mux_streams = $arr; + + return $this; + } + + /** + * List of output manifests. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Manifest manifests = 12; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getManifests() + { + return $this->manifests; + } + + /** + * List of output manifests. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Manifest manifests = 12; + * @param array<\Google\Cloud\Video\LiveStream\V1\Manifest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setManifests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Manifest::class); + $this->manifests = $arr; + + return $this; + } + + /** + * List of output sprite sheets. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.SpriteSheet sprite_sheets = 13; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSpriteSheets() + { + return $this->sprite_sheets; + } + + /** + * List of output sprite sheets. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.SpriteSheet sprite_sheets = 13; + * @param array<\Google\Cloud\Video\LiveStream\V1\SpriteSheet>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpriteSheets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\SpriteSheet::class); + $this->sprite_sheets = $arr; + + return $this; + } + + /** + * Output only. State of the streaming operation. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.StreamingState streaming_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStreamingState() + { + return $this->streaming_state; + } + + /** + * Output only. State of the streaming operation. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.StreamingState streaming_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStreamingState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Channel\StreamingState::class); + $this->streaming_state = $var; + + return $this; + } + + /** + * Output only. A description of the reason for the streaming error. This + * property is always present when + * [streaming_state][google.cloud.video.livestream.v1.Channel.streaming_state] + * is + * [STREAMING_ERROR][google.cloud.video.livestream.v1.Channel.StreamingState.STREAMING_ERROR]. + * + * Generated from protobuf field .google.rpc.Status streaming_error = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getStreamingError() + { + return $this->streaming_error; + } + + public function hasStreamingError() + { + return isset($this->streaming_error); + } + + public function clearStreamingError() + { + unset($this->streaming_error); + } + + /** + * Output only. A description of the reason for the streaming error. This + * property is always present when + * [streaming_state][google.cloud.video.livestream.v1.Channel.streaming_state] + * is + * [STREAMING_ERROR][google.cloud.video.livestream.v1.Channel.StreamingState.STREAMING_ERROR]. + * + * Generated from protobuf field .google.rpc.Status streaming_error = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setStreamingError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->streaming_error = $var; + + return $this; + } + + /** + * Configuration of platform logs for this channel. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig log_config = 19; + * @return \Google\Cloud\Video\LiveStream\V1\LogConfig|null + */ + public function getLogConfig() + { + return $this->log_config; + } + + public function hasLogConfig() + { + return isset($this->log_config); + } + + public function clearLogConfig() + { + unset($this->log_config); + } + + /** + * Configuration of platform logs for this channel. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig log_config = 19; + * @param \Google\Cloud\Video\LiveStream\V1\LogConfig $var + * @return $this + */ + public function setLogConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\LogConfig::class); + $this->log_config = $var; + + return $this; + } + + /** + * Configuration of timecode for this channel. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig timecode_config = 21; + * @return \Google\Cloud\Video\LiveStream\V1\TimecodeConfig|null + */ + public function getTimecodeConfig() + { + return $this->timecode_config; + } + + public function hasTimecodeConfig() + { + return isset($this->timecode_config); + } + + public function clearTimecodeConfig() + { + unset($this->timecode_config); + } + + /** + * Configuration of timecode for this channel. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig timecode_config = 21; + * @param \Google\Cloud\Video\LiveStream\V1\TimecodeConfig $var + * @return $this + */ + public function setTimecodeConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\TimecodeConfig::class); + $this->timecode_config = $var; + + return $this; + } + + /** + * Encryption configurations for this channel. Each configuration has an ID + * which is referred to by each MuxStream to indicate which configuration is + * used for that output. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Encryption encryptions = 24; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEncryptions() + { + return $this->encryptions; + } + + /** + * Encryption configurations for this channel. Each configuration has an ID + * which is referred to by each MuxStream to indicate which configuration is + * used for that output. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Encryption encryptions = 24; + * @param array<\Google\Cloud\Video\LiveStream\V1\Encryption>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEncryptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Encryption::class); + $this->encryptions = $arr; + + return $this; + } + + /** + * The configuration for input sources defined in + * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments]. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig input_config = 25; + * @return \Google\Cloud\Video\LiveStream\V1\InputConfig|null + */ + public function getInputConfig() + { + return $this->input_config; + } + + public function hasInputConfig() + { + return isset($this->input_config); + } + + public function clearInputConfig() + { + unset($this->input_config); + } + + /** + * The configuration for input sources defined in + * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments]. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig input_config = 25; + * @param \Google\Cloud\Video\LiveStream\V1\InputConfig $var + * @return $this + */ + public function setInputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\InputConfig::class); + $this->input_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/Output.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/Output.php new file mode 100644 index 000000000000..1124a8488084 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/Output.php @@ -0,0 +1,70 @@ +google.cloud.video.livestream.v1.Channel.Output + */ +class Output extends \Google\Protobuf\Internal\Message +{ + /** + * URI for the output file(s). For example, `gs://my-bucket/outputs/`. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * URI for the output file(s). For example, `gs://my-bucket/outputs/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * URI for the output file(s). For example, `gs://my-bucket/outputs/`. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI for the output file(s). For example, `gs://my-bucket/outputs/`. + * + * Generated from protobuf field string uri = 1; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Output::class, \Google\Cloud\Video\LiveStream\V1\Channel_Output::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/StreamingState.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/StreamingState.php new file mode 100644 index 000000000000..87b538780fb8 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/StreamingState.php @@ -0,0 +1,104 @@ +google.cloud.video.livestream.v1.Channel.StreamingState + */ +class StreamingState +{ + /** + * Streaming state is not specified. + * + * Generated from protobuf enum STREAMING_STATE_UNSPECIFIED = 0; + */ + const STREAMING_STATE_UNSPECIFIED = 0; + /** + * Channel is getting the input stream, generating the live streams to the + * specified output location. + * + * Generated from protobuf enum STREAMING = 1; + */ + const STREAMING = 1; + /** + * Channel is waiting for the input stream through the input. + * + * Generated from protobuf enum AWAITING_INPUT = 2; + */ + const AWAITING_INPUT = 2; + /** + * Channel is running, but has trouble publishing the live streams onto the + * specified output location (for example, the specified Cloud Storage + * bucket is not writable). + * + * Generated from protobuf enum STREAMING_ERROR = 4; + */ + const STREAMING_ERROR = 4; + /** + * Channel is generating live streams with no input stream. Live streams are + * filled out with black screen, while input stream is missing. + * Not supported yet. + * + * Generated from protobuf enum STREAMING_NO_INPUT = 5; + */ + const STREAMING_NO_INPUT = 5; + /** + * Channel is stopped, finishing live streams. + * + * Generated from protobuf enum STOPPED = 6; + */ + const STOPPED = 6; + /** + * Channel is starting. + * + * Generated from protobuf enum STARTING = 7; + */ + const STARTING = 7; + /** + * Channel is stopping. + * + * Generated from protobuf enum STOPPING = 8; + */ + const STOPPING = 8; + + private static $valueToName = [ + self::STREAMING_STATE_UNSPECIFIED => 'STREAMING_STATE_UNSPECIFIED', + self::STREAMING => 'STREAMING', + self::AWAITING_INPUT => 'AWAITING_INPUT', + self::STREAMING_ERROR => 'STREAMING_ERROR', + self::STREAMING_NO_INPUT => 'STREAMING_NO_INPUT', + self::STOPPED => 'STOPPED', + self::STARTING => 'STARTING', + self::STOPPING => 'STOPPING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StreamingState::class, \Google\Cloud\Video\LiveStream\V1\Channel_StreamingState::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ChannelOperationResponse.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ChannelOperationResponse.php new file mode 100644 index 000000000000..df5cc4567242 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ChannelOperationResponse.php @@ -0,0 +1,33 @@ +google.cloud.video.livestream.v1.ChannelOperationResponse + */ +class ChannelOperationResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateChannelRequest.php new file mode 100644 index 000000000000..6945278c5aa1 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateChannelRequest.php @@ -0,0 +1,252 @@ +google.cloud.video.livestream.v1.CreateChannelRequest + */ +class CreateChannelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The channel resource to be created. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $channel = null; + /** + * Required. The ID of the channel resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * Generated from protobuf field string channel_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $channel_id = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 4; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. Please see + * {@see LivestreamServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Video\LiveStream\V1\Channel $channel Required. The channel resource to be created. + * @param string $channelId Required. The ID of the channel resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * @return \Google\Cloud\Video\LiveStream\V1\CreateChannelRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\LiveStream\V1\Channel $channel, string $channelId): self + { + return (new self()) + ->setParent($parent) + ->setChannel($channel) + ->setChannelId($channelId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * @type \Google\Cloud\Video\LiveStream\V1\Channel $channel + * Required. The channel resource to be created. + * @type string $channel_id + * Required. The ID of the channel resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The channel resource to be created. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\LiveStream\V1\Channel|null + */ + public function getChannel() + { + return $this->channel; + } + + public function hasChannel() + { + return isset($this->channel); + } + + public function clearChannel() + { + unset($this->channel); + } + + /** + * Required. The channel resource to be created. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\LiveStream\V1\Channel $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Channel::class); + $this->channel = $var; + + return $this; + } + + /** + * Required. The ID of the channel resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * Generated from protobuf field string channel_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getChannelId() + { + return $this->channel_id; + } + + /** + * Required. The ID of the channel resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * Generated from protobuf field string channel_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setChannelId($var) + { + GPBUtil::checkString($var, True); + $this->channel_id = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 4; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 4; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateEventRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateEventRequest.php new file mode 100644 index 000000000000..821c7f956b9e --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateEventRequest.php @@ -0,0 +1,252 @@ +google.cloud.video.livestream.v1.CreateEventRequest + */ +class CreateEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent channel for the resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The event resource to be created. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event event = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $event = null; + /** + * Required. The ID of the event resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * Generated from protobuf field string event_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $event_id = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 4; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent channel for the resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. Please see + * {@see LivestreamServiceClient::channelName()} for help formatting this field. + * @param \Google\Cloud\Video\LiveStream\V1\Event $event Required. The event resource to be created. + * @param string $eventId Required. The ID of the event resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * @return \Google\Cloud\Video\LiveStream\V1\CreateEventRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\LiveStream\V1\Event $event, string $eventId): self + { + return (new self()) + ->setParent($parent) + ->setEvent($event) + ->setEventId($eventId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent channel for the resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * @type \Google\Cloud\Video\LiveStream\V1\Event $event + * Required. The event resource to be created. + * @type string $event_id + * Required. The ID of the event resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent channel for the resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent channel for the resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The event resource to be created. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\LiveStream\V1\Event|null + */ + public function getEvent() + { + return $this->event; + } + + public function hasEvent() + { + return isset($this->event); + } + + public function clearEvent() + { + unset($this->event); + } + + /** + * Required. The event resource to be created. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\LiveStream\V1\Event $var + * @return $this + */ + public function setEvent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event::class); + $this->event = $var; + + return $this; + } + + /** + * Required. The ID of the event resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * Generated from protobuf field string event_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEventId() + { + return $this->event_id; + } + + /** + * Required. The ID of the event resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * Generated from protobuf field string event_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEventId($var) + { + GPBUtil::checkString($var, True); + $this->event_id = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 4; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 4; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateInputRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateInputRequest.php new file mode 100644 index 000000000000..839b2d4d046e --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateInputRequest.php @@ -0,0 +1,252 @@ +google.cloud.video.livestream.v1.CreateInputRequest + */ +class CreateInputRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The input resource to be created. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input = null; + /** + * Required. The ID of the input resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * Generated from protobuf field string input_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_id = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 4; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. Please see + * {@see LivestreamServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Video\LiveStream\V1\Input $input Required. The input resource to be created. + * @param string $inputId Required. The ID of the input resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * @return \Google\Cloud\Video\LiveStream\V1\CreateInputRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\LiveStream\V1\Input $input, string $inputId): self + { + return (new self()) + ->setParent($parent) + ->setInput($input) + ->setInputId($inputId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * @type \Google\Cloud\Video\LiveStream\V1\Input $input + * Required. The input resource to be created. + * @type string $input_id + * Required. The ID of the input resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The input resource to be created. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\LiveStream\V1\Input|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Required. The input resource to be created. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\LiveStream\V1\Input $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Input::class); + $this->input = $var; + + return $this; + } + + /** + * Required. The ID of the input resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * Generated from protobuf field string input_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInputId() + { + return $this->input_id; + } + + /** + * Required. The ID of the input resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * Generated from protobuf field string input_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInputId($var) + { + GPBUtil::checkString($var, True); + $this->input_id = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 4; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 4; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteChannelRequest.php new file mode 100644 index 000000000000..e5ad476fe21d --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteChannelRequest.php @@ -0,0 +1,206 @@ +google.cloud.video.livestream.v1.DeleteChannelRequest + */ +class DeleteChannelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 2; + */ + protected $request_id = ''; + /** + * If the `force` field is set to the default value of `false`, you must + * delete all of a channel's events before you can delete the channel itself. + * If the field is set to `true`, requests to delete a channel also delete + * associated channel events. + * + * Generated from protobuf field bool force = 3; + */ + protected $force = false; + + /** + * @param string $name Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. Please see + * {@see LivestreamServiceClient::channelName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\DeleteChannelRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * @type bool $force + * If the `force` field is set to the default value of `false`, you must + * delete all of a channel's events before you can delete the channel itself. + * If the field is set to `true`, requests to delete a channel also delete + * associated channel events. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 2; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 2; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * If the `force` field is set to the default value of `false`, you must + * delete all of a channel's events before you can delete the channel itself. + * If the field is set to `true`, requests to delete a channel also delete + * associated channel events. + * + * Generated from protobuf field bool force = 3; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * If the `force` field is set to the default value of `false`, you must + * delete all of a channel's events before you can delete the channel itself. + * If the field is set to `true`, requests to delete a channel also delete + * associated channel events. + * + * Generated from protobuf field bool force = 3; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteEventRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteEventRequest.php new file mode 100644 index 000000000000..870470706fe4 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteEventRequest.php @@ -0,0 +1,160 @@ +google.cloud.video.livestream.v1.DeleteEventRequest + */ +class DeleteEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the event resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 2; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the event resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. Please see + * {@see LivestreamServiceClient::eventName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\DeleteEventRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the event resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the event resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the event resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 2; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 2; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteInputRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteInputRequest.php new file mode 100644 index 000000000000..457d3d144f65 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteInputRequest.php @@ -0,0 +1,160 @@ +google.cloud.video.livestream.v1.DeleteInputRequest + */ +class DeleteInputRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the input resource, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 2; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the input resource, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. Please see + * {@see LivestreamServiceClient::inputName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\DeleteInputRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the input resource, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the input resource, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the input resource, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 2; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 2; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ElementaryStream.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ElementaryStream.php new file mode 100644 index 000000000000..029528a39f4a --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ElementaryStream.php @@ -0,0 +1,177 @@ +google.cloud.video.livestream.v1.ElementaryStream + */ +class ElementaryStream extends \Google\Protobuf\Internal\Message +{ + /** + * A unique key for this elementary stream. + * + * Generated from protobuf field string key = 4; + */ + protected $key = ''; + protected $elementary_stream; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * A unique key for this elementary stream. + * @type \Google\Cloud\Video\LiveStream\V1\VideoStream $video_stream + * Encoding of a video stream. + * @type \Google\Cloud\Video\LiveStream\V1\AudioStream $audio_stream + * Encoding of an audio stream. + * @type \Google\Cloud\Video\LiveStream\V1\TextStream $text_stream + * Encoding of a text stream. For example, closed captions or subtitles. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * A unique key for this elementary stream. + * + * Generated from protobuf field string key = 4; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * A unique key for this elementary stream. + * + * Generated from protobuf field string key = 4; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * Encoding of a video stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.VideoStream video_stream = 1; + * @return \Google\Cloud\Video\LiveStream\V1\VideoStream|null + */ + public function getVideoStream() + { + return $this->readOneof(1); + } + + public function hasVideoStream() + { + return $this->hasOneof(1); + } + + /** + * Encoding of a video stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.VideoStream video_stream = 1; + * @param \Google\Cloud\Video\LiveStream\V1\VideoStream $var + * @return $this + */ + public function setVideoStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\VideoStream::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Encoding of an audio stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.AudioStream audio_stream = 2; + * @return \Google\Cloud\Video\LiveStream\V1\AudioStream|null + */ + public function getAudioStream() + { + return $this->readOneof(2); + } + + public function hasAudioStream() + { + return $this->hasOneof(2); + } + + /** + * Encoding of an audio stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.AudioStream audio_stream = 2; + * @param \Google\Cloud\Video\LiveStream\V1\AudioStream $var + * @return $this + */ + public function setAudioStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\AudioStream::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Encoding of a text stream. For example, closed captions or subtitles. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.TextStream text_stream = 3; + * @return \Google\Cloud\Video\LiveStream\V1\TextStream|null + */ + public function getTextStream() + { + return $this->readOneof(3); + } + + public function hasTextStream() + { + return $this->hasOneof(3); + } + + /** + * Encoding of a text stream. For example, closed captions or subtitles. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.TextStream text_stream = 3; + * @param \Google\Cloud\Video\LiveStream\V1\TextStream $var + * @return $this + */ + public function setTextStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\TextStream::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getElementaryStream() + { + return $this->whichOneof("elementary_stream"); + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption.php new file mode 100644 index 000000000000..a0e5fa6b0c1a --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption.php @@ -0,0 +1,261 @@ +google.cloud.video.livestream.v1.Encryption + */ +class Encryption extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Identifier for this set of encryption options. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $id = ''; + /** + * Required. Configuration for DRM systems. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.DrmSystems drm_systems = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $drm_systems = null; + protected $secret_source; + protected $encryption_mode; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Required. Identifier for this set of encryption options. + * @type \Google\Cloud\Video\LiveStream\V1\Encryption\SecretManagerSource $secret_manager_key_source + * For keys stored in Google Secret Manager. + * @type \Google\Cloud\Video\LiveStream\V1\Encryption\DrmSystems $drm_systems + * Required. Configuration for DRM systems. + * @type \Google\Cloud\Video\LiveStream\V1\Encryption\Aes128Encryption $aes128 + * Configuration for HLS AES-128 encryption. + * @type \Google\Cloud\Video\LiveStream\V1\Encryption\SampleAesEncryption $sample_aes + * Configuration for HLS SAMPLE-AES encryption. + * @type \Google\Cloud\Video\LiveStream\V1\Encryption\MpegCommonEncryption $mpeg_cenc + * Configuration for MPEG-Dash Common Encryption (MPEG-CENC). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Identifier for this set of encryption options. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Required. Identifier for this set of encryption options. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * For keys stored in Google Secret Manager. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.SecretManagerSource secret_manager_key_source = 7; + * @return \Google\Cloud\Video\LiveStream\V1\Encryption\SecretManagerSource|null + */ + public function getSecretManagerKeySource() + { + return $this->readOneof(7); + } + + public function hasSecretManagerKeySource() + { + return $this->hasOneof(7); + } + + /** + * For keys stored in Google Secret Manager. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.SecretManagerSource secret_manager_key_source = 7; + * @param \Google\Cloud\Video\LiveStream\V1\Encryption\SecretManagerSource $var + * @return $this + */ + public function setSecretManagerKeySource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\SecretManagerSource::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Required. Configuration for DRM systems. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.DrmSystems drm_systems = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\LiveStream\V1\Encryption\DrmSystems|null + */ + public function getDrmSystems() + { + return $this->drm_systems; + } + + public function hasDrmSystems() + { + return isset($this->drm_systems); + } + + public function clearDrmSystems() + { + unset($this->drm_systems); + } + + /** + * Required. Configuration for DRM systems. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.DrmSystems drm_systems = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\LiveStream\V1\Encryption\DrmSystems $var + * @return $this + */ + public function setDrmSystems($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\DrmSystems::class); + $this->drm_systems = $var; + + return $this; + } + + /** + * Configuration for HLS AES-128 encryption. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Aes128Encryption aes128 = 4; + * @return \Google\Cloud\Video\LiveStream\V1\Encryption\Aes128Encryption|null + */ + public function getAes128() + { + return $this->readOneof(4); + } + + public function hasAes128() + { + return $this->hasOneof(4); + } + + /** + * Configuration for HLS AES-128 encryption. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Aes128Encryption aes128 = 4; + * @param \Google\Cloud\Video\LiveStream\V1\Encryption\Aes128Encryption $var + * @return $this + */ + public function setAes128($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\Aes128Encryption::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Configuration for HLS SAMPLE-AES encryption. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.SampleAesEncryption sample_aes = 5; + * @return \Google\Cloud\Video\LiveStream\V1\Encryption\SampleAesEncryption|null + */ + public function getSampleAes() + { + return $this->readOneof(5); + } + + public function hasSampleAes() + { + return $this->hasOneof(5); + } + + /** + * Configuration for HLS SAMPLE-AES encryption. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.SampleAesEncryption sample_aes = 5; + * @param \Google\Cloud\Video\LiveStream\V1\Encryption\SampleAesEncryption $var + * @return $this + */ + public function setSampleAes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\SampleAesEncryption::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Configuration for MPEG-Dash Common Encryption (MPEG-CENC). + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption mpeg_cenc = 6; + * @return \Google\Cloud\Video\LiveStream\V1\Encryption\MpegCommonEncryption|null + */ + public function getMpegCenc() + { + return $this->readOneof(6); + } + + public function hasMpegCenc() + { + return $this->hasOneof(6); + } + + /** + * Configuration for MPEG-Dash Common Encryption (MPEG-CENC). + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption mpeg_cenc = 6; + * @param \Google\Cloud\Video\LiveStream\V1\Encryption\MpegCommonEncryption $var + * @return $this + */ + public function setMpegCenc($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\MpegCommonEncryption::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getSecretSource() + { + return $this->whichOneof("secret_source"); + } + + /** + * @return string + */ + public function getEncryptionMode() + { + return $this->whichOneof("encryption_mode"); + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Aes128Encryption.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Aes128Encryption.php new file mode 100644 index 000000000000..1903c805f7fb --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Aes128Encryption.php @@ -0,0 +1,36 @@ +google.cloud.video.livestream.v1.Encryption.Aes128Encryption + */ +class Aes128Encryption extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Aes128Encryption::class, \Google\Cloud\Video\LiveStream\V1\Encryption_Aes128Encryption::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Clearkey.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Clearkey.php new file mode 100644 index 000000000000..cf2a3c4ff2de --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Clearkey.php @@ -0,0 +1,36 @@ +google.cloud.video.livestream.v1.Encryption.Clearkey + */ +class Clearkey extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Clearkey::class, \Google\Cloud\Video\LiveStream\V1\Encryption_Clearkey::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/DrmSystems.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/DrmSystems.php new file mode 100644 index 000000000000..c0123be1577a --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/DrmSystems.php @@ -0,0 +1,213 @@ +google.cloud.video.livestream.v1.Encryption.DrmSystems + */ +class DrmSystems extends \Google\Protobuf\Internal\Message +{ + /** + * Widevine configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Widevine widevine = 1; + */ + protected $widevine = null; + /** + * Fairplay configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Fairplay fairplay = 2; + */ + protected $fairplay = null; + /** + * Playready configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Playready playready = 3; + */ + protected $playready = null; + /** + * Clearkey configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Clearkey clearkey = 4; + */ + protected $clearkey = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\LiveStream\V1\Encryption\Widevine $widevine + * Widevine configuration. + * @type \Google\Cloud\Video\LiveStream\V1\Encryption\Fairplay $fairplay + * Fairplay configuration. + * @type \Google\Cloud\Video\LiveStream\V1\Encryption\Playready $playready + * Playready configuration. + * @type \Google\Cloud\Video\LiveStream\V1\Encryption\Clearkey $clearkey + * Clearkey configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Widevine configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Widevine widevine = 1; + * @return \Google\Cloud\Video\LiveStream\V1\Encryption\Widevine|null + */ + public function getWidevine() + { + return $this->widevine; + } + + public function hasWidevine() + { + return isset($this->widevine); + } + + public function clearWidevine() + { + unset($this->widevine); + } + + /** + * Widevine configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Widevine widevine = 1; + * @param \Google\Cloud\Video\LiveStream\V1\Encryption\Widevine $var + * @return $this + */ + public function setWidevine($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\Widevine::class); + $this->widevine = $var; + + return $this; + } + + /** + * Fairplay configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Fairplay fairplay = 2; + * @return \Google\Cloud\Video\LiveStream\V1\Encryption\Fairplay|null + */ + public function getFairplay() + { + return $this->fairplay; + } + + public function hasFairplay() + { + return isset($this->fairplay); + } + + public function clearFairplay() + { + unset($this->fairplay); + } + + /** + * Fairplay configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Fairplay fairplay = 2; + * @param \Google\Cloud\Video\LiveStream\V1\Encryption\Fairplay $var + * @return $this + */ + public function setFairplay($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\Fairplay::class); + $this->fairplay = $var; + + return $this; + } + + /** + * Playready configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Playready playready = 3; + * @return \Google\Cloud\Video\LiveStream\V1\Encryption\Playready|null + */ + public function getPlayready() + { + return $this->playready; + } + + public function hasPlayready() + { + return isset($this->playready); + } + + public function clearPlayready() + { + unset($this->playready); + } + + /** + * Playready configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Playready playready = 3; + * @param \Google\Cloud\Video\LiveStream\V1\Encryption\Playready $var + * @return $this + */ + public function setPlayready($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\Playready::class); + $this->playready = $var; + + return $this; + } + + /** + * Clearkey configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Clearkey clearkey = 4; + * @return \Google\Cloud\Video\LiveStream\V1\Encryption\Clearkey|null + */ + public function getClearkey() + { + return $this->clearkey; + } + + public function hasClearkey() + { + return isset($this->clearkey); + } + + public function clearClearkey() + { + unset($this->clearkey); + } + + /** + * Clearkey configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Clearkey clearkey = 4; + * @param \Google\Cloud\Video\LiveStream\V1\Encryption\Clearkey $var + * @return $this + */ + public function setClearkey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\Clearkey::class); + $this->clearkey = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DrmSystems::class, \Google\Cloud\Video\LiveStream\V1\Encryption_DrmSystems::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Fairplay.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Fairplay.php new file mode 100644 index 000000000000..dc53b5d3a7d9 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Fairplay.php @@ -0,0 +1,36 @@ +google.cloud.video.livestream.v1.Encryption.Fairplay + */ +class Fairplay extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Fairplay::class, \Google\Cloud\Video\LiveStream\V1\Encryption_Fairplay::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/MpegCommonEncryption.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/MpegCommonEncryption.php new file mode 100644 index 000000000000..828acd25e267 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/MpegCommonEncryption.php @@ -0,0 +1,78 @@ +google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption + */ +class MpegCommonEncryption extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Specify the encryption scheme, supported schemes: + * - `cenc` - AES-CTR subsample + * - `cbcs`- AES-CBC subsample pattern + * + * Generated from protobuf field string scheme = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scheme = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $scheme + * Required. Specify the encryption scheme, supported schemes: + * - `cenc` - AES-CTR subsample + * - `cbcs`- AES-CBC subsample pattern + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Specify the encryption scheme, supported schemes: + * - `cenc` - AES-CTR subsample + * - `cbcs`- AES-CBC subsample pattern + * + * Generated from protobuf field string scheme = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getScheme() + { + return $this->scheme; + } + + /** + * Required. Specify the encryption scheme, supported schemes: + * - `cenc` - AES-CTR subsample + * - `cbcs`- AES-CBC subsample pattern + * + * Generated from protobuf field string scheme = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setScheme($var) + { + GPBUtil::checkString($var, True); + $this->scheme = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MpegCommonEncryption::class, \Google\Cloud\Video\LiveStream\V1\Encryption_MpegCommonEncryption::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Playready.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Playready.php new file mode 100644 index 000000000000..a1296c0e2581 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Playready.php @@ -0,0 +1,36 @@ +google.cloud.video.livestream.v1.Encryption.Playready + */ +class Playready extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Playready::class, \Google\Cloud\Video\LiveStream\V1\Encryption_Playready::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SampleAesEncryption.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SampleAesEncryption.php new file mode 100644 index 000000000000..566b81c20da9 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SampleAesEncryption.php @@ -0,0 +1,36 @@ +google.cloud.video.livestream.v1.Encryption.SampleAesEncryption + */ +class SampleAesEncryption extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SampleAesEncryption::class, \Google\Cloud\Video\LiveStream\V1\Encryption_SampleAesEncryption::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SecretManagerSource.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SecretManagerSource.php new file mode 100644 index 000000000000..0cd575268442 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SecretManagerSource.php @@ -0,0 +1,74 @@ +google.cloud.video.livestream.v1.Encryption.SecretManagerSource + */ +class SecretManagerSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Secret Version containing the encryption key. + * `projects/{project}/secrets/{secret_id}/versions/{version_number}` + * + * Generated from protobuf field string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $secret_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $secret_version + * Required. The name of the Secret Version containing the encryption key. + * `projects/{project}/secrets/{secret_id}/versions/{version_number}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Secret Version containing the encryption key. + * `projects/{project}/secrets/{secret_id}/versions/{version_number}` + * + * Generated from protobuf field string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getSecretVersion() + { + return $this->secret_version; + } + + /** + * Required. The name of the Secret Version containing the encryption key. + * `projects/{project}/secrets/{secret_id}/versions/{version_number}` + * + * Generated from protobuf field string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSecretVersion($var) + { + GPBUtil::checkString($var, True); + $this->secret_version = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SecretManagerSource::class, \Google\Cloud\Video\LiveStream\V1\Encryption_SecretManagerSource::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Widevine.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Widevine.php new file mode 100644 index 000000000000..a14e8b2be44b --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Widevine.php @@ -0,0 +1,36 @@ +google.cloud.video.livestream.v1.Encryption.Widevine + */ +class Widevine extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Widevine::class, \Google\Cloud\Video\LiveStream\V1\Encryption_Widevine::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event.php new file mode 100644 index 000000000000..3bf6c5f47fe2 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event.php @@ -0,0 +1,568 @@ +google.cloud.video.livestream.v1.Event + */ +class Event extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the event, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * User-defined key/value metadata. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * When this field is set to true, the event will be executed at the earliest + * time that the server can schedule the event and + * [execution_time][google.cloud.video.livestream.v1.Event.execution_time] + * will be populated with the time that the server actually schedules the + * event. + * + * Generated from protobuf field bool execute_now = 9; + */ + protected $execute_now = false; + /** + * The time to execute the event. If you set + * [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to + * `true`, then do not set this field in the `CreateEvent` request. In + * this case, the server schedules the event and populates this field. If you + * set [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to + * `false`, then you must set this field to at least 10 seconds in the future + * or else the event can't be created. + * + * Generated from protobuf field .google.protobuf.Timestamp execution_time = 10; + */ + protected $execution_time = null; + /** + * Output only. The state of the event. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. An error object that describes the reason for the failure. + * This property is always present when `state` is `FAILED`. + * + * Generated from protobuf field .google.rpc.Status error = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + protected $task; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the event, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update time. + * @type array|\Google\Protobuf\Internal\MapField $labels + * User-defined key/value metadata. + * @type \Google\Cloud\Video\LiveStream\V1\Event\InputSwitchTask $input_switch + * Required. Switches to another input stream. + * @type \Google\Cloud\Video\LiveStream\V1\Event\AdBreakTask $ad_break + * Required. Inserts a new ad opportunity. + * @type \Google\Cloud\Video\LiveStream\V1\Event\ReturnToProgramTask $return_to_program + * Required. Stops any running ad break. + * @type \Google\Cloud\Video\LiveStream\V1\Event\MuteTask $mute + * Required. Mutes the stream. + * @type \Google\Cloud\Video\LiveStream\V1\Event\UnmuteTask $unmute + * Required. Unmutes the stream. + * @type bool $execute_now + * When this field is set to true, the event will be executed at the earliest + * time that the server can schedule the event and + * [execution_time][google.cloud.video.livestream.v1.Event.execution_time] + * will be populated with the time that the server actually schedules the + * event. + * @type \Google\Protobuf\Timestamp $execution_time + * The time to execute the event. If you set + * [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to + * `true`, then do not set this field in the `CreateEvent` request. In + * this case, the server schedules the event and populates this field. If you + * set [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to + * `false`, then you must set this field to at least 10 seconds in the future + * or else the event can't be created. + * @type int $state + * Output only. The state of the event. + * @type \Google\Rpc\Status $error + * Output only. An error object that describes the reason for the failure. + * This property is always present when `state` is `FAILED`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the event, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the event, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * User-defined key/value metadata. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * User-defined key/value metadata. + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. Switches to another input stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.InputSwitchTask input_switch = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\LiveStream\V1\Event\InputSwitchTask|null + */ + public function getInputSwitch() + { + return $this->readOneof(5); + } + + public function hasInputSwitch() + { + return $this->hasOneof(5); + } + + /** + * Required. Switches to another input stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.InputSwitchTask input_switch = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\LiveStream\V1\Event\InputSwitchTask $var + * @return $this + */ + public function setInputSwitch($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event\InputSwitchTask::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Required. Inserts a new ad opportunity. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.AdBreakTask ad_break = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\LiveStream\V1\Event\AdBreakTask|null + */ + public function getAdBreak() + { + return $this->readOneof(6); + } + + public function hasAdBreak() + { + return $this->hasOneof(6); + } + + /** + * Required. Inserts a new ad opportunity. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.AdBreakTask ad_break = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\LiveStream\V1\Event\AdBreakTask $var + * @return $this + */ + public function setAdBreak($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event\AdBreakTask::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Required. Stops any running ad break. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.ReturnToProgramTask return_to_program = 13 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\LiveStream\V1\Event\ReturnToProgramTask|null + */ + public function getReturnToProgram() + { + return $this->readOneof(13); + } + + public function hasReturnToProgram() + { + return $this->hasOneof(13); + } + + /** + * Required. Stops any running ad break. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.ReturnToProgramTask return_to_program = 13 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\LiveStream\V1\Event\ReturnToProgramTask $var + * @return $this + */ + public function setReturnToProgram($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event\ReturnToProgramTask::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * Required. Mutes the stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.MuteTask mute = 15 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\LiveStream\V1\Event\MuteTask|null + */ + public function getMute() + { + return $this->readOneof(15); + } + + public function hasMute() + { + return $this->hasOneof(15); + } + + /** + * Required. Mutes the stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.MuteTask mute = 15 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\LiveStream\V1\Event\MuteTask $var + * @return $this + */ + public function setMute($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event\MuteTask::class); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * Required. Unmutes the stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.UnmuteTask unmute = 16 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\LiveStream\V1\Event\UnmuteTask|null + */ + public function getUnmute() + { + return $this->readOneof(16); + } + + public function hasUnmute() + { + return $this->hasOneof(16); + } + + /** + * Required. Unmutes the stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.UnmuteTask unmute = 16 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\LiveStream\V1\Event\UnmuteTask $var + * @return $this + */ + public function setUnmute($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event\UnmuteTask::class); + $this->writeOneof(16, $var); + + return $this; + } + + /** + * When this field is set to true, the event will be executed at the earliest + * time that the server can schedule the event and + * [execution_time][google.cloud.video.livestream.v1.Event.execution_time] + * will be populated with the time that the server actually schedules the + * event. + * + * Generated from protobuf field bool execute_now = 9; + * @return bool + */ + public function getExecuteNow() + { + return $this->execute_now; + } + + /** + * When this field is set to true, the event will be executed at the earliest + * time that the server can schedule the event and + * [execution_time][google.cloud.video.livestream.v1.Event.execution_time] + * will be populated with the time that the server actually schedules the + * event. + * + * Generated from protobuf field bool execute_now = 9; + * @param bool $var + * @return $this + */ + public function setExecuteNow($var) + { + GPBUtil::checkBool($var); + $this->execute_now = $var; + + return $this; + } + + /** + * The time to execute the event. If you set + * [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to + * `true`, then do not set this field in the `CreateEvent` request. In + * this case, the server schedules the event and populates this field. If you + * set [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to + * `false`, then you must set this field to at least 10 seconds in the future + * or else the event can't be created. + * + * Generated from protobuf field .google.protobuf.Timestamp execution_time = 10; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExecutionTime() + { + return $this->execution_time; + } + + public function hasExecutionTime() + { + return isset($this->execution_time); + } + + public function clearExecutionTime() + { + unset($this->execution_time); + } + + /** + * The time to execute the event. If you set + * [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to + * `true`, then do not set this field in the `CreateEvent` request. In + * this case, the server schedules the event and populates this field. If you + * set [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to + * `false`, then you must set this field to at least 10 seconds in the future + * or else the event can't be created. + * + * Generated from protobuf field .google.protobuf.Timestamp execution_time = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExecutionTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->execution_time = $var; + + return $this; + } + + /** + * Output only. The state of the event. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the event. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Event\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. An error object that describes the reason for the failure. + * This property is always present when `state` is `FAILED`. + * + * Generated from protobuf field .google.rpc.Status error = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. An error object that describes the reason for the failure. + * This property is always present when `state` is `FAILED`. + * + * Generated from protobuf field .google.rpc.Status error = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * @return string + */ + public function getTask() + { + return $this->whichOneof("task"); + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/AdBreakTask.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/AdBreakTask.php new file mode 100644 index 000000000000..31d381b2eedf --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/AdBreakTask.php @@ -0,0 +1,80 @@ +google.cloud.video.livestream.v1.Event.AdBreakTask + */ +class AdBreakTask extends \Google\Protobuf\Internal\Message +{ + /** + * Duration of an ad opportunity. Must be greater than 0. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + */ + protected $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $duration + * Duration of an ad opportunity. Must be greater than 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Duration of an ad opportunity. Must be greater than 0. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Duration of an ad opportunity. Must be greater than 0. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AdBreakTask::class, \Google\Cloud\Video\LiveStream\V1\Event_AdBreakTask::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/InputSwitchTask.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/InputSwitchTask.php new file mode 100644 index 000000000000..bae050a14d8b --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/InputSwitchTask.php @@ -0,0 +1,78 @@ +google.cloud.video.livestream.v1.Event.InputSwitchTask + */ +class InputSwitchTask extends \Google\Protobuf\Internal\Message +{ + /** + * The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * of the input to switch to. + * + * Generated from protobuf field string input_key = 1; + */ + protected $input_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $input_key + * The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * of the input to switch to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * of the input to switch to. + * + * Generated from protobuf field string input_key = 1; + * @return string + */ + public function getInputKey() + { + return $this->input_key; + } + + /** + * The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * of the input to switch to. + * + * Generated from protobuf field string input_key = 1; + * @param string $var + * @return $this + */ + public function setInputKey($var) + { + GPBUtil::checkString($var, True); + $this->input_key = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InputSwitchTask::class, \Google\Cloud\Video\LiveStream\V1\Event_InputSwitchTask::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/MuteTask.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/MuteTask.php new file mode 100644 index 000000000000..f080a8603fb6 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/MuteTask.php @@ -0,0 +1,84 @@ +google.cloud.video.livestream.v1.Event.MuteTask + */ +class MuteTask extends \Google\Protobuf\Internal\Message +{ + /** + * Duration for which the stream should be muted. If omitted, the stream + * will be muted until an UnmuteTask event is sent. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + */ + protected $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $duration + * Duration for which the stream should be muted. If omitted, the stream + * will be muted until an UnmuteTask event is sent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Duration for which the stream should be muted. If omitted, the stream + * will be muted until an UnmuteTask event is sent. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Duration for which the stream should be muted. If omitted, the stream + * will be muted until an UnmuteTask event is sent. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MuteTask::class, \Google\Cloud\Video\LiveStream\V1\Event_MuteTask::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/ReturnToProgramTask.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/ReturnToProgramTask.php new file mode 100644 index 000000000000..f544f6fa571e --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/ReturnToProgramTask.php @@ -0,0 +1,37 @@ +google.cloud.video.livestream.v1.Event.ReturnToProgramTask + */ +class ReturnToProgramTask extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ReturnToProgramTask::class, \Google\Cloud\Video\LiveStream\V1\Event_ReturnToProgramTask::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/State.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/State.php new file mode 100644 index 000000000000..fd2043aa0168 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/State.php @@ -0,0 +1,92 @@ +google.cloud.video.livestream.v1.Event.State + */ +class State +{ + /** + * Event state is not specified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Event is scheduled but not executed yet. + * + * Generated from protobuf enum SCHEDULED = 1; + */ + const SCHEDULED = 1; + /** + * Event is being executed. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * Event has been successfully executed. + * + * Generated from protobuf enum SUCCEEDED = 3; + */ + const SUCCEEDED = 3; + /** + * Event fails to be executed. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + /** + * Event has been created but not scheduled yet. + * + * Generated from protobuf enum PENDING = 5; + */ + const PENDING = 5; + /** + * Event was stopped before running for its full duration. + * + * Generated from protobuf enum STOPPED = 6; + */ + const STOPPED = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::SCHEDULED => 'SCHEDULED', + self::RUNNING => 'RUNNING', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::PENDING => 'PENDING', + self::STOPPED => 'STOPPED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Video\LiveStream\V1\Event_State::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/UnmuteTask.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/UnmuteTask.php new file mode 100644 index 000000000000..9ab47234d353 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/UnmuteTask.php @@ -0,0 +1,37 @@ +google.cloud.video.livestream.v1.Event.UnmuteTask + */ +class UnmuteTask extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UnmuteTask::class, \Google\Cloud\Video\LiveStream\V1\Event_UnmuteTask::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetChannelRequest.php new file mode 100644 index 000000000000..2050793dd1f3 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetChannelRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.livestream.v1.GetChannelRequest + */ +class GetChannelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. Please see + * {@see LivestreamServiceClient::channelName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\GetChannelRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetEventRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetEventRequest.php new file mode 100644 index 000000000000..cc2a65775439 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetEventRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.livestream.v1.GetEventRequest + */ +class GetEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the event resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the event resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. Please see + * {@see LivestreamServiceClient::eventName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\GetEventRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the event resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the event resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the event resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetInputRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetInputRequest.php new file mode 100644 index 000000000000..da3712d40ecf --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetInputRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.livestream.v1.GetInputRequest + */ +class GetInputRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the input resource, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the input resource, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. Please see + * {@see LivestreamServiceClient::inputName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\GetInputRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the input resource, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the input resource, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the input resource, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input.php new file mode 100644 index 000000000000..804f7b0d808c --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input.php @@ -0,0 +1,460 @@ +google.cloud.video.livestream.v1.Input + */ +class Input extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the input, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * User-defined key/value metadata. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Source type. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Type type = 5; + */ + protected $type = 0; + /** + * Tier defines the maximum input specification that is accepted by the + * video pipeline. The billing is charged based on the tier specified here. + * See [Pricing](https://cloud.google.com/livestream/pricing) for more detail. + * The default is `HD`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Tier tier = 14; + */ + protected $tier = 0; + /** + * Output only. URI to push the input stream to. + * Its format depends on the input + * [type][google.cloud.video.livestream.v1.Input.type], for example: + * * `RTMP_PUSH`: `rtmp://1.2.3.4/live/{STREAM-ID}` + * * `SRT_PUSH`: `srt://1.2.3.4:4201?streamid={STREAM-ID}` + * + * Generated from protobuf field string uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uri = ''; + /** + * Preprocessing configurations. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig preprocessing_config = 9; + */ + protected $preprocessing_config = null; + /** + * Security rule for access control. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input.SecurityRule security_rules = 12; + */ + protected $security_rules = null; + /** + * Output only. The information for the input stream. This field will be + * present only when this input receives the input stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputStreamProperty input_stream_property = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $input_stream_property = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the input, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update time. + * @type array|\Google\Protobuf\Internal\MapField $labels + * User-defined key/value metadata. + * @type int $type + * Source type. + * @type int $tier + * Tier defines the maximum input specification that is accepted by the + * video pipeline. The billing is charged based on the tier specified here. + * See [Pricing](https://cloud.google.com/livestream/pricing) for more detail. + * The default is `HD`. + * @type string $uri + * Output only. URI to push the input stream to. + * Its format depends on the input + * [type][google.cloud.video.livestream.v1.Input.type], for example: + * * `RTMP_PUSH`: `rtmp://1.2.3.4/live/{STREAM-ID}` + * * `SRT_PUSH`: `srt://1.2.3.4:4201?streamid={STREAM-ID}` + * @type \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig $preprocessing_config + * Preprocessing configurations. + * @type \Google\Cloud\Video\LiveStream\V1\Input\SecurityRule $security_rules + * Security rule for access control. + * @type \Google\Cloud\Video\LiveStream\V1\InputStreamProperty $input_stream_property + * Output only. The information for the input stream. This field will be + * present only when this input receives the input stream. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the input, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the input, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * User-defined key/value metadata. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * User-defined key/value metadata. + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Source type. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Type type = 5; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Source type. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Type type = 5; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Input\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Tier defines the maximum input specification that is accepted by the + * video pipeline. The billing is charged based on the tier specified here. + * See [Pricing](https://cloud.google.com/livestream/pricing) for more detail. + * The default is `HD`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Tier tier = 14; + * @return int + */ + public function getTier() + { + return $this->tier; + } + + /** + * Tier defines the maximum input specification that is accepted by the + * video pipeline. The billing is charged based on the tier specified here. + * See [Pricing](https://cloud.google.com/livestream/pricing) for more detail. + * The default is `HD`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Tier tier = 14; + * @param int $var + * @return $this + */ + public function setTier($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Input\Tier::class); + $this->tier = $var; + + return $this; + } + + /** + * Output only. URI to push the input stream to. + * Its format depends on the input + * [type][google.cloud.video.livestream.v1.Input.type], for example: + * * `RTMP_PUSH`: `rtmp://1.2.3.4/live/{STREAM-ID}` + * * `SRT_PUSH`: `srt://1.2.3.4:4201?streamid={STREAM-ID}` + * + * Generated from protobuf field string uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Output only. URI to push the input stream to. + * Its format depends on the input + * [type][google.cloud.video.livestream.v1.Input.type], for example: + * * `RTMP_PUSH`: `rtmp://1.2.3.4/live/{STREAM-ID}` + * * `SRT_PUSH`: `srt://1.2.3.4:4201?streamid={STREAM-ID}` + * + * Generated from protobuf field string uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Preprocessing configurations. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig preprocessing_config = 9; + * @return \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig|null + */ + public function getPreprocessingConfig() + { + return $this->preprocessing_config; + } + + public function hasPreprocessingConfig() + { + return isset($this->preprocessing_config); + } + + public function clearPreprocessingConfig() + { + unset($this->preprocessing_config); + } + + /** + * Preprocessing configurations. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig preprocessing_config = 9; + * @param \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig $var + * @return $this + */ + public function setPreprocessingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig::class); + $this->preprocessing_config = $var; + + return $this; + } + + /** + * Security rule for access control. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input.SecurityRule security_rules = 12; + * @return \Google\Cloud\Video\LiveStream\V1\Input\SecurityRule|null + */ + public function getSecurityRules() + { + return $this->security_rules; + } + + public function hasSecurityRules() + { + return isset($this->security_rules); + } + + public function clearSecurityRules() + { + unset($this->security_rules); + } + + /** + * Security rule for access control. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input.SecurityRule security_rules = 12; + * @param \Google\Cloud\Video\LiveStream\V1\Input\SecurityRule $var + * @return $this + */ + public function setSecurityRules($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Input\SecurityRule::class); + $this->security_rules = $var; + + return $this; + } + + /** + * Output only. The information for the input stream. This field will be + * present only when this input receives the input stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputStreamProperty input_stream_property = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Video\LiveStream\V1\InputStreamProperty|null + */ + public function getInputStreamProperty() + { + return $this->input_stream_property; + } + + public function hasInputStreamProperty() + { + return isset($this->input_stream_property); + } + + public function clearInputStreamProperty() + { + unset($this->input_stream_property); + } + + /** + * Output only. The information for the input stream. This field will be + * present only when this input receives the input stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputStreamProperty input_stream_property = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Video\LiveStream\V1\InputStreamProperty $var + * @return $this + */ + public function setInputStreamProperty($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\InputStreamProperty::class); + $this->input_stream_property = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/SecurityRule.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/SecurityRule.php new file mode 100644 index 000000000000..c5c7244181e5 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/SecurityRule.php @@ -0,0 +1,80 @@ +google.cloud.video.livestream.v1.Input.SecurityRule + */ +class SecurityRule extends \Google\Protobuf\Internal\Message +{ + /** + * At least one ip range must match unless none specified. The IP range is + * defined by CIDR block: for example, `192.0.1.0/24` for a range and + * `192.0.1.0/32` for a single IP address. + * + * Generated from protobuf field repeated string ip_ranges = 1; + */ + private $ip_ranges; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $ip_ranges + * At least one ip range must match unless none specified. The IP range is + * defined by CIDR block: for example, `192.0.1.0/24` for a range and + * `192.0.1.0/32` for a single IP address. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * At least one ip range must match unless none specified. The IP range is + * defined by CIDR block: for example, `192.0.1.0/24` for a range and + * `192.0.1.0/32` for a single IP address. + * + * Generated from protobuf field repeated string ip_ranges = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIpRanges() + { + return $this->ip_ranges; + } + + /** + * At least one ip range must match unless none specified. The IP range is + * defined by CIDR block: for example, `192.0.1.0/24` for a range and + * `192.0.1.0/32` for a single IP address. + * + * Generated from protobuf field repeated string ip_ranges = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIpRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ip_ranges = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SecurityRule::class, \Google\Cloud\Video\LiveStream\V1\Input_SecurityRule::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Tier.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Tier.php new file mode 100644 index 000000000000..e1cc73c68de0 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Tier.php @@ -0,0 +1,71 @@ +google.cloud.video.livestream.v1.Input.Tier + */ +class Tier +{ + /** + * Tier is not specified. + * + * Generated from protobuf enum TIER_UNSPECIFIED = 0; + */ + const TIER_UNSPECIFIED = 0; + /** + * Resolution < 1280x720. Bitrate <= 6 Mbps. FPS <= 60. + * + * Generated from protobuf enum SD = 1; + */ + const SD = 1; + /** + * Resolution <= 1920x1080. Bitrate <= 25 Mbps. FPS <= 60. + * + * Generated from protobuf enum HD = 2; + */ + const HD = 2; + /** + * Resolution <= 4096x2160. Not supported yet. + * + * Generated from protobuf enum UHD = 3; + */ + const UHD = 3; + + private static $valueToName = [ + self::TIER_UNSPECIFIED => 'TIER_UNSPECIFIED', + self::SD => 'SD', + self::HD => 'HD', + self::UHD => 'UHD', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Tier::class, \Google\Cloud\Video\LiveStream\V1\Input_Tier::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Type.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Type.php new file mode 100644 index 000000000000..2008bef32975 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Type.php @@ -0,0 +1,64 @@ +google.cloud.video.livestream.v1.Input.Type + */ +class Type +{ + /** + * Input type is not specified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Input will take an rtmp input stream. + * + * Generated from protobuf enum RTMP_PUSH = 1; + */ + const RTMP_PUSH = 1; + /** + * Input will take an srt (Secure Reliable Transport) input stream. + * + * Generated from protobuf enum SRT_PUSH = 2; + */ + const SRT_PUSH = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::RTMP_PUSH => 'RTMP_PUSH', + self::SRT_PUSH => 'SRT_PUSH', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\Video\LiveStream\V1\Input_Type::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment.php new file mode 100644 index 000000000000..86ffab06266a --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment.php @@ -0,0 +1,149 @@ +google.cloud.video.livestream.v1.InputAttachment + */ +class InputAttachment extends \Google\Protobuf\Internal\Message +{ + /** + * A unique key for this input attachment. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * The resource name of an existing input, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * Generated from protobuf field string input = 2 [(.google.api.resource_reference) = { + */ + protected $input = ''; + /** + * Automatic failover configurations. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover automatic_failover = 3; + */ + protected $automatic_failover = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * A unique key for this input attachment. + * @type string $input + * The resource name of an existing input, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * @type \Google\Cloud\Video\LiveStream\V1\InputAttachment\AutomaticFailover $automatic_failover + * Automatic failover configurations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * A unique key for this input attachment. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * A unique key for this input attachment. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * The resource name of an existing input, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * Generated from protobuf field string input = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getInput() + { + return $this->input; + } + + /** + * The resource name of an existing input, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * Generated from protobuf field string input = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkString($var, True); + $this->input = $var; + + return $this; + } + + /** + * Automatic failover configurations. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover automatic_failover = 3; + * @return \Google\Cloud\Video\LiveStream\V1\InputAttachment\AutomaticFailover|null + */ + public function getAutomaticFailover() + { + return $this->automatic_failover; + } + + public function hasAutomaticFailover() + { + return isset($this->automatic_failover); + } + + public function clearAutomaticFailover() + { + unset($this->automatic_failover); + } + + /** + * Automatic failover configurations. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover automatic_failover = 3; + * @param \Google\Cloud\Video\LiveStream\V1\InputAttachment\AutomaticFailover $var + * @return $this + */ + public function setAutomaticFailover($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\InputAttachment\AutomaticFailover::class); + $this->automatic_failover = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment/AutomaticFailover.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment/AutomaticFailover.php new file mode 100644 index 000000000000..d9ae8181935d --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment/AutomaticFailover.php @@ -0,0 +1,82 @@ +google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover + */ +class AutomaticFailover extends \Google\Protobuf\Internal\Message +{ + /** + * The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key]s + * of inputs to failover to when this input is disconnected. Currently, only + * up to one backup input is supported. + * + * Generated from protobuf field repeated string input_keys = 1; + */ + private $input_keys; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $input_keys + * The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key]s + * of inputs to failover to when this input is disconnected. Currently, only + * up to one backup input is supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key]s + * of inputs to failover to when this input is disconnected. Currently, only + * up to one backup input is supported. + * + * Generated from protobuf field repeated string input_keys = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInputKeys() + { + return $this->input_keys; + } + + /** + * The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key]s + * of inputs to failover to when this input is disconnected. Currently, only + * up to one backup input is supported. + * + * Generated from protobuf field repeated string input_keys = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInputKeys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->input_keys = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AutomaticFailover::class, \Google\Cloud\Video\LiveStream\V1\InputAttachment_AutomaticFailover::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig.php new file mode 100644 index 000000000000..fc6b529049d0 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig.php @@ -0,0 +1,67 @@ +google.cloud.video.livestream.v1.InputConfig + */ +class InputConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Input switch mode. Default mode is `FAILOVER_PREFER_PRIMARY`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig.InputSwitchMode input_switch_mode = 1; + */ + protected $input_switch_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $input_switch_mode + * Input switch mode. Default mode is `FAILOVER_PREFER_PRIMARY`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Input switch mode. Default mode is `FAILOVER_PREFER_PRIMARY`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig.InputSwitchMode input_switch_mode = 1; + * @return int + */ + public function getInputSwitchMode() + { + return $this->input_switch_mode; + } + + /** + * Input switch mode. Default mode is `FAILOVER_PREFER_PRIMARY`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig.InputSwitchMode input_switch_mode = 1; + * @param int $var + * @return $this + */ + public function setInputSwitchMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\InputConfig\InputSwitchMode::class); + $this->input_switch_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig/InputSwitchMode.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig/InputSwitchMode.php new file mode 100644 index 000000000000..0a991af82491 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig/InputSwitchMode.php @@ -0,0 +1,72 @@ +google.cloud.video.livestream.v1.InputConfig.InputSwitchMode + */ +class InputSwitchMode +{ + /** + * The input switch mode is not specified. + * + * Generated from protobuf enum INPUT_SWITCH_MODE_UNSPECIFIED = 0; + */ + const INPUT_SWITCH_MODE_UNSPECIFIED = 0; + /** + * Automatic failover is enabled. The primary input stream is always + * preferred over its backup input streams configured using the + * [AutomaticFailover][google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover] + * field. + * + * Generated from protobuf enum FAILOVER_PREFER_PRIMARY = 1; + */ + const FAILOVER_PREFER_PRIMARY = 1; + /** + * Automatic failover is disabled. You must use the + * [inputSwitch][google.cloud.video.livestream.v1.Event.input_switch] event + * to switch the active input source for the channel to stream from. When + * this mode is chosen, the + * [AutomaticFailover][google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover] + * field is ignored. + * + * Generated from protobuf enum MANUAL = 3; + */ + const MANUAL = 3; + + private static $valueToName = [ + self::INPUT_SWITCH_MODE_UNSPECIFIED => 'INPUT_SWITCH_MODE_UNSPECIFIED', + self::FAILOVER_PREFER_PRIMARY => 'FAILOVER_PREFER_PRIMARY', + self::MANUAL => 'MANUAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InputSwitchMode::class, \Google\Cloud\Video\LiveStream\V1\InputConfig_InputSwitchMode::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputStreamProperty.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputStreamProperty.php new file mode 100644 index 000000000000..42b27a630665 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputStreamProperty.php @@ -0,0 +1,149 @@ +google.cloud.video.livestream.v1.InputStreamProperty + */ +class InputStreamProperty extends \Google\Protobuf\Internal\Message +{ + /** + * The time that the current input stream is accepted and the connection is + * established. + * + * Generated from protobuf field .google.protobuf.Timestamp last_establish_time = 1; + */ + protected $last_establish_time = null; + /** + * Properties of the video streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2; + */ + private $video_streams; + /** + * Properties of the audio streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3; + */ + private $audio_streams; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $last_establish_time + * The time that the current input stream is accepted and the connection is + * established. + * @type array<\Google\Cloud\Video\LiveStream\V1\VideoStreamProperty>|\Google\Protobuf\Internal\RepeatedField $video_streams + * Properties of the video streams. + * @type array<\Google\Cloud\Video\LiveStream\V1\AudioStreamProperty>|\Google\Protobuf\Internal\RepeatedField $audio_streams + * Properties of the audio streams. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The time that the current input stream is accepted and the connection is + * established. + * + * Generated from protobuf field .google.protobuf.Timestamp last_establish_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastEstablishTime() + { + return $this->last_establish_time; + } + + public function hasLastEstablishTime() + { + return isset($this->last_establish_time); + } + + public function clearLastEstablishTime() + { + unset($this->last_establish_time); + } + + /** + * The time that the current input stream is accepted and the connection is + * established. + * + * Generated from protobuf field .google.protobuf.Timestamp last_establish_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastEstablishTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_establish_time = $var; + + return $this; + } + + /** + * Properties of the video streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVideoStreams() + { + return $this->video_streams; + } + + /** + * Properties of the video streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2; + * @param array<\Google\Cloud\Video\LiveStream\V1\VideoStreamProperty>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVideoStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\VideoStreamProperty::class); + $this->video_streams = $arr; + + return $this; + } + + /** + * Properties of the audio streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAudioStreams() + { + return $this->audio_streams; + } + + /** + * Properties of the audio streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3; + * @param array<\Google\Cloud\Video\LiveStream\V1\AudioStreamProperty>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAudioStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\AudioStreamProperty::class); + $this->audio_streams = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsRequest.php new file mode 100644 index 000000000000..2dbfdfd1b10c --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsRequest.php @@ -0,0 +1,242 @@ +google.cloud.video.livestream.v1.ListChannelsRequest + */ +class ListChannelsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListChannelsResponse.next_page_token] + * to determine if there are more items left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The filter to apply to list results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. Please see + * {@see LivestreamServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\ListChannelsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * @type int $page_size + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListChannelsResponse.next_page_token] + * to determine if there are more items left to be queried. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * @type string $filter + * The filter to apply to list results. + * @type string $order_by + * Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListChannelsResponse.next_page_token] + * to determine if there are more items left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListChannelsResponse.next_page_token] + * to determine if there are more items left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The filter to apply to list results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter to apply to list results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsResponse.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsResponse.php new file mode 100644 index 000000000000..c535a18d3457 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsResponse.php @@ -0,0 +1,139 @@ +google.cloud.video.livestream.v1.ListChannelsResponse + */ +class ListChannelsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of channels. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Channel channels = 1; + */ + private $channels; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Video\LiveStream\V1\Channel>|\Google\Protobuf\Internal\RepeatedField $channels + * A list of channels. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * A list of channels. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Channel channels = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChannels() + { + return $this->channels; + } + + /** + * A list of channels. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Channel channels = 1; + * @param array<\Google\Cloud\Video\LiveStream\V1\Channel>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChannels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Channel::class); + $this->channels = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsRequest.php new file mode 100644 index 000000000000..2e459d167a5c --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsRequest.php @@ -0,0 +1,242 @@ +google.cloud.video.livestream.v1.ListEventsRequest + */ +class ListEventsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent channel for the resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListEventsResponse.next_page_token] + * to determine if there are more items left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The filter to apply to list results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent channel for the resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. Please see + * {@see LivestreamServiceClient::channelName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\ListEventsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent channel for the resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * @type int $page_size + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListEventsResponse.next_page_token] + * to determine if there are more items left to be queried. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * @type string $filter + * The filter to apply to list results. + * @type string $order_by + * Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent channel for the resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent channel for the resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListEventsResponse.next_page_token] + * to determine if there are more items left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListEventsResponse.next_page_token] + * to determine if there are more items left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The filter to apply to list results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter to apply to list results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsResponse.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsResponse.php new file mode 100644 index 000000000000..9c30220fcb35 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsResponse.php @@ -0,0 +1,139 @@ +google.cloud.video.livestream.v1.ListEventsResponse + */ +class ListEventsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of events. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Event events = 1; + */ + private $events; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Video\LiveStream\V1\Event>|\Google\Protobuf\Internal\RepeatedField $events + * A list of events. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * A list of events. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Event events = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEvents() + { + return $this->events; + } + + /** + * A list of events. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Event events = 1; + * @param array<\Google\Cloud\Video\LiveStream\V1\Event>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Event::class); + $this->events = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsRequest.php new file mode 100644 index 000000000000..95a3d958d8f5 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsRequest.php @@ -0,0 +1,242 @@ +google.cloud.video.livestream.v1.ListInputsRequest + */ +class ListInputsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListInputsResponse.next_page_token] + * to determine if there are more items left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The filter to apply to list results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Specifies the ordering of results following syntax at [Sorting + * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. Please see + * {@see LivestreamServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\ListInputsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * @type int $page_size + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListInputsResponse.next_page_token] + * to determine if there are more items left to be queried. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * @type string $filter + * The filter to apply to list results. + * @type string $order_by + * Specifies the ordering of results following syntax at [Sorting + * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListInputsResponse.next_page_token] + * to determine if there are more items left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListInputsResponse.next_page_token] + * to determine if there are more items left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The filter to apply to list results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter to apply to list results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Specifies the ordering of results following syntax at [Sorting + * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Specifies the ordering of results following syntax at [Sorting + * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsResponse.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsResponse.php new file mode 100644 index 000000000000..a996747b4e20 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsResponse.php @@ -0,0 +1,139 @@ +google.cloud.video.livestream.v1.ListInputsResponse + */ +class ListInputsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of inputs. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Input inputs = 1; + */ + private $inputs; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Video\LiveStream\V1\Input>|\Google\Protobuf\Internal\RepeatedField $inputs + * A list of inputs. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * A list of inputs. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Input inputs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInputs() + { + return $this->inputs; + } + + /** + * A list of inputs. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Input inputs = 1; + * @param array<\Google\Cloud\Video\LiveStream\V1\Input>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInputs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Input::class); + $this->inputs = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LivestreamServiceGrpcClient.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LivestreamServiceGrpcClient.php new file mode 100644 index 000000000000..038b2486d594 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LivestreamServiceGrpcClient.php @@ -0,0 +1,282 @@ +_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/CreateChannel', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Returns a list of all channels in the specified region. + * @param \Google\Cloud\Video\LiveStream\V1\ListChannelsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListChannels(\Google\Cloud\Video\LiveStream\V1\ListChannelsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/ListChannels', + $argument, + ['\Google\Cloud\Video\LiveStream\V1\ListChannelsResponse', 'decode'], + $metadata, $options); + } + + /** + * Returns the specified channel. + * @param \Google\Cloud\Video\LiveStream\V1\GetChannelRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetChannel(\Google\Cloud\Video\LiveStream\V1\GetChannelRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/GetChannel', + $argument, + ['\Google\Cloud\Video\LiveStream\V1\Channel', 'decode'], + $metadata, $options); + } + + /** + * Deletes the specified channel. + * @param \Google\Cloud\Video\LiveStream\V1\DeleteChannelRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteChannel(\Google\Cloud\Video\LiveStream\V1\DeleteChannelRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/DeleteChannel', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates the specified channel. + * @param \Google\Cloud\Video\LiveStream\V1\UpdateChannelRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateChannel(\Google\Cloud\Video\LiveStream\V1\UpdateChannelRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/UpdateChannel', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Starts the specified channel. Part of the video pipeline will be created + * only when the StartChannel request is received by the server. + * @param \Google\Cloud\Video\LiveStream\V1\StartChannelRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function StartChannel(\Google\Cloud\Video\LiveStream\V1\StartChannelRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/StartChannel', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Stops the specified channel. Part of the video pipeline will be released + * when the StopChannel request is received by the server. + * @param \Google\Cloud\Video\LiveStream\V1\StopChannelRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function StopChannel(\Google\Cloud\Video\LiveStream\V1\StopChannelRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/StopChannel', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Creates an input with the provided unique ID in the specified region. + * @param \Google\Cloud\Video\LiveStream\V1\CreateInputRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateInput(\Google\Cloud\Video\LiveStream\V1\CreateInputRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/CreateInput', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Returns a list of all inputs in the specified region. + * @param \Google\Cloud\Video\LiveStream\V1\ListInputsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListInputs(\Google\Cloud\Video\LiveStream\V1\ListInputsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/ListInputs', + $argument, + ['\Google\Cloud\Video\LiveStream\V1\ListInputsResponse', 'decode'], + $metadata, $options); + } + + /** + * Returns the specified input. + * @param \Google\Cloud\Video\LiveStream\V1\GetInputRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetInput(\Google\Cloud\Video\LiveStream\V1\GetInputRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/GetInput', + $argument, + ['\Google\Cloud\Video\LiveStream\V1\Input', 'decode'], + $metadata, $options); + } + + /** + * Deletes the specified input. + * @param \Google\Cloud\Video\LiveStream\V1\DeleteInputRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteInput(\Google\Cloud\Video\LiveStream\V1\DeleteInputRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/DeleteInput', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates the specified input. + * @param \Google\Cloud\Video\LiveStream\V1\UpdateInputRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateInput(\Google\Cloud\Video\LiveStream\V1\UpdateInputRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/UpdateInput', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Creates an event with the provided unique ID in the specified channel. + * @param \Google\Cloud\Video\LiveStream\V1\CreateEventRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateEvent(\Google\Cloud\Video\LiveStream\V1\CreateEventRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/CreateEvent', + $argument, + ['\Google\Cloud\Video\LiveStream\V1\Event', 'decode'], + $metadata, $options); + } + + /** + * Returns a list of all events in the specified channel. + * @param \Google\Cloud\Video\LiveStream\V1\ListEventsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListEvents(\Google\Cloud\Video\LiveStream\V1\ListEventsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/ListEvents', + $argument, + ['\Google\Cloud\Video\LiveStream\V1\ListEventsResponse', 'decode'], + $metadata, $options); + } + + /** + * Returns the specified event. + * @param \Google\Cloud\Video\LiveStream\V1\GetEventRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetEvent(\Google\Cloud\Video\LiveStream\V1\GetEventRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/GetEvent', + $argument, + ['\Google\Cloud\Video\LiveStream\V1\Event', 'decode'], + $metadata, $options); + } + + /** + * Deletes the specified event. + * @param \Google\Cloud\Video\LiveStream\V1\DeleteEventRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteEvent(\Google\Cloud\Video\LiveStream\V1\DeleteEventRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/DeleteEvent', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig.php new file mode 100644 index 000000000000..24c7138b5826 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig.php @@ -0,0 +1,70 @@ +google.cloud.video.livestream.v1.LogConfig + */ +class LogConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The severity level of platform logging for this resource. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig.LogSeverity log_severity = 1; + */ + protected $log_severity = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $log_severity + * The severity level of platform logging for this resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The severity level of platform logging for this resource. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig.LogSeverity log_severity = 1; + * @return int + */ + public function getLogSeverity() + { + return $this->log_severity; + } + + /** + * The severity level of platform logging for this resource. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig.LogSeverity log_severity = 1; + * @param int $var + * @return $this + */ + public function setLogSeverity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\LogConfig\LogSeverity::class); + $this->log_severity = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig/LogSeverity.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig/LogSeverity.php new file mode 100644 index 000000000000..f8a3b5c54235 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig/LogSeverity.php @@ -0,0 +1,92 @@ +google.cloud.video.livestream.v1.LogConfig.LogSeverity + */ +class LogSeverity +{ + /** + * Log severity is not specified. This is the same as log severity is OFF. + * + * Generated from protobuf enum LOG_SEVERITY_UNSPECIFIED = 0; + */ + const LOG_SEVERITY_UNSPECIFIED = 0; + /** + * Log is turned off. + * + * Generated from protobuf enum OFF = 1; + */ + const OFF = 1; + /** + * Log with severity higher than or equal to DEBUG are logged. + * + * Generated from protobuf enum DEBUG = 100; + */ + const DEBUG = 100; + /** + * Logs with severity higher than or equal to INFO are logged. + * + * Generated from protobuf enum INFO = 200; + */ + const INFO = 200; + /** + * Logs with severity higher than or equal to WARNING are logged. + * + * Generated from protobuf enum WARNING = 400; + */ + const WARNING = 400; + /** + * Logs with severity higher than or equal to ERROR are logged. + * + * Generated from protobuf enum ERROR = 500; + */ + const ERROR = 500; + + private static $valueToName = [ + self::LOG_SEVERITY_UNSPECIFIED => 'LOG_SEVERITY_UNSPECIFIED', + self::OFF => 'OFF', + self::DEBUG => 'DEBUG', + self::INFO => 'INFO', + self::WARNING => 'WARNING', + self::ERROR => 'ERROR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LogSeverity::class, \Google\Cloud\Video\LiveStream\V1\LogConfig_LogSeverity::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest.php new file mode 100644 index 000000000000..23356416c1f0 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest.php @@ -0,0 +1,327 @@ +google.cloud.video.livestream.v1.Manifest + */ +class Manifest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the generated file. The default is `manifest` with the + * extension suffix corresponding to the `Manifest` + * [type][google.cloud.video.livestream.v1.Manifest.type]. If multiple + * manifests are added to the channel, each must have a unique file name. + * + * Generated from protobuf field string file_name = 1; + */ + protected $file_name = ''; + /** + * Required. Type of the manifest, can be `HLS` or `DASH`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Required. List of `MuxStream` + * [key][google.cloud.video.livestream.v1.MuxStream.key]s that should appear + * in this manifest. + * - For HLS, either `fmp4` or `ts` mux streams can be specified but not + * mixed. + * - For DASH, only `fmp4` mux streams can be specified. + * + * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $mux_streams; + /** + * Maximum number of segments that this manifest holds. Once the manifest + * reaches this maximum number of segments, whenever a new segment is added to + * the manifest, the oldest segment will be removed from the manifest. + * The minimum value is 3 and the default value is 5. + * + * Generated from protobuf field int32 max_segment_count = 4; + */ + protected $max_segment_count = 0; + /** + * How long to keep a segment on the output Google Cloud Storage bucket after + * it is removed from the manifest. This field should be large enough to cover + * the manifest propagation delay. Otherwise, a player could receive 404 + * errors while accessing segments which are listed in the manifest that the + * player has, but were already deleted from the output Google Cloud Storage + * bucket. Default value is `60s`. + * + * Generated from protobuf field .google.protobuf.Duration segment_keep_duration = 5; + */ + protected $segment_keep_duration = null; + /** + * Whether to use the timecode, as specified in timecode config, when setting: + * - `availabilityStartTime` attribute in DASH manifests. + * - `#EXT-X-PROGRAM-DATE-TIME` tag in HLS manifests. + * If false, ignore the input timecode and use the time from system clock + * when the manifest is first generated. This is the default behavior. + * + * Generated from protobuf field bool use_timecode_as_timeline = 6; + */ + protected $use_timecode_as_timeline = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $file_name + * The name of the generated file. The default is `manifest` with the + * extension suffix corresponding to the `Manifest` + * [type][google.cloud.video.livestream.v1.Manifest.type]. If multiple + * manifests are added to the channel, each must have a unique file name. + * @type int $type + * Required. Type of the manifest, can be `HLS` or `DASH`. + * @type array|\Google\Protobuf\Internal\RepeatedField $mux_streams + * Required. List of `MuxStream` + * [key][google.cloud.video.livestream.v1.MuxStream.key]s that should appear + * in this manifest. + * - For HLS, either `fmp4` or `ts` mux streams can be specified but not + * mixed. + * - For DASH, only `fmp4` mux streams can be specified. + * @type int $max_segment_count + * Maximum number of segments that this manifest holds. Once the manifest + * reaches this maximum number of segments, whenever a new segment is added to + * the manifest, the oldest segment will be removed from the manifest. + * The minimum value is 3 and the default value is 5. + * @type \Google\Protobuf\Duration $segment_keep_duration + * How long to keep a segment on the output Google Cloud Storage bucket after + * it is removed from the manifest. This field should be large enough to cover + * the manifest propagation delay. Otherwise, a player could receive 404 + * errors while accessing segments which are listed in the manifest that the + * player has, but were already deleted from the output Google Cloud Storage + * bucket. Default value is `60s`. + * @type bool $use_timecode_as_timeline + * Whether to use the timecode, as specified in timecode config, when setting: + * - `availabilityStartTime` attribute in DASH manifests. + * - `#EXT-X-PROGRAM-DATE-TIME` tag in HLS manifests. + * If false, ignore the input timecode and use the time from system clock + * when the manifest is first generated. This is the default behavior. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * The name of the generated file. The default is `manifest` with the + * extension suffix corresponding to the `Manifest` + * [type][google.cloud.video.livestream.v1.Manifest.type]. If multiple + * manifests are added to the channel, each must have a unique file name. + * + * Generated from protobuf field string file_name = 1; + * @return string + */ + public function getFileName() + { + return $this->file_name; + } + + /** + * The name of the generated file. The default is `manifest` with the + * extension suffix corresponding to the `Manifest` + * [type][google.cloud.video.livestream.v1.Manifest.type]. If multiple + * manifests are added to the channel, each must have a unique file name. + * + * Generated from protobuf field string file_name = 1; + * @param string $var + * @return $this + */ + public function setFileName($var) + { + GPBUtil::checkString($var, True); + $this->file_name = $var; + + return $this; + } + + /** + * Required. Type of the manifest, can be `HLS` or `DASH`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. Type of the manifest, can be `HLS` or `DASH`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Manifest\ManifestType::class); + $this->type = $var; + + return $this; + } + + /** + * Required. List of `MuxStream` + * [key][google.cloud.video.livestream.v1.MuxStream.key]s that should appear + * in this manifest. + * - For HLS, either `fmp4` or `ts` mux streams can be specified but not + * mixed. + * - For DASH, only `fmp4` mux streams can be specified. + * + * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMuxStreams() + { + return $this->mux_streams; + } + + /** + * Required. List of `MuxStream` + * [key][google.cloud.video.livestream.v1.MuxStream.key]s that should appear + * in this manifest. + * - For HLS, either `fmp4` or `ts` mux streams can be specified but not + * mixed. + * - For DASH, only `fmp4` mux streams can be specified. + * + * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMuxStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->mux_streams = $arr; + + return $this; + } + + /** + * Maximum number of segments that this manifest holds. Once the manifest + * reaches this maximum number of segments, whenever a new segment is added to + * the manifest, the oldest segment will be removed from the manifest. + * The minimum value is 3 and the default value is 5. + * + * Generated from protobuf field int32 max_segment_count = 4; + * @return int + */ + public function getMaxSegmentCount() + { + return $this->max_segment_count; + } + + /** + * Maximum number of segments that this manifest holds. Once the manifest + * reaches this maximum number of segments, whenever a new segment is added to + * the manifest, the oldest segment will be removed from the manifest. + * The minimum value is 3 and the default value is 5. + * + * Generated from protobuf field int32 max_segment_count = 4; + * @param int $var + * @return $this + */ + public function setMaxSegmentCount($var) + { + GPBUtil::checkInt32($var); + $this->max_segment_count = $var; + + return $this; + } + + /** + * How long to keep a segment on the output Google Cloud Storage bucket after + * it is removed from the manifest. This field should be large enough to cover + * the manifest propagation delay. Otherwise, a player could receive 404 + * errors while accessing segments which are listed in the manifest that the + * player has, but were already deleted from the output Google Cloud Storage + * bucket. Default value is `60s`. + * + * Generated from protobuf field .google.protobuf.Duration segment_keep_duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getSegmentKeepDuration() + { + return $this->segment_keep_duration; + } + + public function hasSegmentKeepDuration() + { + return isset($this->segment_keep_duration); + } + + public function clearSegmentKeepDuration() + { + unset($this->segment_keep_duration); + } + + /** + * How long to keep a segment on the output Google Cloud Storage bucket after + * it is removed from the manifest. This field should be large enough to cover + * the manifest propagation delay. Otherwise, a player could receive 404 + * errors while accessing segments which are listed in the manifest that the + * player has, but were already deleted from the output Google Cloud Storage + * bucket. Default value is `60s`. + * + * Generated from protobuf field .google.protobuf.Duration segment_keep_duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setSegmentKeepDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->segment_keep_duration = $var; + + return $this; + } + + /** + * Whether to use the timecode, as specified in timecode config, when setting: + * - `availabilityStartTime` attribute in DASH manifests. + * - `#EXT-X-PROGRAM-DATE-TIME` tag in HLS manifests. + * If false, ignore the input timecode and use the time from system clock + * when the manifest is first generated. This is the default behavior. + * + * Generated from protobuf field bool use_timecode_as_timeline = 6; + * @return bool + */ + public function getUseTimecodeAsTimeline() + { + return $this->use_timecode_as_timeline; + } + + /** + * Whether to use the timecode, as specified in timecode config, when setting: + * - `availabilityStartTime` attribute in DASH manifests. + * - `#EXT-X-PROGRAM-DATE-TIME` tag in HLS manifests. + * If false, ignore the input timecode and use the time from system clock + * when the manifest is first generated. This is the default behavior. + * + * Generated from protobuf field bool use_timecode_as_timeline = 6; + * @param bool $var + * @return $this + */ + public function setUseTimecodeAsTimeline($var) + { + GPBUtil::checkBool($var); + $this->use_timecode_as_timeline = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest/ManifestType.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest/ManifestType.php new file mode 100644 index 000000000000..f3c9bee3a916 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest/ManifestType.php @@ -0,0 +1,64 @@ +google.cloud.video.livestream.v1.Manifest.ManifestType + */ +class ManifestType +{ + /** + * The manifest type is not specified. + * + * Generated from protobuf enum MANIFEST_TYPE_UNSPECIFIED = 0; + */ + const MANIFEST_TYPE_UNSPECIFIED = 0; + /** + * Create an `HLS` manifest. The corresponding file extension is `.m3u8`. + * + * Generated from protobuf enum HLS = 1; + */ + const HLS = 1; + /** + * Create a `DASH` manifest. The corresponding file extension is `.mpd`. + * + * Generated from protobuf enum DASH = 2; + */ + const DASH = 2; + + private static $valueToName = [ + self::MANIFEST_TYPE_UNSPECIFIED => 'MANIFEST_TYPE_UNSPECIFIED', + self::HLS => 'HLS', + self::DASH => 'DASH', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ManifestType::class, \Google\Cloud\Video\LiveStream\V1\Manifest_ManifestType::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/MuxStream.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/MuxStream.php new file mode 100644 index 000000000000..b5198e42c2f0 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/MuxStream.php @@ -0,0 +1,249 @@ +google.cloud.video.livestream.v1.MuxStream + */ +class MuxStream extends \Google\Protobuf\Internal\Message +{ + /** + * A unique key for this multiplexed stream. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * The container format. The default is `fmp4`. + * Supported container formats: + * - `fmp4` - the corresponding file extension is `.m4s` + * - `ts` - the corresponding file extension is `.ts` + * + * Generated from protobuf field string container = 3; + */ + protected $container = ''; + /** + * List of `ElementaryStream` + * [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed + * in this stream. + * - For `fmp4` container, must contain either one video or one audio stream. + * - For `ts` container, must contain exactly one audio stream and up to one + * video stream. + * + * Generated from protobuf field repeated string elementary_streams = 4; + */ + private $elementary_streams; + /** + * Segment settings for `fmp4` and `ts`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5; + */ + protected $segment_settings = null; + /** + * Identifier of the encryption configuration to use. If omitted, output + * will be unencrypted. + * + * Generated from protobuf field string encryption_id = 6; + */ + protected $encryption_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * A unique key for this multiplexed stream. + * @type string $container + * The container format. The default is `fmp4`. + * Supported container formats: + * - `fmp4` - the corresponding file extension is `.m4s` + * - `ts` - the corresponding file extension is `.ts` + * @type array|\Google\Protobuf\Internal\RepeatedField $elementary_streams + * List of `ElementaryStream` + * [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed + * in this stream. + * - For `fmp4` container, must contain either one video or one audio stream. + * - For `ts` container, must contain exactly one audio stream and up to one + * video stream. + * @type \Google\Cloud\Video\LiveStream\V1\SegmentSettings $segment_settings + * Segment settings for `fmp4` and `ts`. + * @type string $encryption_id + * Identifier of the encryption configuration to use. If omitted, output + * will be unencrypted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * A unique key for this multiplexed stream. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * A unique key for this multiplexed stream. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * The container format. The default is `fmp4`. + * Supported container formats: + * - `fmp4` - the corresponding file extension is `.m4s` + * - `ts` - the corresponding file extension is `.ts` + * + * Generated from protobuf field string container = 3; + * @return string + */ + public function getContainer() + { + return $this->container; + } + + /** + * The container format. The default is `fmp4`. + * Supported container formats: + * - `fmp4` - the corresponding file extension is `.m4s` + * - `ts` - the corresponding file extension is `.ts` + * + * Generated from protobuf field string container = 3; + * @param string $var + * @return $this + */ + public function setContainer($var) + { + GPBUtil::checkString($var, True); + $this->container = $var; + + return $this; + } + + /** + * List of `ElementaryStream` + * [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed + * in this stream. + * - For `fmp4` container, must contain either one video or one audio stream. + * - For `ts` container, must contain exactly one audio stream and up to one + * video stream. + * + * Generated from protobuf field repeated string elementary_streams = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getElementaryStreams() + { + return $this->elementary_streams; + } + + /** + * List of `ElementaryStream` + * [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed + * in this stream. + * - For `fmp4` container, must contain either one video or one audio stream. + * - For `ts` container, must contain exactly one audio stream and up to one + * video stream. + * + * Generated from protobuf field repeated string elementary_streams = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setElementaryStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->elementary_streams = $arr; + + return $this; + } + + /** + * Segment settings for `fmp4` and `ts`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5; + * @return \Google\Cloud\Video\LiveStream\V1\SegmentSettings|null + */ + public function getSegmentSettings() + { + return $this->segment_settings; + } + + public function hasSegmentSettings() + { + return isset($this->segment_settings); + } + + public function clearSegmentSettings() + { + unset($this->segment_settings); + } + + /** + * Segment settings for `fmp4` and `ts`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5; + * @param \Google\Cloud\Video\LiveStream\V1\SegmentSettings $var + * @return $this + */ + public function setSegmentSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\SegmentSettings::class); + $this->segment_settings = $var; + + return $this; + } + + /** + * Identifier of the encryption configuration to use. If omitted, output + * will be unencrypted. + * + * Generated from protobuf field string encryption_id = 6; + * @return string + */ + public function getEncryptionId() + { + return $this->encryption_id; + } + + /** + * Identifier of the encryption configuration to use. If omitted, output + * will be unencrypted. + * + * Generated from protobuf field string encryption_id = 6; + * @param string $var + * @return $this + */ + public function setEncryptionId($var) + { + GPBUtil::checkString($var, True); + $this->encryption_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/OperationMetadata.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/OperationMetadata.php new file mode 100644 index 000000000000..ccb892bc11cf --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/OperationMetadata.php @@ -0,0 +1,273 @@ +google.cloud.video.livestream.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig.php new file mode 100644 index 000000000000..3f4966135443 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig.php @@ -0,0 +1,165 @@ +google.cloud.video.livestream.v1.PreprocessingConfig + */ +class PreprocessingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Audio preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Audio audio = 1; + */ + protected $audio = null; + /** + * Specify the video cropping configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Crop crop = 2; + */ + protected $crop = null; + /** + * Specify the video pad filter configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Pad pad = 3; + */ + protected $pad = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Audio $audio + * Audio preprocessing configuration. + * @type \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Crop $crop + * Specify the video cropping configuration. + * @type \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Pad $pad + * Specify the video pad filter configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * Audio preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Audio audio = 1; + * @return \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Audio|null + */ + public function getAudio() + { + return $this->audio; + } + + public function hasAudio() + { + return isset($this->audio); + } + + public function clearAudio() + { + unset($this->audio); + } + + /** + * Audio preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Audio audio = 1; + * @param \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Audio $var + * @return $this + */ + public function setAudio($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Audio::class); + $this->audio = $var; + + return $this; + } + + /** + * Specify the video cropping configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Crop crop = 2; + * @return \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Crop|null + */ + public function getCrop() + { + return $this->crop; + } + + public function hasCrop() + { + return isset($this->crop); + } + + public function clearCrop() + { + unset($this->crop); + } + + /** + * Specify the video cropping configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Crop crop = 2; + * @param \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Crop $var + * @return $this + */ + public function setCrop($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Crop::class); + $this->crop = $var; + + return $this; + } + + /** + * Specify the video pad filter configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Pad pad = 3; + * @return \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Pad|null + */ + public function getPad() + { + return $this->pad; + } + + public function hasPad() + { + return isset($this->pad); + } + + public function clearPad() + { + unset($this->pad); + } + + /** + * Specify the video pad filter configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Pad pad = 3; + * @param \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Pad $var + * @return $this + */ + public function setPad($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Pad::class); + $this->pad = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Audio.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Audio.php new file mode 100644 index 000000000000..5e62f61a0530 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Audio.php @@ -0,0 +1,106 @@ +google.cloud.video.livestream.v1.PreprocessingConfig.Audio + */ +class Audio extends \Google\Protobuf\Internal\Message +{ + /** + * Specify audio loudness normalization in loudness units relative to full + * scale (LUFS). Enter a value between -24 and 0 according to the following: + * - -24 is the Advanced Television Systems Committee (ATSC A/85) + * - -23 is the EU R128 broadcast standard + * - -19 is the prior standard for online mono audio + * - -18 is the ReplayGain standard + * - -16 is the prior standard for stereo audio + * - -14 is the new online audio standard recommended by Spotify, as well as + * Amazon Echo + * - 0 disables normalization. The default is 0. + * + * Generated from protobuf field double lufs = 1; + */ + protected $lufs = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $lufs + * Specify audio loudness normalization in loudness units relative to full + * scale (LUFS). Enter a value between -24 and 0 according to the following: + * - -24 is the Advanced Television Systems Committee (ATSC A/85) + * - -23 is the EU R128 broadcast standard + * - -19 is the prior standard for online mono audio + * - -18 is the ReplayGain standard + * - -16 is the prior standard for stereo audio + * - -14 is the new online audio standard recommended by Spotify, as well as + * Amazon Echo + * - 0 disables normalization. The default is 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * Specify audio loudness normalization in loudness units relative to full + * scale (LUFS). Enter a value between -24 and 0 according to the following: + * - -24 is the Advanced Television Systems Committee (ATSC A/85) + * - -23 is the EU R128 broadcast standard + * - -19 is the prior standard for online mono audio + * - -18 is the ReplayGain standard + * - -16 is the prior standard for stereo audio + * - -14 is the new online audio standard recommended by Spotify, as well as + * Amazon Echo + * - 0 disables normalization. The default is 0. + * + * Generated from protobuf field double lufs = 1; + * @return float + */ + public function getLufs() + { + return $this->lufs; + } + + /** + * Specify audio loudness normalization in loudness units relative to full + * scale (LUFS). Enter a value between -24 and 0 according to the following: + * - -24 is the Advanced Television Systems Committee (ATSC A/85) + * - -23 is the EU R128 broadcast standard + * - -19 is the prior standard for online mono audio + * - -18 is the ReplayGain standard + * - -16 is the prior standard for stereo audio + * - -14 is the new online audio standard recommended by Spotify, as well as + * Amazon Echo + * - 0 disables normalization. The default is 0. + * + * Generated from protobuf field double lufs = 1; + * @param float $var + * @return $this + */ + public function setLufs($var) + { + GPBUtil::checkDouble($var); + $this->lufs = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Audio::class, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig_Audio::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Crop.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Crop.php new file mode 100644 index 000000000000..71c8d4b86cde --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Crop.php @@ -0,0 +1,173 @@ +google.cloud.video.livestream.v1.PreprocessingConfig.Crop + */ +class Crop extends \Google\Protobuf\Internal\Message +{ + /** + * The number of pixels to crop from the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + */ + protected $top_pixels = 0; + /** + * The number of pixels to crop from the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + */ + protected $bottom_pixels = 0; + /** + * The number of pixels to crop from the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + */ + protected $left_pixels = 0; + /** + * The number of pixels to crop from the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + */ + protected $right_pixels = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $top_pixels + * The number of pixels to crop from the top. The default is 0. + * @type int $bottom_pixels + * The number of pixels to crop from the bottom. The default is 0. + * @type int $left_pixels + * The number of pixels to crop from the left. The default is 0. + * @type int $right_pixels + * The number of pixels to crop from the right. The default is 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * The number of pixels to crop from the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + * @return int + */ + public function getTopPixels() + { + return $this->top_pixels; + } + + /** + * The number of pixels to crop from the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + * @param int $var + * @return $this + */ + public function setTopPixels($var) + { + GPBUtil::checkInt32($var); + $this->top_pixels = $var; + + return $this; + } + + /** + * The number of pixels to crop from the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + * @return int + */ + public function getBottomPixels() + { + return $this->bottom_pixels; + } + + /** + * The number of pixels to crop from the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + * @param int $var + * @return $this + */ + public function setBottomPixels($var) + { + GPBUtil::checkInt32($var); + $this->bottom_pixels = $var; + + return $this; + } + + /** + * The number of pixels to crop from the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + * @return int + */ + public function getLeftPixels() + { + return $this->left_pixels; + } + + /** + * The number of pixels to crop from the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + * @param int $var + * @return $this + */ + public function setLeftPixels($var) + { + GPBUtil::checkInt32($var); + $this->left_pixels = $var; + + return $this; + } + + /** + * The number of pixels to crop from the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + * @return int + */ + public function getRightPixels() + { + return $this->right_pixels; + } + + /** + * The number of pixels to crop from the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + * @param int $var + * @return $this + */ + public function setRightPixels($var) + { + GPBUtil::checkInt32($var); + $this->right_pixels = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Crop::class, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig_Crop::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Pad.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Pad.php new file mode 100644 index 000000000000..ee40c165846e --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Pad.php @@ -0,0 +1,173 @@ +google.cloud.video.livestream.v1.PreprocessingConfig.Pad + */ +class Pad extends \Google\Protobuf\Internal\Message +{ + /** + * The number of pixels to add to the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + */ + protected $top_pixels = 0; + /** + * The number of pixels to add to the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + */ + protected $bottom_pixels = 0; + /** + * The number of pixels to add to the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + */ + protected $left_pixels = 0; + /** + * The number of pixels to add to the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + */ + protected $right_pixels = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $top_pixels + * The number of pixels to add to the top. The default is 0. + * @type int $bottom_pixels + * The number of pixels to add to the bottom. The default is 0. + * @type int $left_pixels + * The number of pixels to add to the left. The default is 0. + * @type int $right_pixels + * The number of pixels to add to the right. The default is 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * The number of pixels to add to the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + * @return int + */ + public function getTopPixels() + { + return $this->top_pixels; + } + + /** + * The number of pixels to add to the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + * @param int $var + * @return $this + */ + public function setTopPixels($var) + { + GPBUtil::checkInt32($var); + $this->top_pixels = $var; + + return $this; + } + + /** + * The number of pixels to add to the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + * @return int + */ + public function getBottomPixels() + { + return $this->bottom_pixels; + } + + /** + * The number of pixels to add to the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + * @param int $var + * @return $this + */ + public function setBottomPixels($var) + { + GPBUtil::checkInt32($var); + $this->bottom_pixels = $var; + + return $this; + } + + /** + * The number of pixels to add to the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + * @return int + */ + public function getLeftPixels() + { + return $this->left_pixels; + } + + /** + * The number of pixels to add to the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + * @param int $var + * @return $this + */ + public function setLeftPixels($var) + { + GPBUtil::checkInt32($var); + $this->left_pixels = $var; + + return $this; + } + + /** + * The number of pixels to add to the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + * @return int + */ + public function getRightPixels() + { + return $this->right_pixels; + } + + /** + * The number of pixels to add to the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + * @param int $var + * @return $this + */ + public function setRightPixels($var) + { + GPBUtil::checkInt32($var); + $this->right_pixels = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Pad::class, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig_Pad::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SegmentSettings.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SegmentSettings.php new file mode 100644 index 000000000000..6778ece42f49 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SegmentSettings.php @@ -0,0 +1,105 @@ +google.cloud.video.livestream.v1.SegmentSettings + */ +class SegmentSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Duration of the segments in seconds. The default is `6s`. Note that + * `segmentDuration` must be greater than or equal to + * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration], + * and `segmentDuration` must be divisible by + * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration]. + * Valid range is [2s, 20s]. + * All [mux_streams][google.cloud.video.livestream.v1.Manifest.mux_streams] in + * the same manifest must have the same segment duration. + * + * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; + */ + protected $segment_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $segment_duration + * Duration of the segments in seconds. The default is `6s`. Note that + * `segmentDuration` must be greater than or equal to + * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration], + * and `segmentDuration` must be divisible by + * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration]. + * Valid range is [2s, 20s]. + * All [mux_streams][google.cloud.video.livestream.v1.Manifest.mux_streams] in + * the same manifest must have the same segment duration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * Duration of the segments in seconds. The default is `6s`. Note that + * `segmentDuration` must be greater than or equal to + * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration], + * and `segmentDuration` must be divisible by + * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration]. + * Valid range is [2s, 20s]. + * All [mux_streams][google.cloud.video.livestream.v1.Manifest.mux_streams] in + * the same manifest must have the same segment duration. + * + * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getSegmentDuration() + { + return $this->segment_duration; + } + + public function hasSegmentDuration() + { + return isset($this->segment_duration); + } + + public function clearSegmentDuration() + { + unset($this->segment_duration); + } + + /** + * Duration of the segments in seconds. The default is `6s`. Note that + * `segmentDuration` must be greater than or equal to + * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration], + * and `segmentDuration` must be divisible by + * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration]. + * Valid range is [2s, 20s]. + * All [mux_streams][google.cloud.video.livestream.v1.Manifest.mux_streams] in + * the same manifest must have the same segment duration. + * + * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setSegmentDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->segment_duration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SpriteSheet.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SpriteSheet.php new file mode 100644 index 000000000000..719cf70bff52 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SpriteSheet.php @@ -0,0 +1,367 @@ +google.cloud.video.livestream.v1.SpriteSheet + */ +class SpriteSheet extends \Google\Protobuf\Internal\Message +{ + /** + * Format type. The default is `jpeg`. + * Supported formats: + * - `jpeg` + * + * Generated from protobuf field string format = 1; + */ + protected $format = ''; + /** + * Required. File name prefix for the generated sprite sheets. If multiple + * sprite sheets are added to the channel, each must have a unique file + * prefix. + * Each sprite sheet has an incremental 10-digit zero-padded suffix starting + * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. + * + * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $file_prefix = ''; + /** + * Required. The width of the sprite in pixels. Must be an even integer. + * + * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $sprite_width_pixels = 0; + /** + * Required. The height of the sprite in pixels. Must be an even integer. + * + * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $sprite_height_pixels = 0; + /** + * The maximum number of sprites per row in a sprite sheet. Valid range is + * [1, 10] and the default value is 1. + * + * Generated from protobuf field int32 column_count = 5; + */ + protected $column_count = 0; + /** + * The maximum number of rows per sprite sheet. When the sprite sheet is full, + * a new sprite sheet is created. Valid range is [1, 10] and the default value + * is 1. + * + * Generated from protobuf field int32 row_count = 6; + */ + protected $row_count = 0; + /** + * Create sprites at regular intervals. Valid range is [1 second, 1 hour] and + * the default value is `10s`. + * + * Generated from protobuf field .google.protobuf.Duration interval = 7; + */ + protected $interval = null; + /** + * The quality of the generated sprite sheet. Enter a value between 1 + * and 100, where 1 is the lowest quality and 100 is the highest quality. + * The default is 100. A high quality value corresponds to a low image data + * compression ratio. + * + * Generated from protobuf field int32 quality = 8; + */ + protected $quality = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $format + * Format type. The default is `jpeg`. + * Supported formats: + * - `jpeg` + * @type string $file_prefix + * Required. File name prefix for the generated sprite sheets. If multiple + * sprite sheets are added to the channel, each must have a unique file + * prefix. + * Each sprite sheet has an incremental 10-digit zero-padded suffix starting + * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. + * @type int $sprite_width_pixels + * Required. The width of the sprite in pixels. Must be an even integer. + * @type int $sprite_height_pixels + * Required. The height of the sprite in pixels. Must be an even integer. + * @type int $column_count + * The maximum number of sprites per row in a sprite sheet. Valid range is + * [1, 10] and the default value is 1. + * @type int $row_count + * The maximum number of rows per sprite sheet. When the sprite sheet is full, + * a new sprite sheet is created. Valid range is [1, 10] and the default value + * is 1. + * @type \Google\Protobuf\Duration $interval + * Create sprites at regular intervals. Valid range is [1 second, 1 hour] and + * the default value is `10s`. + * @type int $quality + * The quality of the generated sprite sheet. Enter a value between 1 + * and 100, where 1 is the lowest quality and 100 is the highest quality. + * The default is 100. A high quality value corresponds to a low image data + * compression ratio. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * Format type. The default is `jpeg`. + * Supported formats: + * - `jpeg` + * + * Generated from protobuf field string format = 1; + * @return string + */ + public function getFormat() + { + return $this->format; + } + + /** + * Format type. The default is `jpeg`. + * Supported formats: + * - `jpeg` + * + * Generated from protobuf field string format = 1; + * @param string $var + * @return $this + */ + public function setFormat($var) + { + GPBUtil::checkString($var, True); + $this->format = $var; + + return $this; + } + + /** + * Required. File name prefix for the generated sprite sheets. If multiple + * sprite sheets are added to the channel, each must have a unique file + * prefix. + * Each sprite sheet has an incremental 10-digit zero-padded suffix starting + * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. + * + * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFilePrefix() + { + return $this->file_prefix; + } + + /** + * Required. File name prefix for the generated sprite sheets. If multiple + * sprite sheets are added to the channel, each must have a unique file + * prefix. + * Each sprite sheet has an incremental 10-digit zero-padded suffix starting + * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. + * + * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFilePrefix($var) + { + GPBUtil::checkString($var, True); + $this->file_prefix = $var; + + return $this; + } + + /** + * Required. The width of the sprite in pixels. Must be an even integer. + * + * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getSpriteWidthPixels() + { + return $this->sprite_width_pixels; + } + + /** + * Required. The width of the sprite in pixels. Must be an even integer. + * + * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setSpriteWidthPixels($var) + { + GPBUtil::checkInt32($var); + $this->sprite_width_pixels = $var; + + return $this; + } + + /** + * Required. The height of the sprite in pixels. Must be an even integer. + * + * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getSpriteHeightPixels() + { + return $this->sprite_height_pixels; + } + + /** + * Required. The height of the sprite in pixels. Must be an even integer. + * + * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setSpriteHeightPixels($var) + { + GPBUtil::checkInt32($var); + $this->sprite_height_pixels = $var; + + return $this; + } + + /** + * The maximum number of sprites per row in a sprite sheet. Valid range is + * [1, 10] and the default value is 1. + * + * Generated from protobuf field int32 column_count = 5; + * @return int + */ + public function getColumnCount() + { + return $this->column_count; + } + + /** + * The maximum number of sprites per row in a sprite sheet. Valid range is + * [1, 10] and the default value is 1. + * + * Generated from protobuf field int32 column_count = 5; + * @param int $var + * @return $this + */ + public function setColumnCount($var) + { + GPBUtil::checkInt32($var); + $this->column_count = $var; + + return $this; + } + + /** + * The maximum number of rows per sprite sheet. When the sprite sheet is full, + * a new sprite sheet is created. Valid range is [1, 10] and the default value + * is 1. + * + * Generated from protobuf field int32 row_count = 6; + * @return int + */ + public function getRowCount() + { + return $this->row_count; + } + + /** + * The maximum number of rows per sprite sheet. When the sprite sheet is full, + * a new sprite sheet is created. Valid range is [1, 10] and the default value + * is 1. + * + * Generated from protobuf field int32 row_count = 6; + * @param int $var + * @return $this + */ + public function setRowCount($var) + { + GPBUtil::checkInt32($var); + $this->row_count = $var; + + return $this; + } + + /** + * Create sprites at regular intervals. Valid range is [1 second, 1 hour] and + * the default value is `10s`. + * + * Generated from protobuf field .google.protobuf.Duration interval = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getInterval() + { + return $this->interval; + } + + public function hasInterval() + { + return isset($this->interval); + } + + public function clearInterval() + { + unset($this->interval); + } + + /** + * Create sprites at regular intervals. Valid range is [1 second, 1 hour] and + * the default value is `10s`. + * + * Generated from protobuf field .google.protobuf.Duration interval = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->interval = $var; + + return $this; + } + + /** + * The quality of the generated sprite sheet. Enter a value between 1 + * and 100, where 1 is the lowest quality and 100 is the highest quality. + * The default is 100. A high quality value corresponds to a low image data + * compression ratio. + * + * Generated from protobuf field int32 quality = 8; + * @return int + */ + public function getQuality() + { + return $this->quality; + } + + /** + * The quality of the generated sprite sheet. Enter a value between 1 + * and 100, where 1 is the lowest quality and 100 is the highest quality. + * The default is 100. A high quality value corresponds to a low image data + * compression ratio. + * + * Generated from protobuf field int32 quality = 8; + * @param int $var + * @return $this + */ + public function setQuality($var) + { + GPBUtil::checkInt32($var); + $this->quality = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StartChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StartChannelRequest.php new file mode 100644 index 000000000000..d70e8707a2a4 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StartChannelRequest.php @@ -0,0 +1,160 @@ +google.cloud.video.livestream.v1.StartChannelRequest + */ +class StartChannelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 2; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. Please see + * {@see LivestreamServiceClient::channelName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\StartChannelRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 2; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 2; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StopChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StopChannelRequest.php new file mode 100644 index 000000000000..59ed1b5512cf --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StopChannelRequest.php @@ -0,0 +1,160 @@ +google.cloud.video.livestream.v1.StopChannelRequest + */ +class StopChannelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 2; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. Please see + * {@see LivestreamServiceClient::channelName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\StopChannelRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 2; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 2; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TextStream.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TextStream.php new file mode 100644 index 000000000000..65259f395c0a --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TextStream.php @@ -0,0 +1,79 @@ +google.cloud.video.livestream.v1.TextStream + */ +class TextStream extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The codec for this text stream. + * Supported text codecs: + * - `cea608` + * - `cea708` + * + * Generated from protobuf field string codec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $codec = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $codec + * Required. The codec for this text stream. + * Supported text codecs: + * - `cea608` + * - `cea708` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * Required. The codec for this text stream. + * Supported text codecs: + * - `cea608` + * - `cea708` + * + * Generated from protobuf field string codec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCodec() + { + return $this->codec; + } + + /** + * Required. The codec for this text stream. + * Supported text codecs: + * - `cea608` + * - `cea708` + * + * Generated from protobuf field string codec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCodec($var) + { + GPBUtil::checkString($var, True); + $this->codec = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig.php new file mode 100644 index 000000000000..0bfb38e5aa03 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig.php @@ -0,0 +1,150 @@ +google.cloud.video.livestream.v1.TimecodeConfig + */ +class TimecodeConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The source of the timecode that will later be used in outputs/manifests. + * It determines the initial timecode/timestamp (first frame) of output + * streams. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig.TimecodeSource source = 1; + */ + protected $source = 0; + protected $time_offset; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $source + * The source of the timecode that will later be used in outputs/manifests. + * It determines the initial timecode/timestamp (first frame) of output + * streams. + * @type \Google\Protobuf\Duration $utc_offset + * UTC offset. Must be whole seconds, between -18 hours and +18 hours. + * @type \Google\Type\TimeZone $time_zone + * Time zone e.g. "America/Los_Angeles". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * The source of the timecode that will later be used in outputs/manifests. + * It determines the initial timecode/timestamp (first frame) of output + * streams. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig.TimecodeSource source = 1; + * @return int + */ + public function getSource() + { + return $this->source; + } + + /** + * The source of the timecode that will later be used in outputs/manifests. + * It determines the initial timecode/timestamp (first frame) of output + * streams. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig.TimecodeSource source = 1; + * @param int $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\TimecodeConfig\TimecodeSource::class); + $this->source = $var; + + return $this; + } + + /** + * UTC offset. Must be whole seconds, between -18 hours and +18 hours. + * + * Generated from protobuf field .google.protobuf.Duration utc_offset = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getUtcOffset() + { + return $this->readOneof(2); + } + + public function hasUtcOffset() + { + return $this->hasOneof(2); + } + + /** + * UTC offset. Must be whole seconds, between -18 hours and +18 hours. + * + * Generated from protobuf field .google.protobuf.Duration utc_offset = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setUtcOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Time zone e.g. "America/Los_Angeles". + * + * Generated from protobuf field .google.type.TimeZone time_zone = 3; + * @return \Google\Type\TimeZone|null + */ + public function getTimeZone() + { + return $this->readOneof(3); + } + + public function hasTimeZone() + { + return $this->hasOneof(3); + } + + /** + * Time zone e.g. "America/Los_Angeles". + * + * Generated from protobuf field .google.type.TimeZone time_zone = 3; + * @param \Google\Type\TimeZone $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkMessage($var, \Google\Type\TimeZone::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getTimeOffset() + { + return $this->whichOneof("time_offset"); + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig/TimecodeSource.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig/TimecodeSource.php new file mode 100644 index 000000000000..143ed3952b6b --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig/TimecodeSource.php @@ -0,0 +1,64 @@ +google.cloud.video.livestream.v1.TimecodeConfig.TimecodeSource + */ +class TimecodeSource +{ + /** + * The timecode source is not specified. + * + * Generated from protobuf enum TIMECODE_SOURCE_UNSPECIFIED = 0; + */ + const TIMECODE_SOURCE_UNSPECIFIED = 0; + /** + * Use input media timestamp. + * + * Generated from protobuf enum MEDIA_TIMESTAMP = 1; + */ + const MEDIA_TIMESTAMP = 1; + /** + * Use input embedded timecode e.g. picture timing SEI message. + * + * Generated from protobuf enum EMBEDDED_TIMECODE = 2; + */ + const EMBEDDED_TIMECODE = 2; + + private static $valueToName = [ + self::TIMECODE_SOURCE_UNSPECIFIED => 'TIMECODE_SOURCE_UNSPECIFIED', + self::MEDIA_TIMESTAMP => 'MEDIA_TIMESTAMP', + self::EMBEDDED_TIMECODE => 'EMBEDDED_TIMECODE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TimecodeSource::class, \Google\Cloud\Video\LiveStream\V1\TimecodeConfig_TimecodeSource::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateChannelRequest.php new file mode 100644 index 000000000000..0d41cb29e8b9 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateChannelRequest.php @@ -0,0 +1,293 @@ +google.cloud.video.livestream.v1.UpdateChannelRequest + */ +class UpdateChannelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Field mask is used to specify the fields to be overwritten in the Channel + * resource by the update. You can only update the following fields: + * * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) + * * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) + * * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) + * * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) + * * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) + * * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) + * * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) + * * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) + * * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) + * * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the mask is not present, then each field from the list above is updated + * if the field appears in the request payload. To unset a field, add the + * field to the update mask and remove it from the request payload. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + */ + protected $update_mask = null; + /** + * Required. The channel resource to be updated. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $channel = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 3; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\Video\LiveStream\V1\Channel $channel Required. The channel resource to be updated. + * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the Channel + * resource by the update. You can only update the following fields: + * + * * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) + * * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) + * * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) + * * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) + * * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) + * * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) + * * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) + * * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) + * * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) + * * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) + * + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * + * If the mask is not present, then each field from the list above is updated + * if the field appears in the request payload. To unset a field, add the + * field to the update mask and remove it from the request payload. + * + * @return \Google\Cloud\Video\LiveStream\V1\UpdateChannelRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Video\LiveStream\V1\Channel $channel, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setChannel($channel) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Field mask is used to specify the fields to be overwritten in the Channel + * resource by the update. You can only update the following fields: + * * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) + * * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) + * * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) + * * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) + * * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) + * * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) + * * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) + * * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) + * * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) + * * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the mask is not present, then each field from the list above is updated + * if the field appears in the request payload. To unset a field, add the + * field to the update mask and remove it from the request payload. + * @type \Google\Cloud\Video\LiveStream\V1\Channel $channel + * Required. The channel resource to be updated. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Field mask is used to specify the fields to be overwritten in the Channel + * resource by the update. You can only update the following fields: + * * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) + * * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) + * * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) + * * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) + * * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) + * * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) + * * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) + * * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) + * * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) + * * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the mask is not present, then each field from the list above is updated + * if the field appears in the request payload. To unset a field, add the + * field to the update mask and remove it from the request payload. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Field mask is used to specify the fields to be overwritten in the Channel + * resource by the update. You can only update the following fields: + * * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) + * * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) + * * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) + * * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) + * * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) + * * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) + * * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) + * * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) + * * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) + * * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the mask is not present, then each field from the list above is updated + * if the field appears in the request payload. To unset a field, add the + * field to the update mask and remove it from the request payload. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The channel resource to be updated. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\LiveStream\V1\Channel|null + */ + public function getChannel() + { + return $this->channel; + } + + public function hasChannel() + { + return isset($this->channel); + } + + public function clearChannel() + { + unset($this->channel); + } + + /** + * Required. The channel resource to be updated. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\LiveStream\V1\Channel $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Channel::class); + $this->channel = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 3; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 3; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateInputRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateInputRequest.php new file mode 100644 index 000000000000..c68b33c975ce --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateInputRequest.php @@ -0,0 +1,253 @@ +google.cloud.video.livestream.v1.UpdateInputRequest + */ +class UpdateInputRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Field mask is used to specify the fields to be overwritten in the Input + * resource by the update. You can only update the following fields: + * * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) + * * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the mask is not present, then each field from the list above is updated + * if the field appears in the request payload. To unset a field, add the + * field to the update mask and remove it from the request payload. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + */ + protected $update_mask = null; + /** + * Required. The input resource to be updated. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 3; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\Video\LiveStream\V1\Input $input Required. The input resource to be updated. + * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the Input + * resource by the update. You can only update the following fields: + * + * * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) + * * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) + * + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * + * If the mask is not present, then each field from the list above is updated + * if the field appears in the request payload. To unset a field, add the + * field to the update mask and remove it from the request payload. + * + * @return \Google\Cloud\Video\LiveStream\V1\UpdateInputRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Video\LiveStream\V1\Input $input, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setInput($input) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Field mask is used to specify the fields to be overwritten in the Input + * resource by the update. You can only update the following fields: + * * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) + * * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the mask is not present, then each field from the list above is updated + * if the field appears in the request payload. To unset a field, add the + * field to the update mask and remove it from the request payload. + * @type \Google\Cloud\Video\LiveStream\V1\Input $input + * Required. The input resource to be updated. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Field mask is used to specify the fields to be overwritten in the Input + * resource by the update. You can only update the following fields: + * * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) + * * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the mask is not present, then each field from the list above is updated + * if the field appears in the request payload. To unset a field, add the + * field to the update mask and remove it from the request payload. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Field mask is used to specify the fields to be overwritten in the Input + * resource by the update. You can only update the following fields: + * * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) + * * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * If the mask is not present, then each field from the list above is updated + * if the field appears in the request payload. To unset a field, add the + * field to the update mask and remove it from the request payload. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The input resource to be updated. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\LiveStream\V1\Input|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Required. The input resource to be updated. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\LiveStream\V1\Input $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Input::class); + $this->input = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 3; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 3; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoFormat.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoFormat.php new file mode 100644 index 000000000000..605d4d41bf8e --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoFormat.php @@ -0,0 +1,169 @@ +google.cloud.video.livestream.v1.VideoFormat + */ +class VideoFormat extends \Google\Protobuf\Internal\Message +{ + /** + * Video codec used in this video stream. + * + * Generated from protobuf field string codec = 1; + */ + protected $codec = ''; + /** + * The width of the video stream in pixels. + * + * Generated from protobuf field int32 width_pixels = 2; + */ + protected $width_pixels = 0; + /** + * The height of the video stream in pixels. + * + * Generated from protobuf field int32 height_pixels = 3; + */ + protected $height_pixels = 0; + /** + * The frame rate of the input video stream. + * + * Generated from protobuf field double frame_rate = 4; + */ + protected $frame_rate = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $codec + * Video codec used in this video stream. + * @type int $width_pixels + * The width of the video stream in pixels. + * @type int $height_pixels + * The height of the video stream in pixels. + * @type float $frame_rate + * The frame rate of the input video stream. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Video codec used in this video stream. + * + * Generated from protobuf field string codec = 1; + * @return string + */ + public function getCodec() + { + return $this->codec; + } + + /** + * Video codec used in this video stream. + * + * Generated from protobuf field string codec = 1; + * @param string $var + * @return $this + */ + public function setCodec($var) + { + GPBUtil::checkString($var, True); + $this->codec = $var; + + return $this; + } + + /** + * The width of the video stream in pixels. + * + * Generated from protobuf field int32 width_pixels = 2; + * @return int + */ + public function getWidthPixels() + { + return $this->width_pixels; + } + + /** + * The width of the video stream in pixels. + * + * Generated from protobuf field int32 width_pixels = 2; + * @param int $var + * @return $this + */ + public function setWidthPixels($var) + { + GPBUtil::checkInt32($var); + $this->width_pixels = $var; + + return $this; + } + + /** + * The height of the video stream in pixels. + * + * Generated from protobuf field int32 height_pixels = 3; + * @return int + */ + public function getHeightPixels() + { + return $this->height_pixels; + } + + /** + * The height of the video stream in pixels. + * + * Generated from protobuf field int32 height_pixels = 3; + * @param int $var + * @return $this + */ + public function setHeightPixels($var) + { + GPBUtil::checkInt32($var); + $this->height_pixels = $var; + + return $this; + } + + /** + * The frame rate of the input video stream. + * + * Generated from protobuf field double frame_rate = 4; + * @return float + */ + public function getFrameRate() + { + return $this->frame_rate; + } + + /** + * The frame rate of the input video stream. + * + * Generated from protobuf field double frame_rate = 4; + * @param float $var + * @return $this + */ + public function setFrameRate($var) + { + GPBUtil::checkDouble($var); + $this->frame_rate = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream.php new file mode 100644 index 000000000000..6213a93235f8 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream.php @@ -0,0 +1,75 @@ +google.cloud.video.livestream.v1.VideoStream + */ +class VideoStream extends \Google\Protobuf\Internal\Message +{ + protected $codec_settings; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\LiveStream\V1\VideoStream\H264CodecSettings $h264 + * H264 codec settings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * H264 codec settings. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.VideoStream.H264CodecSettings h264 = 20; + * @return \Google\Cloud\Video\LiveStream\V1\VideoStream\H264CodecSettings|null + */ + public function getH264() + { + return $this->readOneof(20); + } + + public function hasH264() + { + return $this->hasOneof(20); + } + + /** + * H264 codec settings. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.VideoStream.H264CodecSettings h264 = 20; + * @param \Google\Cloud\Video\LiveStream\V1\VideoStream\H264CodecSettings $var + * @return $this + */ + public function setH264($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\VideoStream\H264CodecSettings::class); + $this->writeOneof(20, $var); + + return $this; + } + + /** + * @return string + */ + public function getCodecSettings() + { + return $this->whichOneof("codec_settings"); + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream/H264CodecSettings.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream/H264CodecSettings.php new file mode 100644 index 000000000000..e6953375134f --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream/H264CodecSettings.php @@ -0,0 +1,743 @@ +google.cloud.video.livestream.v1.VideoStream.H264CodecSettings + */ +class H264CodecSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The width of the video in pixels. Must be an even integer. + * Valid range is [320, 1920]. + * + * Generated from protobuf field int32 width_pixels = 1; + */ + protected $width_pixels = 0; + /** + * Required. The height of the video in pixels. Must be an even integer. + * Valid range is [180, 1080]. + * + * Generated from protobuf field int32 height_pixels = 2; + */ + protected $height_pixels = 0; + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 60. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $frame_rate = 0.0; + /** + * Required. The video bitrate in bits per second. Minimum value is 10,000. + * - For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps). + * - For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps). + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bitrate_bps = 0; + /** + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * + * Generated from protobuf field bool allow_open_gop = 6; + */ + protected $allow_open_gop = false; + /** + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to + * [bitrate_bps][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.bitrate_bps]. + * + * Generated from protobuf field int32 vbv_size_bits = 9; + */ + protected $vbv_size_bits = 0; + /** + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * [vbv_size_bits][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.vbv_size_bits]. + * + * Generated from protobuf field int32 vbv_fullness_bits = 10; + */ + protected $vbv_fullness_bits = 0; + /** + * The entropy coder to use. The default is `cabac`. + * Supported entropy coders: + * - `cavlc` + * - `cabac` + * + * Generated from protobuf field string entropy_coder = 11; + */ + protected $entropy_coder = ''; + /** + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * + * Generated from protobuf field bool b_pyramid = 12; + */ + protected $b_pyramid = false; + /** + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than + * [gop_frame_count][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_frame_count] + * if set. The default is 0. + * + * Generated from protobuf field int32 b_frame_count = 13; + */ + protected $b_frame_count = 0; + /** + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * + * Generated from protobuf field double aq_strength = 14; + */ + protected $aq_strength = 0.0; + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * `baseline` + * * `main` (default) + * * `high` + * The available options are [FFmpeg-compatible Profile + * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Profile). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the + * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] + * message. + * + * Generated from protobuf field string profile = 15; + */ + protected $profile = ''; + /** + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible Encode + * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune) + * Note that certain values for this field may cause the transcoder to + * override other fields you set in the + * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] + * message. + * + * Generated from protobuf field string tune = 16; + */ + protected $tune = ''; + protected $gop_mode; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $width_pixels + * Required. The width of the video in pixels. Must be an even integer. + * Valid range is [320, 1920]. + * @type int $height_pixels + * Required. The height of the video in pixels. Must be an even integer. + * Valid range is [180, 1080]. + * @type float $frame_rate + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 60. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * @type int $bitrate_bps + * Required. The video bitrate in bits per second. Minimum value is 10,000. + * - For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps). + * - For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps). + * @type bool $allow_open_gop + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * @type int $gop_frame_count + * Select the GOP size based on the specified frame count. + * If GOP frame count is set instead of GOP duration, GOP duration will be + * calculated by `gopFrameCount`/`frameRate`. The calculated GOP duration + * must satisfy the limitations on `gopDuration` as well. + * Valid range is [60, 600]. + * @type \Google\Protobuf\Duration $gop_duration + * Select the GOP size based on the specified duration. The default is + * `2s`. Note that `gopDuration` must be less than or equal to + * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration], + * and + * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration] + * must be divisible by `gopDuration`. Valid range is [2s, 20s]. + * All video streams in the same channel must have the same GOP size. + * @type int $vbv_size_bits + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to + * [bitrate_bps][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.bitrate_bps]. + * @type int $vbv_fullness_bits + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * [vbv_size_bits][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.vbv_size_bits]. + * @type string $entropy_coder + * The entropy coder to use. The default is `cabac`. + * Supported entropy coders: + * - `cavlc` + * - `cabac` + * @type bool $b_pyramid + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * @type int $b_frame_count + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than + * [gop_frame_count][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_frame_count] + * if set. The default is 0. + * @type float $aq_strength + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * @type string $profile + * Enforces the specified codec profile. The following profiles are + * supported: + * * `baseline` + * * `main` (default) + * * `high` + * The available options are [FFmpeg-compatible Profile + * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Profile). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the + * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] + * message. + * @type string $tune + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible Encode + * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune) + * Note that certain values for this field may cause the transcoder to + * override other fields you set in the + * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] + * message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * Required. The width of the video in pixels. Must be an even integer. + * Valid range is [320, 1920]. + * + * Generated from protobuf field int32 width_pixels = 1; + * @return int + */ + public function getWidthPixels() + { + return $this->width_pixels; + } + + /** + * Required. The width of the video in pixels. Must be an even integer. + * Valid range is [320, 1920]. + * + * Generated from protobuf field int32 width_pixels = 1; + * @param int $var + * @return $this + */ + public function setWidthPixels($var) + { + GPBUtil::checkInt32($var); + $this->width_pixels = $var; + + return $this; + } + + /** + * Required. The height of the video in pixels. Must be an even integer. + * Valid range is [180, 1080]. + * + * Generated from protobuf field int32 height_pixels = 2; + * @return int + */ + public function getHeightPixels() + { + return $this->height_pixels; + } + + /** + * Required. The height of the video in pixels. Must be an even integer. + * Valid range is [180, 1080]. + * + * Generated from protobuf field int32 height_pixels = 2; + * @param int $var + * @return $this + */ + public function setHeightPixels($var) + { + GPBUtil::checkInt32($var); + $this->height_pixels = $var; + + return $this; + } + + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 60. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return float + */ + public function getFrameRate() + { + return $this->frame_rate; + } + + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 60. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param float $var + * @return $this + */ + public function setFrameRate($var) + { + GPBUtil::checkDouble($var); + $this->frame_rate = $var; + + return $this; + } + + /** + * Required. The video bitrate in bits per second. Minimum value is 10,000. + * - For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps). + * - For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps). + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getBitrateBps() + { + return $this->bitrate_bps; + } + + /** + * Required. The video bitrate in bits per second. Minimum value is 10,000. + * - For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps). + * - For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps). + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setBitrateBps($var) + { + GPBUtil::checkInt32($var); + $this->bitrate_bps = $var; + + return $this; + } + + /** + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * + * Generated from protobuf field bool allow_open_gop = 6; + * @return bool + */ + public function getAllowOpenGop() + { + return $this->allow_open_gop; + } + + /** + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * + * Generated from protobuf field bool allow_open_gop = 6; + * @param bool $var + * @return $this + */ + public function setAllowOpenGop($var) + { + GPBUtil::checkBool($var); + $this->allow_open_gop = $var; + + return $this; + } + + /** + * Select the GOP size based on the specified frame count. + * If GOP frame count is set instead of GOP duration, GOP duration will be + * calculated by `gopFrameCount`/`frameRate`. The calculated GOP duration + * must satisfy the limitations on `gopDuration` as well. + * Valid range is [60, 600]. + * + * Generated from protobuf field int32 gop_frame_count = 7; + * @return int + */ + public function getGopFrameCount() + { + return $this->readOneof(7); + } + + public function hasGopFrameCount() + { + return $this->hasOneof(7); + } + + /** + * Select the GOP size based on the specified frame count. + * If GOP frame count is set instead of GOP duration, GOP duration will be + * calculated by `gopFrameCount`/`frameRate`. The calculated GOP duration + * must satisfy the limitations on `gopDuration` as well. + * Valid range is [60, 600]. + * + * Generated from protobuf field int32 gop_frame_count = 7; + * @param int $var + * @return $this + */ + public function setGopFrameCount($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Select the GOP size based on the specified duration. The default is + * `2s`. Note that `gopDuration` must be less than or equal to + * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration], + * and + * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration] + * must be divisible by `gopDuration`. Valid range is [2s, 20s]. + * All video streams in the same channel must have the same GOP size. + * + * Generated from protobuf field .google.protobuf.Duration gop_duration = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getGopDuration() + { + return $this->readOneof(8); + } + + public function hasGopDuration() + { + return $this->hasOneof(8); + } + + /** + * Select the GOP size based on the specified duration. The default is + * `2s`. Note that `gopDuration` must be less than or equal to + * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration], + * and + * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration] + * must be divisible by `gopDuration`. Valid range is [2s, 20s]. + * All video streams in the same channel must have the same GOP size. + * + * Generated from protobuf field .google.protobuf.Duration gop_duration = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setGopDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to + * [bitrate_bps][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.bitrate_bps]. + * + * Generated from protobuf field int32 vbv_size_bits = 9; + * @return int + */ + public function getVbvSizeBits() + { + return $this->vbv_size_bits; + } + + /** + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to + * [bitrate_bps][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.bitrate_bps]. + * + * Generated from protobuf field int32 vbv_size_bits = 9; + * @param int $var + * @return $this + */ + public function setVbvSizeBits($var) + { + GPBUtil::checkInt32($var); + $this->vbv_size_bits = $var; + + return $this; + } + + /** + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * [vbv_size_bits][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.vbv_size_bits]. + * + * Generated from protobuf field int32 vbv_fullness_bits = 10; + * @return int + */ + public function getVbvFullnessBits() + { + return $this->vbv_fullness_bits; + } + + /** + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * [vbv_size_bits][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.vbv_size_bits]. + * + * Generated from protobuf field int32 vbv_fullness_bits = 10; + * @param int $var + * @return $this + */ + public function setVbvFullnessBits($var) + { + GPBUtil::checkInt32($var); + $this->vbv_fullness_bits = $var; + + return $this; + } + + /** + * The entropy coder to use. The default is `cabac`. + * Supported entropy coders: + * - `cavlc` + * - `cabac` + * + * Generated from protobuf field string entropy_coder = 11; + * @return string + */ + public function getEntropyCoder() + { + return $this->entropy_coder; + } + + /** + * The entropy coder to use. The default is `cabac`. + * Supported entropy coders: + * - `cavlc` + * - `cabac` + * + * Generated from protobuf field string entropy_coder = 11; + * @param string $var + * @return $this + */ + public function setEntropyCoder($var) + { + GPBUtil::checkString($var, True); + $this->entropy_coder = $var; + + return $this; + } + + /** + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * + * Generated from protobuf field bool b_pyramid = 12; + * @return bool + */ + public function getBPyramid() + { + return $this->b_pyramid; + } + + /** + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * + * Generated from protobuf field bool b_pyramid = 12; + * @param bool $var + * @return $this + */ + public function setBPyramid($var) + { + GPBUtil::checkBool($var); + $this->b_pyramid = $var; + + return $this; + } + + /** + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than + * [gop_frame_count][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_frame_count] + * if set. The default is 0. + * + * Generated from protobuf field int32 b_frame_count = 13; + * @return int + */ + public function getBFrameCount() + { + return $this->b_frame_count; + } + + /** + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than + * [gop_frame_count][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_frame_count] + * if set. The default is 0. + * + * Generated from protobuf field int32 b_frame_count = 13; + * @param int $var + * @return $this + */ + public function setBFrameCount($var) + { + GPBUtil::checkInt32($var); + $this->b_frame_count = $var; + + return $this; + } + + /** + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * + * Generated from protobuf field double aq_strength = 14; + * @return float + */ + public function getAqStrength() + { + return $this->aq_strength; + } + + /** + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * + * Generated from protobuf field double aq_strength = 14; + * @param float $var + * @return $this + */ + public function setAqStrength($var) + { + GPBUtil::checkDouble($var); + $this->aq_strength = $var; + + return $this; + } + + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * `baseline` + * * `main` (default) + * * `high` + * The available options are [FFmpeg-compatible Profile + * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Profile). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the + * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] + * message. + * + * Generated from protobuf field string profile = 15; + * @return string + */ + public function getProfile() + { + return $this->profile; + } + + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * `baseline` + * * `main` (default) + * * `high` + * The available options are [FFmpeg-compatible Profile + * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Profile). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the + * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] + * message. + * + * Generated from protobuf field string profile = 15; + * @param string $var + * @return $this + */ + public function setProfile($var) + { + GPBUtil::checkString($var, True); + $this->profile = $var; + + return $this; + } + + /** + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible Encode + * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune) + * Note that certain values for this field may cause the transcoder to + * override other fields you set in the + * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] + * message. + * + * Generated from protobuf field string tune = 16; + * @return string + */ + public function getTune() + { + return $this->tune; + } + + /** + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible Encode + * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune) + * Note that certain values for this field may cause the transcoder to + * override other fields you set in the + * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] + * message. + * + * Generated from protobuf field string tune = 16; + * @param string $var + * @return $this + */ + public function setTune($var) + { + GPBUtil::checkString($var, True); + $this->tune = $var; + + return $this; + } + + /** + * @return string + */ + public function getGopMode() + { + return $this->whichOneof("gop_mode"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(H264CodecSettings::class, \Google\Cloud\Video\LiveStream\V1\VideoStream_H264CodecSettings::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStreamProperty.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStreamProperty.php new file mode 100644 index 000000000000..ffda21dceb46 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStreamProperty.php @@ -0,0 +1,111 @@ +google.cloud.video.livestream.v1.VideoStreamProperty + */ +class VideoStreamProperty extends \Google\Protobuf\Internal\Message +{ + /** + * Index of this video stream. + * + * Generated from protobuf field int32 index = 1; + */ + protected $index = 0; + /** + * Properties of the video format. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.VideoFormat video_format = 2; + */ + protected $video_format = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $index + * Index of this video stream. + * @type \Google\Cloud\Video\LiveStream\V1\VideoFormat $video_format + * Properties of the video format. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Index of this video stream. + * + * Generated from protobuf field int32 index = 1; + * @return int + */ + public function getIndex() + { + return $this->index; + } + + /** + * Index of this video stream. + * + * Generated from protobuf field int32 index = 1; + * @param int $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkInt32($var); + $this->index = $var; + + return $this; + } + + /** + * Properties of the video format. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.VideoFormat video_format = 2; + * @return \Google\Cloud\Video\LiveStream\V1\VideoFormat|null + */ + public function getVideoFormat() + { + return $this->video_format; + } + + public function hasVideoFormat() + { + return isset($this->video_format); + } + + public function clearVideoFormat() + { + unset($this->video_format); + } + + /** + * Properties of the video format. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.VideoFormat video_format = 2; + * @param \Google\Cloud\Video\LiveStream\V1\VideoFormat $var + * @return $this + */ + public function setVideoFormat($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\VideoFormat::class); + $this->video_format = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_channel.php new file mode 100644 index 000000000000..a81cd8279bf6 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_channel.php @@ -0,0 +1,95 @@ +setOutput($channelOutput); + $request = (new CreateChannelRequest()) + ->setParent($formattedParent) + ->setChannel($channel) + ->setChannelId($channelId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $livestreamServiceClient->createChannel($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Channel $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $channelId = '[CHANNEL_ID]'; + + create_channel_sample($formattedParent, $channelId); +} +// [END livestream_v1_generated_LivestreamService_CreateChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_event.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_event.php new file mode 100644 index 000000000000..0dcda1a55299 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_event.php @@ -0,0 +1,82 @@ +setInputSwitch($eventInputSwitch); + $request = (new CreateEventRequest()) + ->setParent($formattedParent) + ->setEvent($event) + ->setEventId($eventId); + + // Call the API and handle any network failures. + try { + /** @var Event $response */ + $response = $livestreamServiceClient->createEvent($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $eventId = '[EVENT_ID]'; + + create_event_sample($formattedParent, $eventId); +} +// [END livestream_v1_generated_LivestreamService_CreateEvent_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_input.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_input.php new file mode 100644 index 000000000000..76b3f317620b --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_input.php @@ -0,0 +1,91 @@ +setParent($formattedParent) + ->setInput($input) + ->setInputId($inputId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $livestreamServiceClient->createInput($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Input $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $inputId = '[INPUT_ID]'; + + create_input_sample($formattedParent, $inputId); +} +// [END livestream_v1_generated_LivestreamService_CreateInput_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_channel.php new file mode 100644 index 000000000000..ce3c080fb1b6 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_channel.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $livestreamServiceClient->deleteChannel($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + + delete_channel_sample($formattedName); +} +// [END livestream_v1_generated_LivestreamService_DeleteChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_event.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_event.php new file mode 100644 index 000000000000..bce176bc9ff8 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_event.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $livestreamServiceClient->deleteEvent($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = LivestreamServiceClient::eventName( + '[PROJECT]', + '[LOCATION]', + '[CHANNEL]', + '[EVENT]' + ); + + delete_event_sample($formattedName); +} +// [END livestream_v1_generated_LivestreamService_DeleteEvent_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_input.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_input.php new file mode 100644 index 000000000000..a5029ab1224f --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_input.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $livestreamServiceClient->deleteInput($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = LivestreamServiceClient::inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); + + delete_input_sample($formattedName); +} +// [END livestream_v1_generated_LivestreamService_DeleteInput_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_channel.php new file mode 100644 index 000000000000..f0c8beb1fbd7 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_channel.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Channel $response */ + $response = $livestreamServiceClient->getChannel($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + + get_channel_sample($formattedName); +} +// [END livestream_v1_generated_LivestreamService_GetChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_event.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_event.php new file mode 100644 index 000000000000..0f5e7832fd48 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_event.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Event $response */ + $response = $livestreamServiceClient->getEvent($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = LivestreamServiceClient::eventName( + '[PROJECT]', + '[LOCATION]', + '[CHANNEL]', + '[EVENT]' + ); + + get_event_sample($formattedName); +} +// [END livestream_v1_generated_LivestreamService_GetEvent_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_input.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_input.php new file mode 100644 index 000000000000..96aa5edc1d63 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_input.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Input $response */ + $response = $livestreamServiceClient->getInput($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = LivestreamServiceClient::inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); + + get_input_sample($formattedName); +} +// [END livestream_v1_generated_LivestreamService_GetInput_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_location.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_location.php new file mode 100644 index 000000000000..a3b885a9de6b --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END livestream_v1_generated_LivestreamService_GetLocation_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_channels.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_channels.php new file mode 100644 index 000000000000..0e245efa793c --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_channels.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $livestreamServiceClient->listChannels($request); + + /** @var Channel $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_channels_sample($formattedParent); +} +// [END livestream_v1_generated_LivestreamService_ListChannels_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_events.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_events.php new file mode 100644 index 000000000000..3ed4ef0e8b55 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_events.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $livestreamServiceClient->listEvents($request); + + /** @var Event $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + + list_events_sample($formattedParent); +} +// [END livestream_v1_generated_LivestreamService_ListEvents_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_inputs.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_inputs.php new file mode 100644 index 000000000000..220a9285895e --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_inputs.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $livestreamServiceClient->listInputs($request); + + /** @var Input $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_inputs_sample($formattedParent); +} +// [END livestream_v1_generated_LivestreamService_ListInputs_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_locations.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_locations.php new file mode 100644 index 000000000000..5a16f54d9602 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END livestream_v1_generated_LivestreamService_ListLocations_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/start_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/start_channel.php new file mode 100644 index 000000000000..71dcf4e87b24 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/start_channel.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $livestreamServiceClient->startChannel($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ChannelOperationResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + + start_channel_sample($formattedName); +} +// [END livestream_v1_generated_LivestreamService_StartChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/stop_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/stop_channel.php new file mode 100644 index 000000000000..37ece3009599 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/stop_channel.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $livestreamServiceClient->stopChannel($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ChannelOperationResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + + stop_channel_sample($formattedName); +} +// [END livestream_v1_generated_LivestreamService_StopChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_channel.php new file mode 100644 index 000000000000..0b24a725f7f0 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_channel.php @@ -0,0 +1,74 @@ +setOutput($channelOutput); + $request = (new UpdateChannelRequest()) + ->setChannel($channel); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $livestreamServiceClient->updateChannel($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Channel $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END livestream_v1_generated_LivestreamService_UpdateChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_input.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_input.php new file mode 100644 index 000000000000..4aa8d72bf935 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_input.php @@ -0,0 +1,71 @@ +setInput($input); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $livestreamServiceClient->updateInput($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Input $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END livestream_v1_generated_LivestreamService_UpdateInput_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/src/V1/Client/BaseClient/LivestreamServiceBaseClient.php b/owl-bot-staging/VideoLiveStream/v1/src/V1/Client/BaseClient/LivestreamServiceBaseClient.php new file mode 100644 index 000000000000..5db98580b409 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/src/V1/Client/BaseClient/LivestreamServiceBaseClient.php @@ -0,0 +1,802 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/livestream_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/livestream_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/livestream_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/livestream_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a channel + * resource. + * + * @param string $project + * @param string $location + * @param string $channel + * + * @return string The formatted channel resource. + */ + public static function channelName(string $project, string $location, string $channel): string + { + return self::getPathTemplate('channel')->render([ + 'project' => $project, + 'location' => $location, + 'channel' => $channel, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a event + * resource. + * + * @param string $project + * @param string $location + * @param string $channel + * @param string $event + * + * @return string The formatted event resource. + */ + public static function eventName(string $project, string $location, string $channel, string $event): string + { + return self::getPathTemplate('event')->render([ + 'project' => $project, + 'location' => $location, + 'channel' => $channel, + 'event' => $event, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a input + * resource. + * + * @param string $project + * @param string $location + * @param string $input + * + * @return string The formatted input resource. + */ + public static function inputName(string $project, string $location, string $input): string + { + return self::getPathTemplate('input')->render([ + 'project' => $project, + 'location' => $location, + 'input' => $input, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * secret_version resource. + * + * @param string $project + * @param string $secret + * @param string $version + * + * @return string The formatted secret_version resource. + */ + public static function secretVersionName(string $project, string $secret, string $version): string + { + return self::getPathTemplate('secretVersion')->render([ + 'project' => $project, + 'secret' => $secret, + 'version' => $version, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - channel: projects/{project}/locations/{location}/channels/{channel} + * - event: projects/{project}/locations/{location}/channels/{channel}/events/{event} + * - input: projects/{project}/locations/{location}/inputs/{input} + * - location: projects/{project}/locations/{location} + * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'livestream.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a channel with the provided unique ID in the specified + * region. + * + * The async variant is {@see self::createChannelAsync()} . + * + * @param CreateChannelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createChannel(CreateChannelRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateChannel', $request, $callOptions)->wait(); + } + + /** + * Creates an event with the provided unique ID in the specified channel. + * + * The async variant is {@see self::createEventAsync()} . + * + * @param CreateEventRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Event + * + * @throws ApiException Thrown if the API call fails. + */ + public function createEvent(CreateEventRequest $request, array $callOptions = []): Event + { + return $this->startApiCall('CreateEvent', $request, $callOptions)->wait(); + } + + /** + * Creates an input with the provided unique ID in the specified region. + * + * The async variant is {@see self::createInputAsync()} . + * + * @param CreateInputRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createInput(CreateInputRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateInput', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified channel. + * + * The async variant is {@see self::deleteChannelAsync()} . + * + * @param DeleteChannelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteChannel(DeleteChannelRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteChannel', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified event. + * + * The async variant is {@see self::deleteEventAsync()} . + * + * @param DeleteEventRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteEvent(DeleteEventRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteEvent', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified input. + * + * The async variant is {@see self::deleteInputAsync()} . + * + * @param DeleteInputRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteInput(DeleteInputRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteInput', $request, $callOptions)->wait(); + } + + /** + * Returns the specified channel. + * + * The async variant is {@see self::getChannelAsync()} . + * + * @param GetChannelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Channel + * + * @throws ApiException Thrown if the API call fails. + */ + public function getChannel(GetChannelRequest $request, array $callOptions = []): Channel + { + return $this->startApiCall('GetChannel', $request, $callOptions)->wait(); + } + + /** + * Returns the specified event. + * + * The async variant is {@see self::getEventAsync()} . + * + * @param GetEventRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Event + * + * @throws ApiException Thrown if the API call fails. + */ + public function getEvent(GetEventRequest $request, array $callOptions = []): Event + { + return $this->startApiCall('GetEvent', $request, $callOptions)->wait(); + } + + /** + * Returns the specified input. + * + * The async variant is {@see self::getInputAsync()} . + * + * @param GetInputRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Input + * + * @throws ApiException Thrown if the API call fails. + */ + public function getInput(GetInputRequest $request, array $callOptions = []): Input + { + return $this->startApiCall('GetInput', $request, $callOptions)->wait(); + } + + /** + * Returns a list of all channels in the specified region. + * + * The async variant is {@see self::listChannelsAsync()} . + * + * @param ListChannelsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listChannels(ListChannelsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListChannels', $request, $callOptions); + } + + /** + * Returns a list of all events in the specified channel. + * + * The async variant is {@see self::listEventsAsync()} . + * + * @param ListEventsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listEvents(ListEventsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListEvents', $request, $callOptions); + } + + /** + * Returns a list of all inputs in the specified region. + * + * The async variant is {@see self::listInputsAsync()} . + * + * @param ListInputsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listInputs(ListInputsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListInputs', $request, $callOptions); + } + + /** + * Starts the specified channel. Part of the video pipeline will be created + * only when the StartChannel request is received by the server. + * + * The async variant is {@see self::startChannelAsync()} . + * + * @param StartChannelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function startChannel(StartChannelRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('StartChannel', $request, $callOptions)->wait(); + } + + /** + * Stops the specified channel. Part of the video pipeline will be released + * when the StopChannel request is received by the server. + * + * The async variant is {@see self::stopChannelAsync()} . + * + * @param StopChannelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function stopChannel(StopChannelRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('StopChannel', $request, $callOptions)->wait(); + } + + /** + * Updates the specified channel. + * + * The async variant is {@see self::updateChannelAsync()} . + * + * @param UpdateChannelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateChannel(UpdateChannelRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateChannel', $request, $callOptions)->wait(); + } + + /** + * Updates the specified input. + * + * The async variant is {@see self::updateInputAsync()} . + * + * @param UpdateInputRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateInput(UpdateInputRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateInput', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see self::getLocationAsync()} . + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see self::listLocationsAsync()} . + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/VideoLiveStream/v1/src/V1/Client/LivestreamServiceClient.php b/owl-bot-staging/VideoLiveStream/v1/src/V1/Client/LivestreamServiceClient.php new file mode 100644 index 000000000000..055a92e9d6ce --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/src/V1/Client/LivestreamServiceClient.php @@ -0,0 +1,40 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $channel = new Channel(); + * $channelId = 'channel_id'; + * $operationResponse = $livestreamServiceClient->createChannel($formattedParent, $channel, $channelId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $livestreamServiceClient->createChannel($formattedParent, $channel, $channelId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $livestreamServiceClient->resumeOperation($operationName, 'createChannel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $livestreamServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + */ +class LivestreamServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.video.livestream.v1.LivestreamService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'livestream.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $channelNameTemplate; + + private static $eventNameTemplate; + + private static $inputNameTemplate; + + private static $locationNameTemplate; + + private static $secretVersionNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/livestream_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/livestream_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/livestream_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/livestream_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getChannelNameTemplate() + { + if (self::$channelNameTemplate == null) { + self::$channelNameTemplate = new PathTemplate('projects/{project}/locations/{location}/channels/{channel}'); + } + + return self::$channelNameTemplate; + } + + private static function getEventNameTemplate() + { + if (self::$eventNameTemplate == null) { + self::$eventNameTemplate = new PathTemplate('projects/{project}/locations/{location}/channels/{channel}/events/{event}'); + } + + return self::$eventNameTemplate; + } + + private static function getInputNameTemplate() + { + if (self::$inputNameTemplate == null) { + self::$inputNameTemplate = new PathTemplate('projects/{project}/locations/{location}/inputs/{input}'); + } + + return self::$inputNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getSecretVersionNameTemplate() + { + if (self::$secretVersionNameTemplate == null) { + self::$secretVersionNameTemplate = new PathTemplate('projects/{project}/secrets/{secret}/versions/{version}'); + } + + return self::$secretVersionNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'channel' => self::getChannelNameTemplate(), + 'event' => self::getEventNameTemplate(), + 'input' => self::getInputNameTemplate(), + 'location' => self::getLocationNameTemplate(), + 'secretVersion' => self::getSecretVersionNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a channel + * resource. + * + * @param string $project + * @param string $location + * @param string $channel + * + * @return string The formatted channel resource. + */ + public static function channelName($project, $location, $channel) + { + return self::getChannelNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'channel' => $channel, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a event + * resource. + * + * @param string $project + * @param string $location + * @param string $channel + * @param string $event + * + * @return string The formatted event resource. + */ + public static function eventName($project, $location, $channel, $event) + { + return self::getEventNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'channel' => $channel, + 'event' => $event, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a input + * resource. + * + * @param string $project + * @param string $location + * @param string $input + * + * @return string The formatted input resource. + */ + public static function inputName($project, $location, $input) + { + return self::getInputNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'input' => $input, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * secret_version resource. + * + * @param string $project + * @param string $secret + * @param string $version + * + * @return string The formatted secret_version resource. + */ + public static function secretVersionName($project, $secret, $version) + { + return self::getSecretVersionNameTemplate()->render([ + 'project' => $project, + 'secret' => $secret, + 'version' => $version, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - channel: projects/{project}/locations/{location}/channels/{channel} + * - event: projects/{project}/locations/{location}/channels/{channel}/events/{event} + * - input: projects/{project}/locations/{location}/inputs/{input} + * - location: projects/{project}/locations/{location} + * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'livestream.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a channel with the provided unique ID in the specified + * region. + * + * Sample code: + * ``` + * $livestreamServiceClient = new LivestreamServiceClient(); + * try { + * $formattedParent = $livestreamServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $channel = new Channel(); + * $channelId = 'channel_id'; + * $operationResponse = $livestreamServiceClient->createChannel($formattedParent, $channel, $channelId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $livestreamServiceClient->createChannel($formattedParent, $channel, $channelId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $livestreamServiceClient->resumeOperation($operationName, 'createChannel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $livestreamServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * @param Channel $channel Required. The channel resource to be created. + * @param string $channelId Required. The ID of the channel resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createChannel($parent, $channel, $channelId, array $optionalArgs = []) + { + $request = new CreateChannelRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setChannel($channel); + $request->setChannelId($channelId); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateChannel', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates an event with the provided unique ID in the specified channel. + * + * Sample code: + * ``` + * $livestreamServiceClient = new LivestreamServiceClient(); + * try { + * $formattedParent = $livestreamServiceClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + * $event = new Event(); + * $eventId = 'event_id'; + * $response = $livestreamServiceClient->createEvent($formattedParent, $event, $eventId); + * } finally { + * $livestreamServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent channel for the resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * @param Event $event Required. The event resource to be created. + * @param string $eventId Required. The ID of the event resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Video\LiveStream\V1\Event + * + * @throws ApiException if the remote call fails + */ + public function createEvent($parent, $event, $eventId, array $optionalArgs = []) + { + $request = new CreateEventRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setEvent($event); + $request->setEventId($eventId); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateEvent', Event::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates an input with the provided unique ID in the specified region. + * + * Sample code: + * ``` + * $livestreamServiceClient = new LivestreamServiceClient(); + * try { + * $formattedParent = $livestreamServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $input = new Input(); + * $inputId = 'input_id'; + * $operationResponse = $livestreamServiceClient->createInput($formattedParent, $input, $inputId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $livestreamServiceClient->createInput($formattedParent, $input, $inputId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $livestreamServiceClient->resumeOperation($operationName, 'createInput'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $livestreamServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * @param Input $input Required. The input resource to be created. + * @param string $inputId Required. The ID of the input resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createInput($parent, $input, $inputId, array $optionalArgs = []) + { + $request = new CreateInputRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setInput($input); + $request->setInputId($inputId); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateInput', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes the specified channel. + * + * Sample code: + * ``` + * $livestreamServiceClient = new LivestreamServiceClient(); + * try { + * $formattedName = $livestreamServiceClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + * $operationResponse = $livestreamServiceClient->deleteChannel($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $livestreamServiceClient->deleteChannel($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $livestreamServiceClient->resumeOperation($operationName, 'deleteChannel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $livestreamServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * @type bool $force + * If the `force` field is set to the default value of `false`, you must + * delete all of a channel's events before you can delete the channel itself. + * If the field is set to `true`, requests to delete a channel also delete + * associated channel events. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteChannel($name, array $optionalArgs = []) + { + $request = new DeleteChannelRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + if (isset($optionalArgs['force'])) { + $request->setForce($optionalArgs['force']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteChannel', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes the specified event. + * + * Sample code: + * ``` + * $livestreamServiceClient = new LivestreamServiceClient(); + * try { + * $formattedName = $livestreamServiceClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[EVENT]'); + * $livestreamServiceClient->deleteEvent($formattedName); + * } finally { + * $livestreamServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the event resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteEvent($name, array $optionalArgs = []) + { + $request = new DeleteEventRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteEvent', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes the specified input. + * + * Sample code: + * ``` + * $livestreamServiceClient = new LivestreamServiceClient(); + * try { + * $formattedName = $livestreamServiceClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); + * $operationResponse = $livestreamServiceClient->deleteInput($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $livestreamServiceClient->deleteInput($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $livestreamServiceClient->resumeOperation($operationName, 'deleteInput'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $livestreamServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the input resource, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteInput($name, array $optionalArgs = []) + { + $request = new DeleteInputRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteInput', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Returns the specified channel. + * + * Sample code: + * ``` + * $livestreamServiceClient = new LivestreamServiceClient(); + * try { + * $formattedName = $livestreamServiceClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + * $response = $livestreamServiceClient->getChannel($formattedName); + * } finally { + * $livestreamServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Video\LiveStream\V1\Channel + * + * @throws ApiException if the remote call fails + */ + public function getChannel($name, array $optionalArgs = []) + { + $request = new GetChannelRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetChannel', Channel::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the specified event. + * + * Sample code: + * ``` + * $livestreamServiceClient = new LivestreamServiceClient(); + * try { + * $formattedName = $livestreamServiceClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[EVENT]'); + * $response = $livestreamServiceClient->getEvent($formattedName); + * } finally { + * $livestreamServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the event resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Video\LiveStream\V1\Event + * + * @throws ApiException if the remote call fails + */ + public function getEvent($name, array $optionalArgs = []) + { + $request = new GetEventRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetEvent', Event::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the specified input. + * + * Sample code: + * ``` + * $livestreamServiceClient = new LivestreamServiceClient(); + * try { + * $formattedName = $livestreamServiceClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); + * $response = $livestreamServiceClient->getInput($formattedName); + * } finally { + * $livestreamServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the input resource, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Video\LiveStream\V1\Input + * + * @throws ApiException if the remote call fails + */ + public function getInput($name, array $optionalArgs = []) + { + $request = new GetInputRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetInput', Input::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns a list of all channels in the specified region. + * + * Sample code: + * ``` + * $livestreamServiceClient = new LivestreamServiceClient(); + * try { + * $formattedParent = $livestreamServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $livestreamServiceClient->listChannels($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $livestreamServiceClient->listChannels($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $livestreamServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * The filter to apply to list results. + * @type string $orderBy + * Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listChannels($parent, array $optionalArgs = []) + { + $request = new ListChannelsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListChannels', $optionalArgs, ListChannelsResponse::class, $request); + } + + /** + * Returns a list of all events in the specified channel. + * + * Sample code: + * ``` + * $livestreamServiceClient = new LivestreamServiceClient(); + * try { + * $formattedParent = $livestreamServiceClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + * // Iterate over pages of elements + * $pagedResponse = $livestreamServiceClient->listEvents($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $livestreamServiceClient->listEvents($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $livestreamServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent channel for the resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * The filter to apply to list results. + * @type string $orderBy + * Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listEvents($parent, array $optionalArgs = []) + { + $request = new ListEventsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListEvents', $optionalArgs, ListEventsResponse::class, $request); + } + + /** + * Returns a list of all inputs in the specified region. + * + * Sample code: + * ``` + * $livestreamServiceClient = new LivestreamServiceClient(); + * try { + * $formattedParent = $livestreamServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $livestreamServiceClient->listInputs($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $livestreamServiceClient->listInputs($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $livestreamServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * The filter to apply to list results. + * @type string $orderBy + * Specifies the ordering of results following syntax at [Sorting + * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listInputs($parent, array $optionalArgs = []) + { + $request = new ListInputsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListInputs', $optionalArgs, ListInputsResponse::class, $request); + } + + /** + * Starts the specified channel. Part of the video pipeline will be created + * only when the StartChannel request is received by the server. + * + * Sample code: + * ``` + * $livestreamServiceClient = new LivestreamServiceClient(); + * try { + * $formattedName = $livestreamServiceClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + * $operationResponse = $livestreamServiceClient->startChannel($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $livestreamServiceClient->startChannel($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $livestreamServiceClient->resumeOperation($operationName, 'startChannel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $livestreamServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function startChannel($name, array $optionalArgs = []) + { + $request = new StartChannelRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('StartChannel', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Stops the specified channel. Part of the video pipeline will be released + * when the StopChannel request is received by the server. + * + * Sample code: + * ``` + * $livestreamServiceClient = new LivestreamServiceClient(); + * try { + * $formattedName = $livestreamServiceClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + * $operationResponse = $livestreamServiceClient->stopChannel($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $livestreamServiceClient->stopChannel($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $livestreamServiceClient->resumeOperation($operationName, 'stopChannel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $livestreamServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function stopChannel($name, array $optionalArgs = []) + { + $request = new StopChannelRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('StopChannel', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates the specified channel. + * + * Sample code: + * ``` + * $livestreamServiceClient = new LivestreamServiceClient(); + * try { + * $channel = new Channel(); + * $operationResponse = $livestreamServiceClient->updateChannel($channel); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $livestreamServiceClient->updateChannel($channel); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $livestreamServiceClient->resumeOperation($operationName, 'updateChannel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $livestreamServiceClient->close(); + * } + * ``` + * + * @param Channel $channel Required. The channel resource to be updated. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Field mask is used to specify the fields to be overwritten in the Channel + * resource by the update. You can only update the following fields: + * + * * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) + * * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) + * * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) + * * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) + * * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) + * * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) + * * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) + * * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) + * * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) + * * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) + * + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * + * If the mask is not present, then each field from the list above is updated + * if the field appears in the request payload. To unset a field, add the + * field to the update mask and remove it from the request payload. + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateChannel($channel, array $optionalArgs = []) + { + $request = new UpdateChannelRequest(); + $requestParamHeaders = []; + $request->setChannel($channel); + $requestParamHeaders['channel.name'] = $channel->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateChannel', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates the specified input. + * + * Sample code: + * ``` + * $livestreamServiceClient = new LivestreamServiceClient(); + * try { + * $input = new Input(); + * $operationResponse = $livestreamServiceClient->updateInput($input); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $livestreamServiceClient->updateInput($input); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $livestreamServiceClient->resumeOperation($operationName, 'updateInput'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $livestreamServiceClient->close(); + * } + * ``` + * + * @param Input $input Required. The input resource to be updated. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Field mask is used to specify the fields to be overwritten in the Input + * resource by the update. You can only update the following fields: + * + * * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) + * * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) + * + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * + * If the mask is not present, then each field from the list above is updated + * if the field appears in the request payload. To unset a field, add the + * field to the update mask and remove it from the request payload. + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateInput($input, array $optionalArgs = []) + { + $request = new UpdateInputRequest(); + $requestParamHeaders = []; + $request->setInput($input); + $requestParamHeaders['input.name'] = $input->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateInput', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $livestreamServiceClient = new LivestreamServiceClient(); + * try { + * $response = $livestreamServiceClient->getLocation(); + * } finally { + * $livestreamServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $livestreamServiceClient = new LivestreamServiceClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $livestreamServiceClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $livestreamServiceClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $livestreamServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/VideoLiveStream/v1/src/V1/LivestreamServiceClient.php b/owl-bot-staging/VideoLiveStream/v1/src/V1/LivestreamServiceClient.php new file mode 100644 index 000000000000..e3f2c3cf351d --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/src/V1/LivestreamServiceClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.video.livestream.v1.LivestreamService' => [ + 'CreateChannel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\Channel', + 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateInput' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\Input', + 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteChannel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteInput' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'StartChannel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\ChannelOperationResponse', + 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'StopChannel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\ChannelOperationResponse', + 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateChannel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\Channel', + 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'channel.name', + 'fieldAccessors' => [ + 'getChannel', + 'getName', + ], + ], + ], + ], + 'UpdateInput' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\Input', + 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'input.name', + 'fieldAccessors' => [ + 'getInput', + 'getName', + ], + ], + ], + ], + 'CreateEvent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\LiveStream\V1\Event', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteEvent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetChannel' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\LiveStream\V1\Channel', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetEvent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\LiveStream\V1\Event', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetInput' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\LiveStream\V1\Input', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListChannels' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getChannels', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\LiveStream\V1\ListChannelsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListEvents' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEvents', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\LiveStream\V1\ListEventsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListInputs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getInputs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\LiveStream\V1\ListInputsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'channel' => 'projects/{project}/locations/{location}/channels/{channel}', + 'event' => 'projects/{project}/locations/{location}/channels/{channel}/events/{event}', + 'input' => 'projects/{project}/locations/{location}/inputs/{input}', + 'location' => 'projects/{project}/locations/{location}', + 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{version}', + ], + ], + ], +]; diff --git a/owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_rest_client_config.php b/owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_rest_client_config.php new file mode 100644 index 000000000000..17b5bb70d3f5 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_rest_client_config.php @@ -0,0 +1,274 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.video.livestream.v1.LivestreamService' => [ + 'CreateChannel' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/channels', + 'body' => 'channel', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'channel_id', + ], + ], + 'CreateEvent' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/channels/*}/events', + 'body' => 'event', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'event_id', + ], + ], + 'CreateInput' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/inputs', + 'body' => 'input', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'input_id', + ], + ], + 'DeleteChannel' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteEvent' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*/events/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteInput' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/inputs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetChannel' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetEvent' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*/events/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetInput' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/inputs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListChannels' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/channels', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListEvents' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/channels/*}/events', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListInputs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/inputs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'StartChannel' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*}:start', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'StopChannel' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*}:stop', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateChannel' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{channel.name=projects/*/locations/*/channels/*}', + 'body' => 'channel', + 'placeholders' => [ + 'channel.name' => [ + 'getters' => [ + 'getChannel', + 'getName', + ], + ], + ], + ], + 'UpdateInput' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{input.name=projects/*/locations/*/inputs/*}', + 'body' => 'input', + 'placeholders' => [ + 'input.name' => [ + 'getters' => [ + 'getInput', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/VideoLiveStream/v1/tests/Unit/V1/Client/LivestreamServiceClientTest.php b/owl-bot-staging/VideoLiveStream/v1/tests/Unit/V1/Client/LivestreamServiceClientTest.php new file mode 100644 index 000000000000..1d5c31b5f615 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/tests/Unit/V1/Client/LivestreamServiceClientTest.php @@ -0,0 +1,1869 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return LivestreamServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new LivestreamServiceClient($options); + } + + /** @test */ + public function createChannelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $activeInput = 'activeInput1758551377'; + $expectedResponse = new Channel(); + $expectedResponse->setName($name); + $expectedResponse->setActiveInput($activeInput); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createChannelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $channel = new Channel(); + $channelOutput = new Output(); + $channel->setOutput($channelOutput); + $channelId = 'channelId-1930808873'; + $request = (new CreateChannelRequest()) + ->setParent($formattedParent) + ->setChannel($channel) + ->setChannelId($channelId); + $response = $gapicClient->createChannel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/CreateChannel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getChannel(); + $this->assertProtobufEquals($channel, $actualValue); + $actualValue = $actualApiRequestObject->getChannelId(); + $this->assertProtobufEquals($channelId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createChannelTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createChannelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $channel = new Channel(); + $channelOutput = new Output(); + $channel->setOutput($channelOutput); + $channelId = 'channelId-1930808873'; + $request = (new CreateChannelRequest()) + ->setParent($formattedParent) + ->setChannel($channel) + ->setChannelId($channelId); + $response = $gapicClient->createChannel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createChannelTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createEventTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $executeNow = true; + $expectedResponse = new Event(); + $expectedResponse->setName($name); + $expectedResponse->setExecuteNow($executeNow); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $event = new Event(); + $eventInputSwitch = new InputSwitchTask(); + $event->setInputSwitch($eventInputSwitch); + $eventId = 'eventId278118624'; + $request = (new CreateEventRequest()) + ->setParent($formattedParent) + ->setEvent($event) + ->setEventId($eventId); + $response = $gapicClient->createEvent($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/CreateEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getEvent(); + $this->assertProtobufEquals($event, $actualValue); + $actualValue = $actualRequestObject->getEventId(); + $this->assertProtobufEquals($eventId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEventExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $event = new Event(); + $eventInputSwitch = new InputSwitchTask(); + $event->setInputSwitch($eventInputSwitch); + $eventId = 'eventId278118624'; + $request = (new CreateEventRequest()) + ->setParent($formattedParent) + ->setEvent($event) + ->setEventId($eventId); + try { + $gapicClient->createEvent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createInputTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInputTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uri = 'uri116076'; + $expectedResponse = new Input(); + $expectedResponse->setName($name); + $expectedResponse->setUri($uri); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createInputTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $input = new Input(); + $inputId = 'inputId470715824'; + $request = (new CreateInputRequest()) + ->setParent($formattedParent) + ->setInput($input) + ->setInputId($inputId); + $response = $gapicClient->createInput($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/CreateInput', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getInput(); + $this->assertProtobufEquals($input, $actualValue); + $actualValue = $actualApiRequestObject->getInputId(); + $this->assertProtobufEquals($inputId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInputTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createInputExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInputTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $input = new Input(); + $inputId = 'inputId470715824'; + $request = (new CreateInputRequest()) + ->setParent($formattedParent) + ->setInput($input) + ->setInputId($inputId); + $response = $gapicClient->createInput($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInputTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteChannelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteChannelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $request = (new DeleteChannelRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteChannel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/DeleteChannel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteChannelTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteChannelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $request = (new DeleteChannelRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteChannel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteChannelTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteEventTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[EVENT]'); + $request = (new DeleteEventRequest()) + ->setName($formattedName); + $gapicClient->deleteEvent($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/DeleteEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteEventExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[EVENT]'); + $request = (new DeleteEventRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteEvent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteInputTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInputTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteInputTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); + $request = (new DeleteInputRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInput($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/DeleteInput', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInputTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInputExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInputTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); + $request = (new DeleteInputRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInput($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInputTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getChannelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $activeInput = 'activeInput1758551377'; + $expectedResponse = new Channel(); + $expectedResponse->setName($name2); + $expectedResponse->setActiveInput($activeInput); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $request = (new GetChannelRequest()) + ->setName($formattedName); + $response = $gapicClient->getChannel($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/GetChannel', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getChannelExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $request = (new GetChannelRequest()) + ->setName($formattedName); + try { + $gapicClient->getChannel($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEventTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $executeNow = true; + $expectedResponse = new Event(); + $expectedResponse->setName($name2); + $expectedResponse->setExecuteNow($executeNow); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[EVENT]'); + $request = (new GetEventRequest()) + ->setName($formattedName); + $response = $gapicClient->getEvent($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/GetEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEventExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[EVENT]'); + $request = (new GetEventRequest()) + ->setName($formattedName); + try { + $gapicClient->getEvent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInputTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uri = 'uri116076'; + $expectedResponse = new Input(); + $expectedResponse->setName($name2); + $expectedResponse->setUri($uri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); + $request = (new GetInputRequest()) + ->setName($formattedName); + $response = $gapicClient->getInput($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/GetInput', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInputExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); + $request = (new GetInputRequest()) + ->setName($formattedName); + try { + $gapicClient->getInput($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listChannelsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $channelsElement = new Channel(); + $channels = [ + $channelsElement, + ]; + $expectedResponse = new ListChannelsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setChannels($channels); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListChannelsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listChannels($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getChannels()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/ListChannels', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listChannelsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListChannelsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listChannels($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEventsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $eventsElement = new Event(); + $events = [ + $eventsElement, + ]; + $expectedResponse = new ListEventsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEvents($events); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $request = (new ListEventsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listEvents($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEvents()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/ListEvents', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEventsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $request = (new ListEventsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listEvents($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInputsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $inputsElement = new Input(); + $inputs = [ + $inputsElement, + ]; + $expectedResponse = new ListInputsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setInputs($inputs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInputsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listInputs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getInputs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/ListInputs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInputsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInputsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listInputs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startChannelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ChannelOperationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/startChannelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $request = (new StartChannelRequest()) + ->setName($formattedName); + $response = $gapicClient->startChannel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/StartChannel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startChannelTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function startChannelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $request = (new StartChannelRequest()) + ->setName($formattedName); + $response = $gapicClient->startChannel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startChannelTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function stopChannelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/stopChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ChannelOperationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/stopChannelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $request = (new StopChannelRequest()) + ->setName($formattedName); + $response = $gapicClient->stopChannel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/StopChannel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopChannelTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function stopChannelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/stopChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $request = (new StopChannelRequest()) + ->setName($formattedName); + $response = $gapicClient->stopChannel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopChannelTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateChannelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $activeInput = 'activeInput1758551377'; + $expectedResponse = new Channel(); + $expectedResponse->setName($name); + $expectedResponse->setActiveInput($activeInput); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateChannelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $channel = new Channel(); + $channelOutput = new Output(); + $channel->setOutput($channelOutput); + $request = (new UpdateChannelRequest()) + ->setChannel($channel); + $response = $gapicClient->updateChannel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/UpdateChannel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getChannel(); + $this->assertProtobufEquals($channel, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateChannelTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateChannelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $channel = new Channel(); + $channelOutput = new Output(); + $channel->setOutput($channelOutput); + $request = (new UpdateChannelRequest()) + ->setChannel($channel); + $response = $gapicClient->updateChannel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateChannelTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateInputTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateInputTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uri = 'uri116076'; + $expectedResponse = new Input(); + $expectedResponse->setName($name); + $expectedResponse->setUri($uri); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateInputTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $input = new Input(); + $request = (new UpdateInputRequest()) + ->setInput($input); + $response = $gapicClient->updateInput($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/UpdateInput', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInput(); + $this->assertProtobufEquals($input, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInputTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateInputExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateInputTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $input = new Input(); + $request = (new UpdateInputRequest()) + ->setInput($input); + $response = $gapicClient->updateInput($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInputTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createChannelAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $activeInput = 'activeInput1758551377'; + $expectedResponse = new Channel(); + $expectedResponse->setName($name); + $expectedResponse->setActiveInput($activeInput); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createChannelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $channel = new Channel(); + $channelOutput = new Output(); + $channel->setOutput($channelOutput); + $channelId = 'channelId-1930808873'; + $request = (new CreateChannelRequest()) + ->setParent($formattedParent) + ->setChannel($channel) + ->setChannelId($channelId); + $response = $gapicClient->createChannelAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/CreateChannel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getChannel(); + $this->assertProtobufEquals($channel, $actualValue); + $actualValue = $actualApiRequestObject->getChannelId(); + $this->assertProtobufEquals($channelId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createChannelTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/VideoLiveStream/v1/tests/Unit/V1/LivestreamServiceClientTest.php b/owl-bot-staging/VideoLiveStream/v1/tests/Unit/V1/LivestreamServiceClientTest.php new file mode 100644 index 000000000000..32b45d6d6b7a --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/tests/Unit/V1/LivestreamServiceClientTest.php @@ -0,0 +1,1693 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return LivestreamServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new LivestreamServiceClient($options); + } + + /** @test */ + public function createChannelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $activeInput = 'activeInput1758551377'; + $expectedResponse = new Channel(); + $expectedResponse->setName($name); + $expectedResponse->setActiveInput($activeInput); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createChannelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $channel = new Channel(); + $channelOutput = new Output(); + $channel->setOutput($channelOutput); + $channelId = 'channelId-1930808873'; + $response = $gapicClient->createChannel($formattedParent, $channel, $channelId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/CreateChannel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getChannel(); + $this->assertProtobufEquals($channel, $actualValue); + $actualValue = $actualApiRequestObject->getChannelId(); + $this->assertProtobufEquals($channelId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createChannelTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createChannelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $channel = new Channel(); + $channelOutput = new Output(); + $channel->setOutput($channelOutput); + $channelId = 'channelId-1930808873'; + $response = $gapicClient->createChannel($formattedParent, $channel, $channelId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createChannelTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createEventTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $executeNow = true; + $expectedResponse = new Event(); + $expectedResponse->setName($name); + $expectedResponse->setExecuteNow($executeNow); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $event = new Event(); + $eventInputSwitch = new InputSwitchTask(); + $event->setInputSwitch($eventInputSwitch); + $eventId = 'eventId278118624'; + $response = $gapicClient->createEvent($formattedParent, $event, $eventId); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/CreateEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getEvent(); + $this->assertProtobufEquals($event, $actualValue); + $actualValue = $actualRequestObject->getEventId(); + $this->assertProtobufEquals($eventId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEventExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $event = new Event(); + $eventInputSwitch = new InputSwitchTask(); + $event->setInputSwitch($eventInputSwitch); + $eventId = 'eventId278118624'; + try { + $gapicClient->createEvent($formattedParent, $event, $eventId); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createInputTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInputTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uri = 'uri116076'; + $expectedResponse = new Input(); + $expectedResponse->setName($name); + $expectedResponse->setUri($uri); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createInputTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $input = new Input(); + $inputId = 'inputId470715824'; + $response = $gapicClient->createInput($formattedParent, $input, $inputId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/CreateInput', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getInput(); + $this->assertProtobufEquals($input, $actualValue); + $actualValue = $actualApiRequestObject->getInputId(); + $this->assertProtobufEquals($inputId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInputTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createInputExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInputTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $input = new Input(); + $inputId = 'inputId470715824'; + $response = $gapicClient->createInput($formattedParent, $input, $inputId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInputTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteChannelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteChannelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $response = $gapicClient->deleteChannel($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/DeleteChannel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteChannelTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteChannelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $response = $gapicClient->deleteChannel($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteChannelTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteEventTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[EVENT]'); + $gapicClient->deleteEvent($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/DeleteEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteEventExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[EVENT]'); + try { + $gapicClient->deleteEvent($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteInputTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInputTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteInputTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); + $response = $gapicClient->deleteInput($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/DeleteInput', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInputTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInputExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInputTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); + $response = $gapicClient->deleteInput($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInputTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getChannelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $activeInput = 'activeInput1758551377'; + $expectedResponse = new Channel(); + $expectedResponse->setName($name2); + $expectedResponse->setActiveInput($activeInput); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $response = $gapicClient->getChannel($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/GetChannel', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getChannelExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + try { + $gapicClient->getChannel($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEventTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $executeNow = true; + $expectedResponse = new Event(); + $expectedResponse->setName($name2); + $expectedResponse->setExecuteNow($executeNow); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[EVENT]'); + $response = $gapicClient->getEvent($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/GetEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEventExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[EVENT]'); + try { + $gapicClient->getEvent($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInputTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uri = 'uri116076'; + $expectedResponse = new Input(); + $expectedResponse->setName($name2); + $expectedResponse->setUri($uri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); + $response = $gapicClient->getInput($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/GetInput', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInputExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); + try { + $gapicClient->getInput($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listChannelsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $channelsElement = new Channel(); + $channels = [ + $channelsElement, + ]; + $expectedResponse = new ListChannelsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setChannels($channels); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listChannels($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getChannels()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/ListChannels', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listChannelsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listChannels($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEventsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $eventsElement = new Event(); + $events = [ + $eventsElement, + ]; + $expectedResponse = new ListEventsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEvents($events); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $response = $gapicClient->listEvents($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEvents()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/ListEvents', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEventsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + try { + $gapicClient->listEvents($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInputsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $inputsElement = new Input(); + $inputs = [ + $inputsElement, + ]; + $expectedResponse = new ListInputsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setInputs($inputs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listInputs($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getInputs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/ListInputs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInputsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listInputs($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startChannelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ChannelOperationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/startChannelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $response = $gapicClient->startChannel($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/StartChannel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startChannelTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function startChannelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $response = $gapicClient->startChannel($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startChannelTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function stopChannelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/stopChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ChannelOperationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/stopChannelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $response = $gapicClient->stopChannel($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/StopChannel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopChannelTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function stopChannelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/stopChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $response = $gapicClient->stopChannel($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopChannelTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateChannelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $activeInput = 'activeInput1758551377'; + $expectedResponse = new Channel(); + $expectedResponse->setName($name); + $expectedResponse->setActiveInput($activeInput); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateChannelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $channel = new Channel(); + $channelOutput = new Output(); + $channel->setOutput($channelOutput); + $response = $gapicClient->updateChannel($channel); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/UpdateChannel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getChannel(); + $this->assertProtobufEquals($channel, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateChannelTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateChannelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $channel = new Channel(); + $channelOutput = new Output(); + $channel->setOutput($channelOutput); + $response = $gapicClient->updateChannel($channel); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateChannelTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateInputTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateInputTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uri = 'uri116076'; + $expectedResponse = new Input(); + $expectedResponse->setName($name); + $expectedResponse->setUri($uri); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateInputTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $input = new Input(); + $response = $gapicClient->updateInput($input); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/UpdateInput', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInput(); + $this->assertProtobufEquals($input, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInputTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateInputExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateInputTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $input = new Input(); + $response = $gapicClient->updateInput($input); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInputTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->getLocation(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->listLocations(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/AdTagDetails.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/AdTagDetails.php new file mode 100644 index 000000000000..c8f68cb7b757 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/AdTagDetails.php @@ -0,0 +1,52 @@ +internalAddGeneratedFile( + ' +� +3google/cloud/video/stitcher/v1/ad_tag_details.protogoogle.cloud.video.stitcher.v1google/protobuf/duration.protogoogle/protobuf/struct.proto"� +LiveAdTagDetail +name ( > + ad_requests ( 2).google.cloud.video.stitcher.v1.AdRequest:��A� +,videostitcher.googleapis.com/LiveAdTagDetailiprojects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}"� +VodAdTagDetail +name ( > + ad_requests ( 2).google.cloud.video.stitcher.v1.AdRequest:��A� ++videostitcher.googleapis.com/VodAdTagDetaileprojects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail}"� + AdRequest +uri ( I +request_metadata ( 2/.google.cloud.video.stitcher.v1.RequestMetadataK +response_metadata ( 20.google.cloud.video.stitcher.v1.ResponseMetadata"; +RequestMetadata( +headers ( 2.google.protobuf.Struct"� +ResponseMetadata +error ( ( +headers ( 2.google.protobuf.Struct + status_code (  + +size_bytes (+ +duration ( 2.google.protobuf.Duration +body ( By +"com.google.cloud.video.stitcher.v1BAdTagDetailsProtoPZ>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/CdnKeys.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/CdnKeys.php new file mode 100644 index 0000000000000000000000000000000000000000..7da4b85eafa55c3385195c29b404ae160afce63a GIT binary patch literal 1437 zcmb7E&rcIU7!?EpLnWjKgC5LSh?EGsK~F4#X{l6VkVXjyvq_!Ker-p#JDZu=CP@0f zdiL&F=f`$w1Vnn-FO%tC96 zVn(r4MCs2OlWmqT#YoJ)>xK4km&6kE?DgJmmQclbg3Z85LZP~W9j57BOSu+c506>3 zj3!!-@F-Cr5)y|EkW{c#anaJPLC^zLC}~cr8~L>cj&*U>aSVcMB=@iq8BE@eu>h5c zWY_XG0HdM`Z_uokvha{W9Mz#uhK!3KxZ3Ip{^8SIrA?IX3Sb;P5e>gQeRp2zxqX9&W6fpA^=H*>l)#AIa$Ely~0pDXGLRrKa}C|xf(Wu(n^YwF9s zGvL@RTDl(p`!&<5>IZEsb=ujzDm!ypSH)ki7lGJx!Jc>rZhZr6r%UPxjS%_+cht~z literal 0 HcmV?d00001 diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Companions.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Companions.php new file mode 100644 index 0000000000000000000000000000000000000000..8295feed69ccba158eb9cedccdd643e741abc7b5 GIT binary patch literal 1738 zcmb7_?@!u57{^8Y#e+YvW*gg!c|(nuY-PG^FK}o;(6J~mP!pFXO=%CgthC+rin_%& z`v>>e?ES7+D4^SLyy0?p&*z?>-@e~>+77ItBWz)+F>Ijb4PtGK9BMOLw@uXaS}jbG zZg(7FVk#q4tfETw6qSnQ(-+*-wLPliEV{JqOA}{w)Ao!^ml)X2xQsBpjcKO4o$&#h zMQqEJ1slN9I@onI9iyXK;RG|y(3qwi35;^!W0Z3rqcnOL<$QY=KsPnlMF$}cz60Vv z$7`BIM=sMC|63=nN-V;NW|D6_svK%*ri;1x{ktvC(iwLQ`36->$LTE;F#Wshj?J@> zLw(0;eqwl1l(NMzwKP*HVppfcVK%MttJ&-&W??%0o%B}kSszDQC>{8i&E9h|hZyzn z@aqUs%sguC3cr28ZMae%o;Ib_#TIk3*+GZ{qKNR-9_huCH;mBzLtgT9_@Mv%Cj6X( z%zxHedL9_aqB&&I9CE)o$70ny2q$sdr5Z5ua8wjK;koq_ZR=o+jR%Z=J`{z9#nKAn~8rIS+S zR6VOSYNdnnVYyUHOh~g3%^x2pB4SawNK8s|Fjc8mN{MLdR}^BQ=TZeE(xQAuRL$Ty z2*xZ4JOS~Y*W-LG3(LGw@7aBr@OeSwjqu_R<2A%sjqpA~qRl$y2yI@_SR0eeHdCEzUZqHST1vp&6){-b--(KyC$Pi?0W)=QbxIsO z0|{Sq%`vbsbT%!{9>Zc_6vAf2{!>^EZNj5jaU=ooLb#^QRAMCO_+CtU3o}?uRx&1f zXk%RDVh#%n5Fe^(Y6BKWGa{`(T;#S_bieCksZ~haEvpoVs7FbVuGBk7+^y5d1&OCw zrmb*uoSkYD>Sec`Mej*bAK4^4i|>I($DM4)xSUNPIGs# eY|e-;!JExcVO|CTIHZ?<)k<+Q5V2dh1^5k&5GSkv literal 0 HcmV?d00001 diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Events.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Events.php new file mode 100644 index 0000000000000000000000000000000000000000..03acc1702d6098ac4cea9bc04a2c82f73708dc97 GIT binary patch literal 1464 zcmb7EU2oeq6kTG+jjxlG5zxZzfPu?8)ImEL>97}P>EOtWL&UZ;Np?SAK#*nH5uiwd zL>cIYJnRqb&+QM5q++L7*ADZ8d_|pmc<#N2{P~ykI)(3WpT#WmIh*6z2h6V-PP2q3 zK@#Cvu~@JS2gywuMl91Y?wNRGx|sB+`>jaLlOhXP2QQOk8L@T{CB?kG3g;|o=RD-W zHOtzolQvtinCH6U1&I9{mZyHeaNjx~GVafP?oa!QVroc==|oaYojZ!@Fa6ocmn-JqvR$j6)v!QTUsv<_s_VC}$$|Q|zLM10E(ZmI-DYu+}jy zIVJX4nuzMp@LH558zP!9r7>q&>_^ic%Y!UTd6HQI+UYDA-?UM#w2tq#m2}|(w@Qtj z&L<+zFwYA1@$MLBj2Bsas&q?&+f6k6mzHhR^$IaYQBbV9rdC2!D{R)-zO?b zT%iM1iwr&Y(l*EaOY~4C+2josVo@18;~_zZGK<)@X(J&BYUHie6_7`zlEI*B3F^ls zwJE};hG5Sah|n9*5$W3Ki4^8sQ42lQ9>HPPFo@-PbTpx^=%whz*GDVZ7tUQ~EYC|{ z=+NNd4fF1XDDCm3A!>KW84H#kI?v%qTxkD+J#Q#YxjI|c*8A5b z=h~{tO?#RA^P=<9P~3HE&!@A~`*2oM9{ln7=8(NCkNrot#Aj~^g)GnUE!+b94M)+c A@c;k- literal 0 HcmV?d00001 diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/LiveConfigs.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/LiveConfigs.php new file mode 100644 index 0000000000000000000000000000000000000000..5521f68d8b359f049b59d35f385d2e732cc93213 GIT binary patch literal 2066 zcmb7FQFGfw5GHn$CY!c#H9(yfn8RcyZih-Fyg4L{Y$?V=8hdOdGi5ZRIZJ2fh%5=| zWC)%71^x;n4P)itP z?gfdp`JU#}IdR-Dn9ymWN_2n#&qxwsm!R&T{faQ`VTSFl1hP8<$UYZ9_9zFk&-V@h zTpuS1I^lqw3=iG_;(t*(_Nj{!h8h32LlcJvlu_){-+5w(XoCHOaQ}DTPSU_-Gz^e% z=m#!oK1Ug*c)JsYoQOkIL^crIa9-?Qz(^cm-!@3%#x!DKJm61Tttnv(M#W9@dHz`e zM<=M6#n@`S6XYRcaY~lIj!;Zk8V3h5ZUJz;IN9&vO^>L3Oo{Kc$pxO%FmAQVtV)pE zT!$nt=zsQF&|#!pLY&3-e^9dc@`&b~>7KWs=$I?3xkyT+xC?&*?EP;^DPLqRs#KvW zRj3v!ROfq7w{u7wQ7z6h&D8ibch#ged37}}PbafC{#XMjHK#m=dqTeT6|~aaXjlKz ztI89Aj5{ZdX}wYyDvAPtJ%{0`G*pE_Ifkt%o;gcxQNPCxoBJ=-59gqE@oXs$16GBY zNPU%iKidE1F7MJ+9SOfIbOSa;gfVt6X)vv?Nvs!lVdI8n&E`KrDyV`<$L%ZN zV7)Umb*p#Ut*s~qELI0%JdHojl z7HoFTET?le9Ga&VhZh(9R|Ae}I=WG-w8Fo2AMD)^(p<8n=v?SO6PG30oBVXG`JpR2 znBNsgepwD$eqE07>&65g-DF7l819n*kA33F##k?O@hqRj4p&)Beo0BfoT9&Er)=(T z7sV(VP%Y+31H;3cqThxG0b##}@g*;)x736cYX1&L2gzVV6Ah~%Zk9yBXf9e4r`V6Z_waMF0!~~0<~*p z36g-YI;G7VQ&_56a_sO;Yyl?qY;~oo$h&rE}}TkuS5g Ja1GZ0{{j__ltusm literal 0 HcmV?d00001 diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Sessions.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Sessions.php new file mode 100644 index 0000000000000000000000000000000000000000..dff4bef886265800238cd24b071e0ef861091019 GIT binary patch literal 3688 zcmb_f-EJF26vlQF>f^dj7ZuzHp~bYSOIxpEssc_^>c2!TO>8Bl2xMtB-W@wb);p`+ zu~DcZ@hV*N2;A@}T$eZC0&!;lyh-b9B9WWydggp{{=V<*Jo&~sbl@{}huYL7f|}~+ zSQUpAn0EO+7wy4cbsAoKGyO85W^ zx}{2kzHQLzJvG3Tdv7}&Gq9ybZVhBoFd@U9EvRb~YuKTl;W9^XcYs?PjR_TTD&;TL zd*QJXj*Zo7;A5llmXlkmaA!1mx~jTV%v^iZ_gey-#81O_B(3SN;Wnd|*`kMJ&bZrX zETUR~EHmAwVI?nYwWLbJHueg!Ww9^r!7{AwoZ8}lzI zxnUUto~>&sCrMrhwF(XHrx;MbAmQeXl+6}qT{nWXhbCbxnlA&$CCvr>*C-&b?!)>fKZi(qR_ z^Cg+=N`PJBbZy}tW3X#etk0NwLg$X`L9d+m(8K& zcvWt}HJgf`xqF1oWG0#+t9%G~Pq-A1#;9Z?_)U^se+0@qvRQ!K5j_r?Nh!k0oLDm& zm^HFrWg7fV(}Lk$pJ6e1F?;)X93_*?XNqRr!m z#-H&8^W;y%lge)yD4uFetVbT}F~XRRJoHrd(8k5n*fd+xQh5%g@C?a6fg&2xht)GR{5V$`8TZ6q+8Qk{>-$Usbu6vT6C@(6C=hlndqSxEsr&#Lmr z6)4C#dX6?H1vO@4PC0;LQXakXs$aY(X~j#NmJmm8xim^$E7UJ7jk{;mtK`Fcc^UVT zdWDjjn0)0mM9a4{l*xaZ_tNA=hKvo0A1dp2POIQ4sf*`fcD)X33#kiplO}ZTnE*;j8nC~G#+rgQXE&FLm~01d<^COey6*y5Be{9 z?H}~-_6`Q!c5l1a?X10r6D8j~Xm|HIy}g~ajB*{I(~aM=mB&yz>+%Osh+G~yGVn}w z1?^Vlm@@*Y%(rGxK?O~TqE(FYj>;nVAoJtXKv|=&A{<>4e)eL9Q%&B@!Yh_D+FU%2 gRmHQ4%+rrMDS>XK?2@ffIoL0499Dc>n+a literal 0 HcmV?d00001 diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Slates.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Slates.php new file mode 100644 index 000000000000..b64766ec3512 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Slates.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile( + ' +� ++google/cloud/video/stitcher/v1/slates.protogoogle.cloud.video.stitcher.v1google/api/resource.proto"� +Slate +name ( B�A +uri ( A + gam_slate ( 2..google.cloud.video.stitcher.v1.Slate.GamSlate@ +GamSlate + network_code ( B�A + gam_slate_id (B�A:_�A\\ +"videostitcher.googleapis.com/Slate6projects/{project}/locations/{location}/slates/{slate}Bs +"com.google.cloud.video.stitcher.v1B SlatesProtoPZ>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/StitchDetails.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/StitchDetails.php new file mode 100644 index 000000000000..27b7f5f709f0 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/StitchDetails.php @@ -0,0 +1,45 @@ +internalAddGeneratedFile( + ' +� +3google/cloud/video/stitcher/v1/stitch_details.protogoogle.cloud.video.stitcher.v1google/api/resource.protogoogle/protobuf/duration.protogoogle/protobuf/struct.proto"� +VodStitchDetail +name ( I +ad_stitch_details ( 2..google.cloud.video.stitcher.v1.AdStitchDetail:��A� +,videostitcher.googleapis.com/VodStitchDetailfprojects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail}"� +AdStitchDetail + ad_break_id ( B�A +ad_id ( B�A6 +ad_time_offset ( 2.google.protobuf.DurationB�A + skip_reason ( B�AM +media ( 29.google.cloud.video.stitcher.v1.AdStitchDetail.MediaEntryB�AD + +MediaEntry +key ( % +value ( 2.google.protobuf.Value:8Bz +"com.google.cloud.video.stitcher.v1BStitchDetailsProtoPZ>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/VideoStitcherService.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/VideoStitcherService.php new file mode 100644 index 000000000000..957e02bd90cd --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/VideoStitcherService.php @@ -0,0 +1,200 @@ +internalAddGeneratedFile( + ' +�O +;google/cloud/video/stitcher/v1/video_stitcher_service.protogoogle.cloud.video.stitcher.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto3google/cloud/video/stitcher/v1/ad_tag_details.proto-google/cloud/video/stitcher/v1/cdn_keys.proto1google/cloud/video/stitcher/v1/live_configs.proto-google/cloud/video/stitcher/v1/sessions.proto+google/cloud/video/stitcher/v1/slates.proto3google/cloud/video/stitcher/v1/stitch_details.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"� +CreateCdnKeyRequest; +parent ( B+�A�A%#videostitcher.googleapis.com/CdnKey< +cdn_key ( 2&.google.cloud.video.stitcher.v1.CdnKeyB�A + +cdn_key_id ( B�A"� +ListCdnKeysRequest; +parent ( B+�A�A%#videostitcher.googleapis.com/CdnKey + page_size ( + +page_token (  +filter (  +order_by ( "} +ListCdnKeysResponse8 +cdn_keys ( 2&.google.cloud.video.stitcher.v1.CdnKey +next_page_token (  + unreachable ( "M +GetCdnKeyRequest9 +name ( B+�A�A% +#videostitcher.googleapis.com/CdnKey"P +DeleteCdnKeyRequest9 +name ( B+�A�A% +#videostitcher.googleapis.com/CdnKey"� +UpdateCdnKeyRequest< +cdn_key ( 2&.google.cloud.video.stitcher.v1.CdnKeyB�A4 + update_mask ( 2.google.protobuf.FieldMaskB�A"� +CreateVodSessionRequest? +parent ( B/�A�A)\'videostitcher.googleapis.com/VodSessionD + vod_session ( 2*.google.cloud.video.stitcher.v1.VodSessionB�A"U +GetVodSessionRequest= +name ( B/�A�A) +\'videostitcher.googleapis.com/VodSession"� +ListVodStitchDetailsRequestD +parent ( B4�A�A.,videostitcher.googleapis.com/VodStitchDetail + page_size ( + +page_token ( "� +ListVodStitchDetailsResponseK +vod_stitch_details ( 2/.google.cloud.video.stitcher.v1.VodStitchDetail +next_page_token ( "_ +GetVodStitchDetailRequestB +name ( B4�A�A. +,videostitcher.googleapis.com/VodStitchDetail"� +ListVodAdTagDetailsRequestC +parent ( B3�A�A-+videostitcher.googleapis.com/VodAdTagDetail + page_size ( + +page_token ( "� +ListVodAdTagDetailsResponseJ +vod_ad_tag_details ( 2..google.cloud.video.stitcher.v1.VodAdTagDetail +next_page_token ( "] +GetVodAdTagDetailRequestA +name ( B3�A�A- ++videostitcher.googleapis.com/VodAdTagDetail"� +ListLiveAdTagDetailsRequestD +parent ( B4�A�A.,videostitcher.googleapis.com/LiveAdTagDetail + page_size ( + +page_token ( "� +ListLiveAdTagDetailsResponseL +live_ad_tag_details ( 2/.google.cloud.video.stitcher.v1.LiveAdTagDetail +next_page_token ( "_ +GetLiveAdTagDetailRequestB +name ( B4�A�A. +,videostitcher.googleapis.com/LiveAdTagDetail"� +CreateSlateRequest: +parent ( B*�A�A$"videostitcher.googleapis.com/Slate +slate_id ( B�A9 +slate ( 2%.google.cloud.video.stitcher.v1.SlateB�A + +request_id ( "K +GetSlateRequest8 +name ( B*�A�A$ +"videostitcher.googleapis.com/Slate"� +ListSlatesRequest: +parent ( B*�A�A$"videostitcher.googleapis.com/Slate + page_size ( + +page_token (  +filter (  +order_by ( "y +ListSlatesResponse5 +slates ( 2%.google.cloud.video.stitcher.v1.Slate +next_page_token (  + unreachable ( "� +UpdateSlateRequest9 +slate ( 2%.google.cloud.video.stitcher.v1.SlateB�A4 + update_mask ( 2.google.protobuf.FieldMaskB�A"N +DeleteSlateRequest8 +name ( B*�A�A$ +"videostitcher.googleapis.com/Slate"� +CreateLiveSessionRequest@ +parent ( B0�A�A* +(videostitcher.googleapis.com/LiveSessionF + live_session ( 2+.google.cloud.video.stitcher.v1.LiveSessionB�A"W +GetLiveSessionRequest> +name ( B0�A�A* +(videostitcher.googleapis.com/LiveSession"� +CreateLiveConfigRequest? +parent ( B/�A�A)\'videostitcher.googleapis.com/LiveConfig +live_config_id ( B�AD + live_config ( 2*.google.cloud.video.stitcher.v1.LiveConfigB�A + +request_id ( "� +ListLiveConfigsRequest? +parent ( B/�A�A)\'videostitcher.googleapis.com/LiveConfig + page_size ( + +page_token (  +filter ( B�A +order_by ( B�A"� +ListLiveConfigsResponse@ + live_configs ( 2*.google.cloud.video.stitcher.v1.LiveConfig +next_page_token (  + unreachable ( "U +GetLiveConfigRequest= +name ( B/�A�A) +\'videostitcher.googleapis.com/LiveConfig"X +DeleteLiveConfigRequest= +name ( B/�A�A) +\'videostitcher.googleapis.com/LiveConfig"� +OperationMetadata/ + create_time ( 2.google.protobuf.Timestamp, +end_time ( 2.google.protobuf.Timestamp +target (  +verb ( 2�* +VideoStitcherService� + CreateCdnKey3.google.cloud.video.stitcher.v1.CreateCdnKeyRequest.google.longrunning.Operation"����6"+/v1/{parent=projects/*/locations/*}/cdnKeys:cdn_key�Aparent,cdn_key,cdn_key_id�AY +%google.cloud.video.stitcher.v1.CdnKey0google.cloud.video.stitcher.v1.OperationMetadata� + ListCdnKeys2.google.cloud.video.stitcher.v1.ListCdnKeysRequest3.google.cloud.video.stitcher.v1.ListCdnKeysResponse"<���-+/v1/{parent=projects/*/locations/*}/cdnKeys�Aparent� + GetCdnKey0.google.cloud.video.stitcher.v1.GetCdnKeyRequest&.google.cloud.video.stitcher.v1.CdnKey":���-+/v1/{name=projects/*/locations/*/cdnKeys/*}�Aname� + DeleteCdnKey3.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest.google.longrunning.Operation"����-*+/v1/{name=projects/*/locations/*/cdnKeys/*}�Aname�AI +google.protobuf.Empty0google.cloud.video.stitcher.v1.OperationMetadata� + UpdateCdnKey3.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest.google.longrunning.Operation"����>23/v1/{cdn_key.name=projects/*/locations/*/cdnKeys/*}:cdn_key�Acdn_key,update_mask�AY +%google.cloud.video.stitcher.v1.CdnKey0google.cloud.video.stitcher.v1.OperationMetadata� +CreateVodSession7.google.cloud.video.stitcher.v1.CreateVodSessionRequest*.google.cloud.video.stitcher.v1.VodSession"Y���>"//v1/{parent=projects/*/locations/*}/vodSessions: vod_session�Aparent,vod_session� + GetVodSession4.google.cloud.video.stitcher.v1.GetVodSessionRequest*.google.cloud.video.stitcher.v1.VodSession">���1//v1/{name=projects/*/locations/*/vodSessions/*}�Aname� +ListVodStitchDetails;.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest<.google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse"S���DB/v1/{parent=projects/*/locations/*/vodSessions/*}/vodStitchDetails�Aparent� +GetVodStitchDetail9.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest/.google.cloud.video.stitcher.v1.VodStitchDetail"Q���DB/v1/{name=projects/*/locations/*/vodSessions/*/vodStitchDetails/*}�Aname� +ListVodAdTagDetails:.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest;.google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse"R���CA/v1/{parent=projects/*/locations/*/vodSessions/*}/vodAdTagDetails�Aparent� +GetVodAdTagDetail8.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest..google.cloud.video.stitcher.v1.VodAdTagDetail"P���CA/v1/{name=projects/*/locations/*/vodSessions/*/vodAdTagDetails/*}�Aname� +ListLiveAdTagDetails;.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest<.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse"T���EC/v1/{parent=projects/*/locations/*/liveSessions/*}/liveAdTagDetails�Aparent� +GetLiveAdTagDetail9.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest/.google.cloud.video.stitcher.v1.LiveAdTagDetail"R���EC/v1/{name=projects/*/locations/*/liveSessions/*/liveAdTagDetails/*}�Aname� + CreateSlate2.google.cloud.video.stitcher.v1.CreateSlateRequest.google.longrunning.Operation"����3"*/v1/{parent=projects/*/locations/*}/slates:slate�Aparent,slate,slate_id�AX +$google.cloud.video.stitcher.v1.Slate0google.cloud.video.stitcher.v1.OperationMetadata� + +ListSlates1.google.cloud.video.stitcher.v1.ListSlatesRequest2.google.cloud.video.stitcher.v1.ListSlatesResponse";���,*/v1/{parent=projects/*/locations/*}/slates�Aparent� +GetSlate/.google.cloud.video.stitcher.v1.GetSlateRequest%.google.cloud.video.stitcher.v1.Slate"9���,*/v1/{name=projects/*/locations/*/slates/*}�Aname� + UpdateSlate2.google.cloud.video.stitcher.v1.UpdateSlateRequest.google.longrunning.Operation"����920/v1/{slate.name=projects/*/locations/*/slates/*}:slate�Aslate,update_mask�AX +$google.cloud.video.stitcher.v1.Slate0google.cloud.video.stitcher.v1.OperationMetadata� + DeleteSlate2.google.cloud.video.stitcher.v1.DeleteSlateRequest.google.longrunning.Operation"����,**/v1/{name=projects/*/locations/*/slates/*}�Aname�AI +google.protobuf.Empty0google.cloud.video.stitcher.v1.OperationMetadata� +CreateLiveSession8.google.cloud.video.stitcher.v1.CreateLiveSessionRequest+.google.cloud.video.stitcher.v1.LiveSession"\\���@"0/v1/{parent=projects/*/locations/*}/liveSessions: live_session�Aparent,live_session� +GetLiveSession5.google.cloud.video.stitcher.v1.GetLiveSessionRequest+.google.cloud.video.stitcher.v1.LiveSession"?���20/v1/{name=projects/*/locations/*/liveSessions/*}�Aname� +CreateLiveConfig7.google.cloud.video.stitcher.v1.CreateLiveConfigRequest.google.longrunning.Operation"����>"//v1/{parent=projects/*/locations/*}/liveConfigs: live_config�A!parent,live_config,live_config_id�A] +)google.cloud.video.stitcher.v1.LiveConfig0google.cloud.video.stitcher.v1.OperationMetadata� +ListLiveConfigs6.google.cloud.video.stitcher.v1.ListLiveConfigsRequest7.google.cloud.video.stitcher.v1.ListLiveConfigsResponse"@���1//v1/{parent=projects/*/locations/*}/liveConfigs�Aparent� + GetLiveConfig4.google.cloud.video.stitcher.v1.GetLiveConfigRequest*.google.cloud.video.stitcher.v1.LiveConfig">���1//v1/{name=projects/*/locations/*/liveConfigs/*}�Aname� +DeleteLiveConfig7.google.cloud.video.stitcher.v1.DeleteLiveConfigRequest.google.longrunning.Operation"����1*//v1/{name=projects/*/locations/*/liveConfigs/*}�Aname�AI +google.protobuf.Empty0google.cloud.video.stitcher.v1.OperationMetadataP�Avideostitcher.googleapis.com�A.https://www.googleapis.com/auth/cloud-platformB� +"com.google.cloud.video.stitcher.v1BVideoStitcherServiceProtoPZ>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdRequest.php new file mode 100644 index 000000000000..37e899db9a19 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdRequest.php @@ -0,0 +1,155 @@ +google.cloud.video.stitcher.v1.AdRequest + */ +class AdRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The ad tag URI processed with integrated macros. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + /** + * The request metadata used to make the ad request. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.RequestMetadata request_metadata = 2; + */ + protected $request_metadata = null; + /** + * The response metadata received from the ad request. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ResponseMetadata response_metadata = 3; + */ + protected $response_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * The ad tag URI processed with integrated macros. + * @type \Google\Cloud\Video\Stitcher\V1\RequestMetadata $request_metadata + * The request metadata used to make the ad request. + * @type \Google\Cloud\Video\Stitcher\V1\ResponseMetadata $response_metadata + * The response metadata received from the ad request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\AdTagDetails::initOnce(); + parent::__construct($data); + } + + /** + * The ad tag URI processed with integrated macros. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * The ad tag URI processed with integrated macros. + * + * Generated from protobuf field string uri = 1; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * The request metadata used to make the ad request. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.RequestMetadata request_metadata = 2; + * @return \Google\Cloud\Video\Stitcher\V1\RequestMetadata|null + */ + public function getRequestMetadata() + { + return $this->request_metadata; + } + + public function hasRequestMetadata() + { + return isset($this->request_metadata); + } + + public function clearRequestMetadata() + { + unset($this->request_metadata); + } + + /** + * The request metadata used to make the ad request. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.RequestMetadata request_metadata = 2; + * @param \Google\Cloud\Video\Stitcher\V1\RequestMetadata $var + * @return $this + */ + public function setRequestMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\RequestMetadata::class); + $this->request_metadata = $var; + + return $this; + } + + /** + * The response metadata received from the ad request. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ResponseMetadata response_metadata = 3; + * @return \Google\Cloud\Video\Stitcher\V1\ResponseMetadata|null + */ + public function getResponseMetadata() + { + return $this->response_metadata; + } + + public function hasResponseMetadata() + { + return isset($this->response_metadata); + } + + public function clearResponseMetadata() + { + unset($this->response_metadata); + } + + /** + * The response metadata received from the ad request. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ResponseMetadata response_metadata = 3; + * @param \Google\Cloud\Video\Stitcher\V1\ResponseMetadata $var + * @return $this + */ + public function setResponseMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\ResponseMetadata::class); + $this->response_metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdStitchDetail.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdStitchDetail.php new file mode 100644 index 000000000000..33dc179495cb --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdStitchDetail.php @@ -0,0 +1,213 @@ +google.cloud.video.stitcher.v1.AdStitchDetail + */ +class AdStitchDetail extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ad break ID of the processed ad. + * + * Generated from protobuf field string ad_break_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ad_break_id = ''; + /** + * Required. The ad ID of the processed ad. + * + * Generated from protobuf field string ad_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ad_id = ''; + /** + * Required. The time offset of the processed ad. + * + * Generated from protobuf field .google.protobuf.Duration ad_time_offset = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ad_time_offset = null; + /** + * Optional. Indicates the reason why the ad has been skipped. + * + * Generated from protobuf field string skip_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip_reason = ''; + /** + * Optional. The metadata of the chosen media file for the ad. + * + * Generated from protobuf field map media = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $media; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ad_break_id + * Required. The ad break ID of the processed ad. + * @type string $ad_id + * Required. The ad ID of the processed ad. + * @type \Google\Protobuf\Duration $ad_time_offset + * Required. The time offset of the processed ad. + * @type string $skip_reason + * Optional. Indicates the reason why the ad has been skipped. + * @type array|\Google\Protobuf\Internal\MapField $media + * Optional. The metadata of the chosen media file for the ad. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\StitchDetails::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ad break ID of the processed ad. + * + * Generated from protobuf field string ad_break_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAdBreakId() + { + return $this->ad_break_id; + } + + /** + * Required. The ad break ID of the processed ad. + * + * Generated from protobuf field string ad_break_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAdBreakId($var) + { + GPBUtil::checkString($var, True); + $this->ad_break_id = $var; + + return $this; + } + + /** + * Required. The ad ID of the processed ad. + * + * Generated from protobuf field string ad_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAdId() + { + return $this->ad_id; + } + + /** + * Required. The ad ID of the processed ad. + * + * Generated from protobuf field string ad_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAdId($var) + { + GPBUtil::checkString($var, True); + $this->ad_id = $var; + + return $this; + } + + /** + * Required. The time offset of the processed ad. + * + * Generated from protobuf field .google.protobuf.Duration ad_time_offset = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getAdTimeOffset() + { + return $this->ad_time_offset; + } + + public function hasAdTimeOffset() + { + return isset($this->ad_time_offset); + } + + public function clearAdTimeOffset() + { + unset($this->ad_time_offset); + } + + /** + * Required. The time offset of the processed ad. + * + * Generated from protobuf field .google.protobuf.Duration ad_time_offset = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setAdTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->ad_time_offset = $var; + + return $this; + } + + /** + * Optional. Indicates the reason why the ad has been skipped. + * + * Generated from protobuf field string skip_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSkipReason() + { + return $this->skip_reason; + } + + /** + * Optional. Indicates the reason why the ad has been skipped. + * + * Generated from protobuf field string skip_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSkipReason($var) + { + GPBUtil::checkString($var, True); + $this->skip_reason = $var; + + return $this; + } + + /** + * Optional. The metadata of the chosen media file for the ad. + * + * Generated from protobuf field map media = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMedia() + { + return $this->media; + } + + /** + * Optional. The metadata of the chosen media file for the ad. + * + * Generated from protobuf field map media = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMedia($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); + $this->media = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdTracking.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdTracking.php new file mode 100644 index 000000000000..aa08c7d30db3 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdTracking.php @@ -0,0 +1,63 @@ +google.cloud.video.stitcher.v1.AdTracking + */ +class AdTracking +{ + /** + * The ad tracking policy is not specified. + * + * Generated from protobuf enum AD_TRACKING_UNSPECIFIED = 0; + */ + const AD_TRACKING_UNSPECIFIED = 0; + /** + * Client-side ad tracking is specified. The client player is expected to + * trigger playback and activity events itself. + * + * Generated from protobuf enum CLIENT = 1; + */ + const CLIENT = 1; + /** + * The Video Stitcher API will trigger playback events on behalf of + * the client player. + * + * Generated from protobuf enum SERVER = 2; + */ + const SERVER = 2; + + private static $valueToName = [ + self::AD_TRACKING_UNSPECIFIED => 'AD_TRACKING_UNSPECIFIED', + self::CLIENT => 'CLIENT', + self::SERVER => 'SERVER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AkamaiCdnKey.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AkamaiCdnKey.php new file mode 100644 index 000000000000..910d74fe0864 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AkamaiCdnKey.php @@ -0,0 +1,67 @@ +google.cloud.video.stitcher.v1.AkamaiCdnKey + */ +class AkamaiCdnKey extends \Google\Protobuf\Internal\Message +{ + /** + * Input only. Token key for the Akamai CDN edge configuration. + * + * Generated from protobuf field bytes token_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $token_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $token_key + * Input only. Token key for the Akamai CDN edge configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\CdnKeys::initOnce(); + parent::__construct($data); + } + + /** + * Input only. Token key for the Akamai CDN edge configuration. + * + * Generated from protobuf field bytes token_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getTokenKey() + { + return $this->token_key; + } + + /** + * Input only. Token key for the Akamai CDN edge configuration. + * + * Generated from protobuf field bytes token_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTokenKey($var) + { + GPBUtil::checkString($var, False); + $this->token_key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CdnKey.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CdnKey.php new file mode 100644 index 000000000000..c5c9fc8a7033 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CdnKey.php @@ -0,0 +1,219 @@ +google.cloud.video.stitcher.v1.CdnKey + */ +class CdnKey extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the CDN key, in the form of + * `projects/{project}/locations/{location}/cdnKeys/{id}`. + * The name is ignored when creating a CDN key. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The hostname this key applies to. + * + * Generated from protobuf field string hostname = 4; + */ + protected $hostname = ''; + protected $cdn_key_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Stitcher\V1\GoogleCdnKey $google_cdn_key + * The configuration for a Google Cloud CDN key. + * @type \Google\Cloud\Video\Stitcher\V1\AkamaiCdnKey $akamai_cdn_key + * The configuration for an Akamai CDN key. + * @type \Google\Cloud\Video\Stitcher\V1\MediaCdnKey $media_cdn_key + * The configuration for a Media CDN key. + * @type string $name + * The resource name of the CDN key, in the form of + * `projects/{project}/locations/{location}/cdnKeys/{id}`. + * The name is ignored when creating a CDN key. + * @type string $hostname + * The hostname this key applies to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\CdnKeys::initOnce(); + parent::__construct($data); + } + + /** + * The configuration for a Google Cloud CDN key. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.GoogleCdnKey google_cdn_key = 5; + * @return \Google\Cloud\Video\Stitcher\V1\GoogleCdnKey|null + */ + public function getGoogleCdnKey() + { + return $this->readOneof(5); + } + + public function hasGoogleCdnKey() + { + return $this->hasOneof(5); + } + + /** + * The configuration for a Google Cloud CDN key. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.GoogleCdnKey google_cdn_key = 5; + * @param \Google\Cloud\Video\Stitcher\V1\GoogleCdnKey $var + * @return $this + */ + public function setGoogleCdnKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\GoogleCdnKey::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The configuration for an Akamai CDN key. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.AkamaiCdnKey akamai_cdn_key = 6; + * @return \Google\Cloud\Video\Stitcher\V1\AkamaiCdnKey|null + */ + public function getAkamaiCdnKey() + { + return $this->readOneof(6); + } + + public function hasAkamaiCdnKey() + { + return $this->hasOneof(6); + } + + /** + * The configuration for an Akamai CDN key. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.AkamaiCdnKey akamai_cdn_key = 6; + * @param \Google\Cloud\Video\Stitcher\V1\AkamaiCdnKey $var + * @return $this + */ + public function setAkamaiCdnKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\AkamaiCdnKey::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * The configuration for a Media CDN key. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.MediaCdnKey media_cdn_key = 8; + * @return \Google\Cloud\Video\Stitcher\V1\MediaCdnKey|null + */ + public function getMediaCdnKey() + { + return $this->readOneof(8); + } + + public function hasMediaCdnKey() + { + return $this->hasOneof(8); + } + + /** + * The configuration for a Media CDN key. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.MediaCdnKey media_cdn_key = 8; + * @param \Google\Cloud\Video\Stitcher\V1\MediaCdnKey $var + * @return $this + */ + public function setMediaCdnKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\MediaCdnKey::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * The resource name of the CDN key, in the form of + * `projects/{project}/locations/{location}/cdnKeys/{id}`. + * The name is ignored when creating a CDN key. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the CDN key, in the form of + * `projects/{project}/locations/{location}/cdnKeys/{id}`. + * The name is ignored when creating a CDN key. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The hostname this key applies to. + * + * Generated from protobuf field string hostname = 4; + * @return string + */ + public function getHostname() + { + return $this->hostname; + } + + /** + * The hostname this key applies to. + * + * Generated from protobuf field string hostname = 4; + * @param string $var + * @return $this + */ + public function setHostname($var) + { + GPBUtil::checkString($var, True); + $this->hostname = $var; + + return $this; + } + + /** + * @return string + */ + public function getCdnKeyConfig() + { + return $this->whichOneof("cdn_key_config"); + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Companion.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Companion.php new file mode 100644 index 000000000000..6acf2dce062b --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Companion.php @@ -0,0 +1,455 @@ +google.cloud.video.stitcher.v1.Companion + */ +class Companion extends \Google\Protobuf\Internal\Message +{ + /** + * The API necessary to communicate with the creative if available. + * + * Generated from protobuf field string api_framework = 1; + */ + protected $api_framework = ''; + /** + * The pixel height of the placement slot for the intended creative. + * + * Generated from protobuf field int32 height_px = 2; + */ + protected $height_px = 0; + /** + * The pixel width of the placement slot for the intended creative. + * + * Generated from protobuf field int32 width_px = 3; + */ + protected $width_px = 0; + /** + * The pixel height of the creative. + * + * Generated from protobuf field int32 asset_height_px = 4; + */ + protected $asset_height_px = 0; + /** + * The maximum pixel height of the creative in its expanded state. + * + * Generated from protobuf field int32 expanded_height_px = 5; + */ + protected $expanded_height_px = 0; + /** + * The pixel width of the creative. + * + * Generated from protobuf field int32 asset_width_px = 6; + */ + protected $asset_width_px = 0; + /** + * The maximum pixel width of the creative in its expanded state. + * + * Generated from protobuf field int32 expanded_width_px = 7; + */ + protected $expanded_width_px = 0; + /** + * The ID used to identify the desired placement on a publisher's page. + * Values to be used should be discussed between publishers and + * advertisers. + * + * Generated from protobuf field string ad_slot_id = 8; + */ + protected $ad_slot_id = ''; + /** + * The list of tracking events for the companion. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 9; + */ + private $events; + protected $ad_resource; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Stitcher\V1\IframeAdResource $iframe_ad_resource + * The IFrame ad resource associated with the companion ad. + * @type \Google\Cloud\Video\Stitcher\V1\StaticAdResource $static_ad_resource + * The static ad resource associated with the companion ad. + * @type \Google\Cloud\Video\Stitcher\V1\HtmlAdResource $html_ad_resource + * The HTML ad resource associated with the companion ad. + * @type string $api_framework + * The API necessary to communicate with the creative if available. + * @type int $height_px + * The pixel height of the placement slot for the intended creative. + * @type int $width_px + * The pixel width of the placement slot for the intended creative. + * @type int $asset_height_px + * The pixel height of the creative. + * @type int $expanded_height_px + * The maximum pixel height of the creative in its expanded state. + * @type int $asset_width_px + * The pixel width of the creative. + * @type int $expanded_width_px + * The maximum pixel width of the creative in its expanded state. + * @type string $ad_slot_id + * The ID used to identify the desired placement on a publisher's page. + * Values to be used should be discussed between publishers and + * advertisers. + * @type array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $events + * The list of tracking events for the companion. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Companions::initOnce(); + parent::__construct($data); + } + + /** + * The IFrame ad resource associated with the companion ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.IframeAdResource iframe_ad_resource = 10; + * @return \Google\Cloud\Video\Stitcher\V1\IframeAdResource|null + */ + public function getIframeAdResource() + { + return $this->readOneof(10); + } + + public function hasIframeAdResource() + { + return $this->hasOneof(10); + } + + /** + * The IFrame ad resource associated with the companion ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.IframeAdResource iframe_ad_resource = 10; + * @param \Google\Cloud\Video\Stitcher\V1\IframeAdResource $var + * @return $this + */ + public function setIframeAdResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\IframeAdResource::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * The static ad resource associated with the companion ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.StaticAdResource static_ad_resource = 11; + * @return \Google\Cloud\Video\Stitcher\V1\StaticAdResource|null + */ + public function getStaticAdResource() + { + return $this->readOneof(11); + } + + public function hasStaticAdResource() + { + return $this->hasOneof(11); + } + + /** + * The static ad resource associated with the companion ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.StaticAdResource static_ad_resource = 11; + * @param \Google\Cloud\Video\Stitcher\V1\StaticAdResource $var + * @return $this + */ + public function setStaticAdResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\StaticAdResource::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * The HTML ad resource associated with the companion ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.HtmlAdResource html_ad_resource = 12; + * @return \Google\Cloud\Video\Stitcher\V1\HtmlAdResource|null + */ + public function getHtmlAdResource() + { + return $this->readOneof(12); + } + + public function hasHtmlAdResource() + { + return $this->hasOneof(12); + } + + /** + * The HTML ad resource associated with the companion ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.HtmlAdResource html_ad_resource = 12; + * @param \Google\Cloud\Video\Stitcher\V1\HtmlAdResource $var + * @return $this + */ + public function setHtmlAdResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\HtmlAdResource::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * The API necessary to communicate with the creative if available. + * + * Generated from protobuf field string api_framework = 1; + * @return string + */ + public function getApiFramework() + { + return $this->api_framework; + } + + /** + * The API necessary to communicate with the creative if available. + * + * Generated from protobuf field string api_framework = 1; + * @param string $var + * @return $this + */ + public function setApiFramework($var) + { + GPBUtil::checkString($var, True); + $this->api_framework = $var; + + return $this; + } + + /** + * The pixel height of the placement slot for the intended creative. + * + * Generated from protobuf field int32 height_px = 2; + * @return int + */ + public function getHeightPx() + { + return $this->height_px; + } + + /** + * The pixel height of the placement slot for the intended creative. + * + * Generated from protobuf field int32 height_px = 2; + * @param int $var + * @return $this + */ + public function setHeightPx($var) + { + GPBUtil::checkInt32($var); + $this->height_px = $var; + + return $this; + } + + /** + * The pixel width of the placement slot for the intended creative. + * + * Generated from protobuf field int32 width_px = 3; + * @return int + */ + public function getWidthPx() + { + return $this->width_px; + } + + /** + * The pixel width of the placement slot for the intended creative. + * + * Generated from protobuf field int32 width_px = 3; + * @param int $var + * @return $this + */ + public function setWidthPx($var) + { + GPBUtil::checkInt32($var); + $this->width_px = $var; + + return $this; + } + + /** + * The pixel height of the creative. + * + * Generated from protobuf field int32 asset_height_px = 4; + * @return int + */ + public function getAssetHeightPx() + { + return $this->asset_height_px; + } + + /** + * The pixel height of the creative. + * + * Generated from protobuf field int32 asset_height_px = 4; + * @param int $var + * @return $this + */ + public function setAssetHeightPx($var) + { + GPBUtil::checkInt32($var); + $this->asset_height_px = $var; + + return $this; + } + + /** + * The maximum pixel height of the creative in its expanded state. + * + * Generated from protobuf field int32 expanded_height_px = 5; + * @return int + */ + public function getExpandedHeightPx() + { + return $this->expanded_height_px; + } + + /** + * The maximum pixel height of the creative in its expanded state. + * + * Generated from protobuf field int32 expanded_height_px = 5; + * @param int $var + * @return $this + */ + public function setExpandedHeightPx($var) + { + GPBUtil::checkInt32($var); + $this->expanded_height_px = $var; + + return $this; + } + + /** + * The pixel width of the creative. + * + * Generated from protobuf field int32 asset_width_px = 6; + * @return int + */ + public function getAssetWidthPx() + { + return $this->asset_width_px; + } + + /** + * The pixel width of the creative. + * + * Generated from protobuf field int32 asset_width_px = 6; + * @param int $var + * @return $this + */ + public function setAssetWidthPx($var) + { + GPBUtil::checkInt32($var); + $this->asset_width_px = $var; + + return $this; + } + + /** + * The maximum pixel width of the creative in its expanded state. + * + * Generated from protobuf field int32 expanded_width_px = 7; + * @return int + */ + public function getExpandedWidthPx() + { + return $this->expanded_width_px; + } + + /** + * The maximum pixel width of the creative in its expanded state. + * + * Generated from protobuf field int32 expanded_width_px = 7; + * @param int $var + * @return $this + */ + public function setExpandedWidthPx($var) + { + GPBUtil::checkInt32($var); + $this->expanded_width_px = $var; + + return $this; + } + + /** + * The ID used to identify the desired placement on a publisher's page. + * Values to be used should be discussed between publishers and + * advertisers. + * + * Generated from protobuf field string ad_slot_id = 8; + * @return string + */ + public function getAdSlotId() + { + return $this->ad_slot_id; + } + + /** + * The ID used to identify the desired placement on a publisher's page. + * Values to be used should be discussed between publishers and + * advertisers. + * + * Generated from protobuf field string ad_slot_id = 8; + * @param string $var + * @return $this + */ + public function setAdSlotId($var) + { + GPBUtil::checkString($var, True); + $this->ad_slot_id = $var; + + return $this; + } + + /** + * The list of tracking events for the companion. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEvents() + { + return $this->events; + } + + /** + * The list of tracking events for the companion. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 9; + * @param array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\Event::class); + $this->events = $arr; + + return $this; + } + + /** + * @return string + */ + public function getAdResource() + { + return $this->whichOneof("ad_resource"); + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds.php new file mode 100644 index 000000000000..19875411f716 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds.php @@ -0,0 +1,101 @@ +google.cloud.video.stitcher.v1.CompanionAds + */ +class CompanionAds extends \Google\Protobuf\Internal\Message +{ + /** + * Indicates how many of the companions should be displayed with the ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement display_requirement = 1; + */ + protected $display_requirement = 0; + /** + * List of companion ads. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Companion companions = 2; + */ + private $companions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $display_requirement + * Indicates how many of the companions should be displayed with the ad. + * @type array<\Google\Cloud\Video\Stitcher\V1\Companion>|\Google\Protobuf\Internal\RepeatedField $companions + * List of companion ads. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Companions::initOnce(); + parent::__construct($data); + } + + /** + * Indicates how many of the companions should be displayed with the ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement display_requirement = 1; + * @return int + */ + public function getDisplayRequirement() + { + return $this->display_requirement; + } + + /** + * Indicates how many of the companions should be displayed with the ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement display_requirement = 1; + * @param int $var + * @return $this + */ + public function setDisplayRequirement($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\CompanionAds\DisplayRequirement::class); + $this->display_requirement = $var; + + return $this; + } + + /** + * List of companion ads. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Companion companions = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCompanions() + { + return $this->companions; + } + + /** + * List of companion ads. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Companion companions = 2; + * @param array<\Google\Cloud\Video\Stitcher\V1\Companion>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCompanions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\Companion::class); + $this->companions = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds/DisplayRequirement.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds/DisplayRequirement.php new file mode 100644 index 000000000000..edcd46145e33 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds/DisplayRequirement.php @@ -0,0 +1,71 @@ +google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement + */ +class DisplayRequirement +{ + /** + * Required companions are not specified. The default is ALL. + * + * Generated from protobuf enum DISPLAY_REQUIREMENT_UNSPECIFIED = 0; + */ + const DISPLAY_REQUIREMENT_UNSPECIFIED = 0; + /** + * All companions are required to be displayed. + * + * Generated from protobuf enum ALL = 1; + */ + const ALL = 1; + /** + * At least one of companions needs to be displayed. + * + * Generated from protobuf enum ANY = 2; + */ + const ANY = 2; + /** + * All companions are optional for display. + * + * Generated from protobuf enum NONE = 3; + */ + const NONE = 3; + + private static $valueToName = [ + self::DISPLAY_REQUIREMENT_UNSPECIFIED => 'DISPLAY_REQUIREMENT_UNSPECIFIED', + self::ALL => 'ALL', + self::ANY => 'ANY', + self::NONE => 'NONE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DisplayRequirement::class, \Google\Cloud\Video\Stitcher\V1\CompanionAds_DisplayRequirement::class); + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateCdnKeyRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateCdnKeyRequest.php new file mode 100644 index 000000000000..86b5b6d68253 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateCdnKeyRequest.php @@ -0,0 +1,189 @@ +google.cloud.video.stitcher.v1.CreateCdnKeyRequest + */ +class CreateCdnKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project in which the CDN key should be created, in the form + * of `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The CDN key resource to create. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cdn_key = null; + /** + * Required. The ID to use for the CDN key, which will become the final + * component of the CDN key's resource name. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * + * Generated from protobuf field string cdn_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cdn_key_id = ''; + + /** + * @param string $parent Required. The project in which the CDN key should be created, in the form + * of `projects/{project_number}/locations/{location}`. Please see + * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Video\Stitcher\V1\CdnKey $cdnKey Required. The CDN key resource to create. + * @param string $cdnKeyId Required. The ID to use for the CDN key, which will become the final + * component of the CDN key's resource name. + * + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * + * @return \Google\Cloud\Video\Stitcher\V1\CreateCdnKeyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\Stitcher\V1\CdnKey $cdnKey, string $cdnKeyId): self + { + return (new self()) + ->setParent($parent) + ->setCdnKey($cdnKey) + ->setCdnKeyId($cdnKeyId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project in which the CDN key should be created, in the form + * of `projects/{project_number}/locations/{location}`. + * @type \Google\Cloud\Video\Stitcher\V1\CdnKey $cdn_key + * Required. The CDN key resource to create. + * @type string $cdn_key_id + * Required. The ID to use for the CDN key, which will become the final + * component of the CDN key's resource name. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project in which the CDN key should be created, in the form + * of `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project in which the CDN key should be created, in the form + * of `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The CDN key resource to create. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\Stitcher\V1\CdnKey|null + */ + public function getCdnKey() + { + return $this->cdn_key; + } + + public function hasCdnKey() + { + return isset($this->cdn_key); + } + + public function clearCdnKey() + { + unset($this->cdn_key); + } + + /** + * Required. The CDN key resource to create. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\Stitcher\V1\CdnKey $var + * @return $this + */ + public function setCdnKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\CdnKey::class); + $this->cdn_key = $var; + + return $this; + } + + /** + * Required. The ID to use for the CDN key, which will become the final + * component of the CDN key's resource name. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * + * Generated from protobuf field string cdn_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCdnKeyId() + { + return $this->cdn_key_id; + } + + /** + * Required. The ID to use for the CDN key, which will become the final + * component of the CDN key's resource name. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * + * Generated from protobuf field string cdn_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCdnKeyId($var) + { + GPBUtil::checkString($var, True); + $this->cdn_key_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveConfigRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveConfigRequest.php new file mode 100644 index 000000000000..2e55e807afd3 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveConfigRequest.php @@ -0,0 +1,242 @@ +google.cloud.video.stitcher.v1.CreateLiveConfigRequest + */ +class CreateLiveConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project in which the live config should be created, in + * the form of `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The unique identifier ID to use for the live config. + * + * Generated from protobuf field string live_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $live_config_id = ''; + /** + * Required. The live config resource to create. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig live_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $live_config = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 4; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The project in which the live config should be created, in + * the form of `projects/{project_number}/locations/{location}`. Please see + * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Video\Stitcher\V1\LiveConfig $liveConfig Required. The live config resource to create. + * @param string $liveConfigId Required. The unique identifier ID to use for the live config. + * + * @return \Google\Cloud\Video\Stitcher\V1\CreateLiveConfigRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\Stitcher\V1\LiveConfig $liveConfig, string $liveConfigId): self + { + return (new self()) + ->setParent($parent) + ->setLiveConfig($liveConfig) + ->setLiveConfigId($liveConfigId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project in which the live config should be created, in + * the form of `projects/{project_number}/locations/{location}`. + * @type string $live_config_id + * Required. The unique identifier ID to use for the live config. + * @type \Google\Cloud\Video\Stitcher\V1\LiveConfig $live_config + * Required. The live config resource to create. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project in which the live config should be created, in + * the form of `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project in which the live config should be created, in + * the form of `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The unique identifier ID to use for the live config. + * + * Generated from protobuf field string live_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLiveConfigId() + { + return $this->live_config_id; + } + + /** + * Required. The unique identifier ID to use for the live config. + * + * Generated from protobuf field string live_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLiveConfigId($var) + { + GPBUtil::checkString($var, True); + $this->live_config_id = $var; + + return $this; + } + + /** + * Required. The live config resource to create. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig live_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\Stitcher\V1\LiveConfig|null + */ + public function getLiveConfig() + { + return $this->live_config; + } + + public function hasLiveConfig() + { + return isset($this->live_config); + } + + public function clearLiveConfig() + { + unset($this->live_config); + } + + /** + * Required. The live config resource to create. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig live_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\Stitcher\V1\LiveConfig $var + * @return $this + */ + public function setLiveConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\LiveConfig::class); + $this->live_config = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 4; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 4; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveSessionRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveSessionRequest.php new file mode 100644 index 000000000000..0b123c8f3e10 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveSessionRequest.php @@ -0,0 +1,132 @@ +google.cloud.video.stitcher.v1.CreateLiveSessionRequest + */ +class CreateLiveSessionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location in which the live session should be + * created, in the form of `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Parameters for creating a live session. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession live_session = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $live_session = null; + + /** + * @param string $parent Required. The project and location in which the live session should be + * created, in the form of `projects/{project_number}/locations/{location}`. Please see + * {@see VideoStitcherServiceClient::liveSessionName()} for help formatting this field. + * @param \Google\Cloud\Video\Stitcher\V1\LiveSession $liveSession Required. Parameters for creating a live session. + * + * @return \Google\Cloud\Video\Stitcher\V1\CreateLiveSessionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\Stitcher\V1\LiveSession $liveSession): self + { + return (new self()) + ->setParent($parent) + ->setLiveSession($liveSession); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location in which the live session should be + * created, in the form of `projects/{project_number}/locations/{location}`. + * @type \Google\Cloud\Video\Stitcher\V1\LiveSession $live_session + * Required. Parameters for creating a live session. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location in which the live session should be + * created, in the form of `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project and location in which the live session should be + * created, in the form of `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Parameters for creating a live session. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession live_session = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\Stitcher\V1\LiveSession|null + */ + public function getLiveSession() + { + return $this->live_session; + } + + public function hasLiveSession() + { + return isset($this->live_session); + } + + public function clearLiveSession() + { + unset($this->live_session); + } + + /** + * Required. Parameters for creating a live session. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession live_session = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\Stitcher\V1\LiveSession $var + * @return $this + */ + public function setLiveSession($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\LiveSession::class); + $this->live_session = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateSlateRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateSlateRequest.php new file mode 100644 index 000000000000..f1cd04f9e2da --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateSlateRequest.php @@ -0,0 +1,257 @@ +google.cloud.video.stitcher.v1.CreateSlateRequest + */ +class CreateSlateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project in which the slate should be created, in the form of + * `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The unique identifier for the slate. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * + * Generated from protobuf field string slate_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $slate_id = ''; + /** + * Required. The slate to create. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $slate = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 4; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The project in which the slate should be created, in the form of + * `projects/{project_number}/locations/{location}`. Please see + * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Video\Stitcher\V1\Slate $slate Required. The slate to create. + * @param string $slateId Required. The unique identifier for the slate. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * + * @return \Google\Cloud\Video\Stitcher\V1\CreateSlateRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\Stitcher\V1\Slate $slate, string $slateId): self + { + return (new self()) + ->setParent($parent) + ->setSlate($slate) + ->setSlateId($slateId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project in which the slate should be created, in the form of + * `projects/{project_number}/locations/{location}`. + * @type string $slate_id + * Required. The unique identifier for the slate. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * @type \Google\Cloud\Video\Stitcher\V1\Slate $slate + * Required. The slate to create. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project in which the slate should be created, in the form of + * `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project in which the slate should be created, in the form of + * `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The unique identifier for the slate. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * + * Generated from protobuf field string slate_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSlateId() + { + return $this->slate_id; + } + + /** + * Required. The unique identifier for the slate. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * + * Generated from protobuf field string slate_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSlateId($var) + { + GPBUtil::checkString($var, True); + $this->slate_id = $var; + + return $this; + } + + /** + * Required. The slate to create. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\Stitcher\V1\Slate|null + */ + public function getSlate() + { + return $this->slate; + } + + public function hasSlate() + { + return isset($this->slate); + } + + public function clearSlate() + { + unset($this->slate); + } + + /** + * Required. The slate to create. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\Stitcher\V1\Slate $var + * @return $this + */ + public function setSlate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\Slate::class); + $this->slate = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 4; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * + * Generated from protobuf field string request_id = 4; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodSessionRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodSessionRequest.php new file mode 100644 index 000000000000..14e94a02e824 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodSessionRequest.php @@ -0,0 +1,132 @@ +google.cloud.video.stitcher.v1.CreateVodSessionRequest + */ +class CreateVodSessionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location in which the VOD session should be + * created, in the form of `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Parameters for creating a session. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession vod_session = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $vod_session = null; + + /** + * @param string $parent Required. The project and location in which the VOD session should be + * created, in the form of `projects/{project_number}/locations/{location}`. Please see + * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Video\Stitcher\V1\VodSession $vodSession Required. Parameters for creating a session. + * + * @return \Google\Cloud\Video\Stitcher\V1\CreateVodSessionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\Stitcher\V1\VodSession $vodSession): self + { + return (new self()) + ->setParent($parent) + ->setVodSession($vodSession); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location in which the VOD session should be + * created, in the form of `projects/{project_number}/locations/{location}`. + * @type \Google\Cloud\Video\Stitcher\V1\VodSession $vod_session + * Required. Parameters for creating a session. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location in which the VOD session should be + * created, in the form of `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project and location in which the VOD session should be + * created, in the form of `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Parameters for creating a session. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession vod_session = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\Stitcher\V1\VodSession|null + */ + public function getVodSession() + { + return $this->vod_session; + } + + public function hasVodSession() + { + return isset($this->vod_session); + } + + public function clearVodSession() + { + unset($this->vod_session); + } + + /** + * Required. Parameters for creating a session. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession vod_session = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\Stitcher\V1\VodSession $var + * @return $this + */ + public function setVodSession($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\VodSession::class); + $this->vod_session = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteCdnKeyRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteCdnKeyRequest.php new file mode 100644 index 000000000000..7e1f8d4d0f91 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteCdnKeyRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + */ +class DeleteCdnKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the CDN key to be deleted, in the form of + * `projects/{project_number}/locations/{location}/cdnKeys/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the CDN key to be deleted, in the form of + * `projects/{project_number}/locations/{location}/cdnKeys/{id}`. Please see + * {@see VideoStitcherServiceClient::cdnKeyName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\DeleteCdnKeyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the CDN key to be deleted, in the form of + * `projects/{project_number}/locations/{location}/cdnKeys/{id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the CDN key to be deleted, in the form of + * `projects/{project_number}/locations/{location}/cdnKeys/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the CDN key to be deleted, in the form of + * `projects/{project_number}/locations/{location}/cdnKeys/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteLiveConfigRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteLiveConfigRequest.php new file mode 100644 index 000000000000..c0b9429e5375 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteLiveConfigRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.stitcher.v1.DeleteLiveConfigRequest + */ +class DeleteLiveConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the live config to be deleted, in the form of + * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the live config to be deleted, in the form of + * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. Please see + * {@see VideoStitcherServiceClient::liveConfigName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\DeleteLiveConfigRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the live config to be deleted, in the form of + * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the live config to be deleted, in the form of + * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the live config to be deleted, in the form of + * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteSlateRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteSlateRequest.php new file mode 100644 index 000000000000..6cdc43bb27e4 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteSlateRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.stitcher.v1.DeleteSlateRequest + */ +class DeleteSlateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the slate to be deleted, in the form of + * `projects/{project_number}/locations/{location}/slates/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the slate to be deleted, in the form of + * `projects/{project_number}/locations/{location}/slates/{id}`. Please see + * {@see VideoStitcherServiceClient::slateName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\DeleteSlateRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the slate to be deleted, in the form of + * `projects/{project_number}/locations/{location}/slates/{id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the slate to be deleted, in the form of + * `projects/{project_number}/locations/{location}/slates/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the slate to be deleted, in the form of + * `projects/{project_number}/locations/{location}/slates/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event.php new file mode 100644 index 000000000000..c9ea208c2db7 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event.php @@ -0,0 +1,179 @@ +google.cloud.video.stitcher.v1.Event + */ +class Event extends \Google\Protobuf\Internal\Message +{ + /** + * Describes the event that occurred. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Event.EventType type = 1; + */ + protected $type = 0; + /** + * The URI to trigger for this event. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * The ID of the event. + * + * Generated from protobuf field string id = 3; + */ + protected $id = ''; + /** + * The offset in seconds if the event type is `PROGRESS`. + * + * Generated from protobuf field .google.protobuf.Duration offset = 4; + */ + protected $offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Describes the event that occurred. + * @type string $uri + * The URI to trigger for this event. + * @type string $id + * The ID of the event. + * @type \Google\Protobuf\Duration $offset + * The offset in seconds if the event type is `PROGRESS`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Events::initOnce(); + parent::__construct($data); + } + + /** + * Describes the event that occurred. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Event.EventType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Describes the event that occurred. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Event.EventType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\Event\EventType::class); + $this->type = $var; + + return $this; + } + + /** + * The URI to trigger for this event. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * The URI to trigger for this event. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * The ID of the event. + * + * Generated from protobuf field string id = 3; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * The ID of the event. + * + * Generated from protobuf field string id = 3; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The offset in seconds if the event type is `PROGRESS`. + * + * Generated from protobuf field .google.protobuf.Duration offset = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getOffset() + { + return $this->offset; + } + + public function hasOffset() + { + return isset($this->offset); + } + + public function clearOffset() + { + unset($this->offset); + } + + /** + * The offset in seconds if the event type is `PROGRESS`. + * + * Generated from protobuf field .google.protobuf.Duration offset = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event/EventType.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event/EventType.php new file mode 100644 index 000000000000..5d323e3ef361 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event/EventType.php @@ -0,0 +1,218 @@ +google.cloud.video.stitcher.v1.Event.EventType + */ +class EventType +{ + /** + * The event type is unspecified. + * + * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; + */ + const EVENT_TYPE_UNSPECIFIED = 0; + /** + * First frame of creative ad viewed. + * + * Generated from protobuf enum CREATIVE_VIEW = 1; + */ + const CREATIVE_VIEW = 1; + /** + * Creative ad started. + * + * Generated from protobuf enum START = 2; + */ + const START = 2; + /** + * Start of an ad break. + * + * Generated from protobuf enum BREAK_START = 3; + */ + const BREAK_START = 3; + /** + * End of an ad break. + * + * Generated from protobuf enum BREAK_END = 4; + */ + const BREAK_END = 4; + /** + * Impression. + * + * Generated from protobuf enum IMPRESSION = 5; + */ + const IMPRESSION = 5; + /** + * First quartile progress. + * + * Generated from protobuf enum FIRST_QUARTILE = 6; + */ + const FIRST_QUARTILE = 6; + /** + * Midpoint progress. + * + * Generated from protobuf enum MIDPOINT = 7; + */ + const MIDPOINT = 7; + /** + * Third quartile progress. + * + * Generated from protobuf enum THIRD_QUARTILE = 8; + */ + const THIRD_QUARTILE = 8; + /** + * Ad progress completed. + * + * Generated from protobuf enum COMPLETE = 9; + */ + const COMPLETE = 9; + /** + * Specific progress event with an offset. + * + * Generated from protobuf enum PROGRESS = 10; + */ + const PROGRESS = 10; + /** + * Player muted. + * + * Generated from protobuf enum MUTE = 11; + */ + const MUTE = 11; + /** + * Player unmuted. + * + * Generated from protobuf enum UNMUTE = 12; + */ + const UNMUTE = 12; + /** + * Player paused. + * + * Generated from protobuf enum PAUSE = 13; + */ + const PAUSE = 13; + /** + * Click event. + * + * Generated from protobuf enum CLICK = 14; + */ + const CLICK = 14; + /** + * Click-through event. + * + * Generated from protobuf enum CLICK_THROUGH = 15; + */ + const CLICK_THROUGH = 15; + /** + * Player rewinding. + * + * Generated from protobuf enum REWIND = 16; + */ + const REWIND = 16; + /** + * Player resumed. + * + * Generated from protobuf enum RESUME = 17; + */ + const RESUME = 17; + /** + * Error event. + * + * Generated from protobuf enum ERROR = 18; + */ + const ERROR = 18; + /** + * Ad expanded to a larger size. + * + * Generated from protobuf enum EXPAND = 21; + */ + const EXPAND = 21; + /** + * Ad collapsed to a smaller size. + * + * Generated from protobuf enum COLLAPSE = 22; + */ + const COLLAPSE = 22; + /** + * Non-linear ad closed. + * + * Generated from protobuf enum CLOSE = 24; + */ + const CLOSE = 24; + /** + * Linear ad closed. + * + * Generated from protobuf enum CLOSE_LINEAR = 25; + */ + const CLOSE_LINEAR = 25; + /** + * Ad skipped. + * + * Generated from protobuf enum SKIP = 26; + */ + const SKIP = 26; + /** + * Accept invitation event. + * + * Generated from protobuf enum ACCEPT_INVITATION = 27; + */ + const ACCEPT_INVITATION = 27; + + private static $valueToName = [ + self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', + self::CREATIVE_VIEW => 'CREATIVE_VIEW', + self::START => 'START', + self::BREAK_START => 'BREAK_START', + self::BREAK_END => 'BREAK_END', + self::IMPRESSION => 'IMPRESSION', + self::FIRST_QUARTILE => 'FIRST_QUARTILE', + self::MIDPOINT => 'MIDPOINT', + self::THIRD_QUARTILE => 'THIRD_QUARTILE', + self::COMPLETE => 'COMPLETE', + self::PROGRESS => 'PROGRESS', + self::MUTE => 'MUTE', + self::UNMUTE => 'UNMUTE', + self::PAUSE => 'PAUSE', + self::CLICK => 'CLICK', + self::CLICK_THROUGH => 'CLICK_THROUGH', + self::REWIND => 'REWIND', + self::RESUME => 'RESUME', + self::ERROR => 'ERROR', + self::EXPAND => 'EXPAND', + self::COLLAPSE => 'COLLAPSE', + self::CLOSE => 'CLOSE', + self::CLOSE_LINEAR => 'CLOSE_LINEAR', + self::SKIP => 'SKIP', + self::ACCEPT_INVITATION => 'ACCEPT_INVITATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EventType::class, \Google\Cloud\Video\Stitcher\V1\Event_EventType::class); + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamLiveConfig.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamLiveConfig.php new file mode 100644 index 000000000000..74a1dd80906a --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamLiveConfig.php @@ -0,0 +1,135 @@ +google.cloud.video.stitcher.v1.GamLiveConfig + */ +class GamLiveConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Ad Manager network code to associate with the live config. + * + * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network_code = ''; + /** + * Output only. The asset key identifier generated for the live config. + * + * Generated from protobuf field string asset_key = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $asset_key = ''; + /** + * Output only. The custom asset key identifier generated for the live config. + * + * Generated from protobuf field string custom_asset_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $custom_asset_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network_code + * Required. Ad Manager network code to associate with the live config. + * @type string $asset_key + * Output only. The asset key identifier generated for the live config. + * @type string $custom_asset_key + * Output only. The custom asset key identifier generated for the live config. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\LiveConfigs::initOnce(); + parent::__construct($data); + } + + /** + * Required. Ad Manager network code to associate with the live config. + * + * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNetworkCode() + { + return $this->network_code; + } + + /** + * Required. Ad Manager network code to associate with the live config. + * + * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNetworkCode($var) + { + GPBUtil::checkString($var, True); + $this->network_code = $var; + + return $this; + } + + /** + * Output only. The asset key identifier generated for the live config. + * + * Generated from protobuf field string asset_key = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAssetKey() + { + return $this->asset_key; + } + + /** + * Output only. The asset key identifier generated for the live config. + * + * Generated from protobuf field string asset_key = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAssetKey($var) + { + GPBUtil::checkString($var, True); + $this->asset_key = $var; + + return $this; + } + + /** + * Output only. The custom asset key identifier generated for the live config. + * + * Generated from protobuf field string custom_asset_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCustomAssetKey() + { + return $this->custom_asset_key; + } + + /** + * Output only. The custom asset key identifier generated for the live config. + * + * Generated from protobuf field string custom_asset_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCustomAssetKey($var) + { + GPBUtil::checkString($var, True); + $this->custom_asset_key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetCdnKeyRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetCdnKeyRequest.php new file mode 100644 index 000000000000..60883c4c2bcb --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetCdnKeyRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.stitcher.v1.GetCdnKeyRequest + */ +class GetCdnKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the CDN key to be retrieved, in the form of + * `projects/{project}/locations/{location}/cdnKeys/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the CDN key to be retrieved, in the form of + * `projects/{project}/locations/{location}/cdnKeys/{id}`. Please see + * {@see VideoStitcherServiceClient::cdnKeyName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\GetCdnKeyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the CDN key to be retrieved, in the form of + * `projects/{project}/locations/{location}/cdnKeys/{id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the CDN key to be retrieved, in the form of + * `projects/{project}/locations/{location}/cdnKeys/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the CDN key to be retrieved, in the form of + * `projects/{project}/locations/{location}/cdnKeys/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveAdTagDetailRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveAdTagDetailRequest.php new file mode 100644 index 000000000000..0bb9510c90d2 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveAdTagDetailRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + */ +class GetLiveAdTagDetailRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. Please see + * {@see VideoStitcherServiceClient::liveAdTagDetailName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\GetLiveAdTagDetailRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveConfigRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveConfigRequest.php new file mode 100644 index 000000000000..903077856948 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveConfigRequest.php @@ -0,0 +1,91 @@ +google.cloud.video.stitcher.v1.GetLiveConfigRequest + */ +class GetLiveConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the live config to be retrieved, in the form + * of + * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the live config to be retrieved, in the form + * of + * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. Please see + * {@see VideoStitcherServiceClient::liveConfigName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\GetLiveConfigRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the live config to be retrieved, in the form + * of + * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the live config to be retrieved, in the form + * of + * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the live config to be retrieved, in the form + * of + * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveSessionRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveSessionRequest.php new file mode 100644 index 000000000000..a3ba9f66b9a9 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveSessionRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.stitcher.v1.GetLiveSessionRequest + */ +class GetLiveSessionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the live session, in the form of + * `projects/{project_number}/locations/{location}/liveSessions/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the live session, in the form of + * `projects/{project_number}/locations/{location}/liveSessions/{id}`. Please see + * {@see VideoStitcherServiceClient::liveSessionName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\GetLiveSessionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the live session, in the form of + * `projects/{project_number}/locations/{location}/liveSessions/{id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the live session, in the form of + * `projects/{project_number}/locations/{location}/liveSessions/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the live session, in the form of + * `projects/{project_number}/locations/{location}/liveSessions/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetSlateRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetSlateRequest.php new file mode 100644 index 000000000000..220a34dfa77c --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetSlateRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.stitcher.v1.GetSlateRequest + */ +class GetSlateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the slate to be retrieved, of the slate, in the form + * of `projects/{project_number}/locations/{location}/slates/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the slate to be retrieved, of the slate, in the form + * of `projects/{project_number}/locations/{location}/slates/{id}`. Please see + * {@see VideoStitcherServiceClient::slateName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\GetSlateRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the slate to be retrieved, of the slate, in the form + * of `projects/{project_number}/locations/{location}/slates/{id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the slate to be retrieved, of the slate, in the form + * of `projects/{project_number}/locations/{location}/slates/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the slate to be retrieved, of the slate, in the form + * of `projects/{project_number}/locations/{location}/slates/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodAdTagDetailRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodAdTagDetailRequest.php new file mode 100644 index 000000000000..b3f841410af0 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodAdTagDetailRequest.php @@ -0,0 +1,91 @@ +google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + */ +class GetVodAdTagDetailRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the ad tag detail for the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the ad tag detail for the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. Please see + * {@see VideoStitcherServiceClient::vodAdTagDetailName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\GetVodAdTagDetailRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the ad tag detail for the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the ad tag detail for the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the ad tag detail for the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodSessionRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodSessionRequest.php new file mode 100644 index 000000000000..523db81a33c9 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodSessionRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.stitcher.v1.GetVodSessionRequest + */ +class GetVodSessionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the VOD session to be retrieved, in the form of + * `projects/{project_number}/locations/{location}/vodSessions/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the VOD session to be retrieved, in the form of + * `projects/{project_number}/locations/{location}/vodSessions/{id}`. Please see + * {@see VideoStitcherServiceClient::vodSessionName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\GetVodSessionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the VOD session to be retrieved, in the form of + * `projects/{project_number}/locations/{location}/vodSessions/{id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the VOD session to be retrieved, in the form of + * `projects/{project_number}/locations/{location}/vodSessions/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the VOD session to be retrieved, in the form of + * `projects/{project_number}/locations/{location}/vodSessions/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodStitchDetailRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodStitchDetailRequest.php new file mode 100644 index 000000000000..019ccfb7cd94 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodStitchDetailRequest.php @@ -0,0 +1,91 @@ +google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + */ +class GetVodStitchDetailRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the stitch detail in the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the stitch detail in the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. Please see + * {@see VideoStitcherServiceClient::vodStitchDetailName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\GetVodStitchDetailRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the stitch detail in the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the stitch detail in the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the stitch detail in the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GoogleCdnKey.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GoogleCdnKey.php new file mode 100644 index 000000000000..afa7b822bf12 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GoogleCdnKey.php @@ -0,0 +1,101 @@ +google.cloud.video.stitcher.v1.GoogleCdnKey + */ +class GoogleCdnKey extends \Google\Protobuf\Internal\Message +{ + /** + * Input only. Secret for this Google Cloud CDN key. + * + * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $private_key = ''; + /** + * The public name of the Google Cloud CDN key. + * + * Generated from protobuf field string key_name = 2; + */ + protected $key_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $private_key + * Input only. Secret for this Google Cloud CDN key. + * @type string $key_name + * The public name of the Google Cloud CDN key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\CdnKeys::initOnce(); + parent::__construct($data); + } + + /** + * Input only. Secret for this Google Cloud CDN key. + * + * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getPrivateKey() + { + return $this->private_key; + } + + /** + * Input only. Secret for this Google Cloud CDN key. + * + * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPrivateKey($var) + { + GPBUtil::checkString($var, False); + $this->private_key = $var; + + return $this; + } + + /** + * The public name of the Google Cloud CDN key. + * + * Generated from protobuf field string key_name = 2; + * @return string + */ + public function getKeyName() + { + return $this->key_name; + } + + /** + * The public name of the Google Cloud CDN key. + * + * Generated from protobuf field string key_name = 2; + * @param string $var + * @return $this + */ + public function setKeyName($var) + { + GPBUtil::checkString($var, True); + $this->key_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/HtmlAdResource.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/HtmlAdResource.php new file mode 100644 index 000000000000..3e45e33af960 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/HtmlAdResource.php @@ -0,0 +1,67 @@ +google.cloud.video.stitcher.v1.HtmlAdResource + */ +class HtmlAdResource extends \Google\Protobuf\Internal\Message +{ + /** + * The HTML to display for the ad resource. + * + * Generated from protobuf field string html_source = 1; + */ + protected $html_source = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $html_source + * The HTML to display for the ad resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Companions::initOnce(); + parent::__construct($data); + } + + /** + * The HTML to display for the ad resource. + * + * Generated from protobuf field string html_source = 1; + * @return string + */ + public function getHtmlSource() + { + return $this->html_source; + } + + /** + * The HTML to display for the ad resource. + * + * Generated from protobuf field string html_source = 1; + * @param string $var + * @return $this + */ + public function setHtmlSource($var) + { + GPBUtil::checkString($var, True); + $this->html_source = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/IframeAdResource.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/IframeAdResource.php new file mode 100644 index 000000000000..3251ce7c39b3 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/IframeAdResource.php @@ -0,0 +1,67 @@ +google.cloud.video.stitcher.v1.IframeAdResource + */ +class IframeAdResource extends \Google\Protobuf\Internal\Message +{ + /** + * URI source for an IFrame to display for the ad resource. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * URI source for an IFrame to display for the ad resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Companions::initOnce(); + parent::__construct($data); + } + + /** + * URI source for an IFrame to display for the ad resource. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI source for an IFrame to display for the ad resource. + * + * Generated from protobuf field string uri = 1; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Interstitials.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Interstitials.php new file mode 100644 index 000000000000..11acfce74a28 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Interstitials.php @@ -0,0 +1,111 @@ +google.cloud.video.stitcher.v1.Interstitials + */ +class Interstitials extends \Google\Protobuf\Internal\Message +{ + /** + * List of ad breaks ordered by time. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAdBreak ad_breaks = 1; + */ + private $ad_breaks; + /** + * Information related to the content of the VOD session. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSessionContent session_content = 2; + */ + protected $session_content = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Video\Stitcher\V1\VodSessionAdBreak>|\Google\Protobuf\Internal\RepeatedField $ad_breaks + * List of ad breaks ordered by time. + * @type \Google\Cloud\Video\Stitcher\V1\VodSessionContent $session_content + * Information related to the content of the VOD session. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * List of ad breaks ordered by time. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAdBreak ad_breaks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdBreaks() + { + return $this->ad_breaks; + } + + /** + * List of ad breaks ordered by time. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAdBreak ad_breaks = 1; + * @param array<\Google\Cloud\Video\Stitcher\V1\VodSessionAdBreak>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdBreaks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\VodSessionAdBreak::class); + $this->ad_breaks = $arr; + + return $this; + } + + /** + * Information related to the content of the VOD session. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSessionContent session_content = 2; + * @return \Google\Cloud\Video\Stitcher\V1\VodSessionContent|null + */ + public function getSessionContent() + { + return $this->session_content; + } + + public function hasSessionContent() + { + return isset($this->session_content); + } + + public function clearSessionContent() + { + unset($this->session_content); + } + + /** + * Information related to the content of the VOD session. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSessionContent session_content = 2; + * @param \Google\Cloud\Video\Stitcher\V1\VodSessionContent $var + * @return $this + */ + public function setSessionContent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\VodSessionContent::class); + $this->session_content = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysRequest.php new file mode 100644 index 000000000000..18c76416ec3f --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysRequest.php @@ -0,0 +1,226 @@ +google.cloud.video.stitcher.v1.ListCdnKeysRequest + */ +class ListCdnKeysRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project that contains the list of CDN keys, in the form of + * `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The project that contains the list of CDN keys, in the form of + * `projects/{project_number}/locations/{location}`. Please see + * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\ListCdnKeysRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project that contains the list of CDN keys, in the form of + * `projects/{project_number}/locations/{location}`. + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results + * @type string $order_by + * Hint for how to order the results + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project that contains the list of CDN keys, in the form of + * `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project that contains the list of CDN keys, in the form of + * `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysResponse.php new file mode 100644 index 000000000000..fdb7d35e26a0 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysResponse.php @@ -0,0 +1,135 @@ +google.cloud.video.stitcher.v1.ListCdnKeysResponse + */ +class ListCdnKeysResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of CDN keys. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.CdnKey cdn_keys = 1; + */ + private $cdn_keys; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Video\Stitcher\V1\CdnKey>|\Google\Protobuf\Internal\RepeatedField $cdn_keys + * List of CDN keys. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * List of CDN keys. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.CdnKey cdn_keys = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCdnKeys() + { + return $this->cdn_keys; + } + + /** + * List of CDN keys. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.CdnKey cdn_keys = 1; + * @param array<\Google\Cloud\Video\Stitcher\V1\CdnKey>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCdnKeys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\CdnKey::class); + $this->cdn_keys = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsRequest.php new file mode 100644 index 000000000000..d14bea8f5f75 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsRequest.php @@ -0,0 +1,154 @@ +google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + */ +class ListLiveAdTagDetailsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource parent in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The pagination token returned from a previous List request. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource parent in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}`. Please see + * {@see VideoStitcherServiceClient::liveSessionName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\ListLiveAdTagDetailsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource parent in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}`. + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The pagination token returned from a previous List request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource parent in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource parent in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The pagination token returned from a previous List request. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The pagination token returned from a previous List request. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsResponse.php new file mode 100644 index 000000000000..934491dee650 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsResponse.php @@ -0,0 +1,101 @@ +google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + */ +class ListLiveAdTagDetailsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of live session ad tag details. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveAdTagDetail live_ad_tag_details = 1; + */ + private $live_ad_tag_details; + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail>|\Google\Protobuf\Internal\RepeatedField $live_ad_tag_details + * A list of live session ad tag details. + * @type string $next_page_token + * The pagination token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * A list of live session ad tag details. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveAdTagDetail live_ad_tag_details = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLiveAdTagDetails() + { + return $this->live_ad_tag_details; + } + + /** + * A list of live session ad tag details. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveAdTagDetail live_ad_tag_details = 1; + * @param array<\Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLiveAdTagDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail::class); + $this->live_ad_tag_details = $arr; + + return $this; + } + + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsRequest.php new file mode 100644 index 000000000000..d45ae42d9d2d --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsRequest.php @@ -0,0 +1,234 @@ +google.cloud.video.stitcher.v1.ListLiveConfigsRequest + */ +class ListLiveConfigsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project that contains the list of live configs, in the + * form of `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Optional. The filter to apply to list results (see + * [Filtering](https://google.aip.dev/160)). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Specifies the ordering of results following + * [Cloud API + * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The project that contains the list of live configs, in the + * form of `projects/{project_number}/locations/{location}`. Please see + * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\ListLiveConfigsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project that contains the list of live configs, in the + * form of `projects/{project_number}/locations/{location}`. + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * @type string $filter + * Optional. The filter to apply to list results (see + * [Filtering](https://google.aip.dev/160)). + * @type string $order_by + * Optional. Specifies the ordering of results following + * [Cloud API + * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project that contains the list of live configs, in the + * form of `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project that contains the list of live configs, in the + * form of `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The filter to apply to list results (see + * [Filtering](https://google.aip.dev/160)). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter to apply to list results (see + * [Filtering](https://google.aip.dev/160)). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Specifies the ordering of results following + * [Cloud API + * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Specifies the ordering of results following + * [Cloud API + * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsResponse.php new file mode 100644 index 000000000000..1eae2969f2b1 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsResponse.php @@ -0,0 +1,135 @@ +google.cloud.video.stitcher.v1.ListLiveConfigsResponse + */ +class ListLiveConfigsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of live configs. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveConfig live_configs = 1; + */ + private $live_configs; + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Video\Stitcher\V1\LiveConfig>|\Google\Protobuf\Internal\RepeatedField $live_configs + * List of live configs. + * @type string $next_page_token + * The pagination token. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * List of live configs. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveConfig live_configs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLiveConfigs() + { + return $this->live_configs; + } + + /** + * List of live configs. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveConfig live_configs = 1; + * @param array<\Google\Cloud\Video\Stitcher\V1\LiveConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLiveConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\LiveConfig::class); + $this->live_configs = $arr; + + return $this; + } + + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesRequest.php new file mode 100644 index 000000000000..7c24832d2b8a --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesRequest.php @@ -0,0 +1,226 @@ +google.cloud.video.stitcher.v1.ListSlatesRequest + */ +class ListSlatesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project to list slates, in the form of + * `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The project to list slates, in the form of + * `projects/{project_number}/locations/{location}`. Please see + * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\ListSlatesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project to list slates, in the form of + * `projects/{project_number}/locations/{location}`. + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results + * @type string $order_by + * Hint for how to order the results + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project to list slates, in the form of + * `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project to list slates, in the form of + * `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesResponse.php new file mode 100644 index 000000000000..d66e458e1618 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesResponse.php @@ -0,0 +1,135 @@ +google.cloud.video.stitcher.v1.ListSlatesResponse + */ +class ListSlatesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of slates + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Slate slates = 1; + */ + private $slates; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Video\Stitcher\V1\Slate>|\Google\Protobuf\Internal\RepeatedField $slates + * The list of slates + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * The list of slates + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Slate slates = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSlates() + { + return $this->slates; + } + + /** + * The list of slates + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Slate slates = 1; + * @param array<\Google\Cloud\Video\Stitcher\V1\Slate>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSlates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\Slate::class); + $this->slates = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsRequest.php new file mode 100644 index 000000000000..a2f4d620fe34 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsRequest.php @@ -0,0 +1,154 @@ +google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + */ +class ListVodAdTagDetailsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The VOD session which the ad tag details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The VOD session which the ad tag details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. Please see + * {@see VideoStitcherServiceClient::vodSessionName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\ListVodAdTagDetailsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The VOD session which the ad tag details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The VOD session which the ad tag details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The VOD session which the ad tag details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsResponse.php new file mode 100644 index 000000000000..47ccb4edaccb --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsResponse.php @@ -0,0 +1,101 @@ +google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + */ +class ListVodAdTagDetailsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A List of ad tag details. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodAdTagDetail vod_ad_tag_details = 1; + */ + private $vod_ad_tag_details; + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Video\Stitcher\V1\VodAdTagDetail>|\Google\Protobuf\Internal\RepeatedField $vod_ad_tag_details + * A List of ad tag details. + * @type string $next_page_token + * The pagination token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * A List of ad tag details. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodAdTagDetail vod_ad_tag_details = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVodAdTagDetails() + { + return $this->vod_ad_tag_details; + } + + /** + * A List of ad tag details. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodAdTagDetail vod_ad_tag_details = 1; + * @param array<\Google\Cloud\Video\Stitcher\V1\VodAdTagDetail>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVodAdTagDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\VodAdTagDetail::class); + $this->vod_ad_tag_details = $arr; + + return $this; + } + + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsRequest.php new file mode 100644 index 000000000000..03a33b3b21dc --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsRequest.php @@ -0,0 +1,154 @@ +google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + */ +class ListVodStitchDetailsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The VOD session where the stitch details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The VOD session where the stitch details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{id}`. Please see + * {@see VideoStitcherServiceClient::vodSessionName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\ListVodStitchDetailsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The VOD session where the stitch details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{id}`. + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The VOD session where the stitch details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The VOD session where the stitch details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsResponse.php new file mode 100644 index 000000000000..202317ab5600 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsResponse.php @@ -0,0 +1,101 @@ +google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + */ +class ListVodStitchDetailsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A List of stitch Details. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodStitchDetail vod_stitch_details = 1; + */ + private $vod_stitch_details; + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Video\Stitcher\V1\VodStitchDetail>|\Google\Protobuf\Internal\RepeatedField $vod_stitch_details + * A List of stitch Details. + * @type string $next_page_token + * The pagination token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * A List of stitch Details. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodStitchDetail vod_stitch_details = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVodStitchDetails() + { + return $this->vod_stitch_details; + } + + /** + * A List of stitch Details. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodStitchDetail vod_stitch_details = 1; + * @param array<\Google\Cloud\Video\Stitcher\V1\VodStitchDetail>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVodStitchDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\VodStitchDetail::class); + $this->vod_stitch_details = $arr; + + return $this; + } + + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveAdTagDetail.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveAdTagDetail.php new file mode 100644 index 000000000000..b594a4e0305f --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveAdTagDetail.php @@ -0,0 +1,105 @@ +google.cloud.video.stitcher.v1.LiveAdTagDetail + */ +class LiveAdTagDetail extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{id}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * A list of ad requests. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; + */ + private $ad_requests; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{id}`. + * @type array<\Google\Cloud\Video\Stitcher\V1\AdRequest>|\Google\Protobuf\Internal\RepeatedField $ad_requests + * A list of ad requests. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\AdTagDetails::initOnce(); + parent::__construct($data); + } + + /** + * The resource name in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{id}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{id}`. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * A list of ad requests. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdRequests() + { + return $this->ad_requests; + } + + /** + * A list of ad requests. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; + * @param array<\Google\Cloud\Video\Stitcher\V1\AdRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\AdRequest::class); + $this->ad_requests = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig.php new file mode 100644 index 000000000000..9a8c8479448f --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig.php @@ -0,0 +1,391 @@ +google.cloud.video.stitcher.v1.LiveConfig + */ +class LiveConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the live config, in the form of + * `projects/{project}/locations/{location}/liveConfigs/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Required. Source URI for the live stream manifest. + * + * Generated from protobuf field string source_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source_uri = ''; + /** + * The default ad tag associated with this live stream config. + * + * Generated from protobuf field string ad_tag_uri = 3; + */ + protected $ad_tag_uri = ''; + /** + * Additional metadata used to register a live stream with Google Ad Manager + * (GAM) + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.GamLiveConfig gam_live_config = 4; + */ + protected $gam_live_config = null; + /** + * Output only. State of the live config. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Required. Determines how the ads are tracked. If + * [gam_live_config][google.cloud.video.stitcher.v1.LiveConfig.gam_live_config] + * is set, the value must be `CLIENT` because the IMA SDK handles ad tracking. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ad_tracking = 0; + /** + * This must refer to a slate in the same + * project. If Google Ad Manager (GAM) is used for ads, this string sets the + * value of `slateCreativeId` in + * https://developers.google.com/ad-manager/api/reference/v202211/LiveStreamEventService.LiveStreamEvent#slateCreativeId + * + * Generated from protobuf field string default_slate = 7 [(.google.api.resource_reference) = { + */ + protected $default_slate = ''; + /** + * Defines the stitcher behavior in case an ad does not align exactly with + * the ad break boundaries. If not specified, the default is `CUT_CURRENT`. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy stitching_policy = 8; + */ + protected $stitching_policy = 0; + /** + * The configuration for prefetching ads. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.PrefetchConfig prefetch_config = 10; + */ + protected $prefetch_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the live config, in the form of + * `projects/{project}/locations/{location}/liveConfigs/{id}`. + * @type string $source_uri + * Required. Source URI for the live stream manifest. + * @type string $ad_tag_uri + * The default ad tag associated with this live stream config. + * @type \Google\Cloud\Video\Stitcher\V1\GamLiveConfig $gam_live_config + * Additional metadata used to register a live stream with Google Ad Manager + * (GAM) + * @type int $state + * Output only. State of the live config. + * @type int $ad_tracking + * Required. Determines how the ads are tracked. If + * [gam_live_config][google.cloud.video.stitcher.v1.LiveConfig.gam_live_config] + * is set, the value must be `CLIENT` because the IMA SDK handles ad tracking. + * @type string $default_slate + * This must refer to a slate in the same + * project. If Google Ad Manager (GAM) is used for ads, this string sets the + * value of `slateCreativeId` in + * https://developers.google.com/ad-manager/api/reference/v202211/LiveStreamEventService.LiveStreamEvent#slateCreativeId + * @type int $stitching_policy + * Defines the stitcher behavior in case an ad does not align exactly with + * the ad break boundaries. If not specified, the default is `CUT_CURRENT`. + * @type \Google\Cloud\Video\Stitcher\V1\PrefetchConfig $prefetch_config + * The configuration for prefetching ads. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\LiveConfigs::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the live config, in the form of + * `projects/{project}/locations/{location}/liveConfigs/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the live config, in the form of + * `projects/{project}/locations/{location}/liveConfigs/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Source URI for the live stream manifest. + * + * Generated from protobuf field string source_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSourceUri() + { + return $this->source_uri; + } + + /** + * Required. Source URI for the live stream manifest. + * + * Generated from protobuf field string source_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSourceUri($var) + { + GPBUtil::checkString($var, True); + $this->source_uri = $var; + + return $this; + } + + /** + * The default ad tag associated with this live stream config. + * + * Generated from protobuf field string ad_tag_uri = 3; + * @return string + */ + public function getAdTagUri() + { + return $this->ad_tag_uri; + } + + /** + * The default ad tag associated with this live stream config. + * + * Generated from protobuf field string ad_tag_uri = 3; + * @param string $var + * @return $this + */ + public function setAdTagUri($var) + { + GPBUtil::checkString($var, True); + $this->ad_tag_uri = $var; + + return $this; + } + + /** + * Additional metadata used to register a live stream with Google Ad Manager + * (GAM) + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.GamLiveConfig gam_live_config = 4; + * @return \Google\Cloud\Video\Stitcher\V1\GamLiveConfig|null + */ + public function getGamLiveConfig() + { + return $this->gam_live_config; + } + + public function hasGamLiveConfig() + { + return isset($this->gam_live_config); + } + + public function clearGamLiveConfig() + { + unset($this->gam_live_config); + } + + /** + * Additional metadata used to register a live stream with Google Ad Manager + * (GAM) + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.GamLiveConfig gam_live_config = 4; + * @param \Google\Cloud\Video\Stitcher\V1\GamLiveConfig $var + * @return $this + */ + public function setGamLiveConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\GamLiveConfig::class); + $this->gam_live_config = $var; + + return $this; + } + + /** + * Output only. State of the live config. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the live config. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\LiveConfig\State::class); + $this->state = $var; + + return $this; + } + + /** + * Required. Determines how the ads are tracked. If + * [gam_live_config][google.cloud.video.stitcher.v1.LiveConfig.gam_live_config] + * is set, the value must be `CLIENT` because the IMA SDK handles ad tracking. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getAdTracking() + { + return $this->ad_tracking; + } + + /** + * Required. Determines how the ads are tracked. If + * [gam_live_config][google.cloud.video.stitcher.v1.LiveConfig.gam_live_config] + * is set, the value must be `CLIENT` because the IMA SDK handles ad tracking. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setAdTracking($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\AdTracking::class); + $this->ad_tracking = $var; + + return $this; + } + + /** + * This must refer to a slate in the same + * project. If Google Ad Manager (GAM) is used for ads, this string sets the + * value of `slateCreativeId` in + * https://developers.google.com/ad-manager/api/reference/v202211/LiveStreamEventService.LiveStreamEvent#slateCreativeId + * + * Generated from protobuf field string default_slate = 7 [(.google.api.resource_reference) = { + * @return string + */ + public function getDefaultSlate() + { + return $this->default_slate; + } + + /** + * This must refer to a slate in the same + * project. If Google Ad Manager (GAM) is used for ads, this string sets the + * value of `slateCreativeId` in + * https://developers.google.com/ad-manager/api/reference/v202211/LiveStreamEventService.LiveStreamEvent#slateCreativeId + * + * Generated from protobuf field string default_slate = 7 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDefaultSlate($var) + { + GPBUtil::checkString($var, True); + $this->default_slate = $var; + + return $this; + } + + /** + * Defines the stitcher behavior in case an ad does not align exactly with + * the ad break boundaries. If not specified, the default is `CUT_CURRENT`. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy stitching_policy = 8; + * @return int + */ + public function getStitchingPolicy() + { + return $this->stitching_policy; + } + + /** + * Defines the stitcher behavior in case an ad does not align exactly with + * the ad break boundaries. If not specified, the default is `CUT_CURRENT`. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy stitching_policy = 8; + * @param int $var + * @return $this + */ + public function setStitchingPolicy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\LiveConfig\StitchingPolicy::class); + $this->stitching_policy = $var; + + return $this; + } + + /** + * The configuration for prefetching ads. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.PrefetchConfig prefetch_config = 10; + * @return \Google\Cloud\Video\Stitcher\V1\PrefetchConfig|null + */ + public function getPrefetchConfig() + { + return $this->prefetch_config; + } + + public function hasPrefetchConfig() + { + return isset($this->prefetch_config); + } + + public function clearPrefetchConfig() + { + unset($this->prefetch_config); + } + + /** + * The configuration for prefetching ads. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.PrefetchConfig prefetch_config = 10; + * @param \Google\Cloud\Video\Stitcher\V1\PrefetchConfig $var + * @return $this + */ + public function setPrefetchConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\PrefetchConfig::class); + $this->prefetch_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/State.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/State.php new file mode 100644 index 000000000000..3defb74d973d --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/State.php @@ -0,0 +1,71 @@ +google.cloud.video.stitcher.v1.LiveConfig.State + */ +class State +{ + /** + * State is not specified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Live config is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Live config is ready for use. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * Live config is queued up for deletion. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::DELETING => 'DELETING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Video\Stitcher\V1\LiveConfig_State::class); + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/StitchingPolicy.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/StitchingPolicy.php new file mode 100644 index 000000000000..02f98376c110 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/StitchingPolicy.php @@ -0,0 +1,66 @@ +google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy + */ +class StitchingPolicy +{ + /** + * Stitching policy is not specified. + * + * Generated from protobuf enum STITCHING_POLICY_UNSPECIFIED = 0; + */ + const STITCHING_POLICY_UNSPECIFIED = 0; + /** + * Cuts an ad short and returns to content in the middle of the ad. + * + * Generated from protobuf enum CUT_CURRENT = 1; + */ + const CUT_CURRENT = 1; + /** + * Finishes stitching the current ad before returning to content. + * + * Generated from protobuf enum COMPLETE_AD = 2; + */ + const COMPLETE_AD = 2; + + private static $valueToName = [ + self::STITCHING_POLICY_UNSPECIFIED => 'STITCHING_POLICY_UNSPECIFIED', + self::CUT_CURRENT => 'CUT_CURRENT', + self::COMPLETE_AD => 'COMPLETE_AD', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StitchingPolicy::class, \Google\Cloud\Video\Stitcher\V1\LiveConfig_StitchingPolicy::class); + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession.php new file mode 100644 index 000000000000..f5a498fc5b6d --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession.php @@ -0,0 +1,302 @@ +google.cloud.video.stitcher.v1.LiveSession + */ +class LiveSession extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the live session, in the form of + * `projects/{project}/locations/{location}/liveSessions/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The URI to play the live session's ad-stitched stream. + * + * Generated from protobuf field string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $play_uri = ''; + /** + * Key value pairs for ad tag macro replacement. If the + * specified ad tag URI has macros, this field provides the mapping + * to the value that will replace the macro in the ad tag URI. + * Macros are designated by square brackets. + * For example: + * Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]" + * Ad tag macros: `{"geoId": "123"}` + * Fully qualified ad tag: + * `"https://doubleclick.google.com/ad/1?geo_id=123"` + * + * Generated from protobuf field map ad_tag_macros = 6; + */ + private $ad_tag_macros; + /** + * Additional options that affect the output of the manifest. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10; + */ + protected $manifest_options = null; + /** + * This field should be set with appropriate values if GAM is being used for + * ads. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession.GamSettings gam_settings = 15; + */ + protected $gam_settings = null; + /** + * Required. The resource name of the live config for this session, in the + * form of `projects/{project}/locations/{location}/liveConfigs/{id}`. + * + * Generated from protobuf field string live_config = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $live_config = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the live session, in the form of + * `projects/{project}/locations/{location}/liveSessions/{id}`. + * @type string $play_uri + * Output only. The URI to play the live session's ad-stitched stream. + * @type array|\Google\Protobuf\Internal\MapField $ad_tag_macros + * Key value pairs for ad tag macro replacement. If the + * specified ad tag URI has macros, this field provides the mapping + * to the value that will replace the macro in the ad tag URI. + * Macros are designated by square brackets. + * For example: + * Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]" + * Ad tag macros: `{"geoId": "123"}` + * Fully qualified ad tag: + * `"https://doubleclick.google.com/ad/1?geo_id=123"` + * @type \Google\Cloud\Video\Stitcher\V1\ManifestOptions $manifest_options + * Additional options that affect the output of the manifest. + * @type \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings $gam_settings + * This field should be set with appropriate values if GAM is being used for + * ads. + * @type string $live_config + * Required. The resource name of the live config for this session, in the + * form of `projects/{project}/locations/{location}/liveConfigs/{id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the live session, in the form of + * `projects/{project}/locations/{location}/liveSessions/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the live session, in the form of + * `projects/{project}/locations/{location}/liveSessions/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The URI to play the live session's ad-stitched stream. + * + * Generated from protobuf field string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPlayUri() + { + return $this->play_uri; + } + + /** + * Output only. The URI to play the live session's ad-stitched stream. + * + * Generated from protobuf field string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPlayUri($var) + { + GPBUtil::checkString($var, True); + $this->play_uri = $var; + + return $this; + } + + /** + * Key value pairs for ad tag macro replacement. If the + * specified ad tag URI has macros, this field provides the mapping + * to the value that will replace the macro in the ad tag URI. + * Macros are designated by square brackets. + * For example: + * Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]" + * Ad tag macros: `{"geoId": "123"}` + * Fully qualified ad tag: + * `"https://doubleclick.google.com/ad/1?geo_id=123"` + * + * Generated from protobuf field map ad_tag_macros = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAdTagMacros() + { + return $this->ad_tag_macros; + } + + /** + * Key value pairs for ad tag macro replacement. If the + * specified ad tag URI has macros, this field provides the mapping + * to the value that will replace the macro in the ad tag URI. + * Macros are designated by square brackets. + * For example: + * Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]" + * Ad tag macros: `{"geoId": "123"}` + * Fully qualified ad tag: + * `"https://doubleclick.google.com/ad/1?geo_id=123"` + * + * Generated from protobuf field map ad_tag_macros = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAdTagMacros($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->ad_tag_macros = $arr; + + return $this; + } + + /** + * Additional options that affect the output of the manifest. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10; + * @return \Google\Cloud\Video\Stitcher\V1\ManifestOptions|null + */ + public function getManifestOptions() + { + return $this->manifest_options; + } + + public function hasManifestOptions() + { + return isset($this->manifest_options); + } + + public function clearManifestOptions() + { + unset($this->manifest_options); + } + + /** + * Additional options that affect the output of the manifest. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10; + * @param \Google\Cloud\Video\Stitcher\V1\ManifestOptions $var + * @return $this + */ + public function setManifestOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\ManifestOptions::class); + $this->manifest_options = $var; + + return $this; + } + + /** + * This field should be set with appropriate values if GAM is being used for + * ads. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession.GamSettings gam_settings = 15; + * @return \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings|null + */ + public function getGamSettings() + { + return $this->gam_settings; + } + + public function hasGamSettings() + { + return isset($this->gam_settings); + } + + public function clearGamSettings() + { + unset($this->gam_settings); + } + + /** + * This field should be set with appropriate values if GAM is being used for + * ads. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession.GamSettings gam_settings = 15; + * @param \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings $var + * @return $this + */ + public function setGamSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings::class); + $this->gam_settings = $var; + + return $this; + } + + /** + * Required. The resource name of the live config for this session, in the + * form of `projects/{project}/locations/{location}/liveConfigs/{id}`. + * + * Generated from protobuf field string live_config = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getLiveConfig() + { + return $this->live_config; + } + + /** + * Required. The resource name of the live config for this session, in the + * form of `projects/{project}/locations/{location}/liveConfigs/{id}`. + * + * Generated from protobuf field string live_config = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLiveConfig($var) + { + GPBUtil::checkString($var, True); + $this->live_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession/GamSettings.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession/GamSettings.php new file mode 100644 index 000000000000..93b56bd1e47d --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession/GamSettings.php @@ -0,0 +1,72 @@ +google.cloud.video.stitcher.v1.LiveSession.GamSettings + */ +class GamSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The stream ID generated by Ad Manager. + * + * Generated from protobuf field string stream_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $stream_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $stream_id + * Required. The stream ID generated by Ad Manager. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * Required. The stream ID generated by Ad Manager. + * + * Generated from protobuf field string stream_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getStreamId() + { + return $this->stream_id; + } + + /** + * Required. The stream ID generated by Ad Manager. + * + * Generated from protobuf field string stream_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setStreamId($var) + { + GPBUtil::checkString($var, True); + $this->stream_id = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GamSettings::class, \Google\Cloud\Video\Stitcher\V1\LiveSession_GamSettings::class); + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions.php new file mode 100644 index 000000000000..27590ff366b0 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions.php @@ -0,0 +1,109 @@ +google.cloud.video.stitcher.v1.ManifestOptions + */ +class ManifestOptions extends \Google\Protobuf\Internal\Message +{ + /** + * If specified, the output manifest will only return renditions matching the + * specified filters. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.RenditionFilter include_renditions = 1; + */ + private $include_renditions; + /** + * If specified, the output manifest will orders the video and muxed + * renditions by bitrate according to the ordering policy. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy bitrate_order = 2; + */ + protected $bitrate_order = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Video\Stitcher\V1\RenditionFilter>|\Google\Protobuf\Internal\RepeatedField $include_renditions + * If specified, the output manifest will only return renditions matching the + * specified filters. + * @type int $bitrate_order + * If specified, the output manifest will orders the video and muxed + * renditions by bitrate according to the ordering policy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * If specified, the output manifest will only return renditions matching the + * specified filters. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.RenditionFilter include_renditions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIncludeRenditions() + { + return $this->include_renditions; + } + + /** + * If specified, the output manifest will only return renditions matching the + * specified filters. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.RenditionFilter include_renditions = 1; + * @param array<\Google\Cloud\Video\Stitcher\V1\RenditionFilter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIncludeRenditions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\RenditionFilter::class); + $this->include_renditions = $arr; + + return $this; + } + + /** + * If specified, the output manifest will orders the video and muxed + * renditions by bitrate according to the ordering policy. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy bitrate_order = 2; + * @return int + */ + public function getBitrateOrder() + { + return $this->bitrate_order; + } + + /** + * If specified, the output manifest will orders the video and muxed + * renditions by bitrate according to the ordering policy. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy bitrate_order = 2; + * @param int $var + * @return $this + */ + public function setBitrateOrder($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\ManifestOptions\OrderPolicy::class); + $this->bitrate_order = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions/OrderPolicy.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions/OrderPolicy.php new file mode 100644 index 000000000000..5808fe871d5b --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions/OrderPolicy.php @@ -0,0 +1,64 @@ +google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy + */ +class OrderPolicy +{ + /** + * Ordering policy is not specified. + * + * Generated from protobuf enum ORDER_POLICY_UNSPECIFIED = 0; + */ + const ORDER_POLICY_UNSPECIFIED = 0; + /** + * Order by ascending. + * + * Generated from protobuf enum ASCENDING = 1; + */ + const ASCENDING = 1; + /** + * Order by descending. + * + * Generated from protobuf enum DESCENDING = 2; + */ + const DESCENDING = 2; + + private static $valueToName = [ + self::ORDER_POLICY_UNSPECIFIED => 'ORDER_POLICY_UNSPECIFIED', + self::ASCENDING => 'ASCENDING', + self::DESCENDING => 'DESCENDING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OrderPolicy::class, \Google\Cloud\Video\Stitcher\V1\ManifestOptions_OrderPolicy::class); + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey.php new file mode 100644 index 000000000000..cd8cfd6dff7a --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey.php @@ -0,0 +1,101 @@ +google.cloud.video.stitcher.v1.MediaCdnKey + */ +class MediaCdnKey extends \Google\Protobuf\Internal\Message +{ + /** + * Input only. 64-byte ed25519 private key for this Media CDN key. + * + * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $private_key = ''; + /** + * The keyset name of the Media CDN key. + * + * Generated from protobuf field string key_name = 2; + */ + protected $key_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $private_key + * Input only. 64-byte ed25519 private key for this Media CDN key. + * @type string $key_name + * The keyset name of the Media CDN key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\CdnKeys::initOnce(); + parent::__construct($data); + } + + /** + * Input only. 64-byte ed25519 private key for this Media CDN key. + * + * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getPrivateKey() + { + return $this->private_key; + } + + /** + * Input only. 64-byte ed25519 private key for this Media CDN key. + * + * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPrivateKey($var) + { + GPBUtil::checkString($var, False); + $this->private_key = $var; + + return $this; + } + + /** + * The keyset name of the Media CDN key. + * + * Generated from protobuf field string key_name = 2; + * @return string + */ + public function getKeyName() + { + return $this->key_name; + } + + /** + * The keyset name of the Media CDN key. + * + * Generated from protobuf field string key_name = 2; + * @param string $var + * @return $this + */ + public function setKeyName($var) + { + GPBUtil::checkString($var, True); + $this->key_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/OperationMetadata.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/OperationMetadata.php new file mode 100644 index 000000000000..59afa335e40b --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/OperationMetadata.php @@ -0,0 +1,189 @@ +google.cloud.video.stitcher.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3; + */ + protected $target = ''; + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + */ + protected $verb = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * The time the operation finished running. + * @type string $target + * Server-defined resource path for the target of the operation. + * @type string $verb + * Name of the verb executed by the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/PrefetchConfig.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/PrefetchConfig.php new file mode 100644 index 000000000000..5a3e14be9089 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/PrefetchConfig.php @@ -0,0 +1,131 @@ +google.cloud.video.stitcher.v1.PrefetchConfig + */ +class PrefetchConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Indicates whether the option to prefetch ad requests is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $enabled = false; + /** + * The duration in seconds of the part of the break to be prefetched. + * This field is only relevant if prefetch is enabled. + * You should set this duration to as long as possible to increase the + * benefits of prefetching, but not longer than the shortest ad break + * expected. For example, for a live event with 30s and 60s ad breaks, the + * initial duration should be set to 30s. + * + * Generated from protobuf field .google.protobuf.Duration initial_ad_request_duration = 2; + */ + protected $initial_ad_request_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * Required. Indicates whether the option to prefetch ad requests is enabled. + * @type \Google\Protobuf\Duration $initial_ad_request_duration + * The duration in seconds of the part of the break to be prefetched. + * This field is only relevant if prefetch is enabled. + * You should set this duration to as long as possible to increase the + * benefits of prefetching, but not longer than the shortest ad break + * expected. For example, for a live event with 30s and 60s ad breaks, the + * initial duration should be set to 30s. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\LiveConfigs::initOnce(); + parent::__construct($data); + } + + /** + * Required. Indicates whether the option to prefetch ad requests is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Required. Indicates whether the option to prefetch ad requests is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * The duration in seconds of the part of the break to be prefetched. + * This field is only relevant if prefetch is enabled. + * You should set this duration to as long as possible to increase the + * benefits of prefetching, but not longer than the shortest ad break + * expected. For example, for a live event with 30s and 60s ad breaks, the + * initial duration should be set to 30s. + * + * Generated from protobuf field .google.protobuf.Duration initial_ad_request_duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getInitialAdRequestDuration() + { + return $this->initial_ad_request_duration; + } + + public function hasInitialAdRequestDuration() + { + return isset($this->initial_ad_request_duration); + } + + public function clearInitialAdRequestDuration() + { + unset($this->initial_ad_request_duration); + } + + /** + * The duration in seconds of the part of the break to be prefetched. + * This field is only relevant if prefetch is enabled. + * You should set this duration to as long as possible to increase the + * benefits of prefetching, but not longer than the shortest ad break + * expected. For example, for a live event with 30s and 60s ad breaks, the + * initial duration should be set to 30s. + * + * Generated from protobuf field .google.protobuf.Duration initial_ad_request_duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setInitialAdRequestDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->initial_ad_request_duration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ProgressEvent.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ProgressEvent.php new file mode 100644 index 000000000000..e1b9852ccb27 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ProgressEvent.php @@ -0,0 +1,128 @@ +google.cloud.video.stitcher.v1.ProgressEvent + */ +class ProgressEvent extends \Google\Protobuf\Internal\Message +{ + /** + * The time when the following tracking events occurs. The time is in + * seconds relative to the start of the VOD asset. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 1; + */ + protected $time_offset = null; + /** + * The list of progress tracking events for the ad break. These can be of + * the following IAB types: `BREAK_START`, `BREAK_END`, `IMPRESSION`, + * `CREATIVE_VIEW`, `START`, `FIRST_QUARTILE`, `MIDPOINT`, `THIRD_QUARTILE`, + * `COMPLETE`, `PROGRESS`. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 2; + */ + private $events; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $time_offset + * The time when the following tracking events occurs. The time is in + * seconds relative to the start of the VOD asset. + * @type array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $events + * The list of progress tracking events for the ad break. These can be of + * the following IAB types: `BREAK_START`, `BREAK_END`, `IMPRESSION`, + * `CREATIVE_VIEW`, `START`, `FIRST_QUARTILE`, `MIDPOINT`, `THIRD_QUARTILE`, + * `COMPLETE`, `PROGRESS`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Events::initOnce(); + parent::__construct($data); + } + + /** + * The time when the following tracking events occurs. The time is in + * seconds relative to the start of the VOD asset. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeOffset() + { + return $this->time_offset; + } + + public function hasTimeOffset() + { + return isset($this->time_offset); + } + + public function clearTimeOffset() + { + unset($this->time_offset); + } + + /** + * The time when the following tracking events occurs. The time is in + * seconds relative to the start of the VOD asset. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->time_offset = $var; + + return $this; + } + + /** + * The list of progress tracking events for the ad break. These can be of + * the following IAB types: `BREAK_START`, `BREAK_END`, `IMPRESSION`, + * `CREATIVE_VIEW`, `START`, `FIRST_QUARTILE`, `MIDPOINT`, `THIRD_QUARTILE`, + * `COMPLETE`, `PROGRESS`. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEvents() + { + return $this->events; + } + + /** + * The list of progress tracking events for the ad break. These can be of + * the following IAB types: `BREAK_START`, `BREAK_END`, `IMPRESSION`, + * `CREATIVE_VIEW`, `START`, `FIRST_QUARTILE`, `MIDPOINT`, `THIRD_QUARTILE`, + * `COMPLETE`, `PROGRESS`. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 2; + * @param array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\Event::class); + $this->events = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RenditionFilter.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RenditionFilter.php new file mode 100644 index 000000000000..0d12d8ea104e --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RenditionFilter.php @@ -0,0 +1,109 @@ +google.cloud.video.stitcher.v1.RenditionFilter + */ +class RenditionFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Bitrate in bits per second for the rendition. If set, only renditions with + * the exact bitrate will match. + * + * Generated from protobuf field int32 bitrate_bps = 1; + */ + protected $bitrate_bps = 0; + /** + * Codecs for the rendition. If set, only renditions with the exact value + * will match. + * + * Generated from protobuf field string codecs = 2; + */ + protected $codecs = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $bitrate_bps + * Bitrate in bits per second for the rendition. If set, only renditions with + * the exact bitrate will match. + * @type string $codecs + * Codecs for the rendition. If set, only renditions with the exact value + * will match. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * Bitrate in bits per second for the rendition. If set, only renditions with + * the exact bitrate will match. + * + * Generated from protobuf field int32 bitrate_bps = 1; + * @return int + */ + public function getBitrateBps() + { + return $this->bitrate_bps; + } + + /** + * Bitrate in bits per second for the rendition. If set, only renditions with + * the exact bitrate will match. + * + * Generated from protobuf field int32 bitrate_bps = 1; + * @param int $var + * @return $this + */ + public function setBitrateBps($var) + { + GPBUtil::checkInt32($var); + $this->bitrate_bps = $var; + + return $this; + } + + /** + * Codecs for the rendition. If set, only renditions with the exact value + * will match. + * + * Generated from protobuf field string codecs = 2; + * @return string + */ + public function getCodecs() + { + return $this->codecs; + } + + /** + * Codecs for the rendition. If set, only renditions with the exact value + * will match. + * + * Generated from protobuf field string codecs = 2; + * @param string $var + * @return $this + */ + public function setCodecs($var) + { + GPBUtil::checkString($var, True); + $this->codecs = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RequestMetadata.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RequestMetadata.php new file mode 100644 index 000000000000..cf958970e04e --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RequestMetadata.php @@ -0,0 +1,77 @@ +google.cloud.video.stitcher.v1.RequestMetadata + */ +class RequestMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The HTTP headers of the ad request. + * + * Generated from protobuf field .google.protobuf.Struct headers = 1; + */ + protected $headers = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Struct $headers + * The HTTP headers of the ad request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\AdTagDetails::initOnce(); + parent::__construct($data); + } + + /** + * The HTTP headers of the ad request. + * + * Generated from protobuf field .google.protobuf.Struct headers = 1; + * @return \Google\Protobuf\Struct|null + */ + public function getHeaders() + { + return $this->headers; + } + + public function hasHeaders() + { + return isset($this->headers); + } + + public function clearHeaders() + { + unset($this->headers); + } + + /** + * The HTTP headers of the ad request. + * + * Generated from protobuf field .google.protobuf.Struct headers = 1; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setHeaders($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->headers = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ResponseMetadata.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ResponseMetadata.php new file mode 100644 index 000000000000..9996433d98a0 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ResponseMetadata.php @@ -0,0 +1,257 @@ +google.cloud.video.stitcher.v1.ResponseMetadata + */ +class ResponseMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Error message received when making the ad request. + * + * Generated from protobuf field string error = 1; + */ + protected $error = ''; + /** + * Headers from the response. + * + * Generated from protobuf field .google.protobuf.Struct headers = 2; + */ + protected $headers = null; + /** + * Status code for the response. + * + * Generated from protobuf field string status_code = 3; + */ + protected $status_code = ''; + /** + * Size in bytes of the response. + * + * Generated from protobuf field int32 size_bytes = 4; + */ + protected $size_bytes = 0; + /** + * Total time elapsed for the response. + * + * Generated from protobuf field .google.protobuf.Duration duration = 5; + */ + protected $duration = null; + /** + * The body of the response. + * + * Generated from protobuf field string body = 6; + */ + protected $body = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $error + * Error message received when making the ad request. + * @type \Google\Protobuf\Struct $headers + * Headers from the response. + * @type string $status_code + * Status code for the response. + * @type int $size_bytes + * Size in bytes of the response. + * @type \Google\Protobuf\Duration $duration + * Total time elapsed for the response. + * @type string $body + * The body of the response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\AdTagDetails::initOnce(); + parent::__construct($data); + } + + /** + * Error message received when making the ad request. + * + * Generated from protobuf field string error = 1; + * @return string + */ + public function getError() + { + return $this->error; + } + + /** + * Error message received when making the ad request. + * + * Generated from protobuf field string error = 1; + * @param string $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkString($var, True); + $this->error = $var; + + return $this; + } + + /** + * Headers from the response. + * + * Generated from protobuf field .google.protobuf.Struct headers = 2; + * @return \Google\Protobuf\Struct|null + */ + public function getHeaders() + { + return $this->headers; + } + + public function hasHeaders() + { + return isset($this->headers); + } + + public function clearHeaders() + { + unset($this->headers); + } + + /** + * Headers from the response. + * + * Generated from protobuf field .google.protobuf.Struct headers = 2; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setHeaders($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->headers = $var; + + return $this; + } + + /** + * Status code for the response. + * + * Generated from protobuf field string status_code = 3; + * @return string + */ + public function getStatusCode() + { + return $this->status_code; + } + + /** + * Status code for the response. + * + * Generated from protobuf field string status_code = 3; + * @param string $var + * @return $this + */ + public function setStatusCode($var) + { + GPBUtil::checkString($var, True); + $this->status_code = $var; + + return $this; + } + + /** + * Size in bytes of the response. + * + * Generated from protobuf field int32 size_bytes = 4; + * @return int + */ + public function getSizeBytes() + { + return $this->size_bytes; + } + + /** + * Size in bytes of the response. + * + * Generated from protobuf field int32 size_bytes = 4; + * @param int $var + * @return $this + */ + public function setSizeBytes($var) + { + GPBUtil::checkInt32($var); + $this->size_bytes = $var; + + return $this; + } + + /** + * Total time elapsed for the response. + * + * Generated from protobuf field .google.protobuf.Duration duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Total time elapsed for the response. + * + * Generated from protobuf field .google.protobuf.Duration duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + + /** + * The body of the response. + * + * Generated from protobuf field string body = 6; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * The body of the response. + * + * Generated from protobuf field string body = 6; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, True); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate.php new file mode 100644 index 000000000000..ffa5a67fc3f1 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate.php @@ -0,0 +1,153 @@ +google.cloud.video.stitcher.v1.Slate + */ +class Slate extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the slate, in the form of + * `projects/{project_number}/locations/{location}/slates/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * The URI to fetch the source content for the slate. This URI must return an + * MP4 video with at least one audio track. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * gam_slate has all the GAM-related attributes of slates. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate.GamSlate gam_slate = 3; + */ + protected $gam_slate = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the slate, in the form of + * `projects/{project_number}/locations/{location}/slates/{id}`. + * @type string $uri + * The URI to fetch the source content for the slate. This URI must return an + * MP4 video with at least one audio track. + * @type \Google\Cloud\Video\Stitcher\V1\Slate\GamSlate $gam_slate + * gam_slate has all the GAM-related attributes of slates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Slates::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the slate, in the form of + * `projects/{project_number}/locations/{location}/slates/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the slate, in the form of + * `projects/{project_number}/locations/{location}/slates/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The URI to fetch the source content for the slate. This URI must return an + * MP4 video with at least one audio track. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * The URI to fetch the source content for the slate. This URI must return an + * MP4 video with at least one audio track. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * gam_slate has all the GAM-related attributes of slates. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate.GamSlate gam_slate = 3; + * @return \Google\Cloud\Video\Stitcher\V1\Slate\GamSlate|null + */ + public function getGamSlate() + { + return $this->gam_slate; + } + + public function hasGamSlate() + { + return isset($this->gam_slate); + } + + public function clearGamSlate() + { + unset($this->gam_slate); + } + + /** + * gam_slate has all the GAM-related attributes of slates. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate.GamSlate gam_slate = 3; + * @param \Google\Cloud\Video\Stitcher\V1\Slate\GamSlate $var + * @return $this + */ + public function setGamSlate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\Slate\GamSlate::class); + $this->gam_slate = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate/GamSlate.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate/GamSlate.php new file mode 100644 index 000000000000..e4991ab67127 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate/GamSlate.php @@ -0,0 +1,105 @@ +google.cloud.video.stitcher.v1.Slate.GamSlate + */ +class GamSlate extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Ad Manager network code to associate with the live config. + * + * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network_code = ''; + /** + * Output only. The identifier generated for the slate by GAM. + * + * Generated from protobuf field int64 gam_slate_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $gam_slate_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network_code + * Required. Ad Manager network code to associate with the live config. + * @type int|string $gam_slate_id + * Output only. The identifier generated for the slate by GAM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Slates::initOnce(); + parent::__construct($data); + } + + /** + * Required. Ad Manager network code to associate with the live config. + * + * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNetworkCode() + { + return $this->network_code; + } + + /** + * Required. Ad Manager network code to associate with the live config. + * + * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNetworkCode($var) + { + GPBUtil::checkString($var, True); + $this->network_code = $var; + + return $this; + } + + /** + * Output only. The identifier generated for the slate by GAM. + * + * Generated from protobuf field int64 gam_slate_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getGamSlateId() + { + return $this->gam_slate_id; + } + + /** + * Output only. The identifier generated for the slate by GAM. + * + * Generated from protobuf field int64 gam_slate_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setGamSlateId($var) + { + GPBUtil::checkInt64($var); + $this->gam_slate_id = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GamSlate::class, \Google\Cloud\Video\Stitcher\V1\Slate_GamSlate::class); + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/StaticAdResource.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/StaticAdResource.php new file mode 100644 index 000000000000..c52ed06d37cf --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/StaticAdResource.php @@ -0,0 +1,101 @@ +google.cloud.video.stitcher.v1.StaticAdResource + */ +class StaticAdResource extends \Google\Protobuf\Internal\Message +{ + /** + * URI to the static file for the ad resource. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + /** + * Describes the MIME type of the ad resource. + * + * Generated from protobuf field string creative_type = 2; + */ + protected $creative_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * URI to the static file for the ad resource. + * @type string $creative_type + * Describes the MIME type of the ad resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Companions::initOnce(); + parent::__construct($data); + } + + /** + * URI to the static file for the ad resource. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI to the static file for the ad resource. + * + * Generated from protobuf field string uri = 1; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Describes the MIME type of the ad resource. + * + * Generated from protobuf field string creative_type = 2; + * @return string + */ + public function getCreativeType() + { + return $this->creative_type; + } + + /** + * Describes the MIME type of the ad resource. + * + * Generated from protobuf field string creative_type = 2; + * @param string $var + * @return $this + */ + public function setCreativeType($var) + { + GPBUtil::checkString($var, True); + $this->creative_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateCdnKeyRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateCdnKeyRequest.php new file mode 100644 index 000000000000..b3f90236908c --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateCdnKeyRequest.php @@ -0,0 +1,146 @@ +google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + */ +class UpdateCdnKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The CDN key resource which replaces the resource on the server. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cdn_key = null; + /** + * Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Video\Stitcher\V1\CdnKey $cdnKey Required. The CDN key resource which replaces the resource on the server. + * @param \Google\Protobuf\FieldMask $updateMask Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * @return \Google\Cloud\Video\Stitcher\V1\UpdateCdnKeyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Video\Stitcher\V1\CdnKey $cdnKey, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCdnKey($cdnKey) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Stitcher\V1\CdnKey $cdn_key + * Required. The CDN key resource which replaces the resource on the server. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The CDN key resource which replaces the resource on the server. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\Stitcher\V1\CdnKey|null + */ + public function getCdnKey() + { + return $this->cdn_key; + } + + public function hasCdnKey() + { + return isset($this->cdn_key); + } + + public function clearCdnKey() + { + unset($this->cdn_key); + } + + /** + * Required. The CDN key resource which replaces the resource on the server. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\Stitcher\V1\CdnKey $var + * @return $this + */ + public function setCdnKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\CdnKey::class); + $this->cdn_key = $var; + + return $this; + } + + /** + * Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateSlateRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateSlateRequest.php new file mode 100644 index 000000000000..6e415aa29b8e --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateSlateRequest.php @@ -0,0 +1,136 @@ +google.cloud.video.stitcher.v1.UpdateSlateRequest + */ +class UpdateSlateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource with updated fields. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $slate = null; + /** + * Required. The update mask which specifies fields which should be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Video\Stitcher\V1\Slate $slate Required. The resource with updated fields. + * @param \Google\Protobuf\FieldMask $updateMask Required. The update mask which specifies fields which should be updated. + * + * @return \Google\Cloud\Video\Stitcher\V1\UpdateSlateRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Video\Stitcher\V1\Slate $slate, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSlate($slate) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Stitcher\V1\Slate $slate + * Required. The resource with updated fields. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The update mask which specifies fields which should be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource with updated fields. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\Stitcher\V1\Slate|null + */ + public function getSlate() + { + return $this->slate; + } + + public function hasSlate() + { + return isset($this->slate); + } + + public function clearSlate() + { + unset($this->slate); + } + + /** + * Required. The resource with updated fields. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\Stitcher\V1\Slate $var + * @return $this + */ + public function setSlate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\Slate::class); + $this->slate = $var; + + return $this; + } + + /** + * Required. The update mask which specifies fields which should be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The update mask which specifies fields which should be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VideoStitcherServiceGrpcClient.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VideoStitcherServiceGrpcClient.php new file mode 100644 index 000000000000..07927b286718 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VideoStitcherServiceGrpcClient.php @@ -0,0 +1,406 @@ +_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateCdnKey', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists all CDN keys in the specified project and location. + * @param \Google\Cloud\Video\Stitcher\V1\ListCdnKeysRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListCdnKeys(\Google\Cloud\Video\Stitcher\V1\ListCdnKeysRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/ListCdnKeys', + $argument, + ['\Google\Cloud\Video\Stitcher\V1\ListCdnKeysResponse', 'decode'], + $metadata, $options); + } + + /** + * Returns the specified CDN key. + * @param \Google\Cloud\Video\Stitcher\V1\GetCdnKeyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetCdnKey(\Google\Cloud\Video\Stitcher\V1\GetCdnKeyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/GetCdnKey', + $argument, + ['\Google\Cloud\Video\Stitcher\V1\CdnKey', 'decode'], + $metadata, $options); + } + + /** + * Deletes the specified CDN key. + * @param \Google\Cloud\Video\Stitcher\V1\DeleteCdnKeyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteCdnKey(\Google\Cloud\Video\Stitcher\V1\DeleteCdnKeyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/DeleteCdnKey', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates the specified CDN key. Only update fields specified + * in the call method body. + * @param \Google\Cloud\Video\Stitcher\V1\UpdateCdnKeyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateCdnKey(\Google\Cloud\Video\Stitcher\V1\UpdateCdnKeyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/UpdateCdnKey', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Creates a client side playback VOD session and returns the full + * tracking and playback metadata of the session. + * @param \Google\Cloud\Video\Stitcher\V1\CreateVodSessionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateVodSession(\Google\Cloud\Video\Stitcher\V1\CreateVodSessionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateVodSession', + $argument, + ['\Google\Cloud\Video\Stitcher\V1\VodSession', 'decode'], + $metadata, $options); + } + + /** + * Returns the full tracking, playback metadata, and relevant ad-ops + * logs for the specified VOD session. + * @param \Google\Cloud\Video\Stitcher\V1\GetVodSessionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetVodSession(\Google\Cloud\Video\Stitcher\V1\GetVodSessionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/GetVodSession', + $argument, + ['\Google\Cloud\Video\Stitcher\V1\VodSession', 'decode'], + $metadata, $options); + } + + /** + * Returns a list of detailed stitching information of the specified VOD + * session. + * @param \Google\Cloud\Video\Stitcher\V1\ListVodStitchDetailsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListVodStitchDetails(\Google\Cloud\Video\Stitcher\V1\ListVodStitchDetailsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/ListVodStitchDetails', + $argument, + ['\Google\Cloud\Video\Stitcher\V1\ListVodStitchDetailsResponse', 'decode'], + $metadata, $options); + } + + /** + * Returns the specified stitching information for the specified VOD session. + * @param \Google\Cloud\Video\Stitcher\V1\GetVodStitchDetailRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetVodStitchDetail(\Google\Cloud\Video\Stitcher\V1\GetVodStitchDetailRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/GetVodStitchDetail', + $argument, + ['\Google\Cloud\Video\Stitcher\V1\VodStitchDetail', 'decode'], + $metadata, $options); + } + + /** + * Return the list of ad tag details for the specified VOD session. + * @param \Google\Cloud\Video\Stitcher\V1\ListVodAdTagDetailsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListVodAdTagDetails(\Google\Cloud\Video\Stitcher\V1\ListVodAdTagDetailsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/ListVodAdTagDetails', + $argument, + ['\Google\Cloud\Video\Stitcher\V1\ListVodAdTagDetailsResponse', 'decode'], + $metadata, $options); + } + + /** + * Returns the specified ad tag detail for the specified VOD session. + * @param \Google\Cloud\Video\Stitcher\V1\GetVodAdTagDetailRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetVodAdTagDetail(\Google\Cloud\Video\Stitcher\V1\GetVodAdTagDetailRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/GetVodAdTagDetail', + $argument, + ['\Google\Cloud\Video\Stitcher\V1\VodAdTagDetail', 'decode'], + $metadata, $options); + } + + /** + * Return the list of ad tag details for the specified live session. + * @param \Google\Cloud\Video\Stitcher\V1\ListLiveAdTagDetailsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListLiveAdTagDetails(\Google\Cloud\Video\Stitcher\V1\ListLiveAdTagDetailsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/ListLiveAdTagDetails', + $argument, + ['\Google\Cloud\Video\Stitcher\V1\ListLiveAdTagDetailsResponse', 'decode'], + $metadata, $options); + } + + /** + * Returns the specified ad tag detail for the specified live session. + * @param \Google\Cloud\Video\Stitcher\V1\GetLiveAdTagDetailRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetLiveAdTagDetail(\Google\Cloud\Video\Stitcher\V1\GetLiveAdTagDetailRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/GetLiveAdTagDetail', + $argument, + ['\Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail', 'decode'], + $metadata, $options); + } + + /** + * Creates a slate. + * @param \Google\Cloud\Video\Stitcher\V1\CreateSlateRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateSlate(\Google\Cloud\Video\Stitcher\V1\CreateSlateRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateSlate', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists all slates in the specified project and location. + * @param \Google\Cloud\Video\Stitcher\V1\ListSlatesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListSlates(\Google\Cloud\Video\Stitcher\V1\ListSlatesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/ListSlates', + $argument, + ['\Google\Cloud\Video\Stitcher\V1\ListSlatesResponse', 'decode'], + $metadata, $options); + } + + /** + * Returns the specified slate. + * @param \Google\Cloud\Video\Stitcher\V1\GetSlateRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetSlate(\Google\Cloud\Video\Stitcher\V1\GetSlateRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/GetSlate', + $argument, + ['\Google\Cloud\Video\Stitcher\V1\Slate', 'decode'], + $metadata, $options); + } + + /** + * Updates the specified slate. + * @param \Google\Cloud\Video\Stitcher\V1\UpdateSlateRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateSlate(\Google\Cloud\Video\Stitcher\V1\UpdateSlateRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/UpdateSlate', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes the specified slate. + * @param \Google\Cloud\Video\Stitcher\V1\DeleteSlateRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteSlate(\Google\Cloud\Video\Stitcher\V1\DeleteSlateRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/DeleteSlate', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Creates a new live session. + * @param \Google\Cloud\Video\Stitcher\V1\CreateLiveSessionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateLiveSession(\Google\Cloud\Video\Stitcher\V1\CreateLiveSessionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateLiveSession', + $argument, + ['\Google\Cloud\Video\Stitcher\V1\LiveSession', 'decode'], + $metadata, $options); + } + + /** + * Returns the details for the specified live session. + * @param \Google\Cloud\Video\Stitcher\V1\GetLiveSessionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetLiveSession(\Google\Cloud\Video\Stitcher\V1\GetLiveSessionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/GetLiveSession', + $argument, + ['\Google\Cloud\Video\Stitcher\V1\LiveSession', 'decode'], + $metadata, $options); + } + + /** + * Registers the live config with the provided unique ID in + * the specified region. + * @param \Google\Cloud\Video\Stitcher\V1\CreateLiveConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateLiveConfig(\Google\Cloud\Video\Stitcher\V1\CreateLiveConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateLiveConfig', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists all live configs managed by the Video Stitcher that + * belong to the specified project and region. + * @param \Google\Cloud\Video\Stitcher\V1\ListLiveConfigsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListLiveConfigs(\Google\Cloud\Video\Stitcher\V1\ListLiveConfigsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/ListLiveConfigs', + $argument, + ['\Google\Cloud\Video\Stitcher\V1\ListLiveConfigsResponse', 'decode'], + $metadata, $options); + } + + /** + * Returns the specified live config managed by the Video + * Stitcher service. + * @param \Google\Cloud\Video\Stitcher\V1\GetLiveConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetLiveConfig(\Google\Cloud\Video\Stitcher\V1\GetLiveConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/GetLiveConfig', + $argument, + ['\Google\Cloud\Video\Stitcher\V1\LiveConfig', 'decode'], + $metadata, $options); + } + + /** + * Deletes the specified live config. + * @param \Google\Cloud\Video\Stitcher\V1\DeleteLiveConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteLiveConfig(\Google\Cloud\Video\Stitcher\V1\DeleteLiveConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/DeleteLiveConfig', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodAdTagDetail.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodAdTagDetail.php new file mode 100644 index 000000000000..65915ceef1c0 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodAdTagDetail.php @@ -0,0 +1,105 @@ +google.cloud.video.stitcher.v1.VodAdTagDetail + */ +class VodAdTagDetail extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the ad tag detail for the specified VOD session, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{id}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * A list of ad requests for one ad tag. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; + */ + private $ad_requests; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the ad tag detail for the specified VOD session, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{id}`. + * @type array<\Google\Cloud\Video\Stitcher\V1\AdRequest>|\Google\Protobuf\Internal\RepeatedField $ad_requests + * A list of ad requests for one ad tag. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\AdTagDetails::initOnce(); + parent::__construct($data); + } + + /** + * The name of the ad tag detail for the specified VOD session, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{id}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the ad tag detail for the specified VOD session, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{id}`. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * A list of ad requests for one ad tag. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdRequests() + { + return $this->ad_requests; + } + + /** + * A list of ad requests for one ad tag. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; + * @param array<\Google\Cloud\Video\Stitcher\V1\AdRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\AdRequest::class); + $this->ad_requests = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession.php new file mode 100644 index 000000000000..d34907f54e93 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession.php @@ -0,0 +1,451 @@ +google.cloud.video.stitcher.v1.VodSession + */ +class VodSession extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the VOD session, in the form of + * `projects/{project_number}/locations/{location}/vodSessions/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Metadata of what was stitched into the content. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Interstitials interstitials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $interstitials = null; + /** + * Output only. The playback URI of the stitched content. + * + * Generated from protobuf field string play_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $play_uri = ''; + /** + * Required. URI of the media to stitch. + * + * Generated from protobuf field string source_uri = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source_uri = ''; + /** + * Required. Ad tag URI. + * + * Generated from protobuf field string ad_tag_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ad_tag_uri = ''; + /** + * Key value pairs for ad tag macro replacement. If the + * specified ad tag URI has macros, this field provides the mapping + * to the value that will replace the macro in the ad tag URI. + * Macros are designated by square brackets. + * For example: + * Ad tag URI: `"https://doubleclick.google.com/ad/1?geo_id=[geoId]"` + * Ad tag macro map: `{"geoId": "123"}` + * Fully qualified ad tag: + * `"`https://doubleclick.google.com/ad/1?geo_id=123"` + * + * Generated from protobuf field map ad_tag_macro_map = 7; + */ + private $ad_tag_macro_map; + /** + * Additional options that affect the output of the manifest. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 9; + */ + protected $manifest_options = null; + /** + * Output only. The generated ID of the VodSession's source media. + * + * Generated from protobuf field string asset_id = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $asset_id = ''; + /** + * Required. Determines how the ad should be tracked. If + * [gam_vod_config][google.cloud.video.stitcher.v1.VodSession.gam_vod_config] + * is set, the value must be `CLIENT` because the IMA SDK handles ad tracking. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 11 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ad_tracking = 0; + /** + * This field should be set with appropriate values if GAM is being used for + * ads. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession.GamSettings gam_settings = 13; + */ + protected $gam_settings = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the VOD session, in the form of + * `projects/{project_number}/locations/{location}/vodSessions/{id}`. + * @type \Google\Cloud\Video\Stitcher\V1\Interstitials $interstitials + * Output only. Metadata of what was stitched into the content. + * @type string $play_uri + * Output only. The playback URI of the stitched content. + * @type string $source_uri + * Required. URI of the media to stitch. + * @type string $ad_tag_uri + * Required. Ad tag URI. + * @type array|\Google\Protobuf\Internal\MapField $ad_tag_macro_map + * Key value pairs for ad tag macro replacement. If the + * specified ad tag URI has macros, this field provides the mapping + * to the value that will replace the macro in the ad tag URI. + * Macros are designated by square brackets. + * For example: + * Ad tag URI: `"https://doubleclick.google.com/ad/1?geo_id=[geoId]"` + * Ad tag macro map: `{"geoId": "123"}` + * Fully qualified ad tag: + * `"`https://doubleclick.google.com/ad/1?geo_id=123"` + * @type \Google\Cloud\Video\Stitcher\V1\ManifestOptions $manifest_options + * Additional options that affect the output of the manifest. + * @type string $asset_id + * Output only. The generated ID of the VodSession's source media. + * @type int $ad_tracking + * Required. Determines how the ad should be tracked. If + * [gam_vod_config][google.cloud.video.stitcher.v1.VodSession.gam_vod_config] + * is set, the value must be `CLIENT` because the IMA SDK handles ad tracking. + * @type \Google\Cloud\Video\Stitcher\V1\VodSession\GamSettings $gam_settings + * This field should be set with appropriate values if GAM is being used for + * ads. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the VOD session, in the form of + * `projects/{project_number}/locations/{location}/vodSessions/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the VOD session, in the form of + * `projects/{project_number}/locations/{location}/vodSessions/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Metadata of what was stitched into the content. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Interstitials interstitials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Video\Stitcher\V1\Interstitials|null + */ + public function getInterstitials() + { + return $this->interstitials; + } + + public function hasInterstitials() + { + return isset($this->interstitials); + } + + public function clearInterstitials() + { + unset($this->interstitials); + } + + /** + * Output only. Metadata of what was stitched into the content. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Interstitials interstitials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Video\Stitcher\V1\Interstitials $var + * @return $this + */ + public function setInterstitials($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\Interstitials::class); + $this->interstitials = $var; + + return $this; + } + + /** + * Output only. The playback URI of the stitched content. + * + * Generated from protobuf field string play_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPlayUri() + { + return $this->play_uri; + } + + /** + * Output only. The playback URI of the stitched content. + * + * Generated from protobuf field string play_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPlayUri($var) + { + GPBUtil::checkString($var, True); + $this->play_uri = $var; + + return $this; + } + + /** + * Required. URI of the media to stitch. + * + * Generated from protobuf field string source_uri = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSourceUri() + { + return $this->source_uri; + } + + /** + * Required. URI of the media to stitch. + * + * Generated from protobuf field string source_uri = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSourceUri($var) + { + GPBUtil::checkString($var, True); + $this->source_uri = $var; + + return $this; + } + + /** + * Required. Ad tag URI. + * + * Generated from protobuf field string ad_tag_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAdTagUri() + { + return $this->ad_tag_uri; + } + + /** + * Required. Ad tag URI. + * + * Generated from protobuf field string ad_tag_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAdTagUri($var) + { + GPBUtil::checkString($var, True); + $this->ad_tag_uri = $var; + + return $this; + } + + /** + * Key value pairs for ad tag macro replacement. If the + * specified ad tag URI has macros, this field provides the mapping + * to the value that will replace the macro in the ad tag URI. + * Macros are designated by square brackets. + * For example: + * Ad tag URI: `"https://doubleclick.google.com/ad/1?geo_id=[geoId]"` + * Ad tag macro map: `{"geoId": "123"}` + * Fully qualified ad tag: + * `"`https://doubleclick.google.com/ad/1?geo_id=123"` + * + * Generated from protobuf field map ad_tag_macro_map = 7; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAdTagMacroMap() + { + return $this->ad_tag_macro_map; + } + + /** + * Key value pairs for ad tag macro replacement. If the + * specified ad tag URI has macros, this field provides the mapping + * to the value that will replace the macro in the ad tag URI. + * Macros are designated by square brackets. + * For example: + * Ad tag URI: `"https://doubleclick.google.com/ad/1?geo_id=[geoId]"` + * Ad tag macro map: `{"geoId": "123"}` + * Fully qualified ad tag: + * `"`https://doubleclick.google.com/ad/1?geo_id=123"` + * + * Generated from protobuf field map ad_tag_macro_map = 7; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAdTagMacroMap($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->ad_tag_macro_map = $arr; + + return $this; + } + + /** + * Additional options that affect the output of the manifest. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 9; + * @return \Google\Cloud\Video\Stitcher\V1\ManifestOptions|null + */ + public function getManifestOptions() + { + return $this->manifest_options; + } + + public function hasManifestOptions() + { + return isset($this->manifest_options); + } + + public function clearManifestOptions() + { + unset($this->manifest_options); + } + + /** + * Additional options that affect the output of the manifest. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 9; + * @param \Google\Cloud\Video\Stitcher\V1\ManifestOptions $var + * @return $this + */ + public function setManifestOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\ManifestOptions::class); + $this->manifest_options = $var; + + return $this; + } + + /** + * Output only. The generated ID of the VodSession's source media. + * + * Generated from protobuf field string asset_id = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAssetId() + { + return $this->asset_id; + } + + /** + * Output only. The generated ID of the VodSession's source media. + * + * Generated from protobuf field string asset_id = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAssetId($var) + { + GPBUtil::checkString($var, True); + $this->asset_id = $var; + + return $this; + } + + /** + * Required. Determines how the ad should be tracked. If + * [gam_vod_config][google.cloud.video.stitcher.v1.VodSession.gam_vod_config] + * is set, the value must be `CLIENT` because the IMA SDK handles ad tracking. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 11 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getAdTracking() + { + return $this->ad_tracking; + } + + /** + * Required. Determines how the ad should be tracked. If + * [gam_vod_config][google.cloud.video.stitcher.v1.VodSession.gam_vod_config] + * is set, the value must be `CLIENT` because the IMA SDK handles ad tracking. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 11 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setAdTracking($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\AdTracking::class); + $this->ad_tracking = $var; + + return $this; + } + + /** + * This field should be set with appropriate values if GAM is being used for + * ads. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession.GamSettings gam_settings = 13; + * @return \Google\Cloud\Video\Stitcher\V1\VodSession\GamSettings|null + */ + public function getGamSettings() + { + return $this->gam_settings; + } + + public function hasGamSettings() + { + return isset($this->gam_settings); + } + + public function clearGamSettings() + { + unset($this->gam_settings); + } + + /** + * This field should be set with appropriate values if GAM is being used for + * ads. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession.GamSettings gam_settings = 13; + * @param \Google\Cloud\Video\Stitcher\V1\VodSession\GamSettings $var + * @return $this + */ + public function setGamSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\VodSession\GamSettings::class); + $this->gam_settings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession/GamSettings.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession/GamSettings.php new file mode 100644 index 000000000000..8063ccb2beea --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession/GamSettings.php @@ -0,0 +1,105 @@ +google.cloud.video.stitcher.v1.VodSession.GamSettings + */ +class GamSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Ad Manager network code. + * + * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network_code = ''; + /** + * Required. The stream ID generated by Ad Manager. + * + * Generated from protobuf field string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $stream_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network_code + * Required. Ad Manager network code. + * @type string $stream_id + * Required. The stream ID generated by Ad Manager. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * Required. Ad Manager network code. + * + * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNetworkCode() + { + return $this->network_code; + } + + /** + * Required. Ad Manager network code. + * + * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNetworkCode($var) + { + GPBUtil::checkString($var, True); + $this->network_code = $var; + + return $this; + } + + /** + * Required. The stream ID generated by Ad Manager. + * + * Generated from protobuf field string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getStreamId() + { + return $this->stream_id; + } + + /** + * Required. The stream ID generated by Ad Manager. + * + * Generated from protobuf field string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setStreamId($var) + { + GPBUtil::checkString($var, True); + $this->stream_id = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GamSettings::class, \Google\Cloud\Video\Stitcher\V1\VodSession_GamSettings::class); + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAd.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAd.php new file mode 100644 index 000000000000..d1b8a1b44103 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAd.php @@ -0,0 +1,171 @@ +google.cloud.video.stitcher.v1.VodSessionAd + */ +class VodSessionAd extends \Google\Protobuf\Internal\Message +{ + /** + * Duration in seconds of the ad. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + */ + protected $duration = null; + /** + * Metadata of companion ads associated with the ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds companion_ads = 2; + */ + protected $companion_ads = null; + /** + * The list of progress tracking events for the ad break. These can be of + * the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`, + * `CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`, + * `EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`, + * `CLOSE_LINEAR`, `SKIP`. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event activity_events = 3; + */ + private $activity_events; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $duration + * Duration in seconds of the ad. + * @type \Google\Cloud\Video\Stitcher\V1\CompanionAds $companion_ads + * Metadata of companion ads associated with the ad. + * @type array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $activity_events + * The list of progress tracking events for the ad break. These can be of + * the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`, + * `CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`, + * `EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`, + * `CLOSE_LINEAR`, `SKIP`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * Duration in seconds of the ad. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Duration in seconds of the ad. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + + /** + * Metadata of companion ads associated with the ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds companion_ads = 2; + * @return \Google\Cloud\Video\Stitcher\V1\CompanionAds|null + */ + public function getCompanionAds() + { + return $this->companion_ads; + } + + public function hasCompanionAds() + { + return isset($this->companion_ads); + } + + public function clearCompanionAds() + { + unset($this->companion_ads); + } + + /** + * Metadata of companion ads associated with the ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds companion_ads = 2; + * @param \Google\Cloud\Video\Stitcher\V1\CompanionAds $var + * @return $this + */ + public function setCompanionAds($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\CompanionAds::class); + $this->companion_ads = $var; + + return $this; + } + + /** + * The list of progress tracking events for the ad break. These can be of + * the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`, + * `CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`, + * `EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`, + * `CLOSE_LINEAR`, `SKIP`. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event activity_events = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getActivityEvents() + { + return $this->activity_events; + } + + /** + * The list of progress tracking events for the ad break. These can be of + * the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`, + * `CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`, + * `EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`, + * `CLOSE_LINEAR`, `SKIP`. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event activity_events = 3; + * @param array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setActivityEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\Event::class); + $this->activity_events = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAdBreak.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAdBreak.php new file mode 100644 index 000000000000..688d8754996b --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAdBreak.php @@ -0,0 +1,189 @@ +google.cloud.video.stitcher.v1.VodSessionAdBreak + */ +class VodSessionAdBreak extends \Google\Protobuf\Internal\Message +{ + /** + * List of events that are expected to be triggered, ordered by time. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.ProgressEvent progress_events = 1; + */ + private $progress_events; + /** + * Ordered list of ads stitched into the ad break. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAd ads = 2; + */ + private $ads; + /** + * Ad break end time in seconds relative to the start of the VOD asset. + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; + */ + protected $end_time_offset = null; + /** + * Ad break start time in seconds relative to the start of the VOD asset. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; + */ + protected $start_time_offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Video\Stitcher\V1\ProgressEvent>|\Google\Protobuf\Internal\RepeatedField $progress_events + * List of events that are expected to be triggered, ordered by time. + * @type array<\Google\Cloud\Video\Stitcher\V1\VodSessionAd>|\Google\Protobuf\Internal\RepeatedField $ads + * Ordered list of ads stitched into the ad break. + * @type \Google\Protobuf\Duration $end_time_offset + * Ad break end time in seconds relative to the start of the VOD asset. + * @type \Google\Protobuf\Duration $start_time_offset + * Ad break start time in seconds relative to the start of the VOD asset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * List of events that are expected to be triggered, ordered by time. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.ProgressEvent progress_events = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProgressEvents() + { + return $this->progress_events; + } + + /** + * List of events that are expected to be triggered, ordered by time. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.ProgressEvent progress_events = 1; + * @param array<\Google\Cloud\Video\Stitcher\V1\ProgressEvent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProgressEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\ProgressEvent::class); + $this->progress_events = $arr; + + return $this; + } + + /** + * Ordered list of ads stitched into the ad break. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAd ads = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAds() + { + return $this->ads; + } + + /** + * Ordered list of ads stitched into the ad break. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAd ads = 2; + * @param array<\Google\Cloud\Video\Stitcher\V1\VodSessionAd>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\VodSessionAd::class); + $this->ads = $arr; + + return $this; + } + + /** + * Ad break end time in seconds relative to the start of the VOD asset. + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getEndTimeOffset() + { + return $this->end_time_offset; + } + + public function hasEndTimeOffset() + { + return isset($this->end_time_offset); + } + + public function clearEndTimeOffset() + { + unset($this->end_time_offset); + } + + /** + * Ad break end time in seconds relative to the start of the VOD asset. + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setEndTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->end_time_offset = $var; + + return $this; + } + + /** + * Ad break start time in seconds relative to the start of the VOD asset. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getStartTimeOffset() + { + return $this->start_time_offset; + } + + public function hasStartTimeOffset() + { + return isset($this->start_time_offset); + } + + public function clearStartTimeOffset() + { + unset($this->start_time_offset); + } + + /** + * Ad break start time in seconds relative to the start of the VOD asset. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_time_offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionContent.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionContent.php new file mode 100644 index 000000000000..d17cc36f962f --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionContent.php @@ -0,0 +1,81 @@ +google.cloud.video.stitcher.v1.VodSessionContent + */ +class VodSessionContent extends \Google\Protobuf\Internal\Message +{ + /** + * The total duration in seconds of the content including the ads stitched + * in. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + */ + protected $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $duration + * The total duration in seconds of the content including the ads stitched + * in. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * The total duration in seconds of the content including the ads stitched + * in. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * The total duration in seconds of the content including the ads stitched + * in. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodStitchDetail.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodStitchDetail.php new file mode 100644 index 000000000000..6567b5311feb --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodStitchDetail.php @@ -0,0 +1,105 @@ +google.cloud.video.stitcher.v1.VodStitchDetail + */ +class VodStitchDetail extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the stitch detail in the specified VOD session, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * A list of ad processing details for the fetched ad playlist. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdStitchDetail ad_stitch_details = 3; + */ + private $ad_stitch_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the stitch detail in the specified VOD session, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + * @type array<\Google\Cloud\Video\Stitcher\V1\AdStitchDetail>|\Google\Protobuf\Internal\RepeatedField $ad_stitch_details + * A list of ad processing details for the fetched ad playlist. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\StitchDetails::initOnce(); + parent::__construct($data); + } + + /** + * The name of the stitch detail in the specified VOD session, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the stitch detail in the specified VOD session, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * A list of ad processing details for the fetched ad playlist. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdStitchDetail ad_stitch_details = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdStitchDetails() + { + return $this->ad_stitch_details; + } + + /** + * A list of ad processing details for the fetched ad playlist. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdStitchDetail ad_stitch_details = 3; + * @param array<\Google\Cloud\Video\Stitcher\V1\AdStitchDetail>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdStitchDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\AdStitchDetail::class); + $this->ad_stitch_details = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_cdn_key.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_cdn_key.php new file mode 100644 index 000000000000..20ab0dd66dd9 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_cdn_key.php @@ -0,0 +1,94 @@ +setParent($formattedParent) + ->setCdnKey($cdnKey) + ->setCdnKeyId($cdnKeyId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $videoStitcherServiceClient->createCdnKey($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CdnKey $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $cdnKeyId = '[CDN_KEY_ID]'; + + create_cdn_key_sample($formattedParent, $cdnKeyId); +} +// [END videostitcher_v1_generated_VideoStitcherService_CreateCdnKey_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_config.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_config.php new file mode 100644 index 000000000000..a6b9a87a31f1 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_config.php @@ -0,0 +1,108 @@ +setSourceUri($liveConfigSourceUri) + ->setAdTracking($liveConfigAdTracking); + $request = (new CreateLiveConfigRequest()) + ->setParent($formattedParent) + ->setLiveConfigId($liveConfigId) + ->setLiveConfig($liveConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $videoStitcherServiceClient->createLiveConfig($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var LiveConfig $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $liveConfigId = '[LIVE_CONFIG_ID]'; + $liveConfigSourceUri = '[SOURCE_URI]'; + $liveConfigAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; + + create_live_config_sample( + $formattedParent, + $liveConfigId, + $liveConfigSourceUri, + $liveConfigAdTracking + ); +} +// [END videostitcher_v1_generated_VideoStitcherService_CreateLiveConfig_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_session.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_session.php new file mode 100644 index 000000000000..b8a88d5c02e5 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_session.php @@ -0,0 +1,89 @@ +setLiveConfig($formattedLiveSessionLiveConfig); + $request = (new CreateLiveSessionRequest()) + ->setParent($formattedParent) + ->setLiveSession($liveSession); + + // Call the API and handle any network failures. + try { + /** @var LiveSession $response */ + $response = $videoStitcherServiceClient->createLiveSession($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VideoStitcherServiceClient::liveSessionName( + '[PROJECT]', + '[LOCATION]', + '[LIVE_SESSION]' + ); + $formattedLiveSessionLiveConfig = VideoStitcherServiceClient::liveConfigName( + '[PROJECT]', + '[LOCATION]', + '[LIVE_CONFIG]' + ); + + create_live_session_sample($formattedParent, $formattedLiveSessionLiveConfig); +} +// [END videostitcher_v1_generated_VideoStitcherService_CreateLiveSession_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_slate.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_slate.php new file mode 100644 index 000000000000..f28cbe35dc30 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_slate.php @@ -0,0 +1,92 @@ +setParent($formattedParent) + ->setSlateId($slateId) + ->setSlate($slate); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $videoStitcherServiceClient->createSlate($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Slate $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $slateId = '[SLATE_ID]'; + + create_slate_sample($formattedParent, $slateId); +} +// [END videostitcher_v1_generated_VideoStitcherService_CreateSlate_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_session.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_session.php new file mode 100644 index 000000000000..243d8b2e0b79 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_session.php @@ -0,0 +1,96 @@ +setSourceUri($vodSessionSourceUri) + ->setAdTagUri($vodSessionAdTagUri) + ->setAdTracking($vodSessionAdTracking); + $request = (new CreateVodSessionRequest()) + ->setParent($formattedParent) + ->setVodSession($vodSession); + + // Call the API and handle any network failures. + try { + /** @var VodSession $response */ + $response = $videoStitcherServiceClient->createVodSession($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $vodSessionSourceUri = '[SOURCE_URI]'; + $vodSessionAdTagUri = '[AD_TAG_URI]'; + $vodSessionAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; + + create_vod_session_sample( + $formattedParent, + $vodSessionSourceUri, + $vodSessionAdTagUri, + $vodSessionAdTracking + ); +} +// [END videostitcher_v1_generated_VideoStitcherService_CreateVodSession_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_cdn_key.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_cdn_key.php new file mode 100644 index 000000000000..dd398b33b4f5 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_cdn_key.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $videoStitcherServiceClient->deleteCdnKey($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VideoStitcherServiceClient::cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); + + delete_cdn_key_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_DeleteCdnKey_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_live_config.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_live_config.php new file mode 100644 index 000000000000..143782006eee --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_live_config.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $videoStitcherServiceClient->deleteLiveConfig($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VideoStitcherServiceClient::liveConfigName( + '[PROJECT]', + '[LOCATION]', + '[LIVE_CONFIG]' + ); + + delete_live_config_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_DeleteLiveConfig_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_slate.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_slate.php new file mode 100644 index 000000000000..ebcfa6c3867c --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_slate.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $videoStitcherServiceClient->deleteSlate($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VideoStitcherServiceClient::slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); + + delete_slate_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_DeleteSlate_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_cdn_key.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_cdn_key.php new file mode 100644 index 000000000000..d79b6389a4ea --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_cdn_key.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CdnKey $response */ + $response = $videoStitcherServiceClient->getCdnKey($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VideoStitcherServiceClient::cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); + + get_cdn_key_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_GetCdnKey_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_ad_tag_detail.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_ad_tag_detail.php new file mode 100644 index 000000000000..618ea25d43e0 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_ad_tag_detail.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var LiveAdTagDetail $response */ + $response = $videoStitcherServiceClient->getLiveAdTagDetail($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VideoStitcherServiceClient::liveAdTagDetailName( + '[PROJECT]', + '[LOCATION]', + '[LIVE_SESSION]', + '[LIVE_AD_TAG_DETAIL]' + ); + + get_live_ad_tag_detail_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_GetLiveAdTagDetail_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_config.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_config.php new file mode 100644 index 000000000000..dafdbfc5d412 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_config.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var LiveConfig $response */ + $response = $videoStitcherServiceClient->getLiveConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VideoStitcherServiceClient::liveConfigName( + '[PROJECT]', + '[LOCATION]', + '[LIVE_CONFIG]' + ); + + get_live_config_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_GetLiveConfig_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_session.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_session.php new file mode 100644 index 000000000000..2f37b81be58c --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_session.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var LiveSession $response */ + $response = $videoStitcherServiceClient->getLiveSession($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VideoStitcherServiceClient::liveSessionName( + '[PROJECT]', + '[LOCATION]', + '[LIVE_SESSION]' + ); + + get_live_session_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_GetLiveSession_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_slate.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_slate.php new file mode 100644 index 000000000000..3789bac77ca5 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_slate.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Slate $response */ + $response = $videoStitcherServiceClient->getSlate($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VideoStitcherServiceClient::slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); + + get_slate_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_GetSlate_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_ad_tag_detail.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_ad_tag_detail.php new file mode 100644 index 000000000000..8c03922d7492 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_ad_tag_detail.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var VodAdTagDetail $response */ + $response = $videoStitcherServiceClient->getVodAdTagDetail($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VideoStitcherServiceClient::vodAdTagDetailName( + '[PROJECT]', + '[LOCATION]', + '[VOD_SESSION]', + '[VOD_AD_TAG_DETAIL]' + ); + + get_vod_ad_tag_detail_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_GetVodAdTagDetail_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_session.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_session.php new file mode 100644 index 000000000000..75283df4a35b --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_session.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var VodSession $response */ + $response = $videoStitcherServiceClient->getVodSession($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VideoStitcherServiceClient::vodSessionName( + '[PROJECT]', + '[LOCATION]', + '[VOD_SESSION]' + ); + + get_vod_session_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_GetVodSession_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_stitch_detail.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_stitch_detail.php new file mode 100644 index 000000000000..9dc0ea9dd537 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_stitch_detail.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var VodStitchDetail $response */ + $response = $videoStitcherServiceClient->getVodStitchDetail($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VideoStitcherServiceClient::vodStitchDetailName( + '[PROJECT]', + '[LOCATION]', + '[VOD_SESSION]', + '[VOD_STITCH_DETAIL]' + ); + + get_vod_stitch_detail_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_GetVodStitchDetail_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_cdn_keys.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_cdn_keys.php new file mode 100644 index 000000000000..5880dda14d56 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_cdn_keys.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $videoStitcherServiceClient->listCdnKeys($request); + + /** @var CdnKey $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_cdn_keys_sample($formattedParent); +} +// [END videostitcher_v1_generated_VideoStitcherService_ListCdnKeys_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_ad_tag_details.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_ad_tag_details.php new file mode 100644 index 000000000000..fe7c6a03a4b2 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_ad_tag_details.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $videoStitcherServiceClient->listLiveAdTagDetails($request); + + /** @var LiveAdTagDetail $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VideoStitcherServiceClient::liveSessionName( + '[PROJECT]', + '[LOCATION]', + '[LIVE_SESSION]' + ); + + list_live_ad_tag_details_sample($formattedParent); +} +// [END videostitcher_v1_generated_VideoStitcherService_ListLiveAdTagDetails_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_configs.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_configs.php new file mode 100644 index 000000000000..d0429815bf4b --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_configs.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $videoStitcherServiceClient->listLiveConfigs($request); + + /** @var LiveConfig $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_live_configs_sample($formattedParent); +} +// [END videostitcher_v1_generated_VideoStitcherService_ListLiveConfigs_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_slates.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_slates.php new file mode 100644 index 000000000000..aeb7d8878cba --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_slates.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $videoStitcherServiceClient->listSlates($request); + + /** @var Slate $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_slates_sample($formattedParent); +} +// [END videostitcher_v1_generated_VideoStitcherService_ListSlates_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_ad_tag_details.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_ad_tag_details.php new file mode 100644 index 000000000000..c2077b8312d1 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_ad_tag_details.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $videoStitcherServiceClient->listVodAdTagDetails($request); + + /** @var VodAdTagDetail $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VideoStitcherServiceClient::vodSessionName( + '[PROJECT]', + '[LOCATION]', + '[VOD_SESSION]' + ); + + list_vod_ad_tag_details_sample($formattedParent); +} +// [END videostitcher_v1_generated_VideoStitcherService_ListVodAdTagDetails_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_stitch_details.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_stitch_details.php new file mode 100644 index 000000000000..f0bd596de97f --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_stitch_details.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $videoStitcherServiceClient->listVodStitchDetails($request); + + /** @var VodStitchDetail $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VideoStitcherServiceClient::vodSessionName( + '[PROJECT]', + '[LOCATION]', + '[VOD_SESSION]' + ); + + list_vod_stitch_details_sample($formattedParent); +} +// [END videostitcher_v1_generated_VideoStitcherService_ListVodStitchDetails_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_cdn_key.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_cdn_key.php new file mode 100644 index 000000000000..61ab173e2c2a --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_cdn_key.php @@ -0,0 +1,75 @@ +setCdnKey($cdnKey) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $videoStitcherServiceClient->updateCdnKey($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CdnKey $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END videostitcher_v1_generated_VideoStitcherService_UpdateCdnKey_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_slate.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_slate.php new file mode 100644 index 000000000000..b25604313c9f --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_slate.php @@ -0,0 +1,74 @@ +setSlate($slate) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $videoStitcherServiceClient->updateSlate($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Slate $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END videostitcher_v1_generated_VideoStitcherService_UpdateSlate_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/src/V1/Client/BaseClient/VideoStitcherServiceBaseClient.php b/owl-bot-staging/VideoStitcher/v1/src/V1/Client/BaseClient/VideoStitcherServiceBaseClient.php new file mode 100644 index 000000000000..d2727fa68c36 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/src/V1/Client/BaseClient/VideoStitcherServiceBaseClient.php @@ -0,0 +1,1052 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/video_stitcher_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/video_stitcher_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/video_stitcher_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/video_stitcher_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a cdn_key + * resource. + * + * @param string $project + * @param string $location + * @param string $cdnKey + * + * @return string The formatted cdn_key resource. + */ + public static function cdnKeyName(string $project, string $location, string $cdnKey): string + { + return self::getPathTemplate('cdnKey')->render([ + 'project' => $project, + 'location' => $location, + 'cdn_key' => $cdnKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * live_ad_tag_detail resource. + * + * @param string $project + * @param string $location + * @param string $liveSession + * @param string $liveAdTagDetail + * + * @return string The formatted live_ad_tag_detail resource. + */ + public static function liveAdTagDetailName(string $project, string $location, string $liveSession, string $liveAdTagDetail): string + { + return self::getPathTemplate('liveAdTagDetail')->render([ + 'project' => $project, + 'location' => $location, + 'live_session' => $liveSession, + 'live_ad_tag_detail' => $liveAdTagDetail, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a live_config + * resource. + * + * @param string $project + * @param string $location + * @param string $liveConfig + * + * @return string The formatted live_config resource. + */ + public static function liveConfigName(string $project, string $location, string $liveConfig): string + { + return self::getPathTemplate('liveConfig')->render([ + 'project' => $project, + 'location' => $location, + 'live_config' => $liveConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a live_session + * resource. + * + * @param string $project + * @param string $location + * @param string $liveSession + * + * @return string The formatted live_session resource. + */ + public static function liveSessionName(string $project, string $location, string $liveSession): string + { + return self::getPathTemplate('liveSession')->render([ + 'project' => $project, + 'location' => $location, + 'live_session' => $liveSession, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a slate + * resource. + * + * @param string $project + * @param string $location + * @param string $slate + * + * @return string The formatted slate resource. + */ + public static function slateName(string $project, string $location, string $slate): string + { + return self::getPathTemplate('slate')->render([ + 'project' => $project, + 'location' => $location, + 'slate' => $slate, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * vod_ad_tag_detail resource. + * + * @param string $project + * @param string $location + * @param string $vodSession + * @param string $vodAdTagDetail + * + * @return string The formatted vod_ad_tag_detail resource. + */ + public static function vodAdTagDetailName(string $project, string $location, string $vodSession, string $vodAdTagDetail): string + { + return self::getPathTemplate('vodAdTagDetail')->render([ + 'project' => $project, + 'location' => $location, + 'vod_session' => $vodSession, + 'vod_ad_tag_detail' => $vodAdTagDetail, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a vod_session + * resource. + * + * @param string $project + * @param string $location + * @param string $vodSession + * + * @return string The formatted vod_session resource. + */ + public static function vodSessionName(string $project, string $location, string $vodSession): string + { + return self::getPathTemplate('vodSession')->render([ + 'project' => $project, + 'location' => $location, + 'vod_session' => $vodSession, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * vod_stitch_detail resource. + * + * @param string $project + * @param string $location + * @param string $vodSession + * @param string $vodStitchDetail + * + * @return string The formatted vod_stitch_detail resource. + */ + public static function vodStitchDetailName(string $project, string $location, string $vodSession, string $vodStitchDetail): string + { + return self::getPathTemplate('vodStitchDetail')->render([ + 'project' => $project, + 'location' => $location, + 'vod_session' => $vodSession, + 'vod_stitch_detail' => $vodStitchDetail, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - cdnKey: projects/{project}/locations/{location}/cdnKeys/{cdn_key} + * - liveAdTagDetail: projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail} + * - liveConfig: projects/{project}/locations/{location}/liveConfigs/{live_config} + * - liveSession: projects/{project}/locations/{location}/liveSessions/{live_session} + * - location: projects/{project}/locations/{location} + * - slate: projects/{project}/locations/{location}/slates/{slate} + * - vodAdTagDetail: projects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail} + * - vodSession: projects/{project}/locations/{location}/vodSessions/{vod_session} + * - vodStitchDetail: projects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'videostitcher.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new CDN key. + * + * The async variant is {@see self::createCdnKeyAsync()} . + * + * @param CreateCdnKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createCdnKey(CreateCdnKeyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateCdnKey', $request, $callOptions)->wait(); + } + + /** + * Registers the live config with the provided unique ID in + * the specified region. + * + * The async variant is {@see self::createLiveConfigAsync()} . + * + * @param CreateLiveConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createLiveConfig(CreateLiveConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateLiveConfig', $request, $callOptions)->wait(); + } + + /** + * Creates a new live session. + * + * The async variant is {@see self::createLiveSessionAsync()} . + * + * @param CreateLiveSessionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return LiveSession + * + * @throws ApiException Thrown if the API call fails. + */ + public function createLiveSession(CreateLiveSessionRequest $request, array $callOptions = []): LiveSession + { + return $this->startApiCall('CreateLiveSession', $request, $callOptions)->wait(); + } + + /** + * Creates a slate. + * + * The async variant is {@see self::createSlateAsync()} . + * + * @param CreateSlateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSlate(CreateSlateRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateSlate', $request, $callOptions)->wait(); + } + + /** + * Creates a client side playback VOD session and returns the full + * tracking and playback metadata of the session. + * + * The async variant is {@see self::createVodSessionAsync()} . + * + * @param CreateVodSessionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return VodSession + * + * @throws ApiException Thrown if the API call fails. + */ + public function createVodSession(CreateVodSessionRequest $request, array $callOptions = []): VodSession + { + return $this->startApiCall('CreateVodSession', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified CDN key. + * + * The async variant is {@see self::deleteCdnKeyAsync()} . + * + * @param DeleteCdnKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteCdnKey(DeleteCdnKeyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteCdnKey', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified live config. + * + * The async variant is {@see self::deleteLiveConfigAsync()} . + * + * @param DeleteLiveConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteLiveConfig(DeleteLiveConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteLiveConfig', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified slate. + * + * The async variant is {@see self::deleteSlateAsync()} . + * + * @param DeleteSlateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteSlate(DeleteSlateRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteSlate', $request, $callOptions)->wait(); + } + + /** + * Returns the specified CDN key. + * + * The async variant is {@see self::getCdnKeyAsync()} . + * + * @param GetCdnKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CdnKey + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCdnKey(GetCdnKeyRequest $request, array $callOptions = []): CdnKey + { + return $this->startApiCall('GetCdnKey', $request, $callOptions)->wait(); + } + + /** + * Returns the specified ad tag detail for the specified live session. + * + * The async variant is {@see self::getLiveAdTagDetailAsync()} . + * + * @param GetLiveAdTagDetailRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return LiveAdTagDetail + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLiveAdTagDetail(GetLiveAdTagDetailRequest $request, array $callOptions = []): LiveAdTagDetail + { + return $this->startApiCall('GetLiveAdTagDetail', $request, $callOptions)->wait(); + } + + /** + * Returns the specified live config managed by the Video + * Stitcher service. + * + * The async variant is {@see self::getLiveConfigAsync()} . + * + * @param GetLiveConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return LiveConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLiveConfig(GetLiveConfigRequest $request, array $callOptions = []): LiveConfig + { + return $this->startApiCall('GetLiveConfig', $request, $callOptions)->wait(); + } + + /** + * Returns the details for the specified live session. + * + * The async variant is {@see self::getLiveSessionAsync()} . + * + * @param GetLiveSessionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return LiveSession + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLiveSession(GetLiveSessionRequest $request, array $callOptions = []): LiveSession + { + return $this->startApiCall('GetLiveSession', $request, $callOptions)->wait(); + } + + /** + * Returns the specified slate. + * + * The async variant is {@see self::getSlateAsync()} . + * + * @param GetSlateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Slate + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSlate(GetSlateRequest $request, array $callOptions = []): Slate + { + return $this->startApiCall('GetSlate', $request, $callOptions)->wait(); + } + + /** + * Returns the specified ad tag detail for the specified VOD session. + * + * The async variant is {@see self::getVodAdTagDetailAsync()} . + * + * @param GetVodAdTagDetailRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return VodAdTagDetail + * + * @throws ApiException Thrown if the API call fails. + */ + public function getVodAdTagDetail(GetVodAdTagDetailRequest $request, array $callOptions = []): VodAdTagDetail + { + return $this->startApiCall('GetVodAdTagDetail', $request, $callOptions)->wait(); + } + + /** + * Returns the full tracking, playback metadata, and relevant ad-ops + * logs for the specified VOD session. + * + * The async variant is {@see self::getVodSessionAsync()} . + * + * @param GetVodSessionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return VodSession + * + * @throws ApiException Thrown if the API call fails. + */ + public function getVodSession(GetVodSessionRequest $request, array $callOptions = []): VodSession + { + return $this->startApiCall('GetVodSession', $request, $callOptions)->wait(); + } + + /** + * Returns the specified stitching information for the specified VOD session. + * + * The async variant is {@see self::getVodStitchDetailAsync()} . + * + * @param GetVodStitchDetailRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return VodStitchDetail + * + * @throws ApiException Thrown if the API call fails. + */ + public function getVodStitchDetail(GetVodStitchDetailRequest $request, array $callOptions = []): VodStitchDetail + { + return $this->startApiCall('GetVodStitchDetail', $request, $callOptions)->wait(); + } + + /** + * Lists all CDN keys in the specified project and location. + * + * The async variant is {@see self::listCdnKeysAsync()} . + * + * @param ListCdnKeysRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listCdnKeys(ListCdnKeysRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCdnKeys', $request, $callOptions); + } + + /** + * Return the list of ad tag details for the specified live session. + * + * The async variant is {@see self::listLiveAdTagDetailsAsync()} . + * + * @param ListLiveAdTagDetailsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLiveAdTagDetails(ListLiveAdTagDetailsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLiveAdTagDetails', $request, $callOptions); + } + + /** + * Lists all live configs managed by the Video Stitcher that + * belong to the specified project and region. + * + * The async variant is {@see self::listLiveConfigsAsync()} . + * + * @param ListLiveConfigsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLiveConfigs(ListLiveConfigsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLiveConfigs', $request, $callOptions); + } + + /** + * Lists all slates in the specified project and location. + * + * The async variant is {@see self::listSlatesAsync()} . + * + * @param ListSlatesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listSlates(ListSlatesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSlates', $request, $callOptions); + } + + /** + * Return the list of ad tag details for the specified VOD session. + * + * The async variant is {@see self::listVodAdTagDetailsAsync()} . + * + * @param ListVodAdTagDetailsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listVodAdTagDetails(ListVodAdTagDetailsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListVodAdTagDetails', $request, $callOptions); + } + + /** + * Returns a list of detailed stitching information of the specified VOD + * session. + * + * The async variant is {@see self::listVodStitchDetailsAsync()} . + * + * @param ListVodStitchDetailsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listVodStitchDetails(ListVodStitchDetailsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListVodStitchDetails', $request, $callOptions); + } + + /** + * Updates the specified CDN key. Only update fields specified + * in the call method body. + * + * The async variant is {@see self::updateCdnKeyAsync()} . + * + * @param UpdateCdnKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateCdnKey(UpdateCdnKeyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateCdnKey', $request, $callOptions)->wait(); + } + + /** + * Updates the specified slate. + * + * The async variant is {@see self::updateSlateAsync()} . + * + * @param UpdateSlateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSlate(UpdateSlateRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateSlate', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/VideoStitcher/v1/src/V1/Client/VideoStitcherServiceClient.php b/owl-bot-staging/VideoStitcher/v1/src/V1/Client/VideoStitcherServiceClient.php new file mode 100644 index 000000000000..214ff555e8fc --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/src/V1/Client/VideoStitcherServiceClient.php @@ -0,0 +1,40 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $cdnKey = new CdnKey(); + * $cdnKeyId = 'cdn_key_id'; + * $operationResponse = $videoStitcherServiceClient->createCdnKey($formattedParent, $cdnKey, $cdnKeyId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $videoStitcherServiceClient->createCdnKey($formattedParent, $cdnKey, $cdnKeyId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $videoStitcherServiceClient->resumeOperation($operationName, 'createCdnKey'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + */ +class VideoStitcherServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.video.stitcher.v1.VideoStitcherService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'videostitcher.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $cdnKeyNameTemplate; + + private static $liveAdTagDetailNameTemplate; + + private static $liveConfigNameTemplate; + + private static $liveSessionNameTemplate; + + private static $locationNameTemplate; + + private static $slateNameTemplate; + + private static $vodAdTagDetailNameTemplate; + + private static $vodSessionNameTemplate; + + private static $vodStitchDetailNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/video_stitcher_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/video_stitcher_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/video_stitcher_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/video_stitcher_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getCdnKeyNameTemplate() + { + if (self::$cdnKeyNameTemplate == null) { + self::$cdnKeyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/cdnKeys/{cdn_key}'); + } + + return self::$cdnKeyNameTemplate; + } + + private static function getLiveAdTagDetailNameTemplate() + { + if (self::$liveAdTagDetailNameTemplate == null) { + self::$liveAdTagDetailNameTemplate = new PathTemplate('projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}'); + } + + return self::$liveAdTagDetailNameTemplate; + } + + private static function getLiveConfigNameTemplate() + { + if (self::$liveConfigNameTemplate == null) { + self::$liveConfigNameTemplate = new PathTemplate('projects/{project}/locations/{location}/liveConfigs/{live_config}'); + } + + return self::$liveConfigNameTemplate; + } + + private static function getLiveSessionNameTemplate() + { + if (self::$liveSessionNameTemplate == null) { + self::$liveSessionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/liveSessions/{live_session}'); + } + + return self::$liveSessionNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getSlateNameTemplate() + { + if (self::$slateNameTemplate == null) { + self::$slateNameTemplate = new PathTemplate('projects/{project}/locations/{location}/slates/{slate}'); + } + + return self::$slateNameTemplate; + } + + private static function getVodAdTagDetailNameTemplate() + { + if (self::$vodAdTagDetailNameTemplate == null) { + self::$vodAdTagDetailNameTemplate = new PathTemplate('projects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail}'); + } + + return self::$vodAdTagDetailNameTemplate; + } + + private static function getVodSessionNameTemplate() + { + if (self::$vodSessionNameTemplate == null) { + self::$vodSessionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/vodSessions/{vod_session}'); + } + + return self::$vodSessionNameTemplate; + } + + private static function getVodStitchDetailNameTemplate() + { + if (self::$vodStitchDetailNameTemplate == null) { + self::$vodStitchDetailNameTemplate = new PathTemplate('projects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail}'); + } + + return self::$vodStitchDetailNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'cdnKey' => self::getCdnKeyNameTemplate(), + 'liveAdTagDetail' => self::getLiveAdTagDetailNameTemplate(), + 'liveConfig' => self::getLiveConfigNameTemplate(), + 'liveSession' => self::getLiveSessionNameTemplate(), + 'location' => self::getLocationNameTemplate(), + 'slate' => self::getSlateNameTemplate(), + 'vodAdTagDetail' => self::getVodAdTagDetailNameTemplate(), + 'vodSession' => self::getVodSessionNameTemplate(), + 'vodStitchDetail' => self::getVodStitchDetailNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a cdn_key + * resource. + * + * @param string $project + * @param string $location + * @param string $cdnKey + * + * @return string The formatted cdn_key resource. + */ + public static function cdnKeyName($project, $location, $cdnKey) + { + return self::getCdnKeyNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'cdn_key' => $cdnKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * live_ad_tag_detail resource. + * + * @param string $project + * @param string $location + * @param string $liveSession + * @param string $liveAdTagDetail + * + * @return string The formatted live_ad_tag_detail resource. + */ + public static function liveAdTagDetailName($project, $location, $liveSession, $liveAdTagDetail) + { + return self::getLiveAdTagDetailNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'live_session' => $liveSession, + 'live_ad_tag_detail' => $liveAdTagDetail, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a live_config + * resource. + * + * @param string $project + * @param string $location + * @param string $liveConfig + * + * @return string The formatted live_config resource. + */ + public static function liveConfigName($project, $location, $liveConfig) + { + return self::getLiveConfigNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'live_config' => $liveConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a live_session + * resource. + * + * @param string $project + * @param string $location + * @param string $liveSession + * + * @return string The formatted live_session resource. + */ + public static function liveSessionName($project, $location, $liveSession) + { + return self::getLiveSessionNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'live_session' => $liveSession, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a slate + * resource. + * + * @param string $project + * @param string $location + * @param string $slate + * + * @return string The formatted slate resource. + */ + public static function slateName($project, $location, $slate) + { + return self::getSlateNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'slate' => $slate, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * vod_ad_tag_detail resource. + * + * @param string $project + * @param string $location + * @param string $vodSession + * @param string $vodAdTagDetail + * + * @return string The formatted vod_ad_tag_detail resource. + */ + public static function vodAdTagDetailName($project, $location, $vodSession, $vodAdTagDetail) + { + return self::getVodAdTagDetailNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'vod_session' => $vodSession, + 'vod_ad_tag_detail' => $vodAdTagDetail, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a vod_session + * resource. + * + * @param string $project + * @param string $location + * @param string $vodSession + * + * @return string The formatted vod_session resource. + */ + public static function vodSessionName($project, $location, $vodSession) + { + return self::getVodSessionNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'vod_session' => $vodSession, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * vod_stitch_detail resource. + * + * @param string $project + * @param string $location + * @param string $vodSession + * @param string $vodStitchDetail + * + * @return string The formatted vod_stitch_detail resource. + */ + public static function vodStitchDetailName($project, $location, $vodSession, $vodStitchDetail) + { + return self::getVodStitchDetailNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'vod_session' => $vodSession, + 'vod_stitch_detail' => $vodStitchDetail, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - cdnKey: projects/{project}/locations/{location}/cdnKeys/{cdn_key} + * - liveAdTagDetail: projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail} + * - liveConfig: projects/{project}/locations/{location}/liveConfigs/{live_config} + * - liveSession: projects/{project}/locations/{location}/liveSessions/{live_session} + * - location: projects/{project}/locations/{location} + * - slate: projects/{project}/locations/{location}/slates/{slate} + * - vodAdTagDetail: projects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail} + * - vodSession: projects/{project}/locations/{location}/vodSessions/{vod_session} + * - vodStitchDetail: projects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'videostitcher.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a new CDN key. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $formattedParent = $videoStitcherServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $cdnKey = new CdnKey(); + * $cdnKeyId = 'cdn_key_id'; + * $operationResponse = $videoStitcherServiceClient->createCdnKey($formattedParent, $cdnKey, $cdnKeyId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $videoStitcherServiceClient->createCdnKey($formattedParent, $cdnKey, $cdnKeyId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $videoStitcherServiceClient->resumeOperation($operationName, 'createCdnKey'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The project in which the CDN key should be created, in the form + * of `projects/{project_number}/locations/{location}`. + * @param CdnKey $cdnKey Required. The CDN key resource to create. + * @param string $cdnKeyId Required. The ID to use for the CDN key, which will become the final + * component of the CDN key's resource name. + * + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createCdnKey($parent, $cdnKey, $cdnKeyId, array $optionalArgs = []) + { + $request = new CreateCdnKeyRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setCdnKey($cdnKey); + $request->setCdnKeyId($cdnKeyId); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateCdnKey', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Registers the live config with the provided unique ID in + * the specified region. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $formattedParent = $videoStitcherServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $liveConfigId = 'live_config_id'; + * $liveConfig = new LiveConfig(); + * $operationResponse = $videoStitcherServiceClient->createLiveConfig($formattedParent, $liveConfigId, $liveConfig); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $videoStitcherServiceClient->createLiveConfig($formattedParent, $liveConfigId, $liveConfig); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $videoStitcherServiceClient->resumeOperation($operationName, 'createLiveConfig'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The project in which the live config should be created, in + * the form of `projects/{project_number}/locations/{location}`. + * @param string $liveConfigId Required. The unique identifier ID to use for the live config. + * @param LiveConfig $liveConfig Required. The live config resource to create. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createLiveConfig($parent, $liveConfigId, $liveConfig, array $optionalArgs = []) + { + $request = new CreateLiveConfigRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setLiveConfigId($liveConfigId); + $request->setLiveConfig($liveConfig); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateLiveConfig', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a new live session. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $formattedParent = $videoStitcherServiceClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); + * $liveSession = new LiveSession(); + * $response = $videoStitcherServiceClient->createLiveSession($formattedParent, $liveSession); + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The project and location in which the live session should be + * created, in the form of `projects/{project_number}/locations/{location}`. + * @param LiveSession $liveSession Required. Parameters for creating a live session. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Video\Stitcher\V1\LiveSession + * + * @throws ApiException if the remote call fails + */ + public function createLiveSession($parent, $liveSession, array $optionalArgs = []) + { + $request = new CreateLiveSessionRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setLiveSession($liveSession); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateLiveSession', LiveSession::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a slate. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $formattedParent = $videoStitcherServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $slateId = 'slate_id'; + * $slate = new Slate(); + * $operationResponse = $videoStitcherServiceClient->createSlate($formattedParent, $slateId, $slate); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $videoStitcherServiceClient->createSlate($formattedParent, $slateId, $slate); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $videoStitcherServiceClient->resumeOperation($operationName, 'createSlate'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The project in which the slate should be created, in the form of + * `projects/{project_number}/locations/{location}`. + * @param string $slateId Required. The unique identifier for the slate. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * @param Slate $slate Required. The slate to create. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported `(00000000-0000-0000-0000-000000000000)`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createSlate($parent, $slateId, $slate, array $optionalArgs = []) + { + $request = new CreateSlateRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setSlateId($slateId); + $request->setSlate($slate); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateSlate', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a client side playback VOD session and returns the full + * tracking and playback metadata of the session. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $formattedParent = $videoStitcherServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $vodSession = new VodSession(); + * $response = $videoStitcherServiceClient->createVodSession($formattedParent, $vodSession); + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The project and location in which the VOD session should be + * created, in the form of `projects/{project_number}/locations/{location}`. + * @param VodSession $vodSession Required. Parameters for creating a session. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Video\Stitcher\V1\VodSession + * + * @throws ApiException if the remote call fails + */ + public function createVodSession($parent, $vodSession, array $optionalArgs = []) + { + $request = new CreateVodSessionRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setVodSession($vodSession); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateVodSession', VodSession::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes the specified CDN key. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $formattedName = $videoStitcherServiceClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); + * $operationResponse = $videoStitcherServiceClient->deleteCdnKey($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $videoStitcherServiceClient->deleteCdnKey($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $videoStitcherServiceClient->resumeOperation($operationName, 'deleteCdnKey'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the CDN key to be deleted, in the form of + * `projects/{project_number}/locations/{location}/cdnKeys/{id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteCdnKey($name, array $optionalArgs = []) + { + $request = new DeleteCdnKeyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteCdnKey', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes the specified live config. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $formattedName = $videoStitcherServiceClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); + * $operationResponse = $videoStitcherServiceClient->deleteLiveConfig($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $videoStitcherServiceClient->deleteLiveConfig($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $videoStitcherServiceClient->resumeOperation($operationName, 'deleteLiveConfig'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the live config to be deleted, in the form of + * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteLiveConfig($name, array $optionalArgs = []) + { + $request = new DeleteLiveConfigRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteLiveConfig', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes the specified slate. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $formattedName = $videoStitcherServiceClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); + * $operationResponse = $videoStitcherServiceClient->deleteSlate($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $videoStitcherServiceClient->deleteSlate($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $videoStitcherServiceClient->resumeOperation($operationName, 'deleteSlate'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the slate to be deleted, in the form of + * `projects/{project_number}/locations/{location}/slates/{id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteSlate($name, array $optionalArgs = []) + { + $request = new DeleteSlateRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteSlate', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Returns the specified CDN key. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $formattedName = $videoStitcherServiceClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); + * $response = $videoStitcherServiceClient->getCdnKey($formattedName); + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the CDN key to be retrieved, in the form of + * `projects/{project}/locations/{location}/cdnKeys/{id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Video\Stitcher\V1\CdnKey + * + * @throws ApiException if the remote call fails + */ + public function getCdnKey($name, array $optionalArgs = []) + { + $request = new GetCdnKeyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetCdnKey', CdnKey::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the specified ad tag detail for the specified live session. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $formattedName = $videoStitcherServiceClient->liveAdTagDetailName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]', '[LIVE_AD_TAG_DETAIL]'); + * $response = $videoStitcherServiceClient->getLiveAdTagDetail($formattedName); + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail + * + * @throws ApiException if the remote call fails + */ + public function getLiveAdTagDetail($name, array $optionalArgs = []) + { + $request = new GetLiveAdTagDetailRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLiveAdTagDetail', LiveAdTagDetail::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the specified live config managed by the Video + * Stitcher service. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $formattedName = $videoStitcherServiceClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); + * $response = $videoStitcherServiceClient->getLiveConfig($formattedName); + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the live config to be retrieved, in the form + * of + * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Video\Stitcher\V1\LiveConfig + * + * @throws ApiException if the remote call fails + */ + public function getLiveConfig($name, array $optionalArgs = []) + { + $request = new GetLiveConfigRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLiveConfig', LiveConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the details for the specified live session. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $formattedName = $videoStitcherServiceClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); + * $response = $videoStitcherServiceClient->getLiveSession($formattedName); + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the live session, in the form of + * `projects/{project_number}/locations/{location}/liveSessions/{id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Video\Stitcher\V1\LiveSession + * + * @throws ApiException if the remote call fails + */ + public function getLiveSession($name, array $optionalArgs = []) + { + $request = new GetLiveSessionRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLiveSession', LiveSession::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the specified slate. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $formattedName = $videoStitcherServiceClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); + * $response = $videoStitcherServiceClient->getSlate($formattedName); + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the slate to be retrieved, of the slate, in the form + * of `projects/{project_number}/locations/{location}/slates/{id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Video\Stitcher\V1\Slate + * + * @throws ApiException if the remote call fails + */ + public function getSlate($name, array $optionalArgs = []) + { + $request = new GetSlateRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetSlate', Slate::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the specified ad tag detail for the specified VOD session. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $formattedName = $videoStitcherServiceClient->vodAdTagDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_AD_TAG_DETAIL]'); + * $response = $videoStitcherServiceClient->getVodAdTagDetail($formattedName); + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the ad tag detail for the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Video\Stitcher\V1\VodAdTagDetail + * + * @throws ApiException if the remote call fails + */ + public function getVodAdTagDetail($name, array $optionalArgs = []) + { + $request = new GetVodAdTagDetailRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetVodAdTagDetail', VodAdTagDetail::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the full tracking, playback metadata, and relevant ad-ops + * logs for the specified VOD session. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $formattedName = $videoStitcherServiceClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); + * $response = $videoStitcherServiceClient->getVodSession($formattedName); + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the VOD session to be retrieved, in the form of + * `projects/{project_number}/locations/{location}/vodSessions/{id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Video\Stitcher\V1\VodSession + * + * @throws ApiException if the remote call fails + */ + public function getVodSession($name, array $optionalArgs = []) + { + $request = new GetVodSessionRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetVodSession', VodSession::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the specified stitching information for the specified VOD session. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $formattedName = $videoStitcherServiceClient->vodStitchDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_STITCH_DETAIL]'); + * $response = $videoStitcherServiceClient->getVodStitchDetail($formattedName); + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the stitch detail in the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Video\Stitcher\V1\VodStitchDetail + * + * @throws ApiException if the remote call fails + */ + public function getVodStitchDetail($name, array $optionalArgs = []) + { + $request = new GetVodStitchDetailRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetVodStitchDetail', VodStitchDetail::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists all CDN keys in the specified project and location. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $formattedParent = $videoStitcherServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $videoStitcherServiceClient->listCdnKeys($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $videoStitcherServiceClient->listCdnKeys($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The project that contains the list of CDN keys, in the form of + * `projects/{project_number}/locations/{location}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * Filtering results + * @type string $orderBy + * Hint for how to order the results + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listCdnKeys($parent, array $optionalArgs = []) + { + $request = new ListCdnKeysRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListCdnKeys', $optionalArgs, ListCdnKeysResponse::class, $request); + } + + /** + * Return the list of ad tag details for the specified live session. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $formattedParent = $videoStitcherServiceClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); + * // Iterate over pages of elements + * $pagedResponse = $videoStitcherServiceClient->listLiveAdTagDetails($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $videoStitcherServiceClient->listLiveAdTagDetails($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource parent in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listLiveAdTagDetails($parent, array $optionalArgs = []) + { + $request = new ListLiveAdTagDetailsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListLiveAdTagDetails', $optionalArgs, ListLiveAdTagDetailsResponse::class, $request); + } + + /** + * Lists all live configs managed by the Video Stitcher that + * belong to the specified project and region. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $formattedParent = $videoStitcherServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $videoStitcherServiceClient->listLiveConfigs($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $videoStitcherServiceClient->listLiveConfigs($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The project that contains the list of live configs, in the + * form of `projects/{project_number}/locations/{location}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * Optional. The filter to apply to list results (see + * [Filtering](https://google.aip.dev/160)). + * @type string $orderBy + * Optional. Specifies the ordering of results following + * [Cloud API + * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listLiveConfigs($parent, array $optionalArgs = []) + { + $request = new ListLiveConfigsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListLiveConfigs', $optionalArgs, ListLiveConfigsResponse::class, $request); + } + + /** + * Lists all slates in the specified project and location. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $formattedParent = $videoStitcherServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $videoStitcherServiceClient->listSlates($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $videoStitcherServiceClient->listSlates($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The project to list slates, in the form of + * `projects/{project_number}/locations/{location}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * Filtering results + * @type string $orderBy + * Hint for how to order the results + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listSlates($parent, array $optionalArgs = []) + { + $request = new ListSlatesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListSlates', $optionalArgs, ListSlatesResponse::class, $request); + } + + /** + * Return the list of ad tag details for the specified VOD session. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $formattedParent = $videoStitcherServiceClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); + * // Iterate over pages of elements + * $pagedResponse = $videoStitcherServiceClient->listVodAdTagDetails($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $videoStitcherServiceClient->listVodAdTagDetails($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The VOD session which the ad tag details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listVodAdTagDetails($parent, array $optionalArgs = []) + { + $request = new ListVodAdTagDetailsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListVodAdTagDetails', $optionalArgs, ListVodAdTagDetailsResponse::class, $request); + } + + /** + * Returns a list of detailed stitching information of the specified VOD + * session. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $formattedParent = $videoStitcherServiceClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); + * // Iterate over pages of elements + * $pagedResponse = $videoStitcherServiceClient->listVodStitchDetails($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $videoStitcherServiceClient->listVodStitchDetails($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The VOD session where the stitch details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{id}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listVodStitchDetails($parent, array $optionalArgs = []) + { + $request = new ListVodStitchDetailsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListVodStitchDetails', $optionalArgs, ListVodStitchDetailsResponse::class, $request); + } + + /** + * Updates the specified CDN key. Only update fields specified + * in the call method body. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $cdnKey = new CdnKey(); + * $updateMask = new FieldMask(); + * $operationResponse = $videoStitcherServiceClient->updateCdnKey($cdnKey, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $videoStitcherServiceClient->updateCdnKey($cdnKey, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $videoStitcherServiceClient->resumeOperation($operationName, 'updateCdnKey'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param CdnKey $cdnKey Required. The CDN key resource which replaces the resource on the server. + * @param FieldMask $updateMask Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateCdnKey($cdnKey, $updateMask, array $optionalArgs = []) + { + $request = new UpdateCdnKeyRequest(); + $requestParamHeaders = []; + $request->setCdnKey($cdnKey); + $request->setUpdateMask($updateMask); + $requestParamHeaders['cdn_key.name'] = $cdnKey->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateCdnKey', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates the specified slate. + * + * Sample code: + * ``` + * $videoStitcherServiceClient = new VideoStitcherServiceClient(); + * try { + * $slate = new Slate(); + * $updateMask = new FieldMask(); + * $operationResponse = $videoStitcherServiceClient->updateSlate($slate, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $videoStitcherServiceClient->updateSlate($slate, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $videoStitcherServiceClient->resumeOperation($operationName, 'updateSlate'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $videoStitcherServiceClient->close(); + * } + * ``` + * + * @param Slate $slate Required. The resource with updated fields. + * @param FieldMask $updateMask Required. The update mask which specifies fields which should be updated. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateSlate($slate, $updateMask, array $optionalArgs = []) + { + $request = new UpdateSlateRequest(); + $requestParamHeaders = []; + $request->setSlate($slate); + $request->setUpdateMask($updateMask); + $requestParamHeaders['slate.name'] = $slate->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateSlate', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } +} diff --git a/owl-bot-staging/VideoStitcher/v1/src/V1/VideoStitcherServiceClient.php b/owl-bot-staging/VideoStitcher/v1/src/V1/VideoStitcherServiceClient.php new file mode 100644 index 000000000000..e011efb2eb40 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/src/V1/VideoStitcherServiceClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.video.stitcher.v1.VideoStitcherService' => [ + 'CreateCdnKey' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\CdnKey', + 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateLiveConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\LiveConfig', + 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSlate' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\Slate', + 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteCdnKey' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteLiveConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSlate' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateCdnKey' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\CdnKey', + 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'cdn_key.name', + 'fieldAccessors' => [ + 'getCdnKey', + 'getName', + ], + ], + ], + ], + 'UpdateSlate' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\Slate', + 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'slate.name', + 'fieldAccessors' => [ + 'getSlate', + 'getName', + ], + ], + ], + ], + 'CreateLiveSession' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\LiveSession', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateVodSession' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\VodSession', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetCdnKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\CdnKey', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetLiveAdTagDetail' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetLiveConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\LiveConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetLiveSession' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\LiveSession', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSlate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\Slate', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetVodAdTagDetail' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\VodAdTagDetail', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetVodSession' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\VodSession', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetVodStitchDetail' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\VodStitchDetail', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCdnKeys' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCdnKeys', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListCdnKeysResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListLiveAdTagDetails' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLiveAdTagDetails', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListLiveAdTagDetailsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListLiveConfigs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLiveConfigs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListLiveConfigsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSlates' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSlates', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListSlatesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListVodAdTagDetails' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getVodAdTagDetails', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListVodAdTagDetailsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListVodStitchDetails' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getVodStitchDetails', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListVodStitchDetailsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'cdnKey' => 'projects/{project}/locations/{location}/cdnKeys/{cdn_key}', + 'liveAdTagDetail' => 'projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}', + 'liveConfig' => 'projects/{project}/locations/{location}/liveConfigs/{live_config}', + 'liveSession' => 'projects/{project}/locations/{location}/liveSessions/{live_session}', + 'location' => 'projects/{project}/locations/{location}', + 'slate' => 'projects/{project}/locations/{location}/slates/{slate}', + 'vodAdTagDetail' => 'projects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail}', + 'vodSession' => 'projects/{project}/locations/{location}/vodSessions/{vod_session}', + 'vodStitchDetail' => 'projects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail}', + ], + ], + ], +]; diff --git a/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_rest_client_config.php b/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_rest_client_config.php new file mode 100644 index 000000000000..d6dd5bc244c6 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_rest_client_config.php @@ -0,0 +1,344 @@ + [ + 'google.cloud.video.stitcher.v1.VideoStitcherService' => [ + 'CreateCdnKey' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/cdnKeys', + 'body' => 'cdn_key', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'cdn_key_id', + ], + ], + 'CreateLiveConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/liveConfigs', + 'body' => 'live_config', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'live_config_id', + ], + ], + 'CreateLiveSession' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/liveSessions', + 'body' => 'live_session', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSlate' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/slates', + 'body' => 'slate', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'slate_id', + ], + ], + 'CreateVodSession' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/vodSessions', + 'body' => 'vod_session', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteCdnKey' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/cdnKeys/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteLiveConfig' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/liveConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSlate' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/slates/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCdnKey' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/cdnKeys/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetLiveAdTagDetail' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/liveSessions/*/liveAdTagDetails/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetLiveConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/liveConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetLiveSession' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/liveSessions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSlate' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/slates/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetVodAdTagDetail' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/vodSessions/*/vodAdTagDetails/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetVodSession' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/vodSessions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetVodStitchDetail' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/vodSessions/*/vodStitchDetails/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCdnKeys' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/cdnKeys', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListLiveAdTagDetails' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/liveSessions/*}/liveAdTagDetails', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListLiveConfigs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/liveConfigs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSlates' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/slates', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListVodAdTagDetails' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/vodSessions/*}/vodAdTagDetails', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListVodStitchDetails' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/vodSessions/*}/vodStitchDetails', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateCdnKey' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{cdn_key.name=projects/*/locations/*/cdnKeys/*}', + 'body' => 'cdn_key', + 'placeholders' => [ + 'cdn_key.name' => [ + 'getters' => [ + 'getCdnKey', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateSlate' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{slate.name=projects/*/locations/*/slates/*}', + 'body' => 'slate', + 'placeholders' => [ + 'slate.name' => [ + 'getters' => [ + 'getSlate', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/VideoStitcher/v1/tests/Unit/V1/Client/VideoStitcherServiceClientTest.php b/owl-bot-staging/VideoStitcher/v1/tests/Unit/V1/Client/VideoStitcherServiceClientTest.php new file mode 100644 index 000000000000..d9f52614ce1e --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/tests/Unit/V1/Client/VideoStitcherServiceClientTest.php @@ -0,0 +1,2363 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return VideoStitcherServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new VideoStitcherServiceClient($options); + } + + /** @test */ + public function createCdnKeyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCdnKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $hostname = 'hostname-299803597'; + $expectedResponse = new CdnKey(); + $expectedResponse->setName($name); + $expectedResponse->setHostname($hostname); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createCdnKeyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $cdnKey = new CdnKey(); + $cdnKeyId = 'cdnKeyId1672586061'; + $request = (new CreateCdnKeyRequest()) + ->setParent($formattedParent) + ->setCdnKey($cdnKey) + ->setCdnKeyId($cdnKeyId); + $response = $gapicClient->createCdnKey($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateCdnKey', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getCdnKey(); + $this->assertProtobufEquals($cdnKey, $actualValue); + $actualValue = $actualApiRequestObject->getCdnKeyId(); + $this->assertProtobufEquals($cdnKeyId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCdnKeyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createCdnKeyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCdnKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $cdnKey = new CdnKey(); + $cdnKeyId = 'cdnKeyId1672586061'; + $request = (new CreateCdnKeyRequest()) + ->setParent($formattedParent) + ->setCdnKey($cdnKey) + ->setCdnKeyId($cdnKeyId); + $response = $gapicClient->createCdnKey($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCdnKeyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createLiveConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createLiveConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $sourceUri = 'sourceUri-1111107768'; + $adTagUri = 'adTagUri-1429194965'; + $defaultSlate = 'defaultSlate1316218395'; + $expectedResponse = new LiveConfig(); + $expectedResponse->setName($name); + $expectedResponse->setSourceUri($sourceUri); + $expectedResponse->setAdTagUri($adTagUri); + $expectedResponse->setDefaultSlate($defaultSlate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createLiveConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $liveConfigId = 'liveConfigId-558267483'; + $liveConfig = new LiveConfig(); + $liveConfigSourceUri = 'liveConfigSourceUri-20192349'; + $liveConfig->setSourceUri($liveConfigSourceUri); + $liveConfigAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; + $liveConfig->setAdTracking($liveConfigAdTracking); + $request = (new CreateLiveConfigRequest()) + ->setParent($formattedParent) + ->setLiveConfigId($liveConfigId) + ->setLiveConfig($liveConfig); + $response = $gapicClient->createLiveConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateLiveConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getLiveConfigId(); + $this->assertProtobufEquals($liveConfigId, $actualValue); + $actualValue = $actualApiRequestObject->getLiveConfig(); + $this->assertProtobufEquals($liveConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createLiveConfigTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createLiveConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createLiveConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $liveConfigId = 'liveConfigId-558267483'; + $liveConfig = new LiveConfig(); + $liveConfigSourceUri = 'liveConfigSourceUri-20192349'; + $liveConfig->setSourceUri($liveConfigSourceUri); + $liveConfigAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; + $liveConfig->setAdTracking($liveConfigAdTracking); + $request = (new CreateLiveConfigRequest()) + ->setParent($formattedParent) + ->setLiveConfigId($liveConfigId) + ->setLiveConfig($liveConfig); + $response = $gapicClient->createLiveConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createLiveConfigTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createLiveSessionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $playUri = 'playUri1879098849'; + $liveConfig = 'liveConfig-1498665483'; + $expectedResponse = new LiveSession(); + $expectedResponse->setName($name); + $expectedResponse->setPlayUri($playUri); + $expectedResponse->setLiveConfig($liveConfig); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); + $liveSession = new LiveSession(); + $liveSessionLiveConfig = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); + $liveSession->setLiveConfig($liveSessionLiveConfig); + $request = (new CreateLiveSessionRequest()) + ->setParent($formattedParent) + ->setLiveSession($liveSession); + $response = $gapicClient->createLiveSession($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateLiveSession', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getLiveSession(); + $this->assertProtobufEquals($liveSession, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createLiveSessionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); + $liveSession = new LiveSession(); + $liveSessionLiveConfig = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); + $liveSession->setLiveConfig($liveSessionLiveConfig); + $request = (new CreateLiveSessionRequest()) + ->setParent($formattedParent) + ->setLiveSession($liveSession); + try { + $gapicClient->createLiveSession($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSlateTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSlateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uri = 'uri116076'; + $expectedResponse = new Slate(); + $expectedResponse->setName($name); + $expectedResponse->setUri($uri); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createSlateTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $slateId = 'slateId-1486865023'; + $slate = new Slate(); + $request = (new CreateSlateRequest()) + ->setParent($formattedParent) + ->setSlateId($slateId) + ->setSlate($slate); + $response = $gapicClient->createSlate($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateSlate', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSlateId(); + $this->assertProtobufEquals($slateId, $actualValue); + $actualValue = $actualApiRequestObject->getSlate(); + $this->assertProtobufEquals($slate, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSlateTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSlateExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSlateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $slateId = 'slateId-1486865023'; + $slate = new Slate(); + $request = (new CreateSlateRequest()) + ->setParent($formattedParent) + ->setSlateId($slateId) + ->setSlate($slate); + $response = $gapicClient->createSlate($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSlateTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createVodSessionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $playUri = 'playUri1879098849'; + $sourceUri = 'sourceUri-1111107768'; + $adTagUri = 'adTagUri-1429194965'; + $assetId = 'assetId-373202742'; + $expectedResponse = new VodSession(); + $expectedResponse->setName($name); + $expectedResponse->setPlayUri($playUri); + $expectedResponse->setSourceUri($sourceUri); + $expectedResponse->setAdTagUri($adTagUri); + $expectedResponse->setAssetId($assetId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $vodSession = new VodSession(); + $vodSessionSourceUri = 'vodSessionSourceUri2085185606'; + $vodSession->setSourceUri($vodSessionSourceUri); + $vodSessionAdTagUri = 'vodSessionAdTagUri-600567328'; + $vodSession->setAdTagUri($vodSessionAdTagUri); + $vodSessionAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; + $vodSession->setAdTracking($vodSessionAdTracking); + $request = (new CreateVodSessionRequest()) + ->setParent($formattedParent) + ->setVodSession($vodSession); + $response = $gapicClient->createVodSession($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateVodSession', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getVodSession(); + $this->assertProtobufEquals($vodSession, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createVodSessionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $vodSession = new VodSession(); + $vodSessionSourceUri = 'vodSessionSourceUri2085185606'; + $vodSession->setSourceUri($vodSessionSourceUri); + $vodSessionAdTagUri = 'vodSessionAdTagUri-600567328'; + $vodSession->setAdTagUri($vodSessionAdTagUri); + $vodSessionAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; + $vodSession->setAdTracking($vodSessionAdTracking); + $request = (new CreateVodSessionRequest()) + ->setParent($formattedParent) + ->setVodSession($vodSession); + try { + $gapicClient->createVodSession($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteCdnKeyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteCdnKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteCdnKeyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); + $request = (new DeleteCdnKeyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCdnKey($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/DeleteCdnKey', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCdnKeyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteCdnKeyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteCdnKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); + $request = (new DeleteCdnKeyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCdnKey($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCdnKeyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteLiveConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteLiveConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteLiveConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); + $request = (new DeleteLiveConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteLiveConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/DeleteLiveConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteLiveConfigTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteLiveConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteLiveConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); + $request = (new DeleteLiveConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteLiveConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteLiveConfigTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSlateTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSlateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteSlateTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); + $request = (new DeleteSlateRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSlate($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/DeleteSlate', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSlateTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSlateExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSlateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); + $request = (new DeleteSlateRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSlate($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSlateTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getCdnKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $hostname = 'hostname-299803597'; + $expectedResponse = new CdnKey(); + $expectedResponse->setName($name2); + $expectedResponse->setHostname($hostname); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); + $request = (new GetCdnKeyRequest()) + ->setName($formattedName); + $response = $gapicClient->getCdnKey($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetCdnKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCdnKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); + $request = (new GetCdnKeyRequest()) + ->setName($formattedName); + try { + $gapicClient->getCdnKey($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLiveAdTagDetailTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new LiveAdTagDetail(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->liveAdTagDetailName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]', '[LIVE_AD_TAG_DETAIL]'); + $request = (new GetLiveAdTagDetailRequest()) + ->setName($formattedName); + $response = $gapicClient->getLiveAdTagDetail($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetLiveAdTagDetail', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLiveAdTagDetailExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->liveAdTagDetailName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]', '[LIVE_AD_TAG_DETAIL]'); + $request = (new GetLiveAdTagDetailRequest()) + ->setName($formattedName); + try { + $gapicClient->getLiveAdTagDetail($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLiveConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $sourceUri = 'sourceUri-1111107768'; + $adTagUri = 'adTagUri-1429194965'; + $defaultSlate = 'defaultSlate1316218395'; + $expectedResponse = new LiveConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setSourceUri($sourceUri); + $expectedResponse->setAdTagUri($adTagUri); + $expectedResponse->setDefaultSlate($defaultSlate); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); + $request = (new GetLiveConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getLiveConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetLiveConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLiveConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); + $request = (new GetLiveConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getLiveConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLiveSessionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $playUri = 'playUri1879098849'; + $liveConfig = 'liveConfig-1498665483'; + $expectedResponse = new LiveSession(); + $expectedResponse->setName($name2); + $expectedResponse->setPlayUri($playUri); + $expectedResponse->setLiveConfig($liveConfig); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); + $request = (new GetLiveSessionRequest()) + ->setName($formattedName); + $response = $gapicClient->getLiveSession($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetLiveSession', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLiveSessionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); + $request = (new GetLiveSessionRequest()) + ->setName($formattedName); + try { + $gapicClient->getLiveSession($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSlateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uri = 'uri116076'; + $expectedResponse = new Slate(); + $expectedResponse->setName($name2); + $expectedResponse->setUri($uri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); + $request = (new GetSlateRequest()) + ->setName($formattedName); + $response = $gapicClient->getSlate($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetSlate', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSlateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); + $request = (new GetSlateRequest()) + ->setName($formattedName); + try { + $gapicClient->getSlate($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVodAdTagDetailTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new VodAdTagDetail(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->vodAdTagDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_AD_TAG_DETAIL]'); + $request = (new GetVodAdTagDetailRequest()) + ->setName($formattedName); + $response = $gapicClient->getVodAdTagDetail($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetVodAdTagDetail', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVodAdTagDetailExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->vodAdTagDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_AD_TAG_DETAIL]'); + $request = (new GetVodAdTagDetailRequest()) + ->setName($formattedName); + try { + $gapicClient->getVodAdTagDetail($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVodSessionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $playUri = 'playUri1879098849'; + $sourceUri = 'sourceUri-1111107768'; + $adTagUri = 'adTagUri-1429194965'; + $assetId = 'assetId-373202742'; + $expectedResponse = new VodSession(); + $expectedResponse->setName($name2); + $expectedResponse->setPlayUri($playUri); + $expectedResponse->setSourceUri($sourceUri); + $expectedResponse->setAdTagUri($adTagUri); + $expectedResponse->setAssetId($assetId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); + $request = (new GetVodSessionRequest()) + ->setName($formattedName); + $response = $gapicClient->getVodSession($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetVodSession', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVodSessionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); + $request = (new GetVodSessionRequest()) + ->setName($formattedName); + try { + $gapicClient->getVodSession($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVodStitchDetailTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new VodStitchDetail(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->vodStitchDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_STITCH_DETAIL]'); + $request = (new GetVodStitchDetailRequest()) + ->setName($formattedName); + $response = $gapicClient->getVodStitchDetail($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetVodStitchDetail', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVodStitchDetailExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->vodStitchDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_STITCH_DETAIL]'); + $request = (new GetVodStitchDetailRequest()) + ->setName($formattedName); + try { + $gapicClient->getVodStitchDetail($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCdnKeysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $cdnKeysElement = new CdnKey(); + $cdnKeys = [ + $cdnKeysElement, + ]; + $expectedResponse = new ListCdnKeysResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCdnKeys($cdnKeys); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListCdnKeysRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listCdnKeys($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCdnKeys()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListCdnKeys', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCdnKeysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListCdnKeysRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listCdnKeys($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLiveAdTagDetailsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $liveAdTagDetailsElement = new LiveAdTagDetail(); + $liveAdTagDetails = [ + $liveAdTagDetailsElement, + ]; + $expectedResponse = new ListLiveAdTagDetailsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLiveAdTagDetails($liveAdTagDetails); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); + $request = (new ListLiveAdTagDetailsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listLiveAdTagDetails($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLiveAdTagDetails()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListLiveAdTagDetails', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLiveAdTagDetailsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); + $request = (new ListLiveAdTagDetailsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listLiveAdTagDetails($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLiveConfigsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $liveConfigsElement = new LiveConfig(); + $liveConfigs = [ + $liveConfigsElement, + ]; + $expectedResponse = new ListLiveConfigsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLiveConfigs($liveConfigs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListLiveConfigsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listLiveConfigs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLiveConfigs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListLiveConfigs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLiveConfigsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListLiveConfigsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listLiveConfigs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSlatesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $slatesElement = new Slate(); + $slates = [ + $slatesElement, + ]; + $expectedResponse = new ListSlatesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSlates($slates); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListSlatesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSlates($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSlates()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListSlates', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSlatesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListSlatesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSlates($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVodAdTagDetailsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $vodAdTagDetailsElement = new VodAdTagDetail(); + $vodAdTagDetails = [ + $vodAdTagDetailsElement, + ]; + $expectedResponse = new ListVodAdTagDetailsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setVodAdTagDetails($vodAdTagDetails); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); + $request = (new ListVodAdTagDetailsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listVodAdTagDetails($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getVodAdTagDetails()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListVodAdTagDetails', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVodAdTagDetailsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); + $request = (new ListVodAdTagDetailsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listVodAdTagDetails($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVodStitchDetailsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $vodStitchDetailsElement = new VodStitchDetail(); + $vodStitchDetails = [ + $vodStitchDetailsElement, + ]; + $expectedResponse = new ListVodStitchDetailsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setVodStitchDetails($vodStitchDetails); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); + $request = (new ListVodStitchDetailsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listVodStitchDetails($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getVodStitchDetails()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListVodStitchDetails', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVodStitchDetailsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); + $request = (new ListVodStitchDetailsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listVodStitchDetails($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCdnKeyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateCdnKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $hostname = 'hostname-299803597'; + $expectedResponse = new CdnKey(); + $expectedResponse->setName($name); + $expectedResponse->setHostname($hostname); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateCdnKeyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $cdnKey = new CdnKey(); + $updateMask = new FieldMask(); + $request = (new UpdateCdnKeyRequest()) + ->setCdnKey($cdnKey) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateCdnKey($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/UpdateCdnKey', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getCdnKey(); + $this->assertProtobufEquals($cdnKey, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateCdnKeyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateCdnKeyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateCdnKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $cdnKey = new CdnKey(); + $updateMask = new FieldMask(); + $request = (new UpdateCdnKeyRequest()) + ->setCdnKey($cdnKey) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateCdnKey($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateCdnKeyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSlateTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSlateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uri = 'uri116076'; + $expectedResponse = new Slate(); + $expectedResponse->setName($name); + $expectedResponse->setUri($uri); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateSlateTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $slate = new Slate(); + $updateMask = new FieldMask(); + $request = (new UpdateSlateRequest()) + ->setSlate($slate) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateSlate($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/UpdateSlate', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getSlate(); + $this->assertProtobufEquals($slate, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSlateTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSlateExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSlateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $slate = new Slate(); + $updateMask = new FieldMask(); + $request = (new UpdateSlateRequest()) + ->setSlate($slate) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateSlate($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSlateTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createCdnKeyAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCdnKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $hostname = 'hostname-299803597'; + $expectedResponse = new CdnKey(); + $expectedResponse->setName($name); + $expectedResponse->setHostname($hostname); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createCdnKeyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $cdnKey = new CdnKey(); + $cdnKeyId = 'cdnKeyId1672586061'; + $request = (new CreateCdnKeyRequest()) + ->setParent($formattedParent) + ->setCdnKey($cdnKey) + ->setCdnKeyId($cdnKeyId); + $response = $gapicClient->createCdnKeyAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateCdnKey', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getCdnKey(); + $this->assertProtobufEquals($cdnKey, $actualValue); + $actualValue = $actualApiRequestObject->getCdnKeyId(); + $this->assertProtobufEquals($cdnKeyId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCdnKeyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/VideoStitcher/v1/tests/Unit/V1/VideoStitcherServiceClientTest.php b/owl-bot-staging/VideoStitcher/v1/tests/Unit/V1/VideoStitcherServiceClientTest.php new file mode 100644 index 000000000000..3c9cc76ac8f2 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/tests/Unit/V1/VideoStitcherServiceClientTest.php @@ -0,0 +1,2147 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return VideoStitcherServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new VideoStitcherServiceClient($options); + } + + /** @test */ + public function createCdnKeyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCdnKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $hostname = 'hostname-299803597'; + $expectedResponse = new CdnKey(); + $expectedResponse->setName($name); + $expectedResponse->setHostname($hostname); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createCdnKeyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $cdnKey = new CdnKey(); + $cdnKeyId = 'cdnKeyId1672586061'; + $response = $gapicClient->createCdnKey($formattedParent, $cdnKey, $cdnKeyId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateCdnKey', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getCdnKey(); + $this->assertProtobufEquals($cdnKey, $actualValue); + $actualValue = $actualApiRequestObject->getCdnKeyId(); + $this->assertProtobufEquals($cdnKeyId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCdnKeyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createCdnKeyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCdnKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $cdnKey = new CdnKey(); + $cdnKeyId = 'cdnKeyId1672586061'; + $response = $gapicClient->createCdnKey($formattedParent, $cdnKey, $cdnKeyId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCdnKeyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createLiveConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createLiveConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $sourceUri = 'sourceUri-1111107768'; + $adTagUri = 'adTagUri-1429194965'; + $defaultSlate = 'defaultSlate1316218395'; + $expectedResponse = new LiveConfig(); + $expectedResponse->setName($name); + $expectedResponse->setSourceUri($sourceUri); + $expectedResponse->setAdTagUri($adTagUri); + $expectedResponse->setDefaultSlate($defaultSlate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createLiveConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $liveConfigId = 'liveConfigId-558267483'; + $liveConfig = new LiveConfig(); + $liveConfigSourceUri = 'liveConfigSourceUri-20192349'; + $liveConfig->setSourceUri($liveConfigSourceUri); + $liveConfigAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; + $liveConfig->setAdTracking($liveConfigAdTracking); + $response = $gapicClient->createLiveConfig($formattedParent, $liveConfigId, $liveConfig); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateLiveConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getLiveConfigId(); + $this->assertProtobufEquals($liveConfigId, $actualValue); + $actualValue = $actualApiRequestObject->getLiveConfig(); + $this->assertProtobufEquals($liveConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createLiveConfigTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createLiveConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createLiveConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $liveConfigId = 'liveConfigId-558267483'; + $liveConfig = new LiveConfig(); + $liveConfigSourceUri = 'liveConfigSourceUri-20192349'; + $liveConfig->setSourceUri($liveConfigSourceUri); + $liveConfigAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; + $liveConfig->setAdTracking($liveConfigAdTracking); + $response = $gapicClient->createLiveConfig($formattedParent, $liveConfigId, $liveConfig); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createLiveConfigTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createLiveSessionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $playUri = 'playUri1879098849'; + $liveConfig = 'liveConfig-1498665483'; + $expectedResponse = new LiveSession(); + $expectedResponse->setName($name); + $expectedResponse->setPlayUri($playUri); + $expectedResponse->setLiveConfig($liveConfig); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); + $liveSession = new LiveSession(); + $liveSessionLiveConfig = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); + $liveSession->setLiveConfig($liveSessionLiveConfig); + $response = $gapicClient->createLiveSession($formattedParent, $liveSession); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateLiveSession', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getLiveSession(); + $this->assertProtobufEquals($liveSession, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createLiveSessionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); + $liveSession = new LiveSession(); + $liveSessionLiveConfig = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); + $liveSession->setLiveConfig($liveSessionLiveConfig); + try { + $gapicClient->createLiveSession($formattedParent, $liveSession); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSlateTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSlateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uri = 'uri116076'; + $expectedResponse = new Slate(); + $expectedResponse->setName($name); + $expectedResponse->setUri($uri); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createSlateTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $slateId = 'slateId-1486865023'; + $slate = new Slate(); + $response = $gapicClient->createSlate($formattedParent, $slateId, $slate); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateSlate', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSlateId(); + $this->assertProtobufEquals($slateId, $actualValue); + $actualValue = $actualApiRequestObject->getSlate(); + $this->assertProtobufEquals($slate, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSlateTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSlateExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSlateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $slateId = 'slateId-1486865023'; + $slate = new Slate(); + $response = $gapicClient->createSlate($formattedParent, $slateId, $slate); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSlateTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createVodSessionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $playUri = 'playUri1879098849'; + $sourceUri = 'sourceUri-1111107768'; + $adTagUri = 'adTagUri-1429194965'; + $assetId = 'assetId-373202742'; + $expectedResponse = new VodSession(); + $expectedResponse->setName($name); + $expectedResponse->setPlayUri($playUri); + $expectedResponse->setSourceUri($sourceUri); + $expectedResponse->setAdTagUri($adTagUri); + $expectedResponse->setAssetId($assetId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $vodSession = new VodSession(); + $vodSessionSourceUri = 'vodSessionSourceUri2085185606'; + $vodSession->setSourceUri($vodSessionSourceUri); + $vodSessionAdTagUri = 'vodSessionAdTagUri-600567328'; + $vodSession->setAdTagUri($vodSessionAdTagUri); + $vodSessionAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; + $vodSession->setAdTracking($vodSessionAdTracking); + $response = $gapicClient->createVodSession($formattedParent, $vodSession); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateVodSession', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getVodSession(); + $this->assertProtobufEquals($vodSession, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createVodSessionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $vodSession = new VodSession(); + $vodSessionSourceUri = 'vodSessionSourceUri2085185606'; + $vodSession->setSourceUri($vodSessionSourceUri); + $vodSessionAdTagUri = 'vodSessionAdTagUri-600567328'; + $vodSession->setAdTagUri($vodSessionAdTagUri); + $vodSessionAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; + $vodSession->setAdTracking($vodSessionAdTracking); + try { + $gapicClient->createVodSession($formattedParent, $vodSession); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteCdnKeyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteCdnKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteCdnKeyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); + $response = $gapicClient->deleteCdnKey($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/DeleteCdnKey', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCdnKeyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteCdnKeyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteCdnKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); + $response = $gapicClient->deleteCdnKey($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCdnKeyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteLiveConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteLiveConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteLiveConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); + $response = $gapicClient->deleteLiveConfig($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/DeleteLiveConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteLiveConfigTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteLiveConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteLiveConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); + $response = $gapicClient->deleteLiveConfig($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteLiveConfigTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSlateTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSlateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteSlateTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); + $response = $gapicClient->deleteSlate($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/DeleteSlate', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSlateTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSlateExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSlateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); + $response = $gapicClient->deleteSlate($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSlateTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getCdnKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $hostname = 'hostname-299803597'; + $expectedResponse = new CdnKey(); + $expectedResponse->setName($name2); + $expectedResponse->setHostname($hostname); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); + $response = $gapicClient->getCdnKey($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetCdnKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCdnKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); + try { + $gapicClient->getCdnKey($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLiveAdTagDetailTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new LiveAdTagDetail(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->liveAdTagDetailName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]', '[LIVE_AD_TAG_DETAIL]'); + $response = $gapicClient->getLiveAdTagDetail($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetLiveAdTagDetail', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLiveAdTagDetailExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->liveAdTagDetailName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]', '[LIVE_AD_TAG_DETAIL]'); + try { + $gapicClient->getLiveAdTagDetail($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLiveConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $sourceUri = 'sourceUri-1111107768'; + $adTagUri = 'adTagUri-1429194965'; + $defaultSlate = 'defaultSlate1316218395'; + $expectedResponse = new LiveConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setSourceUri($sourceUri); + $expectedResponse->setAdTagUri($adTagUri); + $expectedResponse->setDefaultSlate($defaultSlate); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); + $response = $gapicClient->getLiveConfig($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetLiveConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLiveConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); + try { + $gapicClient->getLiveConfig($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLiveSessionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $playUri = 'playUri1879098849'; + $liveConfig = 'liveConfig-1498665483'; + $expectedResponse = new LiveSession(); + $expectedResponse->setName($name2); + $expectedResponse->setPlayUri($playUri); + $expectedResponse->setLiveConfig($liveConfig); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); + $response = $gapicClient->getLiveSession($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetLiveSession', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLiveSessionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); + try { + $gapicClient->getLiveSession($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSlateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uri = 'uri116076'; + $expectedResponse = new Slate(); + $expectedResponse->setName($name2); + $expectedResponse->setUri($uri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); + $response = $gapicClient->getSlate($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetSlate', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSlateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); + try { + $gapicClient->getSlate($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVodAdTagDetailTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new VodAdTagDetail(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->vodAdTagDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_AD_TAG_DETAIL]'); + $response = $gapicClient->getVodAdTagDetail($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetVodAdTagDetail', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVodAdTagDetailExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->vodAdTagDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_AD_TAG_DETAIL]'); + try { + $gapicClient->getVodAdTagDetail($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVodSessionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $playUri = 'playUri1879098849'; + $sourceUri = 'sourceUri-1111107768'; + $adTagUri = 'adTagUri-1429194965'; + $assetId = 'assetId-373202742'; + $expectedResponse = new VodSession(); + $expectedResponse->setName($name2); + $expectedResponse->setPlayUri($playUri); + $expectedResponse->setSourceUri($sourceUri); + $expectedResponse->setAdTagUri($adTagUri); + $expectedResponse->setAssetId($assetId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); + $response = $gapicClient->getVodSession($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetVodSession', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVodSessionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); + try { + $gapicClient->getVodSession($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVodStitchDetailTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new VodStitchDetail(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->vodStitchDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_STITCH_DETAIL]'); + $response = $gapicClient->getVodStitchDetail($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetVodStitchDetail', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVodStitchDetailExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->vodStitchDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_STITCH_DETAIL]'); + try { + $gapicClient->getVodStitchDetail($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCdnKeysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $cdnKeysElement = new CdnKey(); + $cdnKeys = [ + $cdnKeysElement, + ]; + $expectedResponse = new ListCdnKeysResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCdnKeys($cdnKeys); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listCdnKeys($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCdnKeys()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListCdnKeys', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCdnKeysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listCdnKeys($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLiveAdTagDetailsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $liveAdTagDetailsElement = new LiveAdTagDetail(); + $liveAdTagDetails = [ + $liveAdTagDetailsElement, + ]; + $expectedResponse = new ListLiveAdTagDetailsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLiveAdTagDetails($liveAdTagDetails); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); + $response = $gapicClient->listLiveAdTagDetails($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLiveAdTagDetails()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListLiveAdTagDetails', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLiveAdTagDetailsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); + try { + $gapicClient->listLiveAdTagDetails($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLiveConfigsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $liveConfigsElement = new LiveConfig(); + $liveConfigs = [ + $liveConfigsElement, + ]; + $expectedResponse = new ListLiveConfigsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLiveConfigs($liveConfigs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listLiveConfigs($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLiveConfigs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListLiveConfigs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLiveConfigsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listLiveConfigs($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSlatesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $slatesElement = new Slate(); + $slates = [ + $slatesElement, + ]; + $expectedResponse = new ListSlatesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSlates($slates); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listSlates($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSlates()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListSlates', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSlatesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listSlates($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVodAdTagDetailsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $vodAdTagDetailsElement = new VodAdTagDetail(); + $vodAdTagDetails = [ + $vodAdTagDetailsElement, + ]; + $expectedResponse = new ListVodAdTagDetailsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setVodAdTagDetails($vodAdTagDetails); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); + $response = $gapicClient->listVodAdTagDetails($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getVodAdTagDetails()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListVodAdTagDetails', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVodAdTagDetailsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); + try { + $gapicClient->listVodAdTagDetails($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVodStitchDetailsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $vodStitchDetailsElement = new VodStitchDetail(); + $vodStitchDetails = [ + $vodStitchDetailsElement, + ]; + $expectedResponse = new ListVodStitchDetailsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setVodStitchDetails($vodStitchDetails); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); + $response = $gapicClient->listVodStitchDetails($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getVodStitchDetails()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListVodStitchDetails', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVodStitchDetailsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); + try { + $gapicClient->listVodStitchDetails($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCdnKeyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateCdnKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $hostname = 'hostname-299803597'; + $expectedResponse = new CdnKey(); + $expectedResponse->setName($name); + $expectedResponse->setHostname($hostname); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateCdnKeyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $cdnKey = new CdnKey(); + $updateMask = new FieldMask(); + $response = $gapicClient->updateCdnKey($cdnKey, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/UpdateCdnKey', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getCdnKey(); + $this->assertProtobufEquals($cdnKey, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateCdnKeyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateCdnKeyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateCdnKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $cdnKey = new CdnKey(); + $updateMask = new FieldMask(); + $response = $gapicClient->updateCdnKey($cdnKey, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateCdnKeyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSlateTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSlateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uri = 'uri116076'; + $expectedResponse = new Slate(); + $expectedResponse->setName($name); + $expectedResponse->setUri($uri); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateSlateTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $slate = new Slate(); + $updateMask = new FieldMask(); + $response = $gapicClient->updateSlate($slate, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/UpdateSlate', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getSlate(); + $this->assertProtobufEquals($slate, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSlateTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSlateExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSlateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $slate = new Slate(); + $updateMask = new FieldMask(); + $response = $gapicClient->updateSlate($slate, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSlateTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/GPBMetadata/Google/Cloud/Video/Transcoder/V1/Resources.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/GPBMetadata/Google/Cloud/Video/Transcoder/V1/Resources.php new file mode 100644 index 0000000000000000000000000000000000000000..57dfc6ec596d49d17521be2a01e2ef1b4ea52fa9 GIT binary patch literal 9456 zcmeHNOK%(36%IvFA`c~58ruoYGzr6`joijmP3L7fPQsULI?#?+ily-wSrEExw*F8cMOxcgpWEAS=4#b? z^JOIU?7(fa?OfNkyC&Oen|7dY9T_^aw|rN#ytb_~ckAfpmdnIaufV|pEUnKxM{Bd( zy@T>D^EF-bwZnTH=deOJhmQ&8uo>YTKE8PeplxcNmwOoE!55Ije@@UcjdsrSH6Q=H zYIv$)8NQ*J#^-phySa{LdJL&guk8d@+c#`0M+Ey;n{8gt2~1l1s$-)Z?&dtxH{LU(j!L>7sbmKYc{36siS#x2x&l9aS_@XB%@?@M z7r4zAhBjX~x|zKuF*V1C>|dCF_C@)MI|G{2mM-Nd-@i2Z-VcQ&7d$5yxK4YE3@VV0 zmH+E9#2?r#Wd#<=#WJy6Y%`@i3n{~L0$&YWBeOt{%JILI7M14!?7$CS#D_1kkoH;M zF)=KthMrlB-rRpixeH5e+v*tIOadRLi$5s{X3iEx0XeF05+tuff;eWGBvP*x-<*rO zfR@%~o@ZEHQamH}7}kI6K)8FcfYfvM@n)3ji5#eL=K3AJI)nGD{aE zYx9x34A*?$RJ9I93YB80$;d@iT^o3rONfzBO0Z;VEoOR|^;{f9c{AkwOsgVM7Cz!M zHOqGg%8wwyT-SCp8=Na8L_o_Zkf;JroVpB)eT>GLE4XZ}_(r(w{EdcE-$mN&4M>k} zord_QY#>c+6%t3988Bg9+Y9f+@;$gT1mJ2@a`1zLhx?UUqfy_xr#70UW=(yx*EpzE z>O1vXb^RG74a*0$y(+$5kI|QhkM{QH%Yw2Bsm7y9rB4Jrh2+mq=Y{Blq20x~-QAwc970Y;?e8gVV%z?66jQYb|cew4Rii3dUtt(F|_@U__|uT$j2sFz~8;j5;)sb_<;ts`gNxFDzHp~I1#iA`FRjRP+Ij(_8#OpDJvPf~3Zp_ANaIywbDR&@g zA2HXY*beiaX`vdK^Y{_g2?&jNTLU$)WRF`S7Ax& zMDE3_h5VN>NJfS`#?o5kKI8!@r3jb8tf<mk-(6vx{$T2UN3t@$bNqb|MenToM zFw(`dsq*i`a%cfl0f_T+0e-Up>$OQQl858vjZ%XZUdBnM;(0AyoWl-yqawTt>l=j8 z0^P7f7!jW5fGH7G1XH03?AQ-cgq~jy#d>zyZX!_#Qoalur=m{&PccXh!@!t+Hz3u) z0$JsyBd-$`e1!SP*9>eDxpGrVc4{o65R_6rgmsT~DbA^A4d`TD3NECZIcl4RplnFO z{9n)zqkuEUn<#4^z@k5JM9HyMe0#QVLa;*kp^4;FA1x@E@qkK^nHR|m`43=abh+{Z zT-z<})pu%*rrP}YV6w2l0{s3*4J;s%uvjfMuwKaLVdHe%!Gg)R9iuJkr~JP$+m8km zbhVD{_BCJDSI8e%4Mu^EaXc*I7qF(fECbjRL-%{CV;oaONfwh3XL}j0$Q3v`MSpF=)Ie$L7vG!zSW}rm1J+EZ zr*TV*Wq%igOA+T(?Hg_70W2Jg2I0GJH#O{w;Ci;UU3ykR&HjD?QW1>u z2-daGY|*Jm`!a#vp5M$OIAK2My+4DsAuOp)+U^{&KGawQN~%N1eOMhrV)Y^`mbWgz zCJOKVGv)PB9?7aOV9XmW!?vf%|3K4~$B@<;Ph=)e!LbjbOjf!W zW7Q#0wgd^GUL25kIQ|iHS(z->AxXuYtMMK-wi#1!Rm-KCz{2U8jO5p0In*fB*XgC0dYPrQOr~?MO=jPPgir^9m_dh{aLGdtSx{THE%{1P zFfyKgV%l5I;4j)rcPAHclZL&^O@bH>Q!CHqO zIb6!ipzJRoPI~$8fd4TL=@Bg{zl6j<(~XYwc76xx)a0rTqj{ShJ1qJI{N5i&zz>O}Y zya>;Z_=BpMrrL4ol8C#1GW#KI7KzgK` z!(6f0E57xH)YAL2wKPIpxQ~<-oJF?7eugI>0(?`d<>>+6oCMs3_>ps42HZJHkWmI7 zJGUp`vj2+1#wotZVa8gE$mPb{3E^^hr@$4bQeiD3O4MPs3|?-lEk~$z*nIG&MU@>7 zHH<0DoEro|lMdgtO_f_1H6bb9l)4?&WJk>8p)-M39BXJZ7&2^!S!x$!JvA6fM7e}t zge^^U5;tLmUWIor^K=u>(ZGXSw*SOd9lVOpKt=KoW2&`%Mh{MVd{9z*ixuQKc1K{)w|j zm(28>=iw;s^E(%nhAyHvka0f?tKy9m22b_!-Se;}?ibYXC1nNq64lqmiKMEx_<>^i zf5ZTWlg~;0pcclDE2@M#MA8-)G4ISy@WV|C^f464q~!QSIg2&^=%VjSZgjCaF)CGV z4d<>=KBF{!o*&TU(6Dsl$k1^@hStvKwxSD2a^01G4X@&b=1j4a*TUb9cn37_KZyOj zDn``dPXq8)v}>RKX%JqS;;)0yFywEAoYtMuFD=Yg2zTqX=ocHWiyz61{H8_>8>al8 OhOZRAdO3j;fd2qoTupue literal 0 HcmV?d00001 diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/GPBMetadata/Google/Cloud/Video/Transcoder/V1/Services.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/GPBMetadata/Google/Cloud/Video/Transcoder/V1/Services.php new file mode 100644 index 000000000000..b9bd81111f46 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/GPBMetadata/Google/Cloud/Video/Transcoder/V1/Services.php @@ -0,0 +1,90 @@ +internalAddGeneratedFile( + ' +� +/google/cloud/video/transcoder/v1/services.proto google.cloud.video.transcoder.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto0google/cloud/video/transcoder/v1/resources.protogoogle/protobuf/empty.proto"� +CreateJobRequest9 +parent ( B)�A�A# +!locations.googleapis.com/Location7 +job ( 2%.google.cloud.video.transcoder.v1.JobB�A"� +ListJobsRequest9 +parent ( B)�A�A# +!locations.googleapis.com/Location + page_size ( + +page_token (  +filter (  +order_by ( "D + GetJobRequest3 +name ( B%�A�A +transcoder.googleapis.com/Job"^ +DeleteJobRequest3 +name ( B%�A�A +transcoder.googleapis.com/Job + allow_missing ("u +ListJobsResponse3 +jobs ( 2%.google.cloud.video.transcoder.v1.Job +next_page_token (  + unreachable ( "� +CreateJobTemplateRequest9 +parent ( B)�A�A# +!locations.googleapis.com/LocationH + job_template ( 2-.google.cloud.video.transcoder.v1.JobTemplateB�A +job_template_id ( B�A"� +ListJobTemplatesRequest9 +parent ( B)�A�A# +!locations.googleapis.com/Location + page_size ( + +page_token (  +filter (  +order_by ( "T +GetJobTemplateRequest; +name ( B-�A�A\' +%transcoder.googleapis.com/JobTemplate"n +DeleteJobTemplateRequest; +name ( B-�A�A\' +%transcoder.googleapis.com/JobTemplate + allow_missing ("� +ListJobTemplatesResponseD + job_templates ( 2-.google.cloud.video.transcoder.v1.JobTemplate +next_page_token (  + unreachable ( 2� +TranscoderService� + CreateJob2.google.cloud.video.transcoder.v1.CreateJobRequest%.google.cloud.video.transcoder.v1.Job"B���/"(/v1/{parent=projects/*/locations/*}/jobs:job�A +parent,job� +ListJobs1.google.cloud.video.transcoder.v1.ListJobsRequest2.google.cloud.video.transcoder.v1.ListJobsResponse"9���*(/v1/{parent=projects/*/locations/*}/jobs�Aparent� +GetJob/.google.cloud.video.transcoder.v1.GetJobRequest%.google.cloud.video.transcoder.v1.Job"7���*(/v1/{name=projects/*/locations/*/jobs/*}�Aname� + DeleteJob2.google.cloud.video.transcoder.v1.DeleteJobRequest.google.protobuf.Empty"7���**(/v1/{name=projects/*/locations/*/jobs/*}�Aname� +CreateJobTemplate:.google.cloud.video.transcoder.v1.CreateJobTemplateRequest-.google.cloud.video.transcoder.v1.JobTemplate"l���@"0/v1/{parent=projects/*/locations/*}/jobTemplates: job_template�A#parent,job_template,job_template_id� +ListJobTemplates9.google.cloud.video.transcoder.v1.ListJobTemplatesRequest:.google.cloud.video.transcoder.v1.ListJobTemplatesResponse"A���20/v1/{parent=projects/*/locations/*}/jobTemplates�Aparent� +GetJobTemplate7.google.cloud.video.transcoder.v1.GetJobTemplateRequest-.google.cloud.video.transcoder.v1.JobTemplate"?���20/v1/{name=projects/*/locations/*/jobTemplates/*}�Aname� +DeleteJobTemplate:.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest.google.protobuf.Empty"?���2*0/v1/{name=projects/*/locations/*/jobTemplates/*}�AnameM�Atranscoder.googleapis.com�A.https://www.googleapis.com/auth/cloud-platformB� +$com.google.cloud.video.transcoder.v1B ServicesProtoPZDcloud.google.com/go/video/transcoder/apiv1/transcoderpb;transcoderpb� Google.Cloud.Video.Transcoder.V1� Google\\Cloud\\Video\\Transcoder\\V1�$Google::Cloud::Video::Transcoder::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AdBreak.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AdBreak.php new file mode 100644 index 000000000000..9cadeb444fd8 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AdBreak.php @@ -0,0 +1,81 @@ +google.cloud.video.transcoder.v1.AdBreak + */ +class AdBreak extends \Google\Protobuf\Internal\Message +{ + /** + * Start time in seconds for the ad break, relative to the output file + * timeline. The default is `0s`. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; + */ + protected $start_time_offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $start_time_offset + * Start time in seconds for the ad break, relative to the output file + * timeline. The default is `0s`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Start time in seconds for the ad break, relative to the output file + * timeline. The default is `0s`. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getStartTimeOffset() + { + return $this->start_time_offset; + } + + public function hasStartTimeOffset() + { + return isset($this->start_time_offset); + } + + public function clearStartTimeOffset() + { + unset($this->start_time_offset); + } + + /** + * Start time in seconds for the ad break, relative to the output file + * timeline. The default is `0s`. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_time_offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream.php new file mode 100644 index 000000000000..7cf6be6554b6 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream.php @@ -0,0 +1,389 @@ +google.cloud.video.transcoder.v1.AudioStream + */ +class AudioStream extends \Google\Protobuf\Internal\Message +{ + /** + * The codec for this audio stream. The default is `aac`. + * Supported audio codecs: + * - `aac` + * - `aac-he` + * - `aac-he-v2` + * - `mp3` + * - `ac3` + * - `eac3` + * + * Generated from protobuf field string codec = 1; + */ + protected $codec = ''; + /** + * Required. Audio bitrate in bits per second. Must be between 1 and + * 10,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bitrate_bps = 0; + /** + * Number of audio channels. Must be between 1 and 6. The default is 2. + * + * Generated from protobuf field int32 channel_count = 3; + */ + protected $channel_count = 0; + /** + * A list of channel names specifying layout of the audio channels. + * This only affects the metadata embedded in the container headers, if + * supported by the specified format. The default is `["fl", "fr"]`. + * Supported channel names: + * - `fl` - Front left channel + * - `fr` - Front right channel + * - `sl` - Side left channel + * - `sr` - Side right channel + * - `fc` - Front center channel + * - `lfe` - Low frequency + * + * Generated from protobuf field repeated string channel_layout = 4; + */ + private $channel_layout; + /** + * The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AudioStream.AudioMapping mapping = 5; + */ + private $mapping; + /** + * The audio sample rate in Hertz. The default is 48000 Hertz. + * + * Generated from protobuf field int32 sample_rate_hertz = 6; + */ + protected $sample_rate_hertz = 0; + /** + * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more + * information, see + * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not + * supported in MP4 files. + * + * Generated from protobuf field string language_code = 7; + */ + protected $language_code = ''; + /** + * The name for this particular audio stream that + * will be added to the HLS/DASH manifest. Not supported in MP4 files. + * + * Generated from protobuf field string display_name = 8; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $codec + * The codec for this audio stream. The default is `aac`. + * Supported audio codecs: + * - `aac` + * - `aac-he` + * - `aac-he-v2` + * - `mp3` + * - `ac3` + * - `eac3` + * @type int $bitrate_bps + * Required. Audio bitrate in bits per second. Must be between 1 and + * 10,000,000. + * @type int $channel_count + * Number of audio channels. Must be between 1 and 6. The default is 2. + * @type array|\Google\Protobuf\Internal\RepeatedField $channel_layout + * A list of channel names specifying layout of the audio channels. + * This only affects the metadata embedded in the container headers, if + * supported by the specified format. The default is `["fl", "fr"]`. + * Supported channel names: + * - `fl` - Front left channel + * - `fr` - Front right channel + * - `sl` - Side left channel + * - `sr` - Side right channel + * - `fc` - Front center channel + * - `lfe` - Low frequency + * @type array<\Google\Cloud\Video\Transcoder\V1\AudioStream\AudioMapping>|\Google\Protobuf\Internal\RepeatedField $mapping + * The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. + * @type int $sample_rate_hertz + * The audio sample rate in Hertz. The default is 48000 Hertz. + * @type string $language_code + * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more + * information, see + * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not + * supported in MP4 files. + * @type string $display_name + * The name for this particular audio stream that + * will be added to the HLS/DASH manifest. Not supported in MP4 files. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The codec for this audio stream. The default is `aac`. + * Supported audio codecs: + * - `aac` + * - `aac-he` + * - `aac-he-v2` + * - `mp3` + * - `ac3` + * - `eac3` + * + * Generated from protobuf field string codec = 1; + * @return string + */ + public function getCodec() + { + return $this->codec; + } + + /** + * The codec for this audio stream. The default is `aac`. + * Supported audio codecs: + * - `aac` + * - `aac-he` + * - `aac-he-v2` + * - `mp3` + * - `ac3` + * - `eac3` + * + * Generated from protobuf field string codec = 1; + * @param string $var + * @return $this + */ + public function setCodec($var) + { + GPBUtil::checkString($var, True); + $this->codec = $var; + + return $this; + } + + /** + * Required. Audio bitrate in bits per second. Must be between 1 and + * 10,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getBitrateBps() + { + return $this->bitrate_bps; + } + + /** + * Required. Audio bitrate in bits per second. Must be between 1 and + * 10,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setBitrateBps($var) + { + GPBUtil::checkInt32($var); + $this->bitrate_bps = $var; + + return $this; + } + + /** + * Number of audio channels. Must be between 1 and 6. The default is 2. + * + * Generated from protobuf field int32 channel_count = 3; + * @return int + */ + public function getChannelCount() + { + return $this->channel_count; + } + + /** + * Number of audio channels. Must be between 1 and 6. The default is 2. + * + * Generated from protobuf field int32 channel_count = 3; + * @param int $var + * @return $this + */ + public function setChannelCount($var) + { + GPBUtil::checkInt32($var); + $this->channel_count = $var; + + return $this; + } + + /** + * A list of channel names specifying layout of the audio channels. + * This only affects the metadata embedded in the container headers, if + * supported by the specified format. The default is `["fl", "fr"]`. + * Supported channel names: + * - `fl` - Front left channel + * - `fr` - Front right channel + * - `sl` - Side left channel + * - `sr` - Side right channel + * - `fc` - Front center channel + * - `lfe` - Low frequency + * + * Generated from protobuf field repeated string channel_layout = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChannelLayout() + { + return $this->channel_layout; + } + + /** + * A list of channel names specifying layout of the audio channels. + * This only affects the metadata embedded in the container headers, if + * supported by the specified format. The default is `["fl", "fr"]`. + * Supported channel names: + * - `fl` - Front left channel + * - `fr` - Front right channel + * - `sl` - Side left channel + * - `sr` - Side right channel + * - `fc` - Front center channel + * - `lfe` - Low frequency + * + * Generated from protobuf field repeated string channel_layout = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChannelLayout($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->channel_layout = $arr; + + return $this; + } + + /** + * The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AudioStream.AudioMapping mapping = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMapping() + { + return $this->mapping; + } + + /** + * The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AudioStream.AudioMapping mapping = 5; + * @param array<\Google\Cloud\Video\Transcoder\V1\AudioStream\AudioMapping>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMapping($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\AudioStream\AudioMapping::class); + $this->mapping = $arr; + + return $this; + } + + /** + * The audio sample rate in Hertz. The default is 48000 Hertz. + * + * Generated from protobuf field int32 sample_rate_hertz = 6; + * @return int + */ + public function getSampleRateHertz() + { + return $this->sample_rate_hertz; + } + + /** + * The audio sample rate in Hertz. The default is 48000 Hertz. + * + * Generated from protobuf field int32 sample_rate_hertz = 6; + * @param int $var + * @return $this + */ + public function setSampleRateHertz($var) + { + GPBUtil::checkInt32($var); + $this->sample_rate_hertz = $var; + + return $this; + } + + /** + * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more + * information, see + * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not + * supported in MP4 files. + * + * Generated from protobuf field string language_code = 7; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more + * information, see + * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not + * supported in MP4 files. + * + * Generated from protobuf field string language_code = 7; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * The name for this particular audio stream that + * will be added to the HLS/DASH manifest. Not supported in MP4 files. + * + * Generated from protobuf field string display_name = 8; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The name for this particular audio stream that + * will be added to the HLS/DASH manifest. Not supported in MP4 files. + * + * Generated from protobuf field string display_name = 8; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream/AudioMapping.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream/AudioMapping.php new file mode 100644 index 000000000000..ee7b36b6e3d4 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream/AudioMapping.php @@ -0,0 +1,248 @@ +google.cloud.video.transcoder.v1.AudioStream.AudioMapping + */ +class AudioMapping extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `EditAtom.key` that references the atom with audio inputs + * in the `Job.edit_list`. + * + * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $atom_key = ''; + /** + * Required. The `Input.key` that identifies the input file. + * + * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_key = ''; + /** + * Required. The zero-based index of the track in the input file. + * + * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_track = 0; + /** + * Required. The zero-based index of the channel in the input audio stream. + * + * Generated from protobuf field int32 input_channel = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_channel = 0; + /** + * Required. The zero-based index of the channel in the output audio stream. + * + * Generated from protobuf field int32 output_channel = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $output_channel = 0; + /** + * Audio volume control in dB. Negative values decrease volume, + * positive values increase. The default is 0. + * + * Generated from protobuf field double gain_db = 6; + */ + protected $gain_db = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $atom_key + * Required. The `EditAtom.key` that references the atom with audio inputs + * in the `Job.edit_list`. + * @type string $input_key + * Required. The `Input.key` that identifies the input file. + * @type int $input_track + * Required. The zero-based index of the track in the input file. + * @type int $input_channel + * Required. The zero-based index of the channel in the input audio stream. + * @type int $output_channel + * Required. The zero-based index of the channel in the output audio stream. + * @type float $gain_db + * Audio volume control in dB. Negative values decrease volume, + * positive values increase. The default is 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `EditAtom.key` that references the atom with audio inputs + * in the `Job.edit_list`. + * + * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAtomKey() + { + return $this->atom_key; + } + + /** + * Required. The `EditAtom.key` that references the atom with audio inputs + * in the `Job.edit_list`. + * + * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAtomKey($var) + { + GPBUtil::checkString($var, True); + $this->atom_key = $var; + + return $this; + } + + /** + * Required. The `Input.key` that identifies the input file. + * + * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInputKey() + { + return $this->input_key; + } + + /** + * Required. The `Input.key` that identifies the input file. + * + * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInputKey($var) + { + GPBUtil::checkString($var, True); + $this->input_key = $var; + + return $this; + } + + /** + * Required. The zero-based index of the track in the input file. + * + * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getInputTrack() + { + return $this->input_track; + } + + /** + * Required. The zero-based index of the track in the input file. + * + * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setInputTrack($var) + { + GPBUtil::checkInt32($var); + $this->input_track = $var; + + return $this; + } + + /** + * Required. The zero-based index of the channel in the input audio stream. + * + * Generated from protobuf field int32 input_channel = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getInputChannel() + { + return $this->input_channel; + } + + /** + * Required. The zero-based index of the channel in the input audio stream. + * + * Generated from protobuf field int32 input_channel = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setInputChannel($var) + { + GPBUtil::checkInt32($var); + $this->input_channel = $var; + + return $this; + } + + /** + * Required. The zero-based index of the channel in the output audio stream. + * + * Generated from protobuf field int32 output_channel = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getOutputChannel() + { + return $this->output_channel; + } + + /** + * Required. The zero-based index of the channel in the output audio stream. + * + * Generated from protobuf field int32 output_channel = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setOutputChannel($var) + { + GPBUtil::checkInt32($var); + $this->output_channel = $var; + + return $this; + } + + /** + * Audio volume control in dB. Negative values decrease volume, + * positive values increase. The default is 0. + * + * Generated from protobuf field double gain_db = 6; + * @return float + */ + public function getGainDb() + { + return $this->gain_db; + } + + /** + * Audio volume control in dB. Negative values decrease volume, + * positive values increase. The default is 0. + * + * Generated from protobuf field double gain_db = 6; + * @param float $var + * @return $this + */ + public function setGainDb($var) + { + GPBUtil::checkDouble($var); + $this->gain_db = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AudioMapping::class, \Google\Cloud\Video\Transcoder\V1\AudioStream_AudioMapping::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobRequest.php new file mode 100644 index 000000000000..e6d90c39b24b --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobRequest.php @@ -0,0 +1,132 @@ +google.cloud.video.transcoder.v1.CreateJobRequest + */ +class CreateJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location to create and process this job. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Parameters for creating transcoding job. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $job = null; + + /** + * @param string $parent Required. The parent location to create and process this job. + * Format: `projects/{project}/locations/{location}` + * Please see {@see TranscoderServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Video\Transcoder\V1\Job $job Required. Parameters for creating transcoding job. + * + * @return \Google\Cloud\Video\Transcoder\V1\CreateJobRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\Transcoder\V1\Job $job): self + { + return (new self()) + ->setParent($parent) + ->setJob($job); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent location to create and process this job. + * Format: `projects/{project}/locations/{location}` + * @type \Google\Cloud\Video\Transcoder\V1\Job $job + * Required. Parameters for creating transcoding job. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location to create and process this job. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent location to create and process this job. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Parameters for creating transcoding job. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\Transcoder\V1\Job|null + */ + public function getJob() + { + return $this->job; + } + + public function hasJob() + { + return isset($this->job); + } + + public function clearJob() + { + unset($this->job); + } + + /** + * Required. Parameters for creating transcoding job. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\Transcoder\V1\Job $var + * @return $this + */ + public function setJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Job::class); + $this->job = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobTemplateRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobTemplateRequest.php new file mode 100644 index 000000000000..2259a64b8917 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobTemplateRequest.php @@ -0,0 +1,184 @@ +google.cloud.video.transcoder.v1.CreateJobTemplateRequest + */ +class CreateJobTemplateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location to create this job template. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Parameters for creating job template. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.JobTemplate job_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $job_template = null; + /** + * Required. The ID to use for the job template, which will become the final + * component of the job template's resource name. + * This value should be 4-63 characters, and valid characters must match the + * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. + * + * Generated from protobuf field string job_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $job_template_id = ''; + + /** + * @param string $parent Required. The parent location to create this job template. + * Format: `projects/{project}/locations/{location}` + * Please see {@see TranscoderServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Video\Transcoder\V1\JobTemplate $jobTemplate Required. Parameters for creating job template. + * @param string $jobTemplateId Required. The ID to use for the job template, which will become the final + * component of the job template's resource name. + * + * This value should be 4-63 characters, and valid characters must match the + * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. + * + * @return \Google\Cloud\Video\Transcoder\V1\CreateJobTemplateRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\Transcoder\V1\JobTemplate $jobTemplate, string $jobTemplateId): self + { + return (new self()) + ->setParent($parent) + ->setJobTemplate($jobTemplate) + ->setJobTemplateId($jobTemplateId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent location to create this job template. + * Format: `projects/{project}/locations/{location}` + * @type \Google\Cloud\Video\Transcoder\V1\JobTemplate $job_template + * Required. Parameters for creating job template. + * @type string $job_template_id + * Required. The ID to use for the job template, which will become the final + * component of the job template's resource name. + * This value should be 4-63 characters, and valid characters must match the + * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location to create this job template. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent location to create this job template. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Parameters for creating job template. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.JobTemplate job_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\Transcoder\V1\JobTemplate|null + */ + public function getJobTemplate() + { + return $this->job_template; + } + + public function hasJobTemplate() + { + return isset($this->job_template); + } + + public function clearJobTemplate() + { + unset($this->job_template); + } + + /** + * Required. Parameters for creating job template. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.JobTemplate job_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\Transcoder\V1\JobTemplate $var + * @return $this + */ + public function setJobTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\JobTemplate::class); + $this->job_template = $var; + + return $this; + } + + /** + * Required. The ID to use for the job template, which will become the final + * component of the job template's resource name. + * This value should be 4-63 characters, and valid characters must match the + * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. + * + * Generated from protobuf field string job_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getJobTemplateId() + { + return $this->job_template_id; + } + + /** + * Required. The ID to use for the job template, which will become the final + * component of the job template's resource name. + * This value should be 4-63 characters, and valid characters must match the + * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. + * + * Generated from protobuf field string job_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setJobTemplateId($var) + { + GPBUtil::checkString($var, True); + $this->job_template_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobRequest.php new file mode 100644 index 000000000000..56bf79ae59c4 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobRequest.php @@ -0,0 +1,124 @@ +google.cloud.video.transcoder.v1.DeleteJobRequest + */ +class DeleteJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the job to delete. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If set to true, and the job is not found, the request will succeed but no + * action will be taken on the server. + * + * Generated from protobuf field bool allow_missing = 2; + */ + protected $allow_missing = false; + + /** + * @param string $name Required. The name of the job to delete. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * Please see {@see TranscoderServiceClient::jobName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Transcoder\V1\DeleteJobRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the job to delete. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * @type bool $allow_missing + * If set to true, and the job is not found, the request will succeed but no + * action will be taken on the server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the job to delete. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the job to delete. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * If set to true, and the job is not found, the request will succeed but no + * action will be taken on the server. + * + * Generated from protobuf field bool allow_missing = 2; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * If set to true, and the job is not found, the request will succeed but no + * action will be taken on the server. + * + * Generated from protobuf field bool allow_missing = 2; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobTemplateRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobTemplateRequest.php new file mode 100644 index 000000000000..a7db529776b4 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobTemplateRequest.php @@ -0,0 +1,124 @@ +google.cloud.video.transcoder.v1.DeleteJobTemplateRequest + */ +class DeleteJobTemplateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the job template to delete. + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If set to true, and the job template is not found, the request will succeed + * but no action will be taken on the server. + * + * Generated from protobuf field bool allow_missing = 2; + */ + protected $allow_missing = false; + + /** + * @param string $name Required. The name of the job template to delete. + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * Please see {@see TranscoderServiceClient::jobTemplateName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Transcoder\V1\DeleteJobTemplateRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the job template to delete. + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * @type bool $allow_missing + * If set to true, and the job template is not found, the request will succeed + * but no action will be taken on the server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the job template to delete. + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the job template to delete. + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * If set to true, and the job template is not found, the request will succeed + * but no action will be taken on the server. + * + * Generated from protobuf field bool allow_missing = 2; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * If set to true, and the job template is not found, the request will succeed + * but no action will be taken on the server. + * + * Generated from protobuf field bool allow_missing = 2; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/EditAtom.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/EditAtom.php new file mode 100644 index 000000000000..42921c0de759 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/EditAtom.php @@ -0,0 +1,209 @@ +google.cloud.video.transcoder.v1.EditAtom + */ +class EditAtom extends \Google\Protobuf\Internal\Message +{ + /** + * A unique key for this atom. Must be specified when using advanced + * mapping. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * List of `Input.key`s identifying files that should be used in this atom. + * The listed `inputs` must have the same timeline. + * + * Generated from protobuf field repeated string inputs = 2; + */ + private $inputs; + /** + * End time in seconds for the atom, relative to the input file timeline. + * When `end_time_offset` is not specified, the `inputs` are used until + * the end of the atom. + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; + */ + protected $end_time_offset = null; + /** + * Start time in seconds for the atom, relative to the input file timeline. + * The default is `0s`. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; + */ + protected $start_time_offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * A unique key for this atom. Must be specified when using advanced + * mapping. + * @type array|\Google\Protobuf\Internal\RepeatedField $inputs + * List of `Input.key`s identifying files that should be used in this atom. + * The listed `inputs` must have the same timeline. + * @type \Google\Protobuf\Duration $end_time_offset + * End time in seconds for the atom, relative to the input file timeline. + * When `end_time_offset` is not specified, the `inputs` are used until + * the end of the atom. + * @type \Google\Protobuf\Duration $start_time_offset + * Start time in seconds for the atom, relative to the input file timeline. + * The default is `0s`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * A unique key for this atom. Must be specified when using advanced + * mapping. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * A unique key for this atom. Must be specified when using advanced + * mapping. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * List of `Input.key`s identifying files that should be used in this atom. + * The listed `inputs` must have the same timeline. + * + * Generated from protobuf field repeated string inputs = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInputs() + { + return $this->inputs; + } + + /** + * List of `Input.key`s identifying files that should be used in this atom. + * The listed `inputs` must have the same timeline. + * + * Generated from protobuf field repeated string inputs = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInputs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->inputs = $arr; + + return $this; + } + + /** + * End time in seconds for the atom, relative to the input file timeline. + * When `end_time_offset` is not specified, the `inputs` are used until + * the end of the atom. + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getEndTimeOffset() + { + return $this->end_time_offset; + } + + public function hasEndTimeOffset() + { + return isset($this->end_time_offset); + } + + public function clearEndTimeOffset() + { + unset($this->end_time_offset); + } + + /** + * End time in seconds for the atom, relative to the input file timeline. + * When `end_time_offset` is not specified, the `inputs` are used until + * the end of the atom. + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setEndTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->end_time_offset = $var; + + return $this; + } + + /** + * Start time in seconds for the atom, relative to the input file timeline. + * The default is `0s`. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getStartTimeOffset() + { + return $this->start_time_offset; + } + + public function hasStartTimeOffset() + { + return isset($this->start_time_offset); + } + + public function clearStartTimeOffset() + { + unset($this->start_time_offset); + } + + /** + * Start time in seconds for the atom, relative to the input file timeline. + * The default is `0s`. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_time_offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ElementaryStream.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ElementaryStream.php new file mode 100644 index 000000000000..6660485d8e24 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ElementaryStream.php @@ -0,0 +1,177 @@ +google.cloud.video.transcoder.v1.ElementaryStream + */ +class ElementaryStream extends \Google\Protobuf\Internal\Message +{ + /** + * A unique key for this elementary stream. + * + * Generated from protobuf field string key = 4; + */ + protected $key = ''; + protected $elementary_stream; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * A unique key for this elementary stream. + * @type \Google\Cloud\Video\Transcoder\V1\VideoStream $video_stream + * Encoding of a video stream. + * @type \Google\Cloud\Video\Transcoder\V1\AudioStream $audio_stream + * Encoding of an audio stream. + * @type \Google\Cloud\Video\Transcoder\V1\TextStream $text_stream + * Encoding of a text stream. For example, closed captions or subtitles. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * A unique key for this elementary stream. + * + * Generated from protobuf field string key = 4; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * A unique key for this elementary stream. + * + * Generated from protobuf field string key = 4; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * Encoding of a video stream. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream video_stream = 1; + * @return \Google\Cloud\Video\Transcoder\V1\VideoStream|null + */ + public function getVideoStream() + { + return $this->readOneof(1); + } + + public function hasVideoStream() + { + return $this->hasOneof(1); + } + + /** + * Encoding of a video stream. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream video_stream = 1; + * @param \Google\Cloud\Video\Transcoder\V1\VideoStream $var + * @return $this + */ + public function setVideoStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\VideoStream::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Encoding of an audio stream. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.AudioStream audio_stream = 2; + * @return \Google\Cloud\Video\Transcoder\V1\AudioStream|null + */ + public function getAudioStream() + { + return $this->readOneof(2); + } + + public function hasAudioStream() + { + return $this->hasOneof(2); + } + + /** + * Encoding of an audio stream. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.AudioStream audio_stream = 2; + * @param \Google\Cloud\Video\Transcoder\V1\AudioStream $var + * @return $this + */ + public function setAudioStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\AudioStream::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Encoding of a text stream. For example, closed captions or subtitles. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.TextStream text_stream = 3; + * @return \Google\Cloud\Video\Transcoder\V1\TextStream|null + */ + public function getTextStream() + { + return $this->readOneof(3); + } + + public function hasTextStream() + { + return $this->hasOneof(3); + } + + /** + * Encoding of a text stream. For example, closed captions or subtitles. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.TextStream text_stream = 3; + * @param \Google\Cloud\Video\Transcoder\V1\TextStream $var + * @return $this + */ + public function setTextStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\TextStream::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getElementaryStream() + { + return $this->whichOneof("elementary_stream"); + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobRequest.php new file mode 100644 index 000000000000..d84bf513d425 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.transcoder.v1.GetJobRequest + */ +class GetJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the job to retrieve. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the job to retrieve. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * Please see {@see TranscoderServiceClient::jobName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Transcoder\V1\GetJobRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the job to retrieve. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the job to retrieve. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the job to retrieve. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobTemplateRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobTemplateRequest.php new file mode 100644 index 000000000000..e9a034eaf217 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobTemplateRequest.php @@ -0,0 +1,91 @@ +google.cloud.video.transcoder.v1.GetJobTemplateRequest + */ +class GetJobTemplateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the job template to retrieve. + * Format: + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the job template to retrieve. + * Format: + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * Please see {@see TranscoderServiceClient::jobTemplateName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Transcoder\V1\GetJobTemplateRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the job template to retrieve. + * Format: + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the job template to retrieve. + * Format: + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the job template to retrieve. + * Format: + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Input.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Input.php new file mode 100644 index 000000000000..3c19c7ccc6a5 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Input.php @@ -0,0 +1,165 @@ +google.cloud.video.transcoder.v1.Input + */ +class Input extends \Google\Protobuf\Internal\Message +{ + /** + * A unique key for this input. Must be specified when using advanced + * mapping and edit lists. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * URI of the media. Input files must be at least 5 seconds in duration and + * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + * If empty, the value is populated from `Job.input_uri`. See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * Preprocessing configurations. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig preprocessing_config = 3; + */ + protected $preprocessing_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * A unique key for this input. Must be specified when using advanced + * mapping and edit lists. + * @type string $uri + * URI of the media. Input files must be at least 5 seconds in duration and + * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + * If empty, the value is populated from `Job.input_uri`. See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig $preprocessing_config + * Preprocessing configurations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * A unique key for this input. Must be specified when using advanced + * mapping and edit lists. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * A unique key for this input. Must be specified when using advanced + * mapping and edit lists. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * URI of the media. Input files must be at least 5 seconds in duration and + * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + * If empty, the value is populated from `Job.input_uri`. See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI of the media. Input files must be at least 5 seconds in duration and + * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + * If empty, the value is populated from `Job.input_uri`. See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Preprocessing configurations. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig preprocessing_config = 3; + * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig|null + */ + public function getPreprocessingConfig() + { + return $this->preprocessing_config; + } + + public function hasPreprocessingConfig() + { + return isset($this->preprocessing_config); + } + + public function clearPreprocessingConfig() + { + unset($this->preprocessing_config); + } + + /** + * Preprocessing configurations. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig preprocessing_config = 3; + * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig $var + * @return $this + */ + public function setPreprocessingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig::class); + $this->preprocessing_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job.php new file mode 100644 index 000000000000..3b4f22494e94 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job.php @@ -0,0 +1,588 @@ +google.cloud.video.transcoder.v1.Job + */ +class Job extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the job. + * Format: `projects/{project_number}/locations/{location}/jobs/{job}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Input only. Specify the `input_uri` to populate empty `uri` fields in each + * element of `Job.config.inputs` or `JobTemplate.config.inputs` when using + * template. URI of the media. Input files must be at least 5 seconds in + * duration and stored in Cloud Storage (for example, + * `gs://bucket/inputs/file.mp4`). See [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * Generated from protobuf field string input_uri = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $input_uri = ''; + /** + * Input only. Specify the `output_uri` to populate an empty + * `Job.config.output.uri` or `JobTemplate.config.output.uri` when using + * template. URI for the output file(s). For example, + * `gs://my-bucket/outputs/`. See [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * Generated from protobuf field string output_uri = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $output_uri = ''; + /** + * Output only. The current state of the job. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The time the job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the transcoding started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. The time the transcoding finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Job time to live value in days, which will be effective after job + * completion. Job should be deleted automatically after the given TTL. Enter + * a value between 1 and 90. The default is 30. + * + * Generated from protobuf field int32 ttl_after_completion_days = 15; + */ + protected $ttl_after_completion_days = 0; + /** + * The labels associated with this job. You can use these to organize and + * group your jobs. + * + * Generated from protobuf field map labels = 16; + */ + private $labels; + /** + * Output only. An error object that describes the reason for the failure. + * This property is always present when `state` is `FAILED`. + * + * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * The processing mode of the job. + * The default is `PROCESSING_MODE_INTERACTIVE`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingMode mode = 20; + */ + protected $mode = 0; + protected $job_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the job. + * Format: `projects/{project_number}/locations/{location}/jobs/{job}` + * @type string $input_uri + * Input only. Specify the `input_uri` to populate empty `uri` fields in each + * element of `Job.config.inputs` or `JobTemplate.config.inputs` when using + * template. URI of the media. Input files must be at least 5 seconds in + * duration and stored in Cloud Storage (for example, + * `gs://bucket/inputs/file.mp4`). See [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * @type string $output_uri + * Input only. Specify the `output_uri` to populate an empty + * `Job.config.output.uri` or `JobTemplate.config.output.uri` when using + * template. URI for the output file(s). For example, + * `gs://my-bucket/outputs/`. See [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * @type string $template_id + * Input only. Specify the `template_id` to use for populating `Job.config`. + * The default is `preset/web-hd`, which is the only supported preset. + * User defined JobTemplate: `{job_template_id}` + * @type \Google\Cloud\Video\Transcoder\V1\JobConfig $config + * The configuration for this job. + * @type int $state + * Output only. The current state of the job. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the job was created. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. The time the transcoding started. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the transcoding finished. + * @type int $ttl_after_completion_days + * Job time to live value in days, which will be effective after job + * completion. Job should be deleted automatically after the given TTL. Enter + * a value between 1 and 90. The default is 30. + * @type array|\Google\Protobuf\Internal\MapField $labels + * The labels associated with this job. You can use these to organize and + * group your jobs. + * @type \Google\Rpc\Status $error + * Output only. An error object that describes the reason for the failure. + * This property is always present when `state` is `FAILED`. + * @type int $mode + * The processing mode of the job. + * The default is `PROCESSING_MODE_INTERACTIVE`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the job. + * Format: `projects/{project_number}/locations/{location}/jobs/{job}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the job. + * Format: `projects/{project_number}/locations/{location}/jobs/{job}` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Input only. Specify the `input_uri` to populate empty `uri` fields in each + * element of `Job.config.inputs` or `JobTemplate.config.inputs` when using + * template. URI of the media. Input files must be at least 5 seconds in + * duration and stored in Cloud Storage (for example, + * `gs://bucket/inputs/file.mp4`). See [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * Generated from protobuf field string input_uri = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getInputUri() + { + return $this->input_uri; + } + + /** + * Input only. Specify the `input_uri` to populate empty `uri` fields in each + * element of `Job.config.inputs` or `JobTemplate.config.inputs` when using + * template. URI of the media. Input files must be at least 5 seconds in + * duration and stored in Cloud Storage (for example, + * `gs://bucket/inputs/file.mp4`). See [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * Generated from protobuf field string input_uri = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setInputUri($var) + { + GPBUtil::checkString($var, True); + $this->input_uri = $var; + + return $this; + } + + /** + * Input only. Specify the `output_uri` to populate an empty + * `Job.config.output.uri` or `JobTemplate.config.output.uri` when using + * template. URI for the output file(s). For example, + * `gs://my-bucket/outputs/`. See [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * Generated from protobuf field string output_uri = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getOutputUri() + { + return $this->output_uri; + } + + /** + * Input only. Specify the `output_uri` to populate an empty + * `Job.config.output.uri` or `JobTemplate.config.output.uri` when using + * template. URI for the output file(s). For example, + * `gs://my-bucket/outputs/`. See [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * Generated from protobuf field string output_uri = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOutputUri($var) + { + GPBUtil::checkString($var, True); + $this->output_uri = $var; + + return $this; + } + + /** + * Input only. Specify the `template_id` to use for populating `Job.config`. + * The default is `preset/web-hd`, which is the only supported preset. + * User defined JobTemplate: `{job_template_id}` + * + * Generated from protobuf field string template_id = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getTemplateId() + { + return $this->readOneof(4); + } + + public function hasTemplateId() + { + return $this->hasOneof(4); + } + + /** + * Input only. Specify the `template_id` to use for populating `Job.config`. + * The default is `preset/web-hd`, which is the only supported preset. + * User defined JobTemplate: `{job_template_id}` + * + * Generated from protobuf field string template_id = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTemplateId($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * The configuration for this job. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.JobConfig config = 5; + * @return \Google\Cloud\Video\Transcoder\V1\JobConfig|null + */ + public function getConfig() + { + return $this->readOneof(5); + } + + public function hasConfig() + { + return $this->hasOneof(5); + } + + /** + * The configuration for this job. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.JobConfig config = 5; + * @param \Google\Cloud\Video\Transcoder\V1\JobConfig $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\JobConfig::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Output only. The current state of the job. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the job. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Transcoder\V1\Job\ProcessingState::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time the job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the transcoding started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. The time the transcoding started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. The time the transcoding finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the transcoding finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Job time to live value in days, which will be effective after job + * completion. Job should be deleted automatically after the given TTL. Enter + * a value between 1 and 90. The default is 30. + * + * Generated from protobuf field int32 ttl_after_completion_days = 15; + * @return int + */ + public function getTtlAfterCompletionDays() + { + return $this->ttl_after_completion_days; + } + + /** + * Job time to live value in days, which will be effective after job + * completion. Job should be deleted automatically after the given TTL. Enter + * a value between 1 and 90. The default is 30. + * + * Generated from protobuf field int32 ttl_after_completion_days = 15; + * @param int $var + * @return $this + */ + public function setTtlAfterCompletionDays($var) + { + GPBUtil::checkInt32($var); + $this->ttl_after_completion_days = $var; + + return $this; + } + + /** + * The labels associated with this job. You can use these to organize and + * group your jobs. + * + * Generated from protobuf field map labels = 16; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * The labels associated with this job. You can use these to organize and + * group your jobs. + * + * Generated from protobuf field map labels = 16; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. An error object that describes the reason for the failure. + * This property is always present when `state` is `FAILED`. + * + * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. An error object that describes the reason for the failure. + * This property is always present when `state` is `FAILED`. + * + * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * The processing mode of the job. + * The default is `PROCESSING_MODE_INTERACTIVE`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingMode mode = 20; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * The processing mode of the job. + * The default is `PROCESSING_MODE_INTERACTIVE`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingMode mode = 20; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Transcoder\V1\Job\ProcessingMode::class); + $this->mode = $var; + + return $this; + } + + /** + * @return string + */ + public function getJobConfig() + { + return $this->whichOneof("job_config"); + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingMode.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingMode.php new file mode 100644 index 000000000000..4ada220e2b33 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingMode.php @@ -0,0 +1,67 @@ +google.cloud.video.transcoder.v1.Job.ProcessingMode + */ +class ProcessingMode +{ + /** + * The job processing mode is not specified. + * + * Generated from protobuf enum PROCESSING_MODE_UNSPECIFIED = 0; + */ + const PROCESSING_MODE_UNSPECIFIED = 0; + /** + * The job processing mode is interactive mode. + * Interactive job will either be ran or rejected if quota does not allow + * for it. + * + * Generated from protobuf enum PROCESSING_MODE_INTERACTIVE = 1; + */ + const PROCESSING_MODE_INTERACTIVE = 1; + /** + * The job processing mode is batch mode. + * Batch mode allows queuing of jobs. + * + * Generated from protobuf enum PROCESSING_MODE_BATCH = 2; + */ + const PROCESSING_MODE_BATCH = 2; + + private static $valueToName = [ + self::PROCESSING_MODE_UNSPECIFIED => 'PROCESSING_MODE_UNSPECIFIED', + self::PROCESSING_MODE_INTERACTIVE => 'PROCESSING_MODE_INTERACTIVE', + self::PROCESSING_MODE_BATCH => 'PROCESSING_MODE_BATCH', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ProcessingMode::class, \Google\Cloud\Video\Transcoder\V1\Job_ProcessingMode::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingState.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingState.php new file mode 100644 index 000000000000..28e9b85c5afc --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingState.php @@ -0,0 +1,79 @@ +google.cloud.video.transcoder.v1.Job.ProcessingState + */ +class ProcessingState +{ + /** + * The processing state is not specified. + * + * Generated from protobuf enum PROCESSING_STATE_UNSPECIFIED = 0; + */ + const PROCESSING_STATE_UNSPECIFIED = 0; + /** + * The job is enqueued and will be picked up for processing soon. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The job is being processed. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The job has been completed successfully. + * + * Generated from protobuf enum SUCCEEDED = 3; + */ + const SUCCEEDED = 3; + /** + * The job has failed. For additional information, see `failure_reason` and + * `failure_details` + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + + private static $valueToName = [ + self::PROCESSING_STATE_UNSPECIFIED => 'PROCESSING_STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::RUNNING => 'RUNNING', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ProcessingState::class, \Google\Cloud\Video\Transcoder\V1\Job_ProcessingState::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobConfig.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobConfig.php new file mode 100644 index 000000000000..2f471a68adc0 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobConfig.php @@ -0,0 +1,405 @@ +google.cloud.video.transcoder.v1.JobConfig + */ +class JobConfig extends \Google\Protobuf\Internal\Message +{ + /** + * List of input assets stored in Cloud Storage. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Input inputs = 1; + */ + private $inputs; + /** + * List of `Edit atom`s. Defines the ultimate timeline of the resulting + * file or manifest. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.EditAtom edit_list = 2; + */ + private $edit_list; + /** + * List of elementary streams. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.ElementaryStream elementary_streams = 3; + */ + private $elementary_streams; + /** + * List of multiplexing settings for output streams. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.MuxStream mux_streams = 4; + */ + private $mux_streams; + /** + * List of output manifests. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Manifest manifests = 5; + */ + private $manifests; + /** + * Output configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Output output = 6; + */ + protected $output = null; + /** + * List of ad breaks. Specifies where to insert ad break tags in the output + * manifests. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AdBreak ad_breaks = 7; + */ + private $ad_breaks; + /** + * Destination on Pub/Sub. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PubsubDestination pubsub_destination = 8; + */ + protected $pubsub_destination = null; + /** + * List of output sprite sheets. + * Spritesheets require at least one VideoStream in the Jobconfig. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; + */ + private $sprite_sheets; + /** + * List of overlays on the output video, in descending Z-order. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay overlays = 10; + */ + private $overlays; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Video\Transcoder\V1\Input>|\Google\Protobuf\Internal\RepeatedField $inputs + * List of input assets stored in Cloud Storage. + * @type array<\Google\Cloud\Video\Transcoder\V1\EditAtom>|\Google\Protobuf\Internal\RepeatedField $edit_list + * List of `Edit atom`s. Defines the ultimate timeline of the resulting + * file or manifest. + * @type array<\Google\Cloud\Video\Transcoder\V1\ElementaryStream>|\Google\Protobuf\Internal\RepeatedField $elementary_streams + * List of elementary streams. + * @type array<\Google\Cloud\Video\Transcoder\V1\MuxStream>|\Google\Protobuf\Internal\RepeatedField $mux_streams + * List of multiplexing settings for output streams. + * @type array<\Google\Cloud\Video\Transcoder\V1\Manifest>|\Google\Protobuf\Internal\RepeatedField $manifests + * List of output manifests. + * @type \Google\Cloud\Video\Transcoder\V1\Output $output + * Output configuration. + * @type array<\Google\Cloud\Video\Transcoder\V1\AdBreak>|\Google\Protobuf\Internal\RepeatedField $ad_breaks + * List of ad breaks. Specifies where to insert ad break tags in the output + * manifests. + * @type \Google\Cloud\Video\Transcoder\V1\PubsubDestination $pubsub_destination + * Destination on Pub/Sub. + * @type array<\Google\Cloud\Video\Transcoder\V1\SpriteSheet>|\Google\Protobuf\Internal\RepeatedField $sprite_sheets + * List of output sprite sheets. + * Spritesheets require at least one VideoStream in the Jobconfig. + * @type array<\Google\Cloud\Video\Transcoder\V1\Overlay>|\Google\Protobuf\Internal\RepeatedField $overlays + * List of overlays on the output video, in descending Z-order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * List of input assets stored in Cloud Storage. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Input inputs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInputs() + { + return $this->inputs; + } + + /** + * List of input assets stored in Cloud Storage. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Input inputs = 1; + * @param array<\Google\Cloud\Video\Transcoder\V1\Input>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInputs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\Input::class); + $this->inputs = $arr; + + return $this; + } + + /** + * List of `Edit atom`s. Defines the ultimate timeline of the resulting + * file or manifest. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.EditAtom edit_list = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEditList() + { + return $this->edit_list; + } + + /** + * List of `Edit atom`s. Defines the ultimate timeline of the resulting + * file or manifest. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.EditAtom edit_list = 2; + * @param array<\Google\Cloud\Video\Transcoder\V1\EditAtom>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEditList($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\EditAtom::class); + $this->edit_list = $arr; + + return $this; + } + + /** + * List of elementary streams. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.ElementaryStream elementary_streams = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getElementaryStreams() + { + return $this->elementary_streams; + } + + /** + * List of elementary streams. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.ElementaryStream elementary_streams = 3; + * @param array<\Google\Cloud\Video\Transcoder\V1\ElementaryStream>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setElementaryStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\ElementaryStream::class); + $this->elementary_streams = $arr; + + return $this; + } + + /** + * List of multiplexing settings for output streams. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.MuxStream mux_streams = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMuxStreams() + { + return $this->mux_streams; + } + + /** + * List of multiplexing settings for output streams. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.MuxStream mux_streams = 4; + * @param array<\Google\Cloud\Video\Transcoder\V1\MuxStream>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMuxStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\MuxStream::class); + $this->mux_streams = $arr; + + return $this; + } + + /** + * List of output manifests. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Manifest manifests = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getManifests() + { + return $this->manifests; + } + + /** + * List of output manifests. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Manifest manifests = 5; + * @param array<\Google\Cloud\Video\Transcoder\V1\Manifest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setManifests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\Manifest::class); + $this->manifests = $arr; + + return $this; + } + + /** + * Output configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Output output = 6; + * @return \Google\Cloud\Video\Transcoder\V1\Output|null + */ + public function getOutput() + { + return $this->output; + } + + public function hasOutput() + { + return isset($this->output); + } + + public function clearOutput() + { + unset($this->output); + } + + /** + * Output configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Output output = 6; + * @param \Google\Cloud\Video\Transcoder\V1\Output $var + * @return $this + */ + public function setOutput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Output::class); + $this->output = $var; + + return $this; + } + + /** + * List of ad breaks. Specifies where to insert ad break tags in the output + * manifests. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AdBreak ad_breaks = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdBreaks() + { + return $this->ad_breaks; + } + + /** + * List of ad breaks. Specifies where to insert ad break tags in the output + * manifests. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AdBreak ad_breaks = 7; + * @param array<\Google\Cloud\Video\Transcoder\V1\AdBreak>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdBreaks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\AdBreak::class); + $this->ad_breaks = $arr; + + return $this; + } + + /** + * Destination on Pub/Sub. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PubsubDestination pubsub_destination = 8; + * @return \Google\Cloud\Video\Transcoder\V1\PubsubDestination|null + */ + public function getPubsubDestination() + { + return $this->pubsub_destination; + } + + public function hasPubsubDestination() + { + return isset($this->pubsub_destination); + } + + public function clearPubsubDestination() + { + unset($this->pubsub_destination); + } + + /** + * Destination on Pub/Sub. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PubsubDestination pubsub_destination = 8; + * @param \Google\Cloud\Video\Transcoder\V1\PubsubDestination $var + * @return $this + */ + public function setPubsubDestination($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PubsubDestination::class); + $this->pubsub_destination = $var; + + return $this; + } + + /** + * List of output sprite sheets. + * Spritesheets require at least one VideoStream in the Jobconfig. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSpriteSheets() + { + return $this->sprite_sheets; + } + + /** + * List of output sprite sheets. + * Spritesheets require at least one VideoStream in the Jobconfig. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; + * @param array<\Google\Cloud\Video\Transcoder\V1\SpriteSheet>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpriteSheets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\SpriteSheet::class); + $this->sprite_sheets = $arr; + + return $this; + } + + /** + * List of overlays on the output video, in descending Z-order. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay overlays = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOverlays() + { + return $this->overlays; + } + + /** + * List of overlays on the output video, in descending Z-order. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay overlays = 10; + * @param array<\Google\Cloud\Video\Transcoder\V1\Overlay>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOverlays($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\Overlay::class); + $this->overlays = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobTemplate.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobTemplate.php new file mode 100644 index 000000000000..1cf56319089e --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobTemplate.php @@ -0,0 +1,157 @@ +google.cloud.video.transcoder.v1.JobTemplate + */ +class JobTemplate extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the job template. + * Format: + * `projects/{project_number}/locations/{location}/jobTemplates/{job_template}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The configuration for this template. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.JobConfig config = 2; + */ + protected $config = null; + /** + * The labels associated with this job template. You can use these to organize + * and group your job templates. + * + * Generated from protobuf field map labels = 3; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the job template. + * Format: + * `projects/{project_number}/locations/{location}/jobTemplates/{job_template}` + * @type \Google\Cloud\Video\Transcoder\V1\JobConfig $config + * The configuration for this template. + * @type array|\Google\Protobuf\Internal\MapField $labels + * The labels associated with this job template. You can use these to organize + * and group your job templates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the job template. + * Format: + * `projects/{project_number}/locations/{location}/jobTemplates/{job_template}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the job template. + * Format: + * `projects/{project_number}/locations/{location}/jobTemplates/{job_template}` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The configuration for this template. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.JobConfig config = 2; + * @return \Google\Cloud\Video\Transcoder\V1\JobConfig|null + */ + public function getConfig() + { + return $this->config; + } + + public function hasConfig() + { + return isset($this->config); + } + + public function clearConfig() + { + unset($this->config); + } + + /** + * The configuration for this template. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.JobConfig config = 2; + * @param \Google\Cloud\Video\Transcoder\V1\JobConfig $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\JobConfig::class); + $this->config = $var; + + return $this; + } + + /** + * The labels associated with this job template. You can use these to organize + * and group your job templates. + * + * Generated from protobuf field map labels = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * The labels associated with this job template. You can use these to organize + * and group your job templates. + * + * Generated from protobuf field map labels = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesRequest.php new file mode 100644 index 000000000000..9a3f102490be --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesRequest.php @@ -0,0 +1,234 @@ +google.cloud.video.transcoder.v1.ListJobTemplatesRequest + */ +class ListJobTemplatesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location from which to retrieve the collection of job + * templates. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The `next_page_token` value returned from a previous List request, if + * any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent location from which to retrieve the collection of job + * templates. Format: `projects/{project}/locations/{location}` + * Please see {@see TranscoderServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Transcoder\V1\ListJobTemplatesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent location from which to retrieve the collection of job + * templates. Format: `projects/{project}/locations/{location}` + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The `next_page_token` value returned from a previous List request, if + * any. + * @type string $filter + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * @type string $order_by + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location from which to retrieve the collection of job + * templates. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent location from which to retrieve the collection of job + * templates. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The `next_page_token` value returned from a previous List request, if + * any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The `next_page_token` value returned from a previous List request, if + * any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesResponse.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesResponse.php new file mode 100644 index 000000000000..3162f2362bd5 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesResponse.php @@ -0,0 +1,135 @@ +google.cloud.video.transcoder.v1.ListJobTemplatesResponse + */ +class ListJobTemplatesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of job templates in the specified region. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.JobTemplate job_templates = 1; + */ + private $job_templates; + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * List of regions that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Video\Transcoder\V1\JobTemplate>|\Google\Protobuf\Internal\RepeatedField $job_templates + * List of job templates in the specified region. + * @type string $next_page_token + * The pagination token. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * List of regions that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); + parent::__construct($data); + } + + /** + * List of job templates in the specified region. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.JobTemplate job_templates = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJobTemplates() + { + return $this->job_templates; + } + + /** + * List of job templates in the specified region. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.JobTemplate job_templates = 1; + * @param array<\Google\Cloud\Video\Transcoder\V1\JobTemplate>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJobTemplates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\JobTemplate::class); + $this->job_templates = $arr; + + return $this; + } + + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * List of regions that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * List of regions that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsRequest.php new file mode 100644 index 000000000000..62bf0d1d56a7 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsRequest.php @@ -0,0 +1,230 @@ +google.cloud.video.transcoder.v1.ListJobsRequest + */ +class ListJobsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The `next_page_token` value returned from a previous List request, if + * any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Format: `projects/{project}/locations/{location}` + * Please see {@see TranscoderServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Transcoder\V1\ListJobsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: `projects/{project}/locations/{location}` + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The `next_page_token` value returned from a previous List request, if + * any. + * @type string $filter + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * @type string $order_by + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The `next_page_token` value returned from a previous List request, if + * any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The `next_page_token` value returned from a previous List request, if + * any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsResponse.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsResponse.php new file mode 100644 index 000000000000..0049a9825e28 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsResponse.php @@ -0,0 +1,135 @@ +google.cloud.video.transcoder.v1.ListJobsResponse + */ +class ListJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of jobs in the specified region. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Job jobs = 1; + */ + private $jobs; + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * List of regions that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Video\Transcoder\V1\Job>|\Google\Protobuf\Internal\RepeatedField $jobs + * List of jobs in the specified region. + * @type string $next_page_token + * The pagination token. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * List of regions that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); + parent::__construct($data); + } + + /** + * List of jobs in the specified region. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Job jobs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJobs() + { + return $this->jobs; + } + + /** + * List of jobs in the specified region. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Job jobs = 1; + * @param array<\Google\Cloud\Video\Transcoder\V1\Job>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\Job::class); + $this->jobs = $arr; + + return $this; + } + + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * List of regions that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * List of regions that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest.php new file mode 100644 index 000000000000..d33527a0efff --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest.php @@ -0,0 +1,155 @@ +google.cloud.video.transcoder.v1.Manifest + */ +class Manifest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the generated file. The default is `manifest` with the + * extension suffix corresponding to the `Manifest.type`. + * + * Generated from protobuf field string file_name = 1; + */ + protected $file_name = ''; + /** + * Required. Type of the manifest, can be `HLS` or `DASH`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Required. List of user given `MuxStream.key`s that should appear in this + * manifest. + * When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` + * and `.m3u8` extension is generated for each element of the + * `Manifest.mux_streams`. + * + * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $mux_streams; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $file_name + * The name of the generated file. The default is `manifest` with the + * extension suffix corresponding to the `Manifest.type`. + * @type int $type + * Required. Type of the manifest, can be `HLS` or `DASH`. + * @type array|\Google\Protobuf\Internal\RepeatedField $mux_streams + * Required. List of user given `MuxStream.key`s that should appear in this + * manifest. + * When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` + * and `.m3u8` extension is generated for each element of the + * `Manifest.mux_streams`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The name of the generated file. The default is `manifest` with the + * extension suffix corresponding to the `Manifest.type`. + * + * Generated from protobuf field string file_name = 1; + * @return string + */ + public function getFileName() + { + return $this->file_name; + } + + /** + * The name of the generated file. The default is `manifest` with the + * extension suffix corresponding to the `Manifest.type`. + * + * Generated from protobuf field string file_name = 1; + * @param string $var + * @return $this + */ + public function setFileName($var) + { + GPBUtil::checkString($var, True); + $this->file_name = $var; + + return $this; + } + + /** + * Required. Type of the manifest, can be `HLS` or `DASH`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. Type of the manifest, can be `HLS` or `DASH`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Transcoder\V1\Manifest\ManifestType::class); + $this->type = $var; + + return $this; + } + + /** + * Required. List of user given `MuxStream.key`s that should appear in this + * manifest. + * When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` + * and `.m3u8` extension is generated for each element of the + * `Manifest.mux_streams`. + * + * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMuxStreams() + { + return $this->mux_streams; + } + + /** + * Required. List of user given `MuxStream.key`s that should appear in this + * manifest. + * When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` + * and `.m3u8` extension is generated for each element of the + * `Manifest.mux_streams`. + * + * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMuxStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->mux_streams = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/ManifestType.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/ManifestType.php new file mode 100644 index 000000000000..a779accd4401 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/ManifestType.php @@ -0,0 +1,64 @@ +google.cloud.video.transcoder.v1.Manifest.ManifestType + */ +class ManifestType +{ + /** + * The manifest type is not specified. + * + * Generated from protobuf enum MANIFEST_TYPE_UNSPECIFIED = 0; + */ + const MANIFEST_TYPE_UNSPECIFIED = 0; + /** + * Create `HLS` manifest. The corresponding file extension is `.m3u8`. + * + * Generated from protobuf enum HLS = 1; + */ + const HLS = 1; + /** + * Create `DASH` manifest. The corresponding file extension is `.mpd`. + * + * Generated from protobuf enum DASH = 2; + */ + const DASH = 2; + + private static $valueToName = [ + self::MANIFEST_TYPE_UNSPECIFIED => 'MANIFEST_TYPE_UNSPECIFIED', + self::HLS => 'HLS', + self::DASH => 'DASH', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ManifestType::class, \Google\Cloud\Video\Transcoder\V1\Manifest_ManifestType::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/MuxStream.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/MuxStream.php new file mode 100644 index 000000000000..e189d8a7c578 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/MuxStream.php @@ -0,0 +1,261 @@ +google.cloud.video.transcoder.v1.MuxStream + */ +class MuxStream extends \Google\Protobuf\Internal\Message +{ + /** + * A unique key for this multiplexed stream. HLS media manifests will be + * named `MuxStream.key` with the `.m3u8` extension suffix. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * The name of the generated file. The default is `MuxStream.key` with the + * extension suffix corresponding to the `MuxStream.container`. + * Individual segments also have an incremental 10-digit zero-padded suffix + * starting from 0 before the extension, such as `mux_stream0000000123.ts`. + * + * Generated from protobuf field string file_name = 2; + */ + protected $file_name = ''; + /** + * The container format. The default is `mp4` + * Supported container formats: + * - `ts` + * - `fmp4`- the corresponding file extension is `.m4s` + * - `mp4` + * - `vtt` + * See also: + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) + * + * Generated from protobuf field string container = 3; + */ + protected $container = ''; + /** + * List of `ElementaryStream.key`s multiplexed in this stream. + * + * Generated from protobuf field repeated string elementary_streams = 4; + */ + private $elementary_streams; + /** + * Segment settings for `ts`, `fmp4` and `vtt`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.SegmentSettings segment_settings = 5; + */ + protected $segment_settings = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * A unique key for this multiplexed stream. HLS media manifests will be + * named `MuxStream.key` with the `.m3u8` extension suffix. + * @type string $file_name + * The name of the generated file. The default is `MuxStream.key` with the + * extension suffix corresponding to the `MuxStream.container`. + * Individual segments also have an incremental 10-digit zero-padded suffix + * starting from 0 before the extension, such as `mux_stream0000000123.ts`. + * @type string $container + * The container format. The default is `mp4` + * Supported container formats: + * - `ts` + * - `fmp4`- the corresponding file extension is `.m4s` + * - `mp4` + * - `vtt` + * See also: + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) + * @type array|\Google\Protobuf\Internal\RepeatedField $elementary_streams + * List of `ElementaryStream.key`s multiplexed in this stream. + * @type \Google\Cloud\Video\Transcoder\V1\SegmentSettings $segment_settings + * Segment settings for `ts`, `fmp4` and `vtt`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * A unique key for this multiplexed stream. HLS media manifests will be + * named `MuxStream.key` with the `.m3u8` extension suffix. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * A unique key for this multiplexed stream. HLS media manifests will be + * named `MuxStream.key` with the `.m3u8` extension suffix. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * The name of the generated file. The default is `MuxStream.key` with the + * extension suffix corresponding to the `MuxStream.container`. + * Individual segments also have an incremental 10-digit zero-padded suffix + * starting from 0 before the extension, such as `mux_stream0000000123.ts`. + * + * Generated from protobuf field string file_name = 2; + * @return string + */ + public function getFileName() + { + return $this->file_name; + } + + /** + * The name of the generated file. The default is `MuxStream.key` with the + * extension suffix corresponding to the `MuxStream.container`. + * Individual segments also have an incremental 10-digit zero-padded suffix + * starting from 0 before the extension, such as `mux_stream0000000123.ts`. + * + * Generated from protobuf field string file_name = 2; + * @param string $var + * @return $this + */ + public function setFileName($var) + { + GPBUtil::checkString($var, True); + $this->file_name = $var; + + return $this; + } + + /** + * The container format. The default is `mp4` + * Supported container formats: + * - `ts` + * - `fmp4`- the corresponding file extension is `.m4s` + * - `mp4` + * - `vtt` + * See also: + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) + * + * Generated from protobuf field string container = 3; + * @return string + */ + public function getContainer() + { + return $this->container; + } + + /** + * The container format. The default is `mp4` + * Supported container formats: + * - `ts` + * - `fmp4`- the corresponding file extension is `.m4s` + * - `mp4` + * - `vtt` + * See also: + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) + * + * Generated from protobuf field string container = 3; + * @param string $var + * @return $this + */ + public function setContainer($var) + { + GPBUtil::checkString($var, True); + $this->container = $var; + + return $this; + } + + /** + * List of `ElementaryStream.key`s multiplexed in this stream. + * + * Generated from protobuf field repeated string elementary_streams = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getElementaryStreams() + { + return $this->elementary_streams; + } + + /** + * List of `ElementaryStream.key`s multiplexed in this stream. + * + * Generated from protobuf field repeated string elementary_streams = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setElementaryStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->elementary_streams = $arr; + + return $this; + } + + /** + * Segment settings for `ts`, `fmp4` and `vtt`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.SegmentSettings segment_settings = 5; + * @return \Google\Cloud\Video\Transcoder\V1\SegmentSettings|null + */ + public function getSegmentSettings() + { + return $this->segment_settings; + } + + public function hasSegmentSettings() + { + return isset($this->segment_settings); + } + + public function clearSegmentSettings() + { + unset($this->segment_settings); + } + + /** + * Segment settings for `ts`, `fmp4` and `vtt`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.SegmentSettings segment_settings = 5; + * @param \Google\Cloud\Video\Transcoder\V1\SegmentSettings $var + * @return $this + */ + public function setSegmentSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\SegmentSettings::class); + $this->segment_settings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Output.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Output.php new file mode 100644 index 000000000000..e3203d1eb0bf --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Output.php @@ -0,0 +1,79 @@ +google.cloud.video.transcoder.v1.Output + */ +class Output extends \Google\Protobuf\Internal\Message +{ + /** + * URI for the output file(s). For example, `gs://my-bucket/outputs/`. + * If empty, the value is populated from `Job.output_uri`. See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * URI for the output file(s). For example, `gs://my-bucket/outputs/`. + * If empty, the value is populated from `Job.output_uri`. See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * URI for the output file(s). For example, `gs://my-bucket/outputs/`. + * If empty, the value is populated from `Job.output_uri`. See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI for the output file(s). For example, `gs://my-bucket/outputs/`. + * If empty, the value is populated from `Job.output_uri`. See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * Generated from protobuf field string uri = 1; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay.php new file mode 100644 index 000000000000..fa19100a1a1e --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay.php @@ -0,0 +1,115 @@ +google.cloud.video.transcoder.v1.Overlay + */ +class Overlay extends \Google\Protobuf\Internal\Message +{ + /** + * Image overlay. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.Image image = 1; + */ + protected $image = null; + /** + * List of Animations. The list should be chronological, without any time + * overlap. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay.Animation animations = 2; + */ + private $animations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Transcoder\V1\Overlay\Image $image + * Image overlay. + * @type array<\Google\Cloud\Video\Transcoder\V1\Overlay\Animation>|\Google\Protobuf\Internal\RepeatedField $animations + * List of Animations. The list should be chronological, without any time + * overlap. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Image overlay. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.Image image = 1; + * @return \Google\Cloud\Video\Transcoder\V1\Overlay\Image|null + */ + public function getImage() + { + return $this->image; + } + + public function hasImage() + { + return isset($this->image); + } + + public function clearImage() + { + unset($this->image); + } + + /** + * Image overlay. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.Image image = 1; + * @param \Google\Cloud\Video\Transcoder\V1\Overlay\Image $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\Image::class); + $this->image = $var; + + return $this; + } + + /** + * List of Animations. The list should be chronological, without any time + * overlap. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay.Animation animations = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAnimations() + { + return $this->animations; + } + + /** + * List of Animations. The list should be chronological, without any time + * overlap. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay.Animation animations = 2; + * @param array<\Google\Cloud\Video\Transcoder\V1\Overlay\Animation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAnimations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\Overlay\Animation::class); + $this->animations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Animation.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Animation.php new file mode 100644 index 000000000000..721b5ff9f161 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Animation.php @@ -0,0 +1,144 @@ +google.cloud.video.transcoder.v1.Overlay.Animation + */ +class Animation extends \Google\Protobuf\Internal\Message +{ + protected $animation_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationStatic $animation_static + * Display static overlay object. + * @type \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationFade $animation_fade + * Display overlay object with fade animation. + * @type \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationEnd $animation_end + * End previous animation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Display static overlay object. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationStatic animation_static = 1; + * @return \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationStatic|null + */ + public function getAnimationStatic() + { + return $this->readOneof(1); + } + + public function hasAnimationStatic() + { + return $this->hasOneof(1); + } + + /** + * Display static overlay object. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationStatic animation_static = 1; + * @param \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationStatic $var + * @return $this + */ + public function setAnimationStatic($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationStatic::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Display overlay object with fade animation. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationFade animation_fade = 2; + * @return \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationFade|null + */ + public function getAnimationFade() + { + return $this->readOneof(2); + } + + public function hasAnimationFade() + { + return $this->hasOneof(2); + } + + /** + * Display overlay object with fade animation. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationFade animation_fade = 2; + * @param \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationFade $var + * @return $this + */ + public function setAnimationFade($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationFade::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * End previous animation. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationEnd animation_end = 3; + * @return \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationEnd|null + */ + public function getAnimationEnd() + { + return $this->readOneof(3); + } + + public function hasAnimationEnd() + { + return $this->hasOneof(3); + } + + /** + * End previous animation. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationEnd animation_end = 3; + * @param \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationEnd $var + * @return $this + */ + public function setAnimationEnd($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationEnd::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getAnimationType() + { + return $this->whichOneof("animation_type"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Animation::class, \Google\Cloud\Video\Transcoder\V1\Overlay_Animation::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationEnd.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationEnd.php new file mode 100644 index 000000000000..38f7c28a1751 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationEnd.php @@ -0,0 +1,82 @@ +google.cloud.video.transcoder.v1.Overlay.AnimationEnd + */ +class AnimationEnd extends \Google\Protobuf\Internal\Message +{ + /** + * The time to end overlay object, in seconds. Default: 0 + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; + */ + protected $start_time_offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $start_time_offset + * The time to end overlay object, in seconds. Default: 0 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The time to end overlay object, in seconds. Default: 0 + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getStartTimeOffset() + { + return $this->start_time_offset; + } + + public function hasStartTimeOffset() + { + return isset($this->start_time_offset); + } + + public function clearStartTimeOffset() + { + unset($this->start_time_offset); + } + + /** + * The time to end overlay object, in seconds. Default: 0 + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_time_offset = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AnimationEnd::class, \Google\Cloud\Video\Transcoder\V1\Overlay_AnimationEnd::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationFade.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationFade.php new file mode 100644 index 000000000000..f6a10418cbdb --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationFade.php @@ -0,0 +1,222 @@ +google.cloud.video.transcoder.v1.Overlay.AnimationFade + */ +class AnimationFade extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.FadeType fade_type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $fade_type = 0; + /** + * Normalized coordinates based on output video resolution. Valid + * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay + * object. For example, use the x and y coordinates {0,0} to position the + * top-left corner of the overlay animation in the top-left corner of the + * output video. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 2; + */ + protected $xy = null; + /** + * The time to start the fade animation, in seconds. Default: 0 + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 3; + */ + protected $start_time_offset = null; + /** + * The time to end the fade animation, in seconds. Default: + * `start_time_offset` + 1s + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 4; + */ + protected $end_time_offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $fade_type + * Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. + * @type \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $xy + * Normalized coordinates based on output video resolution. Valid + * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay + * object. For example, use the x and y coordinates {0,0} to position the + * top-left corner of the overlay animation in the top-left corner of the + * output video. + * @type \Google\Protobuf\Duration $start_time_offset + * The time to start the fade animation, in seconds. Default: 0 + * @type \Google\Protobuf\Duration $end_time_offset + * The time to end the fade animation, in seconds. Default: + * `start_time_offset` + 1s + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.FadeType fade_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getFadeType() + { + return $this->fade_type; + } + + /** + * Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.FadeType fade_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setFadeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Transcoder\V1\Overlay\FadeType::class); + $this->fade_type = $var; + + return $this; + } + + /** + * Normalized coordinates based on output video resolution. Valid + * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay + * object. For example, use the x and y coordinates {0,0} to position the + * top-left corner of the overlay animation in the top-left corner of the + * output video. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 2; + * @return \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate|null + */ + public function getXy() + { + return $this->xy; + } + + public function hasXy() + { + return isset($this->xy); + } + + public function clearXy() + { + unset($this->xy); + } + + /** + * Normalized coordinates based on output video resolution. Valid + * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay + * object. For example, use the x and y coordinates {0,0} to position the + * top-left corner of the overlay animation in the top-left corner of the + * output video. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 2; + * @param \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $var + * @return $this + */ + public function setXy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate::class); + $this->xy = $var; + + return $this; + } + + /** + * The time to start the fade animation, in seconds. Default: 0 + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getStartTimeOffset() + { + return $this->start_time_offset; + } + + public function hasStartTimeOffset() + { + return isset($this->start_time_offset); + } + + public function clearStartTimeOffset() + { + unset($this->start_time_offset); + } + + /** + * The time to start the fade animation, in seconds. Default: 0 + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_time_offset = $var; + + return $this; + } + + /** + * The time to end the fade animation, in seconds. Default: + * `start_time_offset` + 1s + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getEndTimeOffset() + { + return $this->end_time_offset; + } + + public function hasEndTimeOffset() + { + return isset($this->end_time_offset); + } + + public function clearEndTimeOffset() + { + unset($this->end_time_offset); + } + + /** + * The time to end the fade animation, in seconds. Default: + * `start_time_offset` + 1s + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setEndTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->end_time_offset = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AnimationFade::class, \Google\Cloud\Video\Transcoder\V1\Overlay_AnimationFade::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationStatic.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationStatic.php new file mode 100644 index 000000000000..8829a32fef8d --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationStatic.php @@ -0,0 +1,140 @@ +google.cloud.video.transcoder.v1.Overlay.AnimationStatic + */ +class AnimationStatic extends \Google\Protobuf\Internal\Message +{ + /** + * Normalized coordinates based on output video resolution. Valid + * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay + * object. For example, use the x and y coordinates {0,0} to position the + * top-left corner of the overlay animation in the top-left corner of the + * output video. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 1; + */ + protected $xy = null; + /** + * The time to start displaying the overlay object, in seconds. Default: 0 + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 2; + */ + protected $start_time_offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $xy + * Normalized coordinates based on output video resolution. Valid + * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay + * object. For example, use the x and y coordinates {0,0} to position the + * top-left corner of the overlay animation in the top-left corner of the + * output video. + * @type \Google\Protobuf\Duration $start_time_offset + * The time to start displaying the overlay object, in seconds. Default: 0 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Normalized coordinates based on output video resolution. Valid + * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay + * object. For example, use the x and y coordinates {0,0} to position the + * top-left corner of the overlay animation in the top-left corner of the + * output video. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 1; + * @return \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate|null + */ + public function getXy() + { + return $this->xy; + } + + public function hasXy() + { + return isset($this->xy); + } + + public function clearXy() + { + unset($this->xy); + } + + /** + * Normalized coordinates based on output video resolution. Valid + * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay + * object. For example, use the x and y coordinates {0,0} to position the + * top-left corner of the overlay animation in the top-left corner of the + * output video. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 1; + * @param \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $var + * @return $this + */ + public function setXy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate::class); + $this->xy = $var; + + return $this; + } + + /** + * The time to start displaying the overlay object, in seconds. Default: 0 + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getStartTimeOffset() + { + return $this->start_time_offset; + } + + public function hasStartTimeOffset() + { + return isset($this->start_time_offset); + } + + public function clearStartTimeOffset() + { + unset($this->start_time_offset); + } + + /** + * The time to start displaying the overlay object, in seconds. Default: 0 + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_time_offset = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AnimationStatic::class, \Google\Cloud\Video\Transcoder\V1\Overlay_AnimationStatic::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/FadeType.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/FadeType.php new file mode 100644 index 000000000000..00d84b08ab33 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/FadeType.php @@ -0,0 +1,64 @@ +google.cloud.video.transcoder.v1.Overlay.FadeType + */ +class FadeType +{ + /** + * The fade type is not specified. + * + * Generated from protobuf enum FADE_TYPE_UNSPECIFIED = 0; + */ + const FADE_TYPE_UNSPECIFIED = 0; + /** + * Fade the overlay object into view. + * + * Generated from protobuf enum FADE_IN = 1; + */ + const FADE_IN = 1; + /** + * Fade the overlay object out of view. + * + * Generated from protobuf enum FADE_OUT = 2; + */ + const FADE_OUT = 2; + + private static $valueToName = [ + self::FADE_TYPE_UNSPECIFIED => 'FADE_TYPE_UNSPECIFIED', + self::FADE_IN => 'FADE_IN', + self::FADE_OUT => 'FADE_OUT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FadeType::class, \Google\Cloud\Video\Transcoder\V1\Overlay_FadeType::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Image.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Image.php new file mode 100644 index 000000000000..88bcf10bc53f --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Image.php @@ -0,0 +1,168 @@ +google.cloud.video.transcoder.v1.Overlay.Image + */ +class Image extends \Google\Protobuf\Internal\Message +{ + /** + * Required. URI of the image in Cloud Storage. For example, + * `gs://bucket/inputs/image.png`. Only PNG and JPEG images are supported. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + /** + * Normalized image resolution, based on output video resolution. Valid + * values: `0.0`–`1.0`. To respect the original image aspect ratio, set + * either `x` or `y` to `0.0`. To use the original image resolution, set + * both `x` and `y` to `0.0`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate resolution = 2; + */ + protected $resolution = null; + /** + * Target image opacity. Valid values are from `1.0` (solid, default) to + * `0.0` (transparent), exclusive. Set this to a value greater than `0.0`. + * + * Generated from protobuf field double alpha = 3; + */ + protected $alpha = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Required. URI of the image in Cloud Storage. For example, + * `gs://bucket/inputs/image.png`. Only PNG and JPEG images are supported. + * @type \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $resolution + * Normalized image resolution, based on output video resolution. Valid + * values: `0.0`–`1.0`. To respect the original image aspect ratio, set + * either `x` or `y` to `0.0`. To use the original image resolution, set + * both `x` and `y` to `0.0`. + * @type float $alpha + * Target image opacity. Valid values are from `1.0` (solid, default) to + * `0.0` (transparent), exclusive. Set this to a value greater than `0.0`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. URI of the image in Cloud Storage. For example, + * `gs://bucket/inputs/image.png`. Only PNG and JPEG images are supported. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. URI of the image in Cloud Storage. For example, + * `gs://bucket/inputs/image.png`. Only PNG and JPEG images are supported. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Normalized image resolution, based on output video resolution. Valid + * values: `0.0`–`1.0`. To respect the original image aspect ratio, set + * either `x` or `y` to `0.0`. To use the original image resolution, set + * both `x` and `y` to `0.0`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate resolution = 2; + * @return \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate|null + */ + public function getResolution() + { + return $this->resolution; + } + + public function hasResolution() + { + return isset($this->resolution); + } + + public function clearResolution() + { + unset($this->resolution); + } + + /** + * Normalized image resolution, based on output video resolution. Valid + * values: `0.0`–`1.0`. To respect the original image aspect ratio, set + * either `x` or `y` to `0.0`. To use the original image resolution, set + * both `x` and `y` to `0.0`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate resolution = 2; + * @param \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $var + * @return $this + */ + public function setResolution($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate::class); + $this->resolution = $var; + + return $this; + } + + /** + * Target image opacity. Valid values are from `1.0` (solid, default) to + * `0.0` (transparent), exclusive. Set this to a value greater than `0.0`. + * + * Generated from protobuf field double alpha = 3; + * @return float + */ + public function getAlpha() + { + return $this->alpha; + } + + /** + * Target image opacity. Valid values are from `1.0` (solid, default) to + * `0.0` (transparent), exclusive. Set this to a value greater than `0.0`. + * + * Generated from protobuf field double alpha = 3; + * @param float $var + * @return $this + */ + public function setAlpha($var) + { + GPBUtil::checkDouble($var); + $this->alpha = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Image::class, \Google\Cloud\Video\Transcoder\V1\Overlay_Image::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/NormalizedCoordinate.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/NormalizedCoordinate.php new file mode 100644 index 000000000000..6212da72fc3e --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/NormalizedCoordinate.php @@ -0,0 +1,104 @@ +google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate + */ +class NormalizedCoordinate extends \Google\Protobuf\Internal\Message +{ + /** + * Normalized x coordinate. + * + * Generated from protobuf field double x = 1; + */ + protected $x = 0.0; + /** + * Normalized y coordinate. + * + * Generated from protobuf field double y = 2; + */ + protected $y = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $x + * Normalized x coordinate. + * @type float $y + * Normalized y coordinate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Normalized x coordinate. + * + * Generated from protobuf field double x = 1; + * @return float + */ + public function getX() + { + return $this->x; + } + + /** + * Normalized x coordinate. + * + * Generated from protobuf field double x = 1; + * @param float $var + * @return $this + */ + public function setX($var) + { + GPBUtil::checkDouble($var); + $this->x = $var; + + return $this; + } + + /** + * Normalized y coordinate. + * + * Generated from protobuf field double y = 2; + * @return float + */ + public function getY() + { + return $this->y; + } + + /** + * Normalized y coordinate. + * + * Generated from protobuf field double y = 2; + * @param float $var + * @return $this + */ + public function setY($var) + { + GPBUtil::checkDouble($var); + $this->y = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NormalizedCoordinate::class, \Google\Cloud\Video\Transcoder\V1\Overlay_NormalizedCoordinate::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig.php new file mode 100644 index 000000000000..a89acfa1847b --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig.php @@ -0,0 +1,341 @@ +google.cloud.video.transcoder.v1.PreprocessingConfig + */ +class PreprocessingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Color preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Color color = 1; + */ + protected $color = null; + /** + * Denoise preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise denoise = 2; + */ + protected $denoise = null; + /** + * Deblock preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock deblock = 3; + */ + protected $deblock = null; + /** + * Audio preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Audio audio = 4; + */ + protected $audio = null; + /** + * Specify the video cropping configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Crop crop = 5; + */ + protected $crop = null; + /** + * Specify the video pad filter configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Pad pad = 6; + */ + protected $pad = null; + /** + * Specify the video deinterlace configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace deinterlace = 7; + */ + protected $deinterlace = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Color $color + * Color preprocessing configuration. + * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Denoise $denoise + * Denoise preprocessing configuration. + * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deblock $deblock + * Deblock preprocessing configuration. + * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Audio $audio + * Audio preprocessing configuration. + * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Crop $crop + * Specify the video cropping configuration. + * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Pad $pad + * Specify the video pad filter configuration. + * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace $deinterlace + * Specify the video deinterlace configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Color preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Color color = 1; + * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Color|null + */ + public function getColor() + { + return $this->color; + } + + public function hasColor() + { + return isset($this->color); + } + + public function clearColor() + { + unset($this->color); + } + + /** + * Color preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Color color = 1; + * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Color $var + * @return $this + */ + public function setColor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Color::class); + $this->color = $var; + + return $this; + } + + /** + * Denoise preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise denoise = 2; + * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Denoise|null + */ + public function getDenoise() + { + return $this->denoise; + } + + public function hasDenoise() + { + return isset($this->denoise); + } + + public function clearDenoise() + { + unset($this->denoise); + } + + /** + * Denoise preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise denoise = 2; + * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Denoise $var + * @return $this + */ + public function setDenoise($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Denoise::class); + $this->denoise = $var; + + return $this; + } + + /** + * Deblock preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock deblock = 3; + * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deblock|null + */ + public function getDeblock() + { + return $this->deblock; + } + + public function hasDeblock() + { + return isset($this->deblock); + } + + public function clearDeblock() + { + unset($this->deblock); + } + + /** + * Deblock preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock deblock = 3; + * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deblock $var + * @return $this + */ + public function setDeblock($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deblock::class); + $this->deblock = $var; + + return $this; + } + + /** + * Audio preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Audio audio = 4; + * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Audio|null + */ + public function getAudio() + { + return $this->audio; + } + + public function hasAudio() + { + return isset($this->audio); + } + + public function clearAudio() + { + unset($this->audio); + } + + /** + * Audio preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Audio audio = 4; + * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Audio $var + * @return $this + */ + public function setAudio($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Audio::class); + $this->audio = $var; + + return $this; + } + + /** + * Specify the video cropping configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Crop crop = 5; + * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Crop|null + */ + public function getCrop() + { + return $this->crop; + } + + public function hasCrop() + { + return isset($this->crop); + } + + public function clearCrop() + { + unset($this->crop); + } + + /** + * Specify the video cropping configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Crop crop = 5; + * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Crop $var + * @return $this + */ + public function setCrop($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Crop::class); + $this->crop = $var; + + return $this; + } + + /** + * Specify the video pad filter configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Pad pad = 6; + * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Pad|null + */ + public function getPad() + { + return $this->pad; + } + + public function hasPad() + { + return isset($this->pad); + } + + public function clearPad() + { + unset($this->pad); + } + + /** + * Specify the video pad filter configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Pad pad = 6; + * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Pad $var + * @return $this + */ + public function setPad($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Pad::class); + $this->pad = $var; + + return $this; + } + + /** + * Specify the video deinterlace configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace deinterlace = 7; + * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace|null + */ + public function getDeinterlace() + { + return $this->deinterlace; + } + + public function hasDeinterlace() + { + return isset($this->deinterlace); + } + + public function clearDeinterlace() + { + unset($this->deinterlace); + } + + /** + * Specify the video deinterlace configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace deinterlace = 7; + * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace $var + * @return $this + */ + public function setDeinterlace($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace::class); + $this->deinterlace = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Audio.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Audio.php new file mode 100644 index 000000000000..5527aa011f49 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Audio.php @@ -0,0 +1,182 @@ +google.cloud.video.transcoder.v1.PreprocessingConfig.Audio + */ +class Audio extends \Google\Protobuf\Internal\Message +{ + /** + * Specify audio loudness normalization in loudness units relative to full + * scale (LUFS). Enter a value between -24 and 0 (the default), where: + * * -24 is the Advanced Television Systems Committee (ATSC A/85) standard + * * -23 is the EU R128 broadcast standard + * * -19 is the prior standard for online mono audio + * * -18 is the ReplayGain standard + * * -16 is the prior standard for stereo audio + * * -14 is the new online audio standard recommended by Spotify, as well + * as Amazon Echo + * * 0 disables normalization + * + * Generated from protobuf field double lufs = 1; + */ + protected $lufs = 0.0; + /** + * Enable boosting high frequency components. The default is `false`. + * **Note:** This field is not supported. + * + * Generated from protobuf field bool high_boost = 2; + */ + protected $high_boost = false; + /** + * Enable boosting low frequency components. The default is `false`. + * **Note:** This field is not supported. + * + * Generated from protobuf field bool low_boost = 3; + */ + protected $low_boost = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $lufs + * Specify audio loudness normalization in loudness units relative to full + * scale (LUFS). Enter a value between -24 and 0 (the default), where: + * * -24 is the Advanced Television Systems Committee (ATSC A/85) standard + * * -23 is the EU R128 broadcast standard + * * -19 is the prior standard for online mono audio + * * -18 is the ReplayGain standard + * * -16 is the prior standard for stereo audio + * * -14 is the new online audio standard recommended by Spotify, as well + * as Amazon Echo + * * 0 disables normalization + * @type bool $high_boost + * Enable boosting high frequency components. The default is `false`. + * **Note:** This field is not supported. + * @type bool $low_boost + * Enable boosting low frequency components. The default is `false`. + * **Note:** This field is not supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Specify audio loudness normalization in loudness units relative to full + * scale (LUFS). Enter a value between -24 and 0 (the default), where: + * * -24 is the Advanced Television Systems Committee (ATSC A/85) standard + * * -23 is the EU R128 broadcast standard + * * -19 is the prior standard for online mono audio + * * -18 is the ReplayGain standard + * * -16 is the prior standard for stereo audio + * * -14 is the new online audio standard recommended by Spotify, as well + * as Amazon Echo + * * 0 disables normalization + * + * Generated from protobuf field double lufs = 1; + * @return float + */ + public function getLufs() + { + return $this->lufs; + } + + /** + * Specify audio loudness normalization in loudness units relative to full + * scale (LUFS). Enter a value between -24 and 0 (the default), where: + * * -24 is the Advanced Television Systems Committee (ATSC A/85) standard + * * -23 is the EU R128 broadcast standard + * * -19 is the prior standard for online mono audio + * * -18 is the ReplayGain standard + * * -16 is the prior standard for stereo audio + * * -14 is the new online audio standard recommended by Spotify, as well + * as Amazon Echo + * * 0 disables normalization + * + * Generated from protobuf field double lufs = 1; + * @param float $var + * @return $this + */ + public function setLufs($var) + { + GPBUtil::checkDouble($var); + $this->lufs = $var; + + return $this; + } + + /** + * Enable boosting high frequency components. The default is `false`. + * **Note:** This field is not supported. + * + * Generated from protobuf field bool high_boost = 2; + * @return bool + */ + public function getHighBoost() + { + return $this->high_boost; + } + + /** + * Enable boosting high frequency components. The default is `false`. + * **Note:** This field is not supported. + * + * Generated from protobuf field bool high_boost = 2; + * @param bool $var + * @return $this + */ + public function setHighBoost($var) + { + GPBUtil::checkBool($var); + $this->high_boost = $var; + + return $this; + } + + /** + * Enable boosting low frequency components. The default is `false`. + * **Note:** This field is not supported. + * + * Generated from protobuf field bool low_boost = 3; + * @return bool + */ + public function getLowBoost() + { + return $this->low_boost; + } + + /** + * Enable boosting low frequency components. The default is `false`. + * **Note:** This field is not supported. + * + * Generated from protobuf field bool low_boost = 3; + * @param bool $var + * @return $this + */ + public function setLowBoost($var) + { + GPBUtil::checkBool($var); + $this->low_boost = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Audio::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Audio::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Color.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Color.php new file mode 100644 index 000000000000..7fcb9b376823 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Color.php @@ -0,0 +1,163 @@ +google.cloud.video.transcoder.v1.PreprocessingConfig.Color + */ +class Color extends \Google\Protobuf\Internal\Message +{ + /** + * Control color saturation of the video. Enter a value between -1 and 1, + * where -1 is fully desaturated and 1 is maximum saturation. 0 is no + * change. The default is 0. + * + * Generated from protobuf field double saturation = 1; + */ + protected $saturation = 0.0; + /** + * Control black and white contrast of the video. Enter a value between -1 + * and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no + * change. The default is 0. + * + * Generated from protobuf field double contrast = 2; + */ + protected $contrast = 0.0; + /** + * Control brightness of the video. Enter a value between -1 and 1, where -1 + * is minimum brightness and 1 is maximum brightness. 0 is no change. The + * default is 0. + * + * Generated from protobuf field double brightness = 3; + */ + protected $brightness = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $saturation + * Control color saturation of the video. Enter a value between -1 and 1, + * where -1 is fully desaturated and 1 is maximum saturation. 0 is no + * change. The default is 0. + * @type float $contrast + * Control black and white contrast of the video. Enter a value between -1 + * and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no + * change. The default is 0. + * @type float $brightness + * Control brightness of the video. Enter a value between -1 and 1, where -1 + * is minimum brightness and 1 is maximum brightness. 0 is no change. The + * default is 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Control color saturation of the video. Enter a value between -1 and 1, + * where -1 is fully desaturated and 1 is maximum saturation. 0 is no + * change. The default is 0. + * + * Generated from protobuf field double saturation = 1; + * @return float + */ + public function getSaturation() + { + return $this->saturation; + } + + /** + * Control color saturation of the video. Enter a value between -1 and 1, + * where -1 is fully desaturated and 1 is maximum saturation. 0 is no + * change. The default is 0. + * + * Generated from protobuf field double saturation = 1; + * @param float $var + * @return $this + */ + public function setSaturation($var) + { + GPBUtil::checkDouble($var); + $this->saturation = $var; + + return $this; + } + + /** + * Control black and white contrast of the video. Enter a value between -1 + * and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no + * change. The default is 0. + * + * Generated from protobuf field double contrast = 2; + * @return float + */ + public function getContrast() + { + return $this->contrast; + } + + /** + * Control black and white contrast of the video. Enter a value between -1 + * and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no + * change. The default is 0. + * + * Generated from protobuf field double contrast = 2; + * @param float $var + * @return $this + */ + public function setContrast($var) + { + GPBUtil::checkDouble($var); + $this->contrast = $var; + + return $this; + } + + /** + * Control brightness of the video. Enter a value between -1 and 1, where -1 + * is minimum brightness and 1 is maximum brightness. 0 is no change. The + * default is 0. + * + * Generated from protobuf field double brightness = 3; + * @return float + */ + public function getBrightness() + { + return $this->brightness; + } + + /** + * Control brightness of the video. Enter a value between -1 and 1, where -1 + * is minimum brightness and 1 is maximum brightness. 0 is no change. The + * default is 0. + * + * Generated from protobuf field double brightness = 3; + * @param float $var + * @return $this + */ + public function setBrightness($var) + { + GPBUtil::checkDouble($var); + $this->brightness = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Color::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Color::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Crop.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Crop.php new file mode 100644 index 000000000000..a4a924ad4860 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Crop.php @@ -0,0 +1,173 @@ +google.cloud.video.transcoder.v1.PreprocessingConfig.Crop + */ +class Crop extends \Google\Protobuf\Internal\Message +{ + /** + * The number of pixels to crop from the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + */ + protected $top_pixels = 0; + /** + * The number of pixels to crop from the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + */ + protected $bottom_pixels = 0; + /** + * The number of pixels to crop from the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + */ + protected $left_pixels = 0; + /** + * The number of pixels to crop from the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + */ + protected $right_pixels = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $top_pixels + * The number of pixels to crop from the top. The default is 0. + * @type int $bottom_pixels + * The number of pixels to crop from the bottom. The default is 0. + * @type int $left_pixels + * The number of pixels to crop from the left. The default is 0. + * @type int $right_pixels + * The number of pixels to crop from the right. The default is 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The number of pixels to crop from the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + * @return int + */ + public function getTopPixels() + { + return $this->top_pixels; + } + + /** + * The number of pixels to crop from the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + * @param int $var + * @return $this + */ + public function setTopPixels($var) + { + GPBUtil::checkInt32($var); + $this->top_pixels = $var; + + return $this; + } + + /** + * The number of pixels to crop from the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + * @return int + */ + public function getBottomPixels() + { + return $this->bottom_pixels; + } + + /** + * The number of pixels to crop from the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + * @param int $var + * @return $this + */ + public function setBottomPixels($var) + { + GPBUtil::checkInt32($var); + $this->bottom_pixels = $var; + + return $this; + } + + /** + * The number of pixels to crop from the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + * @return int + */ + public function getLeftPixels() + { + return $this->left_pixels; + } + + /** + * The number of pixels to crop from the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + * @param int $var + * @return $this + */ + public function setLeftPixels($var) + { + GPBUtil::checkInt32($var); + $this->left_pixels = $var; + + return $this; + } + + /** + * The number of pixels to crop from the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + * @return int + */ + public function getRightPixels() + { + return $this->right_pixels; + } + + /** + * The number of pixels to crop from the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + * @param int $var + * @return $this + */ + public function setRightPixels($var) + { + GPBUtil::checkInt32($var); + $this->right_pixels = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Crop::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Crop::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deblock.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deblock.php new file mode 100644 index 000000000000..a1c2d7c6a2a5 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deblock.php @@ -0,0 +1,113 @@ +google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock + */ +class Deblock extends \Google\Protobuf\Internal\Message +{ + /** + * Set strength of the deblocker. Enter a value between 0 and 1. The higher + * the value, the stronger the block removal. 0 is no deblocking. The + * default is 0. + * + * Generated from protobuf field double strength = 1; + */ + protected $strength = 0.0; + /** + * Enable deblocker. The default is `false`. + * + * Generated from protobuf field bool enabled = 2; + */ + protected $enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $strength + * Set strength of the deblocker. Enter a value between 0 and 1. The higher + * the value, the stronger the block removal. 0 is no deblocking. The + * default is 0. + * @type bool $enabled + * Enable deblocker. The default is `false`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Set strength of the deblocker. Enter a value between 0 and 1. The higher + * the value, the stronger the block removal. 0 is no deblocking. The + * default is 0. + * + * Generated from protobuf field double strength = 1; + * @return float + */ + public function getStrength() + { + return $this->strength; + } + + /** + * Set strength of the deblocker. Enter a value between 0 and 1. The higher + * the value, the stronger the block removal. 0 is no deblocking. The + * default is 0. + * + * Generated from protobuf field double strength = 1; + * @param float $var + * @return $this + */ + public function setStrength($var) + { + GPBUtil::checkDouble($var); + $this->strength = $var; + + return $this; + } + + /** + * Enable deblocker. The default is `false`. + * + * Generated from protobuf field bool enabled = 2; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Enable deblocker. The default is `false`. + * + * Generated from protobuf field bool enabled = 2; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Deblock::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Deblock::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace.php new file mode 100644 index 000000000000..b770eda51e32 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace.php @@ -0,0 +1,111 @@ +google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace + */ +class Deinterlace extends \Google\Protobuf\Internal\Message +{ + protected $deinterlacing_filter; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\YadifConfig $yadif + * Specifies the Yet Another Deinterlacing Filter Configuration. + * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\BwdifConfig $bwdif + * Specifies the Bob Weaver Deinterlacing Filter Configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Specifies the Yet Another Deinterlacing Filter Configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.YadifConfig yadif = 1; + * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\YadifConfig|null + */ + public function getYadif() + { + return $this->readOneof(1); + } + + public function hasYadif() + { + return $this->hasOneof(1); + } + + /** + * Specifies the Yet Another Deinterlacing Filter Configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.YadifConfig yadif = 1; + * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\YadifConfig $var + * @return $this + */ + public function setYadif($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\YadifConfig::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Specifies the Bob Weaver Deinterlacing Filter Configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.BwdifConfig bwdif = 2; + * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\BwdifConfig|null + */ + public function getBwdif() + { + return $this->readOneof(2); + } + + public function hasBwdif() + { + return $this->hasOneof(2); + } + + /** + * Specifies the Bob Weaver Deinterlacing Filter Configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.BwdifConfig bwdif = 2; + * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\BwdifConfig $var + * @return $this + */ + public function setBwdif($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\BwdifConfig::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getDeinterlacingFilter() + { + return $this->whichOneof("deinterlacing_filter"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Deinterlace::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Deinterlace::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/BwdifConfig.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/BwdifConfig.php new file mode 100644 index 000000000000..ac4676c464e6 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/BwdifConfig.php @@ -0,0 +1,178 @@ +google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.BwdifConfig + */ +class BwdifConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies the deinterlacing mode to adopt. + * The default is `send_frame`. + * Supported values: + * - `send_frame`: Output one frame for each frame + * - `send_field`: Output one frame for each field + * + * Generated from protobuf field string mode = 1; + */ + protected $mode = ''; + /** + * The picture field parity assumed for the input interlaced video. + * The default is `auto`. + * Supported values: + * - `tff`: Assume the top field is first + * - `bff`: Assume the bottom field is first + * - `auto`: Enable automatic detection of field parity + * + * Generated from protobuf field string parity = 2; + */ + protected $parity = ''; + /** + * Deinterlace all frames rather than just the frames identified as + * interlaced. The default is `false`. + * + * Generated from protobuf field bool deinterlace_all_frames = 3; + */ + protected $deinterlace_all_frames = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $mode + * Specifies the deinterlacing mode to adopt. + * The default is `send_frame`. + * Supported values: + * - `send_frame`: Output one frame for each frame + * - `send_field`: Output one frame for each field + * @type string $parity + * The picture field parity assumed for the input interlaced video. + * The default is `auto`. + * Supported values: + * - `tff`: Assume the top field is first + * - `bff`: Assume the bottom field is first + * - `auto`: Enable automatic detection of field parity + * @type bool $deinterlace_all_frames + * Deinterlace all frames rather than just the frames identified as + * interlaced. The default is `false`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Specifies the deinterlacing mode to adopt. + * The default is `send_frame`. + * Supported values: + * - `send_frame`: Output one frame for each frame + * - `send_field`: Output one frame for each field + * + * Generated from protobuf field string mode = 1; + * @return string + */ + public function getMode() + { + return $this->mode; + } + + /** + * Specifies the deinterlacing mode to adopt. + * The default is `send_frame`. + * Supported values: + * - `send_frame`: Output one frame for each frame + * - `send_field`: Output one frame for each field + * + * Generated from protobuf field string mode = 1; + * @param string $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkString($var, True); + $this->mode = $var; + + return $this; + } + + /** + * The picture field parity assumed for the input interlaced video. + * The default is `auto`. + * Supported values: + * - `tff`: Assume the top field is first + * - `bff`: Assume the bottom field is first + * - `auto`: Enable automatic detection of field parity + * + * Generated from protobuf field string parity = 2; + * @return string + */ + public function getParity() + { + return $this->parity; + } + + /** + * The picture field parity assumed for the input interlaced video. + * The default is `auto`. + * Supported values: + * - `tff`: Assume the top field is first + * - `bff`: Assume the bottom field is first + * - `auto`: Enable automatic detection of field parity + * + * Generated from protobuf field string parity = 2; + * @param string $var + * @return $this + */ + public function setParity($var) + { + GPBUtil::checkString($var, True); + $this->parity = $var; + + return $this; + } + + /** + * Deinterlace all frames rather than just the frames identified as + * interlaced. The default is `false`. + * + * Generated from protobuf field bool deinterlace_all_frames = 3; + * @return bool + */ + public function getDeinterlaceAllFrames() + { + return $this->deinterlace_all_frames; + } + + /** + * Deinterlace all frames rather than just the frames identified as + * interlaced. The default is `false`. + * + * Generated from protobuf field bool deinterlace_all_frames = 3; + * @param bool $var + * @return $this + */ + public function setDeinterlaceAllFrames($var) + { + GPBUtil::checkBool($var); + $this->deinterlace_all_frames = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BwdifConfig::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Deinterlace_BwdifConfig::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/YadifConfig.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/YadifConfig.php new file mode 100644 index 000000000000..48e8862bebbb --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/YadifConfig.php @@ -0,0 +1,216 @@ +google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.YadifConfig + */ +class YadifConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies the deinterlacing mode to adopt. + * The default is `send_frame`. + * Supported values: + * - `send_frame`: Output one frame for each frame + * - `send_field`: Output one frame for each field + * + * Generated from protobuf field string mode = 1; + */ + protected $mode = ''; + /** + * Disable spacial interlacing. + * The default is `false`. + * + * Generated from protobuf field bool disable_spatial_interlacing = 2; + */ + protected $disable_spatial_interlacing = false; + /** + * The picture field parity assumed for the input interlaced video. + * The default is `auto`. + * Supported values: + * - `tff`: Assume the top field is first + * - `bff`: Assume the bottom field is first + * - `auto`: Enable automatic detection of field parity + * + * Generated from protobuf field string parity = 3; + */ + protected $parity = ''; + /** + * Deinterlace all frames rather than just the frames identified as + * interlaced. The default is `false`. + * + * Generated from protobuf field bool deinterlace_all_frames = 4; + */ + protected $deinterlace_all_frames = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $mode + * Specifies the deinterlacing mode to adopt. + * The default is `send_frame`. + * Supported values: + * - `send_frame`: Output one frame for each frame + * - `send_field`: Output one frame for each field + * @type bool $disable_spatial_interlacing + * Disable spacial interlacing. + * The default is `false`. + * @type string $parity + * The picture field parity assumed for the input interlaced video. + * The default is `auto`. + * Supported values: + * - `tff`: Assume the top field is first + * - `bff`: Assume the bottom field is first + * - `auto`: Enable automatic detection of field parity + * @type bool $deinterlace_all_frames + * Deinterlace all frames rather than just the frames identified as + * interlaced. The default is `false`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Specifies the deinterlacing mode to adopt. + * The default is `send_frame`. + * Supported values: + * - `send_frame`: Output one frame for each frame + * - `send_field`: Output one frame for each field + * + * Generated from protobuf field string mode = 1; + * @return string + */ + public function getMode() + { + return $this->mode; + } + + /** + * Specifies the deinterlacing mode to adopt. + * The default is `send_frame`. + * Supported values: + * - `send_frame`: Output one frame for each frame + * - `send_field`: Output one frame for each field + * + * Generated from protobuf field string mode = 1; + * @param string $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkString($var, True); + $this->mode = $var; + + return $this; + } + + /** + * Disable spacial interlacing. + * The default is `false`. + * + * Generated from protobuf field bool disable_spatial_interlacing = 2; + * @return bool + */ + public function getDisableSpatialInterlacing() + { + return $this->disable_spatial_interlacing; + } + + /** + * Disable spacial interlacing. + * The default is `false`. + * + * Generated from protobuf field bool disable_spatial_interlacing = 2; + * @param bool $var + * @return $this + */ + public function setDisableSpatialInterlacing($var) + { + GPBUtil::checkBool($var); + $this->disable_spatial_interlacing = $var; + + return $this; + } + + /** + * The picture field parity assumed for the input interlaced video. + * The default is `auto`. + * Supported values: + * - `tff`: Assume the top field is first + * - `bff`: Assume the bottom field is first + * - `auto`: Enable automatic detection of field parity + * + * Generated from protobuf field string parity = 3; + * @return string + */ + public function getParity() + { + return $this->parity; + } + + /** + * The picture field parity assumed for the input interlaced video. + * The default is `auto`. + * Supported values: + * - `tff`: Assume the top field is first + * - `bff`: Assume the bottom field is first + * - `auto`: Enable automatic detection of field parity + * + * Generated from protobuf field string parity = 3; + * @param string $var + * @return $this + */ + public function setParity($var) + { + GPBUtil::checkString($var, True); + $this->parity = $var; + + return $this; + } + + /** + * Deinterlace all frames rather than just the frames identified as + * interlaced. The default is `false`. + * + * Generated from protobuf field bool deinterlace_all_frames = 4; + * @return bool + */ + public function getDeinterlaceAllFrames() + { + return $this->deinterlace_all_frames; + } + + /** + * Deinterlace all frames rather than just the frames identified as + * interlaced. The default is `false`. + * + * Generated from protobuf field bool deinterlace_all_frames = 4; + * @param bool $var + * @return $this + */ + public function setDeinterlaceAllFrames($var) + { + GPBUtil::checkBool($var); + $this->deinterlace_all_frames = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(YadifConfig::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Deinterlace_YadifConfig::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Denoise.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Denoise.php new file mode 100644 index 000000000000..8b261dd4c493 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Denoise.php @@ -0,0 +1,121 @@ +google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise + */ +class Denoise extends \Google\Protobuf\Internal\Message +{ + /** + * Set strength of the denoise. Enter a value between 0 and 1. The higher + * the value, the smoother the image. 0 is no denoising. The default is 0. + * + * Generated from protobuf field double strength = 1; + */ + protected $strength = 0.0; + /** + * Set the denoiser mode. The default is `standard`. + * Supported denoiser modes: + * - `standard` + * - `grain` + * + * Generated from protobuf field string tune = 2; + */ + protected $tune = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $strength + * Set strength of the denoise. Enter a value between 0 and 1. The higher + * the value, the smoother the image. 0 is no denoising. The default is 0. + * @type string $tune + * Set the denoiser mode. The default is `standard`. + * Supported denoiser modes: + * - `standard` + * - `grain` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Set strength of the denoise. Enter a value between 0 and 1. The higher + * the value, the smoother the image. 0 is no denoising. The default is 0. + * + * Generated from protobuf field double strength = 1; + * @return float + */ + public function getStrength() + { + return $this->strength; + } + + /** + * Set strength of the denoise. Enter a value between 0 and 1. The higher + * the value, the smoother the image. 0 is no denoising. The default is 0. + * + * Generated from protobuf field double strength = 1; + * @param float $var + * @return $this + */ + public function setStrength($var) + { + GPBUtil::checkDouble($var); + $this->strength = $var; + + return $this; + } + + /** + * Set the denoiser mode. The default is `standard`. + * Supported denoiser modes: + * - `standard` + * - `grain` + * + * Generated from protobuf field string tune = 2; + * @return string + */ + public function getTune() + { + return $this->tune; + } + + /** + * Set the denoiser mode. The default is `standard`. + * Supported denoiser modes: + * - `standard` + * - `grain` + * + * Generated from protobuf field string tune = 2; + * @param string $var + * @return $this + */ + public function setTune($var) + { + GPBUtil::checkString($var, True); + $this->tune = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Denoise::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Denoise::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Pad.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Pad.php new file mode 100644 index 000000000000..04d702ce9f94 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Pad.php @@ -0,0 +1,173 @@ +google.cloud.video.transcoder.v1.PreprocessingConfig.Pad + */ +class Pad extends \Google\Protobuf\Internal\Message +{ + /** + * The number of pixels to add to the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + */ + protected $top_pixels = 0; + /** + * The number of pixels to add to the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + */ + protected $bottom_pixels = 0; + /** + * The number of pixels to add to the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + */ + protected $left_pixels = 0; + /** + * The number of pixels to add to the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + */ + protected $right_pixels = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $top_pixels + * The number of pixels to add to the top. The default is 0. + * @type int $bottom_pixels + * The number of pixels to add to the bottom. The default is 0. + * @type int $left_pixels + * The number of pixels to add to the left. The default is 0. + * @type int $right_pixels + * The number of pixels to add to the right. The default is 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The number of pixels to add to the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + * @return int + */ + public function getTopPixels() + { + return $this->top_pixels; + } + + /** + * The number of pixels to add to the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + * @param int $var + * @return $this + */ + public function setTopPixels($var) + { + GPBUtil::checkInt32($var); + $this->top_pixels = $var; + + return $this; + } + + /** + * The number of pixels to add to the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + * @return int + */ + public function getBottomPixels() + { + return $this->bottom_pixels; + } + + /** + * The number of pixels to add to the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + * @param int $var + * @return $this + */ + public function setBottomPixels($var) + { + GPBUtil::checkInt32($var); + $this->bottom_pixels = $var; + + return $this; + } + + /** + * The number of pixels to add to the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + * @return int + */ + public function getLeftPixels() + { + return $this->left_pixels; + } + + /** + * The number of pixels to add to the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + * @param int $var + * @return $this + */ + public function setLeftPixels($var) + { + GPBUtil::checkInt32($var); + $this->left_pixels = $var; + + return $this; + } + + /** + * The number of pixels to add to the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + * @return int + */ + public function getRightPixels() + { + return $this->right_pixels; + } + + /** + * The number of pixels to add to the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + * @param int $var + * @return $this + */ + public function setRightPixels($var) + { + GPBUtil::checkInt32($var); + $this->right_pixels = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Pad::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Pad::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PubsubDestination.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PubsubDestination.php new file mode 100644 index 000000000000..554c0dbf0125 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PubsubDestination.php @@ -0,0 +1,71 @@ +google.cloud.video.transcoder.v1.PubsubDestination + */ +class PubsubDestination extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the Pub/Sub topic to publish job completion notification + * to. For example: `projects/{project}/topics/{topic}`. + * + * Generated from protobuf field string topic = 1; + */ + protected $topic = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $topic + * The name of the Pub/Sub topic to publish job completion notification + * to. For example: `projects/{project}/topics/{topic}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The name of the Pub/Sub topic to publish job completion notification + * to. For example: `projects/{project}/topics/{topic}`. + * + * Generated from protobuf field string topic = 1; + * @return string + */ + public function getTopic() + { + return $this->topic; + } + + /** + * The name of the Pub/Sub topic to publish job completion notification + * to. For example: `projects/{project}/topics/{topic}`. + * + * Generated from protobuf field string topic = 1; + * @param string $var + * @return $this + */ + public function setTopic($var) + { + GPBUtil::checkString($var, True); + $this->topic = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SegmentSettings.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SegmentSettings.php new file mode 100644 index 000000000000..9b21c31ca421 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SegmentSettings.php @@ -0,0 +1,123 @@ +google.cloud.video.transcoder.v1.SegmentSettings + */ +class SegmentSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Duration of the segments in seconds. The default is `6.0s`. Note that + * `segmentDuration` must be greater than or equal to + * [`gopDuration`](#videostream), and `segmentDuration` must be divisible by + * [`gopDuration`](#videostream). + * + * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; + */ + protected $segment_duration = null; + /** + * Required. Create an individual segment file. The default is `false`. + * + * Generated from protobuf field bool individual_segments = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $individual_segments = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $segment_duration + * Duration of the segments in seconds. The default is `6.0s`. Note that + * `segmentDuration` must be greater than or equal to + * [`gopDuration`](#videostream), and `segmentDuration` must be divisible by + * [`gopDuration`](#videostream). + * @type bool $individual_segments + * Required. Create an individual segment file. The default is `false`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Duration of the segments in seconds. The default is `6.0s`. Note that + * `segmentDuration` must be greater than or equal to + * [`gopDuration`](#videostream), and `segmentDuration` must be divisible by + * [`gopDuration`](#videostream). + * + * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getSegmentDuration() + { + return $this->segment_duration; + } + + public function hasSegmentDuration() + { + return isset($this->segment_duration); + } + + public function clearSegmentDuration() + { + unset($this->segment_duration); + } + + /** + * Duration of the segments in seconds. The default is `6.0s`. Note that + * `segmentDuration` must be greater than or equal to + * [`gopDuration`](#videostream), and `segmentDuration` must be divisible by + * [`gopDuration`](#videostream). + * + * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setSegmentDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->segment_duration = $var; + + return $this; + } + + /** + * Required. Create an individual segment file. The default is `false`. + * + * Generated from protobuf field bool individual_segments = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return bool + */ + public function getIndividualSegments() + { + return $this->individual_segments; + } + + /** + * Required. Create an individual segment file. The default is `false`. + * + * Generated from protobuf field bool individual_segments = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param bool $var + * @return $this + */ + public function setIndividualSegments($var) + { + GPBUtil::checkBool($var); + $this->individual_segments = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SpriteSheet.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SpriteSheet.php new file mode 100644 index 000000000000..b0b6c8cfeeca --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SpriteSheet.php @@ -0,0 +1,575 @@ +google.cloud.video.transcoder.v1.SpriteSheet + */ +class SpriteSheet extends \Google\Protobuf\Internal\Message +{ + /** + * Format type. The default is `jpeg`. + * Supported formats: + * - `jpeg` + * + * Generated from protobuf field string format = 1; + */ + protected $format = ''; + /** + * Required. File name prefix for the generated sprite sheets. + * Each sprite sheet has an incremental 10-digit zero-padded suffix starting + * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. + * + * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $file_prefix = ''; + /** + * Required. The width of sprite in pixels. Must be an even integer. To + * preserve the source aspect ratio, set the + * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] + * field or the + * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] + * field, but not both (the API will automatically calculate the missing + * field). + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $sprite_width_pixels = 0; + /** + * Required. The height of sprite in pixels. Must be an even integer. To + * preserve the source aspect ratio, set the + * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] + * field or the + * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] + * field, but not both (the API will automatically calculate the missing + * field). + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $sprite_height_pixels = 0; + /** + * The maximum number of sprites per row in a sprite sheet. The default is 0, + * which indicates no maximum limit. + * + * Generated from protobuf field int32 column_count = 5; + */ + protected $column_count = 0; + /** + * The maximum number of rows per sprite sheet. When the sprite sheet is full, + * a new sprite sheet is created. The default is 0, which indicates no maximum + * limit. + * + * Generated from protobuf field int32 row_count = 6; + */ + protected $row_count = 0; + /** + * Start time in seconds, relative to the output file timeline. Determines the + * first sprite to pick. The default is `0s`. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 7; + */ + protected $start_time_offset = null; + /** + * End time in seconds, relative to the output file timeline. When + * `end_time_offset` is not specified, the sprites are generated until the end + * of the output file. + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 8; + */ + protected $end_time_offset = null; + /** + * The quality of the generated sprite sheet. Enter a value between 1 + * and 100, where 1 is the lowest quality and 100 is the highest quality. + * The default is 100. A high quality value corresponds to a low image data + * compression ratio. + * + * Generated from protobuf field int32 quality = 11; + */ + protected $quality = 0; + protected $extraction_strategy; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $format + * Format type. The default is `jpeg`. + * Supported formats: + * - `jpeg` + * @type string $file_prefix + * Required. File name prefix for the generated sprite sheets. + * Each sprite sheet has an incremental 10-digit zero-padded suffix starting + * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. + * @type int $sprite_width_pixels + * Required. The width of sprite in pixels. Must be an even integer. To + * preserve the source aspect ratio, set the + * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] + * field or the + * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] + * field, but not both (the API will automatically calculate the missing + * field). + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * @type int $sprite_height_pixels + * Required. The height of sprite in pixels. Must be an even integer. To + * preserve the source aspect ratio, set the + * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] + * field or the + * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] + * field, but not both (the API will automatically calculate the missing + * field). + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * @type int $column_count + * The maximum number of sprites per row in a sprite sheet. The default is 0, + * which indicates no maximum limit. + * @type int $row_count + * The maximum number of rows per sprite sheet. When the sprite sheet is full, + * a new sprite sheet is created. The default is 0, which indicates no maximum + * limit. + * @type \Google\Protobuf\Duration $start_time_offset + * Start time in seconds, relative to the output file timeline. Determines the + * first sprite to pick. The default is `0s`. + * @type \Google\Protobuf\Duration $end_time_offset + * End time in seconds, relative to the output file timeline. When + * `end_time_offset` is not specified, the sprites are generated until the end + * of the output file. + * @type int $total_count + * Total number of sprites. Create the specified number of sprites + * distributed evenly across the timeline of the output media. The default + * is 100. + * @type \Google\Protobuf\Duration $interval + * Starting from `0s`, create sprites at regular intervals. Specify the + * interval value in seconds. + * @type int $quality + * The quality of the generated sprite sheet. Enter a value between 1 + * and 100, where 1 is the lowest quality and 100 is the highest quality. + * The default is 100. A high quality value corresponds to a low image data + * compression ratio. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Format type. The default is `jpeg`. + * Supported formats: + * - `jpeg` + * + * Generated from protobuf field string format = 1; + * @return string + */ + public function getFormat() + { + return $this->format; + } + + /** + * Format type. The default is `jpeg`. + * Supported formats: + * - `jpeg` + * + * Generated from protobuf field string format = 1; + * @param string $var + * @return $this + */ + public function setFormat($var) + { + GPBUtil::checkString($var, True); + $this->format = $var; + + return $this; + } + + /** + * Required. File name prefix for the generated sprite sheets. + * Each sprite sheet has an incremental 10-digit zero-padded suffix starting + * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. + * + * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFilePrefix() + { + return $this->file_prefix; + } + + /** + * Required. File name prefix for the generated sprite sheets. + * Each sprite sheet has an incremental 10-digit zero-padded suffix starting + * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. + * + * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFilePrefix($var) + { + GPBUtil::checkString($var, True); + $this->file_prefix = $var; + + return $this; + } + + /** + * Required. The width of sprite in pixels. Must be an even integer. To + * preserve the source aspect ratio, set the + * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] + * field or the + * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] + * field, but not both (the API will automatically calculate the missing + * field). + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getSpriteWidthPixels() + { + return $this->sprite_width_pixels; + } + + /** + * Required. The width of sprite in pixels. Must be an even integer. To + * preserve the source aspect ratio, set the + * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] + * field or the + * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] + * field, but not both (the API will automatically calculate the missing + * field). + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setSpriteWidthPixels($var) + { + GPBUtil::checkInt32($var); + $this->sprite_width_pixels = $var; + + return $this; + } + + /** + * Required. The height of sprite in pixels. Must be an even integer. To + * preserve the source aspect ratio, set the + * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] + * field or the + * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] + * field, but not both (the API will automatically calculate the missing + * field). + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getSpriteHeightPixels() + { + return $this->sprite_height_pixels; + } + + /** + * Required. The height of sprite in pixels. Must be an even integer. To + * preserve the source aspect ratio, set the + * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] + * field or the + * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] + * field, but not both (the API will automatically calculate the missing + * field). + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setSpriteHeightPixels($var) + { + GPBUtil::checkInt32($var); + $this->sprite_height_pixels = $var; + + return $this; + } + + /** + * The maximum number of sprites per row in a sprite sheet. The default is 0, + * which indicates no maximum limit. + * + * Generated from protobuf field int32 column_count = 5; + * @return int + */ + public function getColumnCount() + { + return $this->column_count; + } + + /** + * The maximum number of sprites per row in a sprite sheet. The default is 0, + * which indicates no maximum limit. + * + * Generated from protobuf field int32 column_count = 5; + * @param int $var + * @return $this + */ + public function setColumnCount($var) + { + GPBUtil::checkInt32($var); + $this->column_count = $var; + + return $this; + } + + /** + * The maximum number of rows per sprite sheet. When the sprite sheet is full, + * a new sprite sheet is created. The default is 0, which indicates no maximum + * limit. + * + * Generated from protobuf field int32 row_count = 6; + * @return int + */ + public function getRowCount() + { + return $this->row_count; + } + + /** + * The maximum number of rows per sprite sheet. When the sprite sheet is full, + * a new sprite sheet is created. The default is 0, which indicates no maximum + * limit. + * + * Generated from protobuf field int32 row_count = 6; + * @param int $var + * @return $this + */ + public function setRowCount($var) + { + GPBUtil::checkInt32($var); + $this->row_count = $var; + + return $this; + } + + /** + * Start time in seconds, relative to the output file timeline. Determines the + * first sprite to pick. The default is `0s`. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getStartTimeOffset() + { + return $this->start_time_offset; + } + + public function hasStartTimeOffset() + { + return isset($this->start_time_offset); + } + + public function clearStartTimeOffset() + { + unset($this->start_time_offset); + } + + /** + * Start time in seconds, relative to the output file timeline. Determines the + * first sprite to pick. The default is `0s`. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_time_offset = $var; + + return $this; + } + + /** + * End time in seconds, relative to the output file timeline. When + * `end_time_offset` is not specified, the sprites are generated until the end + * of the output file. + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getEndTimeOffset() + { + return $this->end_time_offset; + } + + public function hasEndTimeOffset() + { + return isset($this->end_time_offset); + } + + public function clearEndTimeOffset() + { + unset($this->end_time_offset); + } + + /** + * End time in seconds, relative to the output file timeline. When + * `end_time_offset` is not specified, the sprites are generated until the end + * of the output file. + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setEndTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->end_time_offset = $var; + + return $this; + } + + /** + * Total number of sprites. Create the specified number of sprites + * distributed evenly across the timeline of the output media. The default + * is 100. + * + * Generated from protobuf field int32 total_count = 9; + * @return int + */ + public function getTotalCount() + { + return $this->readOneof(9); + } + + public function hasTotalCount() + { + return $this->hasOneof(9); + } + + /** + * Total number of sprites. Create the specified number of sprites + * distributed evenly across the timeline of the output media. The default + * is 100. + * + * Generated from protobuf field int32 total_count = 9; + * @param int $var + * @return $this + */ + public function setTotalCount($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Starting from `0s`, create sprites at regular intervals. Specify the + * interval value in seconds. + * + * Generated from protobuf field .google.protobuf.Duration interval = 10; + * @return \Google\Protobuf\Duration|null + */ + public function getInterval() + { + return $this->readOneof(10); + } + + public function hasInterval() + { + return $this->hasOneof(10); + } + + /** + * Starting from `0s`, create sprites at regular intervals. Specify the + * interval value in seconds. + * + * Generated from protobuf field .google.protobuf.Duration interval = 10; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * The quality of the generated sprite sheet. Enter a value between 1 + * and 100, where 1 is the lowest quality and 100 is the highest quality. + * The default is 100. A high quality value corresponds to a low image data + * compression ratio. + * + * Generated from protobuf field int32 quality = 11; + * @return int + */ + public function getQuality() + { + return $this->quality; + } + + /** + * The quality of the generated sprite sheet. Enter a value between 1 + * and 100, where 1 is the lowest quality and 100 is the highest quality. + * The default is 100. A high quality value corresponds to a low image data + * compression ratio. + * + * Generated from protobuf field int32 quality = 11; + * @param int $var + * @return $this + */ + public function setQuality($var) + { + GPBUtil::checkInt32($var); + $this->quality = $var; + + return $this; + } + + /** + * @return string + */ + public function getExtractionStrategy() + { + return $this->whichOneof("extraction_strategy"); + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream.php new file mode 100644 index 000000000000..e7f56aa9a086 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream.php @@ -0,0 +1,209 @@ +google.cloud.video.transcoder.v1.TextStream + */ +class TextStream extends \Google\Protobuf\Internal\Message +{ + /** + * The codec for this text stream. The default is `webvtt`. + * Supported text codecs: + * - `srt` + * - `ttml` + * - `cea608` + * - `cea708` + * - `webvtt` + * + * Generated from protobuf field string codec = 1; + */ + protected $codec = ''; + /** + * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more + * information, see + * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not + * supported in MP4 files. + * + * Generated from protobuf field string language_code = 2; + */ + protected $language_code = ''; + /** + * The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.TextStream.TextMapping mapping = 3; + */ + private $mapping; + /** + * The name for this particular text stream that + * will be added to the HLS/DASH manifest. Not supported in MP4 files. + * + * Generated from protobuf field string display_name = 4; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $codec + * The codec for this text stream. The default is `webvtt`. + * Supported text codecs: + * - `srt` + * - `ttml` + * - `cea608` + * - `cea708` + * - `webvtt` + * @type string $language_code + * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more + * information, see + * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not + * supported in MP4 files. + * @type array<\Google\Cloud\Video\Transcoder\V1\TextStream\TextMapping>|\Google\Protobuf\Internal\RepeatedField $mapping + * The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. + * @type string $display_name + * The name for this particular text stream that + * will be added to the HLS/DASH manifest. Not supported in MP4 files. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The codec for this text stream. The default is `webvtt`. + * Supported text codecs: + * - `srt` + * - `ttml` + * - `cea608` + * - `cea708` + * - `webvtt` + * + * Generated from protobuf field string codec = 1; + * @return string + */ + public function getCodec() + { + return $this->codec; + } + + /** + * The codec for this text stream. The default is `webvtt`. + * Supported text codecs: + * - `srt` + * - `ttml` + * - `cea608` + * - `cea708` + * - `webvtt` + * + * Generated from protobuf field string codec = 1; + * @param string $var + * @return $this + */ + public function setCodec($var) + { + GPBUtil::checkString($var, True); + $this->codec = $var; + + return $this; + } + + /** + * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more + * information, see + * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not + * supported in MP4 files. + * + * Generated from protobuf field string language_code = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more + * information, see + * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not + * supported in MP4 files. + * + * Generated from protobuf field string language_code = 2; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.TextStream.TextMapping mapping = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMapping() + { + return $this->mapping; + } + + /** + * The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.TextStream.TextMapping mapping = 3; + * @param array<\Google\Cloud\Video\Transcoder\V1\TextStream\TextMapping>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMapping($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\TextStream\TextMapping::class); + $this->mapping = $arr; + + return $this; + } + + /** + * The name for this particular text stream that + * will be added to the HLS/DASH manifest. Not supported in MP4 files. + * + * Generated from protobuf field string display_name = 4; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The name for this particular text stream that + * will be added to the HLS/DASH manifest. Not supported in MP4 files. + * + * Generated from protobuf field string display_name = 4; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream/TextMapping.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream/TextMapping.php new file mode 100644 index 000000000000..c8404457843c --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream/TextMapping.php @@ -0,0 +1,142 @@ +google.cloud.video.transcoder.v1.TextStream.TextMapping + */ +class TextMapping extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `EditAtom.key` that references atom with text inputs in the + * `Job.edit_list`. + * + * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $atom_key = ''; + /** + * Required. The `Input.key` that identifies the input file. + * + * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_key = ''; + /** + * Required. The zero-based index of the track in the input file. + * + * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_track = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $atom_key + * Required. The `EditAtom.key` that references atom with text inputs in the + * `Job.edit_list`. + * @type string $input_key + * Required. The `Input.key` that identifies the input file. + * @type int $input_track + * Required. The zero-based index of the track in the input file. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `EditAtom.key` that references atom with text inputs in the + * `Job.edit_list`. + * + * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAtomKey() + { + return $this->atom_key; + } + + /** + * Required. The `EditAtom.key` that references atom with text inputs in the + * `Job.edit_list`. + * + * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAtomKey($var) + { + GPBUtil::checkString($var, True); + $this->atom_key = $var; + + return $this; + } + + /** + * Required. The `Input.key` that identifies the input file. + * + * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInputKey() + { + return $this->input_key; + } + + /** + * Required. The `Input.key` that identifies the input file. + * + * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInputKey($var) + { + GPBUtil::checkString($var, True); + $this->input_key = $var; + + return $this; + } + + /** + * Required. The zero-based index of the track in the input file. + * + * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getInputTrack() + { + return $this->input_track; + } + + /** + * Required. The zero-based index of the track in the input file. + * + * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setInputTrack($var) + { + GPBUtil::checkInt32($var); + $this->input_track = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TextMapping::class, \Google\Cloud\Video\Transcoder\V1\TextStream_TextMapping::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TranscoderServiceGrpcClient.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TranscoderServiceGrpcClient.php new file mode 100644 index 000000000000..4d596419e3fd --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TranscoderServiceGrpcClient.php @@ -0,0 +1,160 @@ +_simpleRequest('/google.cloud.video.transcoder.v1.TranscoderService/CreateJob', + $argument, + ['\Google\Cloud\Video\Transcoder\V1\Job', 'decode'], + $metadata, $options); + } + + /** + * Lists jobs in the specified region. + * @param \Google\Cloud\Video\Transcoder\V1\ListJobsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListJobs(\Google\Cloud\Video\Transcoder\V1\ListJobsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.transcoder.v1.TranscoderService/ListJobs', + $argument, + ['\Google\Cloud\Video\Transcoder\V1\ListJobsResponse', 'decode'], + $metadata, $options); + } + + /** + * Returns the job data. + * @param \Google\Cloud\Video\Transcoder\V1\GetJobRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetJob(\Google\Cloud\Video\Transcoder\V1\GetJobRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.transcoder.v1.TranscoderService/GetJob', + $argument, + ['\Google\Cloud\Video\Transcoder\V1\Job', 'decode'], + $metadata, $options); + } + + /** + * Deletes a job. + * @param \Google\Cloud\Video\Transcoder\V1\DeleteJobRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteJob(\Google\Cloud\Video\Transcoder\V1\DeleteJobRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.transcoder.v1.TranscoderService/DeleteJob', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Creates a job template in the specified region. + * @param \Google\Cloud\Video\Transcoder\V1\CreateJobTemplateRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateJobTemplate(\Google\Cloud\Video\Transcoder\V1\CreateJobTemplateRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.transcoder.v1.TranscoderService/CreateJobTemplate', + $argument, + ['\Google\Cloud\Video\Transcoder\V1\JobTemplate', 'decode'], + $metadata, $options); + } + + /** + * Lists job templates in the specified region. + * @param \Google\Cloud\Video\Transcoder\V1\ListJobTemplatesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListJobTemplates(\Google\Cloud\Video\Transcoder\V1\ListJobTemplatesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.transcoder.v1.TranscoderService/ListJobTemplates', + $argument, + ['\Google\Cloud\Video\Transcoder\V1\ListJobTemplatesResponse', 'decode'], + $metadata, $options); + } + + /** + * Returns the job template data. + * @param \Google\Cloud\Video\Transcoder\V1\GetJobTemplateRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetJobTemplate(\Google\Cloud\Video\Transcoder\V1\GetJobTemplateRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.transcoder.v1.TranscoderService/GetJobTemplate', + $argument, + ['\Google\Cloud\Video\Transcoder\V1\JobTemplate', 'decode'], + $metadata, $options); + } + + /** + * Deletes a job template. + * @param \Google\Cloud\Video\Transcoder\V1\DeleteJobTemplateRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteJobTemplate(\Google\Cloud\Video\Transcoder\V1\DeleteJobTemplateRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.video.transcoder.v1.TranscoderService/DeleteJobTemplate', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream.php new file mode 100644 index 000000000000..d3374d958e63 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream.php @@ -0,0 +1,141 @@ +google.cloud.video.transcoder.v1.VideoStream + */ +class VideoStream extends \Google\Protobuf\Internal\Message +{ + protected $codec_settings; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Transcoder\V1\VideoStream\H264CodecSettings $h264 + * H264 codec settings. + * @type \Google\Cloud\Video\Transcoder\V1\VideoStream\H265CodecSettings $h265 + * H265 codec settings. + * @type \Google\Cloud\Video\Transcoder\V1\VideoStream\Vp9CodecSettings $vp9 + * VP9 codec settings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * H264 codec settings. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings h264 = 1; + * @return \Google\Cloud\Video\Transcoder\V1\VideoStream\H264CodecSettings|null + */ + public function getH264() + { + return $this->readOneof(1); + } + + public function hasH264() + { + return $this->hasOneof(1); + } + + /** + * H264 codec settings. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings h264 = 1; + * @param \Google\Cloud\Video\Transcoder\V1\VideoStream\H264CodecSettings $var + * @return $this + */ + public function setH264($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\VideoStream\H264CodecSettings::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * H265 codec settings. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings h265 = 2; + * @return \Google\Cloud\Video\Transcoder\V1\VideoStream\H265CodecSettings|null + */ + public function getH265() + { + return $this->readOneof(2); + } + + public function hasH265() + { + return $this->hasOneof(2); + } + + /** + * H265 codec settings. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings h265 = 2; + * @param \Google\Cloud\Video\Transcoder\V1\VideoStream\H265CodecSettings $var + * @return $this + */ + public function setH265($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\VideoStream\H265CodecSettings::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * VP9 codec settings. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings vp9 = 3; + * @return \Google\Cloud\Video\Transcoder\V1\VideoStream\Vp9CodecSettings|null + */ + public function getVp9() + { + return $this->readOneof(3); + } + + public function hasVp9() + { + return $this->hasOneof(3); + } + + /** + * VP9 codec settings. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings vp9 = 3; + * @param \Google\Cloud\Video\Transcoder\V1\VideoStream\Vp9CodecSettings $var + * @return $this + */ + public function setVp9($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\VideoStream\Vp9CodecSettings::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getCodecSettings() + { + return $this->whichOneof("codec_settings"); + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H264CodecSettings.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H264CodecSettings.php new file mode 100644 index 000000000000..0474d647aed6 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H264CodecSettings.php @@ -0,0 +1,994 @@ +google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + */ +class H264CodecSettings extends \Google\Protobuf\Internal\Message +{ + /** + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 width_pixels = 1; + */ + protected $width_pixels = 0; + /** + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 height_pixels = 2; + */ + protected $height_pixels = 0; + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $frame_rate = 0.0; + /** + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 800,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bitrate_bps = 0; + /** + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * + * Generated from protobuf field string pixel_format = 5; + */ + protected $pixel_format = ''; + /** + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * - `crf` - constant rate factor + * + * Generated from protobuf field string rate_control_mode = 6; + */ + protected $rate_control_mode = ''; + /** + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * + * Generated from protobuf field int32 crf_level = 7; + */ + protected $crf_level = 0; + /** + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * + * Generated from protobuf field bool allow_open_gop = 8; + */ + protected $allow_open_gop = false; + /** + * Use two-pass encoding strategy to achieve better video quality. + * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. + * + * Generated from protobuf field bool enable_two_pass = 11; + */ + protected $enable_two_pass = false; + /** + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to `VideoStream.bitrate_bps`. + * + * Generated from protobuf field int32 vbv_size_bits = 12; + */ + protected $vbv_size_bits = 0; + /** + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * `VideoStream.vbv_size_bits`. + * + * Generated from protobuf field int32 vbv_fullness_bits = 13; + */ + protected $vbv_fullness_bits = 0; + /** + * The entropy coder to use. The default is `cabac`. + * Supported entropy coders: + * - `cavlc` + * - `cabac` + * + * Generated from protobuf field string entropy_coder = 14; + */ + protected $entropy_coder = ''; + /** + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * + * Generated from protobuf field bool b_pyramid = 15; + */ + protected $b_pyramid = false; + /** + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than `VideoStream.gop_frame_count` if set. The default + * is 0. + * + * Generated from protobuf field int32 b_frame_count = 16; + */ + protected $b_frame_count = 0; + /** + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * + * Generated from protobuf field double aq_strength = 17; + */ + protected $aq_strength = 0.0; + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * `baseline` + * * `main` + * * `high` (default) + * The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * + * Generated from protobuf field string profile = 18; + */ + protected $profile = ''; + /** + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * + * Generated from protobuf field string tune = 19; + */ + protected $tune = ''; + /** + * Enforces the specified codec preset. The default is `veryfast`. The + * available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * + * Generated from protobuf field string preset = 20; + */ + protected $preset = ''; + protected $gop_mode; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $width_pixels + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * @type int $height_pixels + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * @type float $frame_rate + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * @type int $bitrate_bps + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 800,000,000. + * @type string $pixel_format + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * @type string $rate_control_mode + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * - `crf` - constant rate factor + * @type int $crf_level + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * @type bool $allow_open_gop + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * @type int $gop_frame_count + * Select the GOP size based on the specified frame count. Must be greater + * than zero. + * @type \Google\Protobuf\Duration $gop_duration + * Select the GOP size based on the specified duration. The default is + * `3s`. Note that `gopDuration` must be less than or equal to + * [`segmentDuration`](#SegmentSettings), and + * [`segmentDuration`](#SegmentSettings) must be divisible by + * `gopDuration`. + * @type bool $enable_two_pass + * Use two-pass encoding strategy to achieve better video quality. + * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. + * @type int $vbv_size_bits + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to `VideoStream.bitrate_bps`. + * @type int $vbv_fullness_bits + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * `VideoStream.vbv_size_bits`. + * @type string $entropy_coder + * The entropy coder to use. The default is `cabac`. + * Supported entropy coders: + * - `cavlc` + * - `cabac` + * @type bool $b_pyramid + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * @type int $b_frame_count + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than `VideoStream.gop_frame_count` if set. The default + * is 0. + * @type float $aq_strength + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * @type string $profile + * Enforces the specified codec profile. The following profiles are + * supported: + * * `baseline` + * * `main` + * * `high` (default) + * The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * @type string $tune + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * @type string $preset + * Enforces the specified codec preset. The default is `veryfast`. The + * available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 width_pixels = 1; + * @return int + */ + public function getWidthPixels() + { + return $this->width_pixels; + } + + /** + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 width_pixels = 1; + * @param int $var + * @return $this + */ + public function setWidthPixels($var) + { + GPBUtil::checkInt32($var); + $this->width_pixels = $var; + + return $this; + } + + /** + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 height_pixels = 2; + * @return int + */ + public function getHeightPixels() + { + return $this->height_pixels; + } + + /** + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 height_pixels = 2; + * @param int $var + * @return $this + */ + public function setHeightPixels($var) + { + GPBUtil::checkInt32($var); + $this->height_pixels = $var; + + return $this; + } + + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return float + */ + public function getFrameRate() + { + return $this->frame_rate; + } + + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param float $var + * @return $this + */ + public function setFrameRate($var) + { + GPBUtil::checkDouble($var); + $this->frame_rate = $var; + + return $this; + } + + /** + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 800,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getBitrateBps() + { + return $this->bitrate_bps; + } + + /** + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 800,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setBitrateBps($var) + { + GPBUtil::checkInt32($var); + $this->bitrate_bps = $var; + + return $this; + } + + /** + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * + * Generated from protobuf field string pixel_format = 5; + * @return string + */ + public function getPixelFormat() + { + return $this->pixel_format; + } + + /** + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * + * Generated from protobuf field string pixel_format = 5; + * @param string $var + * @return $this + */ + public function setPixelFormat($var) + { + GPBUtil::checkString($var, True); + $this->pixel_format = $var; + + return $this; + } + + /** + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * - `crf` - constant rate factor + * + * Generated from protobuf field string rate_control_mode = 6; + * @return string + */ + public function getRateControlMode() + { + return $this->rate_control_mode; + } + + /** + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * - `crf` - constant rate factor + * + * Generated from protobuf field string rate_control_mode = 6; + * @param string $var + * @return $this + */ + public function setRateControlMode($var) + { + GPBUtil::checkString($var, True); + $this->rate_control_mode = $var; + + return $this; + } + + /** + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * + * Generated from protobuf field int32 crf_level = 7; + * @return int + */ + public function getCrfLevel() + { + return $this->crf_level; + } + + /** + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * + * Generated from protobuf field int32 crf_level = 7; + * @param int $var + * @return $this + */ + public function setCrfLevel($var) + { + GPBUtil::checkInt32($var); + $this->crf_level = $var; + + return $this; + } + + /** + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * + * Generated from protobuf field bool allow_open_gop = 8; + * @return bool + */ + public function getAllowOpenGop() + { + return $this->allow_open_gop; + } + + /** + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * + * Generated from protobuf field bool allow_open_gop = 8; + * @param bool $var + * @return $this + */ + public function setAllowOpenGop($var) + { + GPBUtil::checkBool($var); + $this->allow_open_gop = $var; + + return $this; + } + + /** + * Select the GOP size based on the specified frame count. Must be greater + * than zero. + * + * Generated from protobuf field int32 gop_frame_count = 9; + * @return int + */ + public function getGopFrameCount() + { + return $this->readOneof(9); + } + + public function hasGopFrameCount() + { + return $this->hasOneof(9); + } + + /** + * Select the GOP size based on the specified frame count. Must be greater + * than zero. + * + * Generated from protobuf field int32 gop_frame_count = 9; + * @param int $var + * @return $this + */ + public function setGopFrameCount($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Select the GOP size based on the specified duration. The default is + * `3s`. Note that `gopDuration` must be less than or equal to + * [`segmentDuration`](#SegmentSettings), and + * [`segmentDuration`](#SegmentSettings) must be divisible by + * `gopDuration`. + * + * Generated from protobuf field .google.protobuf.Duration gop_duration = 10; + * @return \Google\Protobuf\Duration|null + */ + public function getGopDuration() + { + return $this->readOneof(10); + } + + public function hasGopDuration() + { + return $this->hasOneof(10); + } + + /** + * Select the GOP size based on the specified duration. The default is + * `3s`. Note that `gopDuration` must be less than or equal to + * [`segmentDuration`](#SegmentSettings), and + * [`segmentDuration`](#SegmentSettings) must be divisible by + * `gopDuration`. + * + * Generated from protobuf field .google.protobuf.Duration gop_duration = 10; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setGopDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Use two-pass encoding strategy to achieve better video quality. + * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. + * + * Generated from protobuf field bool enable_two_pass = 11; + * @return bool + */ + public function getEnableTwoPass() + { + return $this->enable_two_pass; + } + + /** + * Use two-pass encoding strategy to achieve better video quality. + * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. + * + * Generated from protobuf field bool enable_two_pass = 11; + * @param bool $var + * @return $this + */ + public function setEnableTwoPass($var) + { + GPBUtil::checkBool($var); + $this->enable_two_pass = $var; + + return $this; + } + + /** + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to `VideoStream.bitrate_bps`. + * + * Generated from protobuf field int32 vbv_size_bits = 12; + * @return int + */ + public function getVbvSizeBits() + { + return $this->vbv_size_bits; + } + + /** + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to `VideoStream.bitrate_bps`. + * + * Generated from protobuf field int32 vbv_size_bits = 12; + * @param int $var + * @return $this + */ + public function setVbvSizeBits($var) + { + GPBUtil::checkInt32($var); + $this->vbv_size_bits = $var; + + return $this; + } + + /** + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * `VideoStream.vbv_size_bits`. + * + * Generated from protobuf field int32 vbv_fullness_bits = 13; + * @return int + */ + public function getVbvFullnessBits() + { + return $this->vbv_fullness_bits; + } + + /** + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * `VideoStream.vbv_size_bits`. + * + * Generated from protobuf field int32 vbv_fullness_bits = 13; + * @param int $var + * @return $this + */ + public function setVbvFullnessBits($var) + { + GPBUtil::checkInt32($var); + $this->vbv_fullness_bits = $var; + + return $this; + } + + /** + * The entropy coder to use. The default is `cabac`. + * Supported entropy coders: + * - `cavlc` + * - `cabac` + * + * Generated from protobuf field string entropy_coder = 14; + * @return string + */ + public function getEntropyCoder() + { + return $this->entropy_coder; + } + + /** + * The entropy coder to use. The default is `cabac`. + * Supported entropy coders: + * - `cavlc` + * - `cabac` + * + * Generated from protobuf field string entropy_coder = 14; + * @param string $var + * @return $this + */ + public function setEntropyCoder($var) + { + GPBUtil::checkString($var, True); + $this->entropy_coder = $var; + + return $this; + } + + /** + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * + * Generated from protobuf field bool b_pyramid = 15; + * @return bool + */ + public function getBPyramid() + { + return $this->b_pyramid; + } + + /** + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * + * Generated from protobuf field bool b_pyramid = 15; + * @param bool $var + * @return $this + */ + public function setBPyramid($var) + { + GPBUtil::checkBool($var); + $this->b_pyramid = $var; + + return $this; + } + + /** + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than `VideoStream.gop_frame_count` if set. The default + * is 0. + * + * Generated from protobuf field int32 b_frame_count = 16; + * @return int + */ + public function getBFrameCount() + { + return $this->b_frame_count; + } + + /** + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than `VideoStream.gop_frame_count` if set. The default + * is 0. + * + * Generated from protobuf field int32 b_frame_count = 16; + * @param int $var + * @return $this + */ + public function setBFrameCount($var) + { + GPBUtil::checkInt32($var); + $this->b_frame_count = $var; + + return $this; + } + + /** + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * + * Generated from protobuf field double aq_strength = 17; + * @return float + */ + public function getAqStrength() + { + return $this->aq_strength; + } + + /** + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * + * Generated from protobuf field double aq_strength = 17; + * @param float $var + * @return $this + */ + public function setAqStrength($var) + { + GPBUtil::checkDouble($var); + $this->aq_strength = $var; + + return $this; + } + + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * `baseline` + * * `main` + * * `high` (default) + * The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * + * Generated from protobuf field string profile = 18; + * @return string + */ + public function getProfile() + { + return $this->profile; + } + + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * `baseline` + * * `main` + * * `high` (default) + * The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * + * Generated from protobuf field string profile = 18; + * @param string $var + * @return $this + */ + public function setProfile($var) + { + GPBUtil::checkString($var, True); + $this->profile = $var; + + return $this; + } + + /** + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * + * Generated from protobuf field string tune = 19; + * @return string + */ + public function getTune() + { + return $this->tune; + } + + /** + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * + * Generated from protobuf field string tune = 19; + * @param string $var + * @return $this + */ + public function setTune($var) + { + GPBUtil::checkString($var, True); + $this->tune = $var; + + return $this; + } + + /** + * Enforces the specified codec preset. The default is `veryfast`. The + * available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * + * Generated from protobuf field string preset = 20; + * @return string + */ + public function getPreset() + { + return $this->preset; + } + + /** + * Enforces the specified codec preset. The default is `veryfast`. The + * available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * + * Generated from protobuf field string preset = 20; + * @param string $var + * @return $this + */ + public function setPreset($var) + { + GPBUtil::checkString($var, True); + $this->preset = $var; + + return $this; + } + + /** + * @return string + */ + public function getGopMode() + { + return $this->whichOneof("gop_mode"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(H264CodecSettings::class, \Google\Cloud\Video\Transcoder\V1\VideoStream_H264CodecSettings::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H265CodecSettings.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H265CodecSettings.php new file mode 100644 index 000000000000..e19c5340e52e --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H265CodecSettings.php @@ -0,0 +1,1008 @@ +google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + */ +class H265CodecSettings extends \Google\Protobuf\Internal\Message +{ + /** + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 width_pixels = 1; + */ + protected $width_pixels = 0; + /** + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 height_pixels = 2; + */ + protected $height_pixels = 0; + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $frame_rate = 0.0; + /** + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 800,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bitrate_bps = 0; + /** + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * + * Generated from protobuf field string pixel_format = 5; + */ + protected $pixel_format = ''; + /** + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * - `crf` - constant rate factor + * + * Generated from protobuf field string rate_control_mode = 6; + */ + protected $rate_control_mode = ''; + /** + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * + * Generated from protobuf field int32 crf_level = 7; + */ + protected $crf_level = 0; + /** + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * + * Generated from protobuf field bool allow_open_gop = 8; + */ + protected $allow_open_gop = false; + /** + * Use two-pass encoding strategy to achieve better video quality. + * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. + * + * Generated from protobuf field bool enable_two_pass = 11; + */ + protected $enable_two_pass = false; + /** + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to `VideoStream.bitrate_bps`. + * + * Generated from protobuf field int32 vbv_size_bits = 12; + */ + protected $vbv_size_bits = 0; + /** + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * `VideoStream.vbv_size_bits`. + * + * Generated from protobuf field int32 vbv_fullness_bits = 13; + */ + protected $vbv_fullness_bits = 0; + /** + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * + * Generated from protobuf field bool b_pyramid = 14; + */ + protected $b_pyramid = false; + /** + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than `VideoStream.gop_frame_count` if set. The default + * is 0. + * + * Generated from protobuf field int32 b_frame_count = 15; + */ + protected $b_frame_count = 0; + /** + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * + * Generated from protobuf field double aq_strength = 16; + */ + protected $aq_strength = 0.0; + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * 8-bit profiles + * * `main` (default) + * * `main-intra` + * * `mainstillpicture` + * * 10-bit profiles + * * `main10` (default) + * * `main10-intra` + * * `main422-10` + * * `main422-10-intra` + * * `main444-10` + * * `main444-10-intra` + * * 12-bit profiles + * * `main12` (default) + * * `main12-intra` + * * `main422-12` + * * `main422-12-intra` + * * `main444-12` + * * `main444-12-intra` + * The available options are + * [FFmpeg-compatible](https://x265.readthedocs.io/). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * + * Generated from protobuf field string profile = 17; + */ + protected $profile = ''; + /** + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * + * Generated from protobuf field string tune = 18; + */ + protected $tune = ''; + /** + * Enforces the specified codec preset. The default is `veryfast`. The + * available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * + * Generated from protobuf field string preset = 19; + */ + protected $preset = ''; + protected $gop_mode; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $width_pixels + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * @type int $height_pixels + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * @type float $frame_rate + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * @type int $bitrate_bps + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 800,000,000. + * @type string $pixel_format + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * @type string $rate_control_mode + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * - `crf` - constant rate factor + * @type int $crf_level + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * @type bool $allow_open_gop + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * @type int $gop_frame_count + * Select the GOP size based on the specified frame count. Must be greater + * than zero. + * @type \Google\Protobuf\Duration $gop_duration + * Select the GOP size based on the specified duration. The default is + * `3s`. Note that `gopDuration` must be less than or equal to + * [`segmentDuration`](#SegmentSettings), and + * [`segmentDuration`](#SegmentSettings) must be divisible by + * `gopDuration`. + * @type bool $enable_two_pass + * Use two-pass encoding strategy to achieve better video quality. + * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. + * @type int $vbv_size_bits + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to `VideoStream.bitrate_bps`. + * @type int $vbv_fullness_bits + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * `VideoStream.vbv_size_bits`. + * @type bool $b_pyramid + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * @type int $b_frame_count + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than `VideoStream.gop_frame_count` if set. The default + * is 0. + * @type float $aq_strength + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * @type string $profile + * Enforces the specified codec profile. The following profiles are + * supported: + * * 8-bit profiles + * * `main` (default) + * * `main-intra` + * * `mainstillpicture` + * * 10-bit profiles + * * `main10` (default) + * * `main10-intra` + * * `main422-10` + * * `main422-10-intra` + * * `main444-10` + * * `main444-10-intra` + * * 12-bit profiles + * * `main12` (default) + * * `main12-intra` + * * `main422-12` + * * `main422-12-intra` + * * `main444-12` + * * `main444-12-intra` + * The available options are + * [FFmpeg-compatible](https://x265.readthedocs.io/). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * @type string $tune + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * @type string $preset + * Enforces the specified codec preset. The default is `veryfast`. The + * available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 width_pixels = 1; + * @return int + */ + public function getWidthPixels() + { + return $this->width_pixels; + } + + /** + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 width_pixels = 1; + * @param int $var + * @return $this + */ + public function setWidthPixels($var) + { + GPBUtil::checkInt32($var); + $this->width_pixels = $var; + + return $this; + } + + /** + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 height_pixels = 2; + * @return int + */ + public function getHeightPixels() + { + return $this->height_pixels; + } + + /** + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 height_pixels = 2; + * @param int $var + * @return $this + */ + public function setHeightPixels($var) + { + GPBUtil::checkInt32($var); + $this->height_pixels = $var; + + return $this; + } + + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return float + */ + public function getFrameRate() + { + return $this->frame_rate; + } + + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param float $var + * @return $this + */ + public function setFrameRate($var) + { + GPBUtil::checkDouble($var); + $this->frame_rate = $var; + + return $this; + } + + /** + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 800,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getBitrateBps() + { + return $this->bitrate_bps; + } + + /** + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 800,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setBitrateBps($var) + { + GPBUtil::checkInt32($var); + $this->bitrate_bps = $var; + + return $this; + } + + /** + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * + * Generated from protobuf field string pixel_format = 5; + * @return string + */ + public function getPixelFormat() + { + return $this->pixel_format; + } + + /** + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * + * Generated from protobuf field string pixel_format = 5; + * @param string $var + * @return $this + */ + public function setPixelFormat($var) + { + GPBUtil::checkString($var, True); + $this->pixel_format = $var; + + return $this; + } + + /** + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * - `crf` - constant rate factor + * + * Generated from protobuf field string rate_control_mode = 6; + * @return string + */ + public function getRateControlMode() + { + return $this->rate_control_mode; + } + + /** + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * - `crf` - constant rate factor + * + * Generated from protobuf field string rate_control_mode = 6; + * @param string $var + * @return $this + */ + public function setRateControlMode($var) + { + GPBUtil::checkString($var, True); + $this->rate_control_mode = $var; + + return $this; + } + + /** + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * + * Generated from protobuf field int32 crf_level = 7; + * @return int + */ + public function getCrfLevel() + { + return $this->crf_level; + } + + /** + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * + * Generated from protobuf field int32 crf_level = 7; + * @param int $var + * @return $this + */ + public function setCrfLevel($var) + { + GPBUtil::checkInt32($var); + $this->crf_level = $var; + + return $this; + } + + /** + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * + * Generated from protobuf field bool allow_open_gop = 8; + * @return bool + */ + public function getAllowOpenGop() + { + return $this->allow_open_gop; + } + + /** + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * + * Generated from protobuf field bool allow_open_gop = 8; + * @param bool $var + * @return $this + */ + public function setAllowOpenGop($var) + { + GPBUtil::checkBool($var); + $this->allow_open_gop = $var; + + return $this; + } + + /** + * Select the GOP size based on the specified frame count. Must be greater + * than zero. + * + * Generated from protobuf field int32 gop_frame_count = 9; + * @return int + */ + public function getGopFrameCount() + { + return $this->readOneof(9); + } + + public function hasGopFrameCount() + { + return $this->hasOneof(9); + } + + /** + * Select the GOP size based on the specified frame count. Must be greater + * than zero. + * + * Generated from protobuf field int32 gop_frame_count = 9; + * @param int $var + * @return $this + */ + public function setGopFrameCount($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Select the GOP size based on the specified duration. The default is + * `3s`. Note that `gopDuration` must be less than or equal to + * [`segmentDuration`](#SegmentSettings), and + * [`segmentDuration`](#SegmentSettings) must be divisible by + * `gopDuration`. + * + * Generated from protobuf field .google.protobuf.Duration gop_duration = 10; + * @return \Google\Protobuf\Duration|null + */ + public function getGopDuration() + { + return $this->readOneof(10); + } + + public function hasGopDuration() + { + return $this->hasOneof(10); + } + + /** + * Select the GOP size based on the specified duration. The default is + * `3s`. Note that `gopDuration` must be less than or equal to + * [`segmentDuration`](#SegmentSettings), and + * [`segmentDuration`](#SegmentSettings) must be divisible by + * `gopDuration`. + * + * Generated from protobuf field .google.protobuf.Duration gop_duration = 10; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setGopDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Use two-pass encoding strategy to achieve better video quality. + * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. + * + * Generated from protobuf field bool enable_two_pass = 11; + * @return bool + */ + public function getEnableTwoPass() + { + return $this->enable_two_pass; + } + + /** + * Use two-pass encoding strategy to achieve better video quality. + * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. + * + * Generated from protobuf field bool enable_two_pass = 11; + * @param bool $var + * @return $this + */ + public function setEnableTwoPass($var) + { + GPBUtil::checkBool($var); + $this->enable_two_pass = $var; + + return $this; + } + + /** + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to `VideoStream.bitrate_bps`. + * + * Generated from protobuf field int32 vbv_size_bits = 12; + * @return int + */ + public function getVbvSizeBits() + { + return $this->vbv_size_bits; + } + + /** + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to `VideoStream.bitrate_bps`. + * + * Generated from protobuf field int32 vbv_size_bits = 12; + * @param int $var + * @return $this + */ + public function setVbvSizeBits($var) + { + GPBUtil::checkInt32($var); + $this->vbv_size_bits = $var; + + return $this; + } + + /** + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * `VideoStream.vbv_size_bits`. + * + * Generated from protobuf field int32 vbv_fullness_bits = 13; + * @return int + */ + public function getVbvFullnessBits() + { + return $this->vbv_fullness_bits; + } + + /** + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * `VideoStream.vbv_size_bits`. + * + * Generated from protobuf field int32 vbv_fullness_bits = 13; + * @param int $var + * @return $this + */ + public function setVbvFullnessBits($var) + { + GPBUtil::checkInt32($var); + $this->vbv_fullness_bits = $var; + + return $this; + } + + /** + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * + * Generated from protobuf field bool b_pyramid = 14; + * @return bool + */ + public function getBPyramid() + { + return $this->b_pyramid; + } + + /** + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * + * Generated from protobuf field bool b_pyramid = 14; + * @param bool $var + * @return $this + */ + public function setBPyramid($var) + { + GPBUtil::checkBool($var); + $this->b_pyramid = $var; + + return $this; + } + + /** + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than `VideoStream.gop_frame_count` if set. The default + * is 0. + * + * Generated from protobuf field int32 b_frame_count = 15; + * @return int + */ + public function getBFrameCount() + { + return $this->b_frame_count; + } + + /** + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than `VideoStream.gop_frame_count` if set. The default + * is 0. + * + * Generated from protobuf field int32 b_frame_count = 15; + * @param int $var + * @return $this + */ + public function setBFrameCount($var) + { + GPBUtil::checkInt32($var); + $this->b_frame_count = $var; + + return $this; + } + + /** + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * + * Generated from protobuf field double aq_strength = 16; + * @return float + */ + public function getAqStrength() + { + return $this->aq_strength; + } + + /** + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * + * Generated from protobuf field double aq_strength = 16; + * @param float $var + * @return $this + */ + public function setAqStrength($var) + { + GPBUtil::checkDouble($var); + $this->aq_strength = $var; + + return $this; + } + + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * 8-bit profiles + * * `main` (default) + * * `main-intra` + * * `mainstillpicture` + * * 10-bit profiles + * * `main10` (default) + * * `main10-intra` + * * `main422-10` + * * `main422-10-intra` + * * `main444-10` + * * `main444-10-intra` + * * 12-bit profiles + * * `main12` (default) + * * `main12-intra` + * * `main422-12` + * * `main422-12-intra` + * * `main444-12` + * * `main444-12-intra` + * The available options are + * [FFmpeg-compatible](https://x265.readthedocs.io/). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * + * Generated from protobuf field string profile = 17; + * @return string + */ + public function getProfile() + { + return $this->profile; + } + + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * 8-bit profiles + * * `main` (default) + * * `main-intra` + * * `mainstillpicture` + * * 10-bit profiles + * * `main10` (default) + * * `main10-intra` + * * `main422-10` + * * `main422-10-intra` + * * `main444-10` + * * `main444-10-intra` + * * 12-bit profiles + * * `main12` (default) + * * `main12-intra` + * * `main422-12` + * * `main422-12-intra` + * * `main444-12` + * * `main444-12-intra` + * The available options are + * [FFmpeg-compatible](https://x265.readthedocs.io/). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * + * Generated from protobuf field string profile = 17; + * @param string $var + * @return $this + */ + public function setProfile($var) + { + GPBUtil::checkString($var, True); + $this->profile = $var; + + return $this; + } + + /** + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * + * Generated from protobuf field string tune = 18; + * @return string + */ + public function getTune() + { + return $this->tune; + } + + /** + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * + * Generated from protobuf field string tune = 18; + * @param string $var + * @return $this + */ + public function setTune($var) + { + GPBUtil::checkString($var, True); + $this->tune = $var; + + return $this; + } + + /** + * Enforces the specified codec preset. The default is `veryfast`. The + * available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * + * Generated from protobuf field string preset = 19; + * @return string + */ + public function getPreset() + { + return $this->preset; + } + + /** + * Enforces the specified codec preset. The default is `veryfast`. The + * available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * + * Generated from protobuf field string preset = 19; + * @param string $var + * @return $this + */ + public function setPreset($var) + { + GPBUtil::checkString($var, True); + $this->preset = $var; + + return $this; + } + + /** + * @return string + */ + public function getGopMode() + { + return $this->whichOneof("gop_mode"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(H265CodecSettings::class, \Google\Cloud\Video\Transcoder\V1\VideoStream_H265CodecSettings::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/Vp9CodecSettings.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/Vp9CodecSettings.php new file mode 100644 index 000000000000..f062f31d7643 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/Vp9CodecSettings.php @@ -0,0 +1,570 @@ +google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + */ +class Vp9CodecSettings extends \Google\Protobuf\Internal\Message +{ + /** + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 width_pixels = 1; + */ + protected $width_pixels = 0; + /** + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 height_pixels = 2; + */ + protected $height_pixels = 0; + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $frame_rate = 0.0; + /** + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 480,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bitrate_bps = 0; + /** + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * + * Generated from protobuf field string pixel_format = 5; + */ + protected $pixel_format = ''; + /** + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * + * Generated from protobuf field string rate_control_mode = 6; + */ + protected $rate_control_mode = ''; + /** + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * **Note:** This field is not supported. + * + * Generated from protobuf field int32 crf_level = 7; + */ + protected $crf_level = 0; + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * `profile0` (default) + * * `profile1` + * * `profile2` + * * `profile3` + * The available options are + * [WebM-compatible](https://www.webmproject.org/vp9/profiles/). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `Vp9CodecSettings` + * message. + * + * Generated from protobuf field string profile = 10; + */ + protected $profile = ''; + protected $gop_mode; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $width_pixels + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * @type int $height_pixels + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * @type float $frame_rate + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * @type int $bitrate_bps + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 480,000,000. + * @type string $pixel_format + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * @type string $rate_control_mode + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * @type int $crf_level + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * **Note:** This field is not supported. + * @type int $gop_frame_count + * Select the GOP size based on the specified frame count. Must be greater + * than zero. + * @type \Google\Protobuf\Duration $gop_duration + * Select the GOP size based on the specified duration. The default is + * `3s`. Note that `gopDuration` must be less than or equal to + * [`segmentDuration`](#SegmentSettings), and + * [`segmentDuration`](#SegmentSettings) must be divisible by + * `gopDuration`. + * @type string $profile + * Enforces the specified codec profile. The following profiles are + * supported: + * * `profile0` (default) + * * `profile1` + * * `profile2` + * * `profile3` + * The available options are + * [WebM-compatible](https://www.webmproject.org/vp9/profiles/). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `Vp9CodecSettings` + * message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 width_pixels = 1; + * @return int + */ + public function getWidthPixels() + { + return $this->width_pixels; + } + + /** + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 width_pixels = 1; + * @param int $var + * @return $this + */ + public function setWidthPixels($var) + { + GPBUtil::checkInt32($var); + $this->width_pixels = $var; + + return $this; + } + + /** + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 height_pixels = 2; + * @return int + */ + public function getHeightPixels() + { + return $this->height_pixels; + } + + /** + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 height_pixels = 2; + * @param int $var + * @return $this + */ + public function setHeightPixels($var) + { + GPBUtil::checkInt32($var); + $this->height_pixels = $var; + + return $this; + } + + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return float + */ + public function getFrameRate() + { + return $this->frame_rate; + } + + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param float $var + * @return $this + */ + public function setFrameRate($var) + { + GPBUtil::checkDouble($var); + $this->frame_rate = $var; + + return $this; + } + + /** + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 480,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getBitrateBps() + { + return $this->bitrate_bps; + } + + /** + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 480,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setBitrateBps($var) + { + GPBUtil::checkInt32($var); + $this->bitrate_bps = $var; + + return $this; + } + + /** + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * + * Generated from protobuf field string pixel_format = 5; + * @return string + */ + public function getPixelFormat() + { + return $this->pixel_format; + } + + /** + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * + * Generated from protobuf field string pixel_format = 5; + * @param string $var + * @return $this + */ + public function setPixelFormat($var) + { + GPBUtil::checkString($var, True); + $this->pixel_format = $var; + + return $this; + } + + /** + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * + * Generated from protobuf field string rate_control_mode = 6; + * @return string + */ + public function getRateControlMode() + { + return $this->rate_control_mode; + } + + /** + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * + * Generated from protobuf field string rate_control_mode = 6; + * @param string $var + * @return $this + */ + public function setRateControlMode($var) + { + GPBUtil::checkString($var, True); + $this->rate_control_mode = $var; + + return $this; + } + + /** + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * **Note:** This field is not supported. + * + * Generated from protobuf field int32 crf_level = 7; + * @return int + */ + public function getCrfLevel() + { + return $this->crf_level; + } + + /** + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * **Note:** This field is not supported. + * + * Generated from protobuf field int32 crf_level = 7; + * @param int $var + * @return $this + */ + public function setCrfLevel($var) + { + GPBUtil::checkInt32($var); + $this->crf_level = $var; + + return $this; + } + + /** + * Select the GOP size based on the specified frame count. Must be greater + * than zero. + * + * Generated from protobuf field int32 gop_frame_count = 8; + * @return int + */ + public function getGopFrameCount() + { + return $this->readOneof(8); + } + + public function hasGopFrameCount() + { + return $this->hasOneof(8); + } + + /** + * Select the GOP size based on the specified frame count. Must be greater + * than zero. + * + * Generated from protobuf field int32 gop_frame_count = 8; + * @param int $var + * @return $this + */ + public function setGopFrameCount($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Select the GOP size based on the specified duration. The default is + * `3s`. Note that `gopDuration` must be less than or equal to + * [`segmentDuration`](#SegmentSettings), and + * [`segmentDuration`](#SegmentSettings) must be divisible by + * `gopDuration`. + * + * Generated from protobuf field .google.protobuf.Duration gop_duration = 9; + * @return \Google\Protobuf\Duration|null + */ + public function getGopDuration() + { + return $this->readOneof(9); + } + + public function hasGopDuration() + { + return $this->hasOneof(9); + } + + /** + * Select the GOP size based on the specified duration. The default is + * `3s`. Note that `gopDuration` must be less than or equal to + * [`segmentDuration`](#SegmentSettings), and + * [`segmentDuration`](#SegmentSettings) must be divisible by + * `gopDuration`. + * + * Generated from protobuf field .google.protobuf.Duration gop_duration = 9; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setGopDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * `profile0` (default) + * * `profile1` + * * `profile2` + * * `profile3` + * The available options are + * [WebM-compatible](https://www.webmproject.org/vp9/profiles/). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `Vp9CodecSettings` + * message. + * + * Generated from protobuf field string profile = 10; + * @return string + */ + public function getProfile() + { + return $this->profile; + } + + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * `profile0` (default) + * * `profile1` + * * `profile2` + * * `profile3` + * The available options are + * [WebM-compatible](https://www.webmproject.org/vp9/profiles/). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `Vp9CodecSettings` + * message. + * + * Generated from protobuf field string profile = 10; + * @param string $var + * @return $this + */ + public function setProfile($var) + { + GPBUtil::checkString($var, True); + $this->profile = $var; + + return $this; + } + + /** + * @return string + */ + public function getGopMode() + { + return $this->whichOneof("gop_mode"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Vp9CodecSettings::class, \Google\Cloud\Video\Transcoder\V1\VideoStream_Vp9CodecSettings::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job.php new file mode 100644 index 000000000000..238cc7c7d9c7 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job.php @@ -0,0 +1,74 @@ +setParent($formattedParent) + ->setJob($job); + + // Call the API and handle any network failures. + try { + /** @var Job $response */ + $response = $transcoderServiceClient->createJob($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = TranscoderServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + create_job_sample($formattedParent); +} +// [END transcoder_v1_generated_TranscoderService_CreateJob_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job_template.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job_template.php new file mode 100644 index 000000000000..1a4dba30b856 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job_template.php @@ -0,0 +1,81 @@ +setParent($formattedParent) + ->setJobTemplate($jobTemplate) + ->setJobTemplateId($jobTemplateId); + + // Call the API and handle any network failures. + try { + /** @var JobTemplate $response */ + $response = $transcoderServiceClient->createJobTemplate($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = TranscoderServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $jobTemplateId = '[JOB_TEMPLATE_ID]'; + + create_job_template_sample($formattedParent, $jobTemplateId); +} +// [END transcoder_v1_generated_TranscoderService_CreateJobTemplate_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job.php new file mode 100644 index 000000000000..61307b20fa95 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job.php @@ -0,0 +1,70 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $transcoderServiceClient->deleteJob($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = TranscoderServiceClient::jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + + delete_job_sample($formattedName); +} +// [END transcoder_v1_generated_TranscoderService_DeleteJob_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job_template.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job_template.php new file mode 100644 index 000000000000..1f9c7b5b6fa4 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job_template.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $transcoderServiceClient->deleteJobTemplate($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = TranscoderServiceClient::jobTemplateName( + '[PROJECT]', + '[LOCATION]', + '[JOB_TEMPLATE]' + ); + + delete_job_template_sample($formattedName); +} +// [END transcoder_v1_generated_TranscoderService_DeleteJobTemplate_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job.php new file mode 100644 index 000000000000..d7430927c035 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Job $response */ + $response = $transcoderServiceClient->getJob($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = TranscoderServiceClient::jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + + get_job_sample($formattedName); +} +// [END transcoder_v1_generated_TranscoderService_GetJob_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job_template.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job_template.php new file mode 100644 index 000000000000..79dbd4f3e2ba --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job_template.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var JobTemplate $response */ + $response = $transcoderServiceClient->getJobTemplate($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = TranscoderServiceClient::jobTemplateName( + '[PROJECT]', + '[LOCATION]', + '[JOB_TEMPLATE]' + ); + + get_job_template_sample($formattedName); +} +// [END transcoder_v1_generated_TranscoderService_GetJobTemplate_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_job_templates.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_job_templates.php new file mode 100644 index 000000000000..ccb2387f6261 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_job_templates.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $transcoderServiceClient->listJobTemplates($request); + + /** @var JobTemplate $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = TranscoderServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_job_templates_sample($formattedParent); +} +// [END transcoder_v1_generated_TranscoderService_ListJobTemplates_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_jobs.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_jobs.php new file mode 100644 index 000000000000..ec4e6c9ef217 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_jobs.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $transcoderServiceClient->listJobs($request); + + /** @var Job $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = TranscoderServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_jobs_sample($formattedParent); +} +// [END transcoder_v1_generated_TranscoderService_ListJobs_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/src/V1/Client/BaseClient/TranscoderServiceBaseClient.php b/owl-bot-staging/VideoTranscoder/v1/src/V1/Client/BaseClient/TranscoderServiceBaseClient.php new file mode 100644 index 000000000000..5e0591ea4bea --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/src/V1/Client/BaseClient/TranscoderServiceBaseClient.php @@ -0,0 +1,459 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/transcoder_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/transcoder_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/transcoder_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/transcoder_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a job + * resource. + * + * @param string $project + * @param string $location + * @param string $job + * + * @return string The formatted job resource. + */ + public static function jobName(string $project, string $location, string $job): string + { + return self::getPathTemplate('job')->render([ + 'project' => $project, + 'location' => $location, + 'job' => $job, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a job_template + * resource. + * + * @param string $project + * @param string $location + * @param string $jobTemplate + * + * @return string The formatted job_template resource. + */ + public static function jobTemplateName(string $project, string $location, string $jobTemplate): string + { + return self::getPathTemplate('jobTemplate')->render([ + 'project' => $project, + 'location' => $location, + 'job_template' => $jobTemplate, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - job: projects/{project}/locations/{location}/jobs/{job} + * - jobTemplate: projects/{project}/locations/{location}/jobTemplates/{job_template} + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'transcoder.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a job in the specified region. + * + * The async variant is {@see self::createJobAsync()} . + * + * @param CreateJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Job + * + * @throws ApiException Thrown if the API call fails. + */ + public function createJob(CreateJobRequest $request, array $callOptions = []): Job + { + return $this->startApiCall('CreateJob', $request, $callOptions)->wait(); + } + + /** + * Creates a job template in the specified region. + * + * The async variant is {@see self::createJobTemplateAsync()} . + * + * @param CreateJobTemplateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return JobTemplate + * + * @throws ApiException Thrown if the API call fails. + */ + public function createJobTemplate(CreateJobTemplateRequest $request, array $callOptions = []): JobTemplate + { + return $this->startApiCall('CreateJobTemplate', $request, $callOptions)->wait(); + } + + /** + * Deletes a job. + * + * The async variant is {@see self::deleteJobAsync()} . + * + * @param DeleteJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteJob(DeleteJobRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteJob', $request, $callOptions)->wait(); + } + + /** + * Deletes a job template. + * + * The async variant is {@see self::deleteJobTemplateAsync()} . + * + * @param DeleteJobTemplateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteJobTemplate(DeleteJobTemplateRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteJobTemplate', $request, $callOptions)->wait(); + } + + /** + * Returns the job data. + * + * The async variant is {@see self::getJobAsync()} . + * + * @param GetJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Job + * + * @throws ApiException Thrown if the API call fails. + */ + public function getJob(GetJobRequest $request, array $callOptions = []): Job + { + return $this->startApiCall('GetJob', $request, $callOptions)->wait(); + } + + /** + * Returns the job template data. + * + * The async variant is {@see self::getJobTemplateAsync()} . + * + * @param GetJobTemplateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return JobTemplate + * + * @throws ApiException Thrown if the API call fails. + */ + public function getJobTemplate(GetJobTemplateRequest $request, array $callOptions = []): JobTemplate + { + return $this->startApiCall('GetJobTemplate', $request, $callOptions)->wait(); + } + + /** + * Lists job templates in the specified region. + * + * The async variant is {@see self::listJobTemplatesAsync()} . + * + * @param ListJobTemplatesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listJobTemplates(ListJobTemplatesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListJobTemplates', $request, $callOptions); + } + + /** + * Lists jobs in the specified region. + * + * The async variant is {@see self::listJobsAsync()} . + * + * @param ListJobsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listJobs(ListJobsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListJobs', $request, $callOptions); + } +} diff --git a/owl-bot-staging/VideoTranscoder/v1/src/V1/Client/TranscoderServiceClient.php b/owl-bot-staging/VideoTranscoder/v1/src/V1/Client/TranscoderServiceClient.php new file mode 100644 index 000000000000..5052e44f31e2 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/src/V1/Client/TranscoderServiceClient.php @@ -0,0 +1,40 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $job = new Job(); + * $response = $transcoderServiceClient->createJob($formattedParent, $job); + * } finally { + * $transcoderServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + */ +class TranscoderServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.video.transcoder.v1.TranscoderService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'transcoder.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $jobNameTemplate; + + private static $jobTemplateNameTemplate; + + private static $locationNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/transcoder_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/transcoder_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/transcoder_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/transcoder_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getJobNameTemplate() + { + if (self::$jobNameTemplate == null) { + self::$jobNameTemplate = new PathTemplate('projects/{project}/locations/{location}/jobs/{job}'); + } + + return self::$jobNameTemplate; + } + + private static function getJobTemplateNameTemplate() + { + if (self::$jobTemplateNameTemplate == null) { + self::$jobTemplateNameTemplate = new PathTemplate('projects/{project}/locations/{location}/jobTemplates/{job_template}'); + } + + return self::$jobTemplateNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'job' => self::getJobNameTemplate(), + 'jobTemplate' => self::getJobTemplateNameTemplate(), + 'location' => self::getLocationNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a job + * resource. + * + * @param string $project + * @param string $location + * @param string $job + * + * @return string The formatted job resource. + */ + public static function jobName($project, $location, $job) + { + return self::getJobNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'job' => $job, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a job_template + * resource. + * + * @param string $project + * @param string $location + * @param string $jobTemplate + * + * @return string The formatted job_template resource. + */ + public static function jobTemplateName($project, $location, $jobTemplate) + { + return self::getJobTemplateNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'job_template' => $jobTemplate, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - job: projects/{project}/locations/{location}/jobs/{job} + * - jobTemplate: projects/{project}/locations/{location}/jobTemplates/{job_template} + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'transcoder.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Creates a job in the specified region. + * + * Sample code: + * ``` + * $transcoderServiceClient = new TranscoderServiceClient(); + * try { + * $formattedParent = $transcoderServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $job = new Job(); + * $response = $transcoderServiceClient->createJob($formattedParent, $job); + * } finally { + * $transcoderServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent location to create and process this job. + * Format: `projects/{project}/locations/{location}` + * @param Job $job Required. Parameters for creating transcoding job. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Video\Transcoder\V1\Job + * + * @throws ApiException if the remote call fails + */ + public function createJob($parent, $job, array $optionalArgs = []) + { + $request = new CreateJobRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setJob($job); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateJob', Job::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a job template in the specified region. + * + * Sample code: + * ``` + * $transcoderServiceClient = new TranscoderServiceClient(); + * try { + * $formattedParent = $transcoderServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $jobTemplate = new JobTemplate(); + * $jobTemplateId = 'job_template_id'; + * $response = $transcoderServiceClient->createJobTemplate($formattedParent, $jobTemplate, $jobTemplateId); + * } finally { + * $transcoderServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent location to create this job template. + * Format: `projects/{project}/locations/{location}` + * @param JobTemplate $jobTemplate Required. Parameters for creating job template. + * @param string $jobTemplateId Required. The ID to use for the job template, which will become the final + * component of the job template's resource name. + * + * This value should be 4-63 characters, and valid characters must match the + * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Video\Transcoder\V1\JobTemplate + * + * @throws ApiException if the remote call fails + */ + public function createJobTemplate($parent, $jobTemplate, $jobTemplateId, array $optionalArgs = []) + { + $request = new CreateJobTemplateRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setJobTemplate($jobTemplate); + $request->setJobTemplateId($jobTemplateId); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateJobTemplate', JobTemplate::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a job. + * + * Sample code: + * ``` + * $transcoderServiceClient = new TranscoderServiceClient(); + * try { + * $formattedName = $transcoderServiceClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + * $transcoderServiceClient->deleteJob($formattedName); + * } finally { + * $transcoderServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the job to delete. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * @param array $optionalArgs { + * Optional. + * + * @type bool $allowMissing + * If set to true, and the job is not found, the request will succeed but no + * action will be taken on the server. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteJob($name, array $optionalArgs = []) + { + $request = new DeleteJobRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['allowMissing'])) { + $request->setAllowMissing($optionalArgs['allowMissing']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteJob', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a job template. + * + * Sample code: + * ``` + * $transcoderServiceClient = new TranscoderServiceClient(); + * try { + * $formattedName = $transcoderServiceClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); + * $transcoderServiceClient->deleteJobTemplate($formattedName); + * } finally { + * $transcoderServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the job template to delete. + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * @param array $optionalArgs { + * Optional. + * + * @type bool $allowMissing + * If set to true, and the job template is not found, the request will succeed + * but no action will be taken on the server. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteJobTemplate($name, array $optionalArgs = []) + { + $request = new DeleteJobTemplateRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['allowMissing'])) { + $request->setAllowMissing($optionalArgs['allowMissing']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteJobTemplate', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the job data. + * + * Sample code: + * ``` + * $transcoderServiceClient = new TranscoderServiceClient(); + * try { + * $formattedName = $transcoderServiceClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + * $response = $transcoderServiceClient->getJob($formattedName); + * } finally { + * $transcoderServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the job to retrieve. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Video\Transcoder\V1\Job + * + * @throws ApiException if the remote call fails + */ + public function getJob($name, array $optionalArgs = []) + { + $request = new GetJobRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetJob', Job::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the job template data. + * + * Sample code: + * ``` + * $transcoderServiceClient = new TranscoderServiceClient(); + * try { + * $formattedName = $transcoderServiceClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); + * $response = $transcoderServiceClient->getJobTemplate($formattedName); + * } finally { + * $transcoderServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the job template to retrieve. + * Format: + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Video\Transcoder\V1\JobTemplate + * + * @throws ApiException if the remote call fails + */ + public function getJobTemplate($name, array $optionalArgs = []) + { + $request = new GetJobTemplateRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetJobTemplate', JobTemplate::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists job templates in the specified region. + * + * Sample code: + * ``` + * $transcoderServiceClient = new TranscoderServiceClient(); + * try { + * $formattedParent = $transcoderServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $transcoderServiceClient->listJobTemplates($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $transcoderServiceClient->listJobTemplates($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $transcoderServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent location from which to retrieve the collection of job + * templates. Format: `projects/{project}/locations/{location}` + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * @type string $orderBy + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listJobTemplates($parent, array $optionalArgs = []) + { + $request = new ListJobTemplatesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListJobTemplates', $optionalArgs, ListJobTemplatesResponse::class, $request); + } + + /** + * Lists jobs in the specified region. + * + * Sample code: + * ``` + * $transcoderServiceClient = new TranscoderServiceClient(); + * try { + * $formattedParent = $transcoderServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $transcoderServiceClient->listJobs($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $transcoderServiceClient->listJobs($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $transcoderServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. Format: `projects/{project}/locations/{location}` + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * @type string $orderBy + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listJobs($parent, array $optionalArgs = []) + { + $request = new ListJobsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListJobs', $optionalArgs, ListJobsResponse::class, $request); + } +} diff --git a/owl-bot-staging/VideoTranscoder/v1/src/V1/TranscoderServiceClient.php b/owl-bot-staging/VideoTranscoder/v1/src/V1/TranscoderServiceClient.php new file mode 100644 index 000000000000..87d6476cd589 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/src/V1/TranscoderServiceClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.video.transcoder.v1.TranscoderService' => [ + 'CreateJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Transcoder\V1\Job', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateJobTemplate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Transcoder\V1\JobTemplate', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteJobTemplate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Transcoder\V1\Job', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetJobTemplate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Transcoder\V1\JobTemplate', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListJobTemplates' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getJobTemplates', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\Transcoder\V1\ListJobTemplatesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListJobs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getJobs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\Transcoder\V1\ListJobsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'job' => 'projects/{project}/locations/{location}/jobs/{job}', + 'jobTemplate' => 'projects/{project}/locations/{location}/jobTemplates/{job_template}', + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_rest_client_config.php b/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_rest_client_config.php new file mode 100644 index 000000000000..bedf0d6bda0e --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_rest_client_config.php @@ -0,0 +1,102 @@ + [ + 'google.cloud.video.transcoder.v1.TranscoderService' => [ + 'CreateJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobs', + 'body' => 'job', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateJobTemplate' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobTemplates', + 'body' => 'job_template', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'job_template_id', + ], + ], + 'DeleteJob' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteJobTemplate' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobTemplates/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetJob' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetJobTemplate' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobTemplates/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListJobTemplates' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobTemplates', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListJobs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/Client/TranscoderServiceClientTest.php b/owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/Client/TranscoderServiceClientTest.php new file mode 100644 index 000000000000..548cd320c092 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/Client/TranscoderServiceClientTest.php @@ -0,0 +1,670 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return TranscoderServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new TranscoderServiceClient($options); + } + + /** @test */ + public function createJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $inputUri = 'inputUri1707300727'; + $outputUri = 'outputUri-1273518802'; + $templateId = 'templateId1769642752'; + $ttlAfterCompletionDays = 107576420; + $expectedResponse = new Job(); + $expectedResponse->setName($name); + $expectedResponse->setInputUri($inputUri); + $expectedResponse->setOutputUri($outputUri); + $expectedResponse->setTemplateId($templateId); + $expectedResponse->setTtlAfterCompletionDays($ttlAfterCompletionDays); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $job = new Job(); + $request = (new CreateJobRequest()) + ->setParent($formattedParent) + ->setJob($job); + $response = $gapicClient->createJob($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/CreateJob', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getJob(); + $this->assertProtobufEquals($job, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $job = new Job(); + $request = (new CreateJobRequest()) + ->setParent($formattedParent) + ->setJob($job); + try { + $gapicClient->createJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createJobTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new JobTemplate(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $jobTemplate = new JobTemplate(); + $jobTemplateId = 'jobTemplateId-1231822466'; + $request = (new CreateJobTemplateRequest()) + ->setParent($formattedParent) + ->setJobTemplate($jobTemplate) + ->setJobTemplateId($jobTemplateId); + $response = $gapicClient->createJobTemplate($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/CreateJobTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getJobTemplate(); + $this->assertProtobufEquals($jobTemplate, $actualValue); + $actualValue = $actualRequestObject->getJobTemplateId(); + $this->assertProtobufEquals($jobTemplateId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createJobTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $jobTemplate = new JobTemplate(); + $jobTemplateId = 'jobTemplateId-1231822466'; + $request = (new CreateJobTemplateRequest()) + ->setParent($formattedParent) + ->setJobTemplate($jobTemplate) + ->setJobTemplateId($jobTemplateId); + try { + $gapicClient->createJobTemplate($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new DeleteJobRequest()) + ->setName($formattedName); + $gapicClient->deleteJob($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/DeleteJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new DeleteJobRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteJobTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); + $request = (new DeleteJobTemplateRequest()) + ->setName($formattedName); + $gapicClient->deleteJobTemplate($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/DeleteJobTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteJobTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); + $request = (new DeleteJobTemplateRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteJobTemplate($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $inputUri = 'inputUri1707300727'; + $outputUri = 'outputUri-1273518802'; + $templateId = 'templateId1769642752'; + $ttlAfterCompletionDays = 107576420; + $expectedResponse = new Job(); + $expectedResponse->setName($name2); + $expectedResponse->setInputUri($inputUri); + $expectedResponse->setOutputUri($outputUri); + $expectedResponse->setTemplateId($templateId); + $expectedResponse->setTtlAfterCompletionDays($ttlAfterCompletionDays); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new GetJobRequest()) + ->setName($formattedName); + $response = $gapicClient->getJob($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/GetJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new GetJobRequest()) + ->setName($formattedName); + try { + $gapicClient->getJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getJobTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new JobTemplate(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); + $request = (new GetJobTemplateRequest()) + ->setName($formattedName); + $response = $gapicClient->getJobTemplate($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/GetJobTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getJobTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); + $request = (new GetJobTemplateRequest()) + ->setName($formattedName); + try { + $gapicClient->getJobTemplate($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listJobTemplatesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $jobTemplatesElement = new JobTemplate(); + $jobTemplates = [ + $jobTemplatesElement, + ]; + $expectedResponse = new ListJobTemplatesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setJobTemplates($jobTemplates); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListJobTemplatesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listJobTemplates($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getJobTemplates()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/ListJobTemplates', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listJobTemplatesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListJobTemplatesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listJobTemplates($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $jobsElement = new Job(); + $jobs = [ + $jobsElement, + ]; + $expectedResponse = new ListJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setJobs($jobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListJobsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listJobs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getJobs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/ListJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListJobsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listJobs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createJobAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $inputUri = 'inputUri1707300727'; + $outputUri = 'outputUri-1273518802'; + $templateId = 'templateId1769642752'; + $ttlAfterCompletionDays = 107576420; + $expectedResponse = new Job(); + $expectedResponse->setName($name); + $expectedResponse->setInputUri($inputUri); + $expectedResponse->setOutputUri($outputUri); + $expectedResponse->setTemplateId($templateId); + $expectedResponse->setTtlAfterCompletionDays($ttlAfterCompletionDays); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $job = new Job(); + $request = (new CreateJobRequest()) + ->setParent($formattedParent) + ->setJob($job); + $response = $gapicClient->createJobAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/CreateJob', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getJob(); + $this->assertProtobufEquals($job, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/TranscoderServiceClientTest.php b/owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/TranscoderServiceClientTest.php new file mode 100644 index 000000000000..8d3032b1bbd5 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/TranscoderServiceClientTest.php @@ -0,0 +1,583 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return TranscoderServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new TranscoderServiceClient($options); + } + + /** @test */ + public function createJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $inputUri = 'inputUri1707300727'; + $outputUri = 'outputUri-1273518802'; + $templateId = 'templateId1769642752'; + $ttlAfterCompletionDays = 107576420; + $expectedResponse = new Job(); + $expectedResponse->setName($name); + $expectedResponse->setInputUri($inputUri); + $expectedResponse->setOutputUri($outputUri); + $expectedResponse->setTemplateId($templateId); + $expectedResponse->setTtlAfterCompletionDays($ttlAfterCompletionDays); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $job = new Job(); + $response = $gapicClient->createJob($formattedParent, $job); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/CreateJob', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getJob(); + $this->assertProtobufEquals($job, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $job = new Job(); + try { + $gapicClient->createJob($formattedParent, $job); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createJobTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new JobTemplate(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $jobTemplate = new JobTemplate(); + $jobTemplateId = 'jobTemplateId-1231822466'; + $response = $gapicClient->createJobTemplate($formattedParent, $jobTemplate, $jobTemplateId); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/CreateJobTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getJobTemplate(); + $this->assertProtobufEquals($jobTemplate, $actualValue); + $actualValue = $actualRequestObject->getJobTemplateId(); + $this->assertProtobufEquals($jobTemplateId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createJobTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $jobTemplate = new JobTemplate(); + $jobTemplateId = 'jobTemplateId-1231822466'; + try { + $gapicClient->createJobTemplate($formattedParent, $jobTemplate, $jobTemplateId); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + $gapicClient->deleteJob($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/DeleteJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + try { + $gapicClient->deleteJob($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteJobTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); + $gapicClient->deleteJobTemplate($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/DeleteJobTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteJobTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); + try { + $gapicClient->deleteJobTemplate($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $inputUri = 'inputUri1707300727'; + $outputUri = 'outputUri-1273518802'; + $templateId = 'templateId1769642752'; + $ttlAfterCompletionDays = 107576420; + $expectedResponse = new Job(); + $expectedResponse->setName($name2); + $expectedResponse->setInputUri($inputUri); + $expectedResponse->setOutputUri($outputUri); + $expectedResponse->setTemplateId($templateId); + $expectedResponse->setTtlAfterCompletionDays($ttlAfterCompletionDays); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + $response = $gapicClient->getJob($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/GetJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + try { + $gapicClient->getJob($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getJobTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new JobTemplate(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); + $response = $gapicClient->getJobTemplate($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/GetJobTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getJobTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); + try { + $gapicClient->getJobTemplate($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listJobTemplatesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $jobTemplatesElement = new JobTemplate(); + $jobTemplates = [ + $jobTemplatesElement, + ]; + $expectedResponse = new ListJobTemplatesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setJobTemplates($jobTemplates); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listJobTemplates($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getJobTemplates()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/ListJobTemplates', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listJobTemplatesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listJobTemplates($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $jobsElement = new Job(); + $jobs = [ + $jobsElement, + ]; + $expectedResponse = new ListJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setJobs($jobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listJobs($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getJobs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/ListJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listJobs($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/Geometry.php b/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/Geometry.php new file mode 100644 index 000000000000..e1e496589232 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/Geometry.php @@ -0,0 +1,40 @@ +internalAddGeneratedFile( + ' +� +%google/cloud/vision/v1/geometry.protogoogle.cloud.vision.v1" +Vertex +x ( +y ("( +NormalizedVertex +x ( +y ("� + BoundingPoly0 +vertices ( 2.google.cloud.vision.v1.VertexE +normalized_vertices ( 2(.google.cloud.vision.v1.NormalizedVertex"+ +Position +x ( +y ( +z (Bn +com.google.cloud.vision.v1B GeometryProtoPZ5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb��GCVNbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ImageAnnotator.php b/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ImageAnnotator.php new file mode 100644 index 0000000000000000000000000000000000000000..d3551fd8c5ab9f8186e235b08be311118969c8da GIT binary patch literal 11157 zcmcf{&u`n-c~<=MlkF(9<0wwjs7%(RX=*i2+HP*sRzGN4i!5of+$@;~f|e+oD^02- zmBcFo483fJp@;1>4A@~i?z+SNhVC$6I}F%qzcN%VmTu{e=INc>!AZ_L(sMn>_UyK8<_`MZuI}X8_HoZJb!RP?E7x;@8lmDu3=mGN4N6Ev397dnq}FZ=Go2~BMe|^ z$GY3o+InuQQQXlzt)qF`{uZOLUm_a&A2J&IAKrQgplxcdo2wA5f=>!QfgJwp^$$#= zopX^q{&&@IRl_noLotikTyXy4BXNznbGT3HEBw#_iwD z`9d{FBdCr2isk8!rJ4I>-EBKY4|ml-(2b2l-3#AxF&0Xg*ZfuMQc{k@d zeLc)QmveNl?^y3JxrxBj;II7{l@)r%zR(Qr$lcf&>}fzE39)1vy5+qX&ZeQ8ouYoE zJu+-(eAFS+?r-V#vFw28UrdJq5<4%gtb9k}@-Nk>}Y&}%G3t??AK_UP8?IYCA1 z8JNB(6nK_ey&U?`C4W~Bgu@GfZzk|R6kaXBUP}POTu82~y3BV4aMGSUbWlH!qH_r7 z8wsQz>j!Gb_d@}DMZlT^XUp4xvk4%7&nO#9cX`kEC;{MW%jvcAl+gO_&<78FBafxS zPxh->!Iyn7nFDYX`6s7fW>ZHRjxMdkBmrb6aue4V*RQT|q+w&N3Gg-YCTR)M$J!Is z(cQl3x!Dw=PDu+eb!>NZGkXeu&dI+`!6XA-hD_^0Ls9o?yA7pO*{mq#%r_(n7B>qe zMJ+2WrPQj_YncgY1*B@BR^BNz?}gS=1Y50d)kABiP=wRfLQ$!P7AFa?rF^dyTAPwC zz`1h0w6~+wTI$fpv~(WM?iMx`byq1gOWPs5X$i%y>=d>Xwb86MlxC}<>}F=9MSv3i zR<|p))^27_Is*&$m0}1HNC-qJ@0D7DY-V0M2TS$hcW|R>wO%SzD-R27%S-axkY?3& zmsNA=EG!(hv68al-FFOT72+~CSR!rD$vZH`5T(;F)3z~mEsp`uOSfT~_Xf-^>Gdl~ zCJix`zg$3jU|TRq#nL;laA5bX4(3L+XPYOCd^*`fiUPQSu+n>w>0;PM@JaA-@ry8L zYF6i1b3Ss>p-v%UK4~9Ox!0-!4-Em1ZJHRo*dS#mk$Z|X+0!hsG{u$>%ri`iaRQrW zYZqZTh+-Ah+ci2mHY(W}_Vp!L@r5Jhguc(R?;EiAL;FNEjgNHGII`_db`IAU*X5)g zR0BxqE}U^~$FU!W(P3=#cOirO(48=LdTi|XVae?~J;!kMFoF5836vp=9)s-lCq3KM zJ7FpdV^et#qyw|>I8pq?vGH*mN4nN|jOjfr!0B-btp0NbW&<}WiUdh%ZE^ihk_{8Q zkSEM_m_>bHdu&_G5!36rBsvWNC;wx5kU;lp_iFX~HPug#m_X-IL}jz3Di0J)oeMD6 ztZZ%bpD8H|%j{!)Q}uz0&HDY!Dav>paQM?Cee#h4S`2GST7{JWEBbAk&~_^2MjbPv zT2xy16{SW(QMN=GYxP}4ZB-hXS(0(DfvHrj;?FtyS*_m}KY=pqPJOSn%>>S*F|Vch zZ^jREXa?r_LJ3p3(#$Miwmieg7wfH7eMjYhiZ>>5Q@TbS94 z^}SlT(0q_N6Zynb~qRGGn-ts_^BkaybzeV`1NSEL| zUm?6z(_Rc->`Vwv+&4lV|`aS*GdP)?%IR9nr$7FFvDqlGY zw#0e|v(n88*_ z#b#O5yCpwRsY}A*;#I9f`7X?2>yJI0cY;nnNvCR2s<8`tq?vu472i1&eZG&4^;>sT zzDh}CQvO{EGK%FH-btw5rs34F(Gg@8VcJBoupqH=PaRiB9D6B;uojCtF1Kwver;R9 z^ZKAvvEo)tWhbZ(dUnr1YRFI&xRK&cm2KSO{5BS6p))r-%ZhVi-xyKu9RTcaNo|Ji zVo{{Bo}37Ug5_UMzN7& zU#4JrSL^Eh7#tGo7EEa!?2ef|$1DAa;^Oe5%Y+^em4#JbBXbg?!YV#4@}n3 zP**e_)*CSCXzi2nTNzn{G=&SEdYWi5={g=73`>1}bTLRgUigr_Z;Xw@J(y#sVHUbC z!xTIIh`^O1fy=-K5koXnm=qR!#uMFCySO!0oXJB{*j#7JHVUg*9>a4ZhMi_yTx3K3 z`?Akw=yW?SS8bbhG(FIsCj(fJ_Y1sb`>**dW`JBTl!Z2^6KbE4N{ZCQZSJNZ_o&E4rl} zn7Yc2`EfnJ%2O5Zj{zNP0a{su;`4zn_3*5w$wA zNmKv0k0UziCQKQ0ycXehDM>ztB;A79E+3T8n1kZ|auR|+P{De_7|^+pw!<>>GwKOr zBs@mmfED(8kZ^oo!uDV=5WsezM>WpsA0OxrD;QJq7c+2nXvCunEilkvBqx>*RV8m60Z=2pQ8pv?Db5@qT<7B{*Yh2bi@rekDO8TZ{lQ z&iF*`!$sC$(QSolv!)_KZ-vpjm9(+segt>OoH#7p)C&q%hUIP_Cl^D6vOEqFZANi0 za2%-$D=xMsV$2!Z9qR$p>o=1&7u(QO;R1K-K?fHmNt2KCdU6J0ULC4`80(=lHc%F( z(r3nckjX+D#fXb!pzH#pk=T=lQx9orC>8o+O&T~nLrald*yN*7340J7r#B93lhW%! z4}w$MH9qW@-WLNq%nWB4hqWX-#AgEeV^}R}Ui(OBfTuUt&u=A|b$F`tV?5E$5ds3g zcG4;|+ks8D~S%nL+EQ9 z!;0X2_;bBHYy|n!6l4qTiPeq~NctKU`akyz)bHDUFBBl$go&xI&VYG@$lrtWF**<` z9-+*SC*x86!vtJrq$5tl@>$?D|C2=Z!SMe1VR0-ehaJyPb-858{};MBftN-ZMB-^{ zB%Trvg)#PHZEpPD4&$s6jjZx$WF#V0q9ywTuX6BN<24jwOw%= z7P{J^q%cpnH^+D_sHhjn(xuvBF`Qhv#>8rsw<;yC&p^FG_r9nwA|< zbyZz#4Mk_2g}H%L;YM7(1dBuXk2-`I&9iuZh^rup8vH;7tM{^n3WyM_Y6cUy(l@a=6H zW=c&3*UNbKfIpghwOXaNl}SmnFj=nG6ufD``F^QTD=F0~LQUS#0YcYYh$HSa@G1jG zz8@;h2Y5qVt=vL>ORNz)jLE0YeoFQ|tc*SPb_~wj=!_ z1xqn`NLu$bHaxkB0T%tp>g^Z85z+ATiBJFX#V=Ano{*P9<>-;!_B zmrr=pbr(%YQ%*O3BTt7EHe<-&c*-AjMKN#6``6-887S+fzX}l%h zil;GfmN?#jE37!;OmQ>PZhT&N6P{l#V^ZK>Q*drnciaQt8eiGMr&!5*p02;(y8hLK ze35h@JST3u4-4|U@oI{y`dK92l;4Oa5x8L-=a55wUbyr8YCWpi)kmKf&Wbly{3#DU zuX5M$9qFG7-#_xap1YCHKYsjJ=-B_5*ZSTOe?|Fo= literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearch.php b/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearch.php new file mode 100644 index 000000000000..802d4d50d763 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearch.php @@ -0,0 +1,55 @@ +internalAddGeneratedFile( + ' +� ++google/cloud/vision/v1/product_search.protogoogle.cloud.vision.v1%google/cloud/vision/v1/geometry.proto3google/cloud/vision/v1/product_search_service.protogoogle/protobuf/timestamp.proto"� +ProductSearchParams; + bounding_poly ( 2$.google.cloud.vision.v1.BoundingPoly: + product_set ( B%�A" + vision.googleapis.com/ProductSet +product_categories (  +filter ( "� +ProductSearchResults. + +index_time ( 2.google.protobuf.TimestampD +results ( 23.google.cloud.vision.v1.ProductSearchResults.Result[ +product_grouped_results ( 2:.google.cloud.vision.v1.ProductSearchResults.GroupedResultX +Result0 +product ( 2.google.cloud.vision.v1.Product +score ( +image ( S +ObjectAnnotation +mid (  + language_code (  +name (  +score (� + GroupedResult; + bounding_poly ( 2$.google.cloud.vision.v1.BoundingPolyD +results ( 23.google.cloud.vision.v1.ProductSearchResults.ResultY +object_annotations ( 2=.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotationBs +com.google.cloud.vision.v1BProductSearchProtoPZ5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb��GCVNbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearchService.php b/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearchService.php new file mode 100644 index 0000000000000000000000000000000000000000..0aa07b5b06e84c662e56a3c395720385efec543b GIT binary patch literal 9855 zcmc&)&2Jn@72mewtW$Opr{dU-LzGS@n{|vcL&lpA#_Mcm#vd{3*pBT4Eg3Ot&y>f# zndxr2dz?6t5dsb?A%w(-IKTxC2*C{@Bn12exgc1HgD-I4l=B_{iH}!bJ>5OiaZen; z7x#3(s(Qcoe(zPi*ZuB$_LhwP2Fg0ZW2c=TXoy0 z5htapGt27I^13=Zv#@?1hPqb6DU+;PwXAB5q{}s{QAuwbu3?$!?W<{+sM08VC70+< zc?Uz2d|1KJC$uJGi&}+t1z&5RJ>NS_ZM6I%$4YTZl&MFzLVy;htdZrL$x&vI5kG@Gpw&o?T)Gj>@l zOQ$n7)iJJPHrt})wCXtx5?ozX9pW_{bBgIrC)o9`ifs&+vyEcTG%acc%XG8ZCZ^^T zaRUoAgP2}tW9AG}tK`X+zHL}eXG2$sAW&i@BeW>a6RS=E ziQk!-eD8zpXY01t!P5RvX0p4w`zX2E{@8T`qQ=wfcJi^ScDc9)d}ze5ff4-5Ekn>b zSE=~yorAa^^Z7>E_cr=>0ZqO_z~do4D8;fwif4(`_SMm0F_~@~kU=N`d4?E07kIEq zSytK*G!p`+0|JiVl6dr%coa=ZRY4dbc0q{Mnyg4$J}ZRK86jkgz)utEckxi>KK~)t zv<}`C5)y_l;Yk+?0ciloE~jZ`Xt?}=_VX_ECODqvP~49W(S$josLI$8Jc#-$hHKaK zof5m-#qOR&eHD?4fYc-1?B-cC04uXRT!t)PwVa)iL-a|$`!Bg3d>b8;k8An{sktLP zYWG-QW-P@~N8ObY3Z>pBI}h|)gN$B6z499Oq3%ayM<{s|^=wm#5vE=Ci!X8y(OKbl zJ~_DDO~Lk(mMF8J%ZH@wx#?%(YByc8KyMnP>1XnCS8gp_j)L3O{;41&=2;`j3^s|7 zVOGeK5_Ji)S6^mS0tW?Ho=^E9M=jQkCr}?BL>$L*m@WGFm~v96{5q*lq4q-Mi?xvj(HhALSC>a#( zuJ%I(4Hg^%EEhajC0}Ylw#1)Bhix6~;&Eo?F9Z00=SZPkPcr%Z-UO0 zVa#xSnR9Wr5o>bGVuZx7l2PH2s69p}7Y)}Fa_(zT?gTnw1M-p!M;xYJ52g##Tb}iZ zh!mi0puzCMt_|Tt@Kw|+lyt!`)baa)!^7yfNuGG6z#1&NwL9p!7%D=^| zer}%}pnVw)-nZc_7-`Ypu<`8KEb4Gl{xtl=ySETPfG#sLD zK$BNR_bUaR;Uo^{b7{3}k@T7@(D4j99!cSX$d}@X9A2IqXcXbdEI~q#Qc{J7`J{eD zwG$@YZ-CL-E-qMo8x2JCmds8FAGcAYO?qahKEe^k$!@a{!+3XUHbr? z;cR>TQ-4cAXQ37m+vU0?E)LFTd_BCUA4$41eOE!+DyduBa%-A%tor|7t*SFca8OC0r|GEvJ+{_1z$$oHbdd=~8|3L0q$P!FAe7r@6du~6F&XC)cIa29kM8+F6u1s^@RzO>+jTCbOwm4xLXB*PwB z`Vo8zomgAXt+oD|VG(4z@lkZ7kXtIuF4CWev@|-^4CE$A|{Lc5p7 zmZyWtUgndt=%}v|Z7}0MC}<#h*v9ENG*L+rmZJ%dX4=+QKmO}?x^8J{+U9=7Ys+as z&3hN)fu6;<->aZGDjPhu@8!<(krTpRw2lv6!$AiBQbET9sg+KGQ*n?Yf)Y`z30mZN zylb}^ysNlVczZcfXX76!=xFGKjVI!i4v9&XlQ`j4NK4uWi*bSM7E$A+$9MN~td)j8 z2D(HK?eTPpN_L{@hfLGYWu`b?n&Fp9u62Yu!$Hmj3S9gHKoua|~kLi>Q3`i3^qL1emF+2h&EoeqbjAC3@; zKUGkFAYxqnX=$Wrn=B|LHILaZ-}j&w+KelFIZn~0j8t=915brC zOTd6&$o&S~9}1*+_lLw1Yxj_8_g?0mV5B99GOA^O1}8;$O$0;h+n{|YVB)n8iAn9_ zf=ZZloIATilm6XrdWK6dJQ?S79#~;%sba#~6V8jw(D$@k`^T9~ztqIhE^ap30@%x4 z77^&kelKtDPDFmw&G8q2om)DLCLVh`X^B0~J$D(@+v6N+GWSGr2DY8wE4&XJR@ud| zwFXTP5n-uvtdHA{5xHfVBd19W@uJ50i!=;JA8Y;{sCq)Vl_86Y$CSTSf zh^yPdpGQM=X#AcT5=#j833Ja4Ez<#7H_M7%hE&um&vQ^#7O>l4Yu`C|E}XcXRU^Jx>4;M1& literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/TextAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/TextAnnotation.php new file mode 100644 index 0000000000000000000000000000000000000000..3499c9a949474093fc8221903d355496744c24bb GIT binary patch literal 2489 zcmd5;-EQMV6vknMbVIXhcI|vuWUZG}H)bbxEh&Cwl9oe;-pLHVbW9BV)$K9m#WH*%R@xj3kB`kD_--)G$9xTHy70N)W*afW(+0b}wK^|A-_-8A1_MV{qbg8v3R;Xwk?H-GH;uz|dN4O!-nru~L4p z*jB)~BT|lQtkvEq@`&(oMz8NqNJ#lC^bcj-0^oA_H28PP2FH|5DG%qh+7-DgEXnQB zQ+L6n?l{ZBzrrq;ms^RA_u;n!JiJYN)equmO`1WA&7fTzlzvP@VYP|sr;rKEF^zT< zvQf@gKh)lysu>uhZb4f3X(vULa&GqsiY>~ijkax@{&*%L-iK{(@jSGdLlG83RTVA7 z{E_QWY_m*H?f$92c9P!+srgcEBm6vwa|+d`>q=Q=psiqN5~+_U>bsCbGX^0Yxv%Ax znEdiw-rC$_C%MR}G5ck-la{XgXx$zS5p}~o8H7lc{z^e6e)~U_T!Sr(&3wo8$3u(7j>%W|)>gKN zHJCS7p8y1AXpTcOm_*1?d`b7$Wg1DOipP_bVJKanMqY*LV1HenWUI;l(%-A!RIEx5 z4K5^;0V@XIgmhp3rjPzctM}`Twq8uB7-5_=`{?%KhFI^Nwe=oa8rK{3UbEZMi<#0N z3goV8z5{CGk@bp&P9pT$BkKhQ-SCdkI92)`-7a6=0WuZ17tN;@^Ab8Auj~J*40|h~ zpB2b1Uf%&q$&?V^`pu(XHlV>_7cVqxh&J9^J>ccwHinternalAddGeneratedFile( + ' +� +*google/cloud/vision/v1/web_detection.protogoogle.cloud.vision.v1"� + WebDetectionD + web_entities ( 2..google.cloud.vision.v1.WebDetection.WebEntityK +full_matching_images ( 2-.google.cloud.vision.v1.WebDetection.WebImageN +partial_matching_images ( 2-.google.cloud.vision.v1.WebDetection.WebImageP +pages_with_matching_images ( 2,.google.cloud.vision.v1.WebDetection.WebPageN +visually_similar_images ( 2-.google.cloud.vision.v1.WebDetection.WebImageH +best_guess_labels ( 2-.google.cloud.vision.v1.WebDetection.WebLabelB + WebEntity + entity_id (  +score ( + description ( & +WebImage +url (  +score (� +WebPage +url (  +score ( + +page_title ( K +full_matching_images ( 2-.google.cloud.vision.v1.WebDetection.WebImageN +partial_matching_images ( 2-.google.cloud.vision.v1.WebDetection.WebImage0 +WebLabel +label (  + language_code ( Br +com.google.cloud.vision.v1BWebDetectionProtoPZ5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb��GCVNbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AddProductToProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AddProductToProductSetRequest.php new file mode 100644 index 000000000000..576f4d539fe8 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AddProductToProductSetRequest.php @@ -0,0 +1,140 @@ +google.cloud.vision.v1.AddProductToProductSetRequest + */ +class AddProductToProductSetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The resource name for the Product to be added to this ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * + * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $product = ''; + + /** + * @param string $name Required. The resource name for the ProductSet to modify. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. + * @param string $product Required. The resource name for the Product to be added to this ProductSet. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * Please see {@see ProductSearchClient::productName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\AddProductToProductSetRequest + * + * @experimental + */ + public static function build(string $name, string $product): self + { + return (new self()) + ->setName($name) + ->setProduct($product); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @type string $product + * Required. The resource name for the Product to be added to this ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The resource name for the Product to be added to this ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * + * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getProduct() + { + return $this->product; + } + + /** + * Required. The resource name for the Product to be added to this ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * + * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProduct($var) + { + GPBUtil::checkString($var, True); + $this->product = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileRequest.php new file mode 100644 index 000000000000..99467c0d102c --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileRequest.php @@ -0,0 +1,225 @@ +google.cloud.vision.v1.AnnotateFileRequest + */ +class AnnotateFileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Information about the input file. + * + * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; + */ + protected $input_config = null; + /** + * Required. Requested features. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; + */ + private $features; + /** + * Additional context that may accompany the image(s) in the file. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; + */ + protected $image_context = null; + /** + * Pages of the file to perform image annotation. + * Pages starts from 1, we assume the first page of the file is page 1. + * At most 5 pages are supported per request. Pages can be negative. + * Page 1 means the first page. + * Page 2 means the second page. + * Page -1 means the last page. + * Page -2 means the second to the last page. + * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + * If this field is empty, by default the service performs image annotation + * for the first 5 pages of the file. + * + * Generated from protobuf field repeated int32 pages = 4; + */ + private $pages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\InputConfig $input_config + * Required. Information about the input file. + * @type array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $features + * Required. Requested features. + * @type \Google\Cloud\Vision\V1\ImageContext $image_context + * Additional context that may accompany the image(s) in the file. + * @type array|\Google\Protobuf\Internal\RepeatedField $pages + * Pages of the file to perform image annotation. + * Pages starts from 1, we assume the first page of the file is page 1. + * At most 5 pages are supported per request. Pages can be negative. + * Page 1 means the first page. + * Page 2 means the second page. + * Page -1 means the last page. + * Page -2 means the second to the last page. + * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + * If this field is empty, by default the service performs image annotation + * for the first 5 pages of the file. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Required. Information about the input file. + * + * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; + * @return \Google\Cloud\Vision\V1\InputConfig|null + */ + public function getInputConfig() + { + return $this->input_config; + } + + public function hasInputConfig() + { + return isset($this->input_config); + } + + public function clearInputConfig() + { + unset($this->input_config); + } + + /** + * Required. Information about the input file. + * + * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; + * @param \Google\Cloud\Vision\V1\InputConfig $var + * @return $this + */ + public function setInputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\InputConfig::class); + $this->input_config = $var; + + return $this; + } + + /** + * Required. Requested features. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFeatures() + { + return $this->features; + } + + /** + * Required. Requested features. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; + * @param array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFeatures($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Feature::class); + $this->features = $arr; + + return $this; + } + + /** + * Additional context that may accompany the image(s) in the file. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; + * @return \Google\Cloud\Vision\V1\ImageContext|null + */ + public function getImageContext() + { + return $this->image_context; + } + + public function hasImageContext() + { + return isset($this->image_context); + } + + public function clearImageContext() + { + unset($this->image_context); + } + + /** + * Additional context that may accompany the image(s) in the file. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; + * @param \Google\Cloud\Vision\V1\ImageContext $var + * @return $this + */ + public function setImageContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageContext::class); + $this->image_context = $var; + + return $this; + } + + /** + * Pages of the file to perform image annotation. + * Pages starts from 1, we assume the first page of the file is page 1. + * At most 5 pages are supported per request. Pages can be negative. + * Page 1 means the first page. + * Page 2 means the second page. + * Page -1 means the last page. + * Page -2 means the second to the last page. + * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + * If this field is empty, by default the service performs image annotation + * for the first 5 pages of the file. + * + * Generated from protobuf field repeated int32 pages = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPages() + { + return $this->pages; + } + + /** + * Pages of the file to perform image annotation. + * Pages starts from 1, we assume the first page of the file is page 1. + * At most 5 pages are supported per request. Pages can be negative. + * Page 1 means the first page. + * Page 2 means the second page. + * Page -1 means the last page. + * Page -2 means the second to the last page. + * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + * If this field is empty, by default the service performs image annotation + * for the first 5 pages of the file. + * + * Generated from protobuf field repeated int32 pages = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->pages = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileResponse.php new file mode 100644 index 000000000000..92682231fc13 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileResponse.php @@ -0,0 +1,198 @@ +google.cloud.vision.v1.AnnotateFileResponse + */ +class AnnotateFileResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Information about the file for which this response is generated. + * + * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; + */ + protected $input_config = null; + /** + * Individual responses to images found within the file. This field will be + * empty if the `error` field is set. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + private $responses; + /** + * This field gives the total number of pages in the file. + * + * Generated from protobuf field int32 total_pages = 3; + */ + protected $total_pages = 0; + /** + * If set, represents the error message for the failed request. The + * `responses` field will not be set in this case. + * + * Generated from protobuf field .google.rpc.Status error = 4; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\InputConfig $input_config + * Information about the file for which this response is generated. + * @type array<\Google\Cloud\Vision\V1\AnnotateImageResponse>|\Google\Protobuf\Internal\RepeatedField $responses + * Individual responses to images found within the file. This field will be + * empty if the `error` field is set. + * @type int $total_pages + * This field gives the total number of pages in the file. + * @type \Google\Rpc\Status $error + * If set, represents the error message for the failed request. The + * `responses` field will not be set in this case. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Information about the file for which this response is generated. + * + * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; + * @return \Google\Cloud\Vision\V1\InputConfig|null + */ + public function getInputConfig() + { + return $this->input_config; + } + + public function hasInputConfig() + { + return isset($this->input_config); + } + + public function clearInputConfig() + { + unset($this->input_config); + } + + /** + * Information about the file for which this response is generated. + * + * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; + * @param \Google\Cloud\Vision\V1\InputConfig $var + * @return $this + */ + public function setInputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\InputConfig::class); + $this->input_config = $var; + + return $this; + } + + /** + * Individual responses to images found within the file. This field will be + * empty if the `error` field is set. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResponses() + { + return $this->responses; + } + + /** + * Individual responses to images found within the file. This field will be + * empty if the `error` field is set. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + * @param array<\Google\Cloud\Vision\V1\AnnotateImageResponse>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResponses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateImageResponse::class); + $this->responses = $arr; + + return $this; + } + + /** + * This field gives the total number of pages in the file. + * + * Generated from protobuf field int32 total_pages = 3; + * @return int + */ + public function getTotalPages() + { + return $this->total_pages; + } + + /** + * This field gives the total number of pages in the file. + * + * Generated from protobuf field int32 total_pages = 3; + * @param int $var + * @return $this + */ + public function setTotalPages($var) + { + GPBUtil::checkInt32($var); + $this->total_pages = $var; + + return $this; + } + + /** + * If set, represents the error message for the failed request. The + * `responses` field will not be set in this case. + * + * Generated from protobuf field .google.rpc.Status error = 4; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * If set, represents the error message for the failed request. The + * `responses` field will not be set in this case. + * + * Generated from protobuf field .google.rpc.Status error = 4; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageRequest.php new file mode 100644 index 000000000000..87da32a59c91 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageRequest.php @@ -0,0 +1,156 @@ +google.cloud.vision.v1.AnnotateImageRequest + */ +class AnnotateImageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The image to be processed. + * + * Generated from protobuf field .google.cloud.vision.v1.Image image = 1; + */ + protected $image = null; + /** + * Requested features. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; + */ + private $features; + /** + * Additional context that may accompany the image. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; + */ + protected $image_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\Image $image + * The image to be processed. + * @type array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $features + * Requested features. + * @type \Google\Cloud\Vision\V1\ImageContext $image_context + * Additional context that may accompany the image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * The image to be processed. + * + * Generated from protobuf field .google.cloud.vision.v1.Image image = 1; + * @return \Google\Cloud\Vision\V1\Image|null + */ + public function getImage() + { + return $this->image; + } + + public function hasImage() + { + return isset($this->image); + } + + public function clearImage() + { + unset($this->image); + } + + /** + * The image to be processed. + * + * Generated from protobuf field .google.cloud.vision.v1.Image image = 1; + * @param \Google\Cloud\Vision\V1\Image $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Image::class); + $this->image = $var; + + return $this; + } + + /** + * Requested features. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFeatures() + { + return $this->features; + } + + /** + * Requested features. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; + * @param array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFeatures($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Feature::class); + $this->features = $arr; + + return $this; + } + + /** + * Additional context that may accompany the image. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; + * @return \Google\Cloud\Vision\V1\ImageContext|null + */ + public function getImageContext() + { + return $this->image_context; + } + + public function hasImageContext() + { + return isset($this->image_context); + } + + public function clearImageContext() + { + unset($this->image_context); + } + + /** + * Additional context that may accompany the image. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; + * @param \Google\Cloud\Vision\V1\ImageContext $var + * @return $this + */ + public function setImageContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageContext::class); + $this->image_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageResponse.php new file mode 100644 index 000000000000..5da367298068 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageResponse.php @@ -0,0 +1,617 @@ +google.cloud.vision.v1.AnnotateImageResponse + */ +class AnnotateImageResponse extends \Google\Protobuf\Internal\Message +{ + /** + * If present, face detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + private $face_annotations; + /** + * If present, landmark detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + private $landmark_annotations; + /** + * If present, logo detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + private $logo_annotations; + /** + * If present, label detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + private $label_annotations; + /** + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + private $localized_object_annotations; + /** + * If present, text (OCR) detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + private $text_annotations; + /** + * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; + */ + protected $full_text_annotation = null; + /** + * If present, safe-search annotation has completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; + */ + protected $safe_search_annotation = null; + /** + * If present, image properties were extracted successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; + */ + protected $image_properties_annotation = null; + /** + * If present, crop hints have completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; + */ + protected $crop_hints_annotation = null; + /** + * If present, web detection has completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.WebDetection web_detection = 13; + */ + protected $web_detection = null; + /** + * If present, product search has completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; + */ + protected $product_search_results = null; + /** + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + * + * Generated from protobuf field .google.rpc.Status error = 9; + */ + protected $error = null; + /** + * If present, contextual information is needed to understand where this image + * comes from. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageAnnotationContext context = 21; + */ + protected $context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\FaceAnnotation>|\Google\Protobuf\Internal\RepeatedField $face_annotations + * If present, face detection has completed successfully. + * @type array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $landmark_annotations + * If present, landmark detection has completed successfully. + * @type array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $logo_annotations + * If present, logo detection has completed successfully. + * @type array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $label_annotations + * If present, label detection has completed successfully. + * @type array<\Google\Cloud\Vision\V1\LocalizedObjectAnnotation>|\Google\Protobuf\Internal\RepeatedField $localized_object_annotations + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + * @type array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $text_annotations + * If present, text (OCR) detection has completed successfully. + * @type \Google\Cloud\Vision\V1\TextAnnotation $full_text_annotation + * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + * @type \Google\Cloud\Vision\V1\SafeSearchAnnotation $safe_search_annotation + * If present, safe-search annotation has completed successfully. + * @type \Google\Cloud\Vision\V1\ImageProperties $image_properties_annotation + * If present, image properties were extracted successfully. + * @type \Google\Cloud\Vision\V1\CropHintsAnnotation $crop_hints_annotation + * If present, crop hints have completed successfully. + * @type \Google\Cloud\Vision\V1\WebDetection $web_detection + * If present, web detection has completed successfully. + * @type \Google\Cloud\Vision\V1\ProductSearchResults $product_search_results + * If present, product search has completed successfully. + * @type \Google\Rpc\Status $error + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + * @type \Google\Cloud\Vision\V1\ImageAnnotationContext $context + * If present, contextual information is needed to understand where this image + * comes from. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * If present, face detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFaceAnnotations() + { + return $this->face_annotations; + } + + /** + * If present, face detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + * @param array<\Google\Cloud\Vision\V1\FaceAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFaceAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\FaceAnnotation::class); + $this->face_annotations = $arr; + + return $this; + } + + /** + * If present, landmark detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLandmarkAnnotations() + { + return $this->landmark_annotations; + } + + /** + * If present, landmark detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + * @param array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLandmarkAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\EntityAnnotation::class); + $this->landmark_annotations = $arr; + + return $this; + } + + /** + * If present, logo detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLogoAnnotations() + { + return $this->logo_annotations; + } + + /** + * If present, logo detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + * @param array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLogoAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\EntityAnnotation::class); + $this->logo_annotations = $arr; + + return $this; + } + + /** + * If present, label detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLabelAnnotations() + { + return $this->label_annotations; + } + + /** + * If present, label detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + * @param array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLabelAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\EntityAnnotation::class); + $this->label_annotations = $arr; + + return $this; + } + + /** + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLocalizedObjectAnnotations() + { + return $this->localized_object_annotations; + } + + /** + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + * @param array<\Google\Cloud\Vision\V1\LocalizedObjectAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLocalizedObjectAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\LocalizedObjectAnnotation::class); + $this->localized_object_annotations = $arr; + + return $this; + } + + /** + * If present, text (OCR) detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTextAnnotations() + { + return $this->text_annotations; + } + + /** + * If present, text (OCR) detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + * @param array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTextAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\EntityAnnotation::class); + $this->text_annotations = $arr; + + return $this; + } + + /** + * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; + * @return \Google\Cloud\Vision\V1\TextAnnotation|null + */ + public function getFullTextAnnotation() + { + return $this->full_text_annotation; + } + + public function hasFullTextAnnotation() + { + return isset($this->full_text_annotation); + } + + public function clearFullTextAnnotation() + { + unset($this->full_text_annotation); + } + + /** + * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; + * @param \Google\Cloud\Vision\V1\TextAnnotation $var + * @return $this + */ + public function setFullTextAnnotation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation::class); + $this->full_text_annotation = $var; + + return $this; + } + + /** + * If present, safe-search annotation has completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; + * @return \Google\Cloud\Vision\V1\SafeSearchAnnotation|null + */ + public function getSafeSearchAnnotation() + { + return $this->safe_search_annotation; + } + + public function hasSafeSearchAnnotation() + { + return isset($this->safe_search_annotation); + } + + public function clearSafeSearchAnnotation() + { + unset($this->safe_search_annotation); + } + + /** + * If present, safe-search annotation has completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; + * @param \Google\Cloud\Vision\V1\SafeSearchAnnotation $var + * @return $this + */ + public function setSafeSearchAnnotation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\SafeSearchAnnotation::class); + $this->safe_search_annotation = $var; + + return $this; + } + + /** + * If present, image properties were extracted successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; + * @return \Google\Cloud\Vision\V1\ImageProperties|null + */ + public function getImagePropertiesAnnotation() + { + return $this->image_properties_annotation; + } + + public function hasImagePropertiesAnnotation() + { + return isset($this->image_properties_annotation); + } + + public function clearImagePropertiesAnnotation() + { + unset($this->image_properties_annotation); + } + + /** + * If present, image properties were extracted successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; + * @param \Google\Cloud\Vision\V1\ImageProperties $var + * @return $this + */ + public function setImagePropertiesAnnotation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageProperties::class); + $this->image_properties_annotation = $var; + + return $this; + } + + /** + * If present, crop hints have completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; + * @return \Google\Cloud\Vision\V1\CropHintsAnnotation|null + */ + public function getCropHintsAnnotation() + { + return $this->crop_hints_annotation; + } + + public function hasCropHintsAnnotation() + { + return isset($this->crop_hints_annotation); + } + + public function clearCropHintsAnnotation() + { + unset($this->crop_hints_annotation); + } + + /** + * If present, crop hints have completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; + * @param \Google\Cloud\Vision\V1\CropHintsAnnotation $var + * @return $this + */ + public function setCropHintsAnnotation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\CropHintsAnnotation::class); + $this->crop_hints_annotation = $var; + + return $this; + } + + /** + * If present, web detection has completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.WebDetection web_detection = 13; + * @return \Google\Cloud\Vision\V1\WebDetection|null + */ + public function getWebDetection() + { + return $this->web_detection; + } + + public function hasWebDetection() + { + return isset($this->web_detection); + } + + public function clearWebDetection() + { + unset($this->web_detection); + } + + /** + * If present, web detection has completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.WebDetection web_detection = 13; + * @param \Google\Cloud\Vision\V1\WebDetection $var + * @return $this + */ + public function setWebDetection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\WebDetection::class); + $this->web_detection = $var; + + return $this; + } + + /** + * If present, product search has completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; + * @return \Google\Cloud\Vision\V1\ProductSearchResults|null + */ + public function getProductSearchResults() + { + return $this->product_search_results; + } + + public function hasProductSearchResults() + { + return isset($this->product_search_results); + } + + public function clearProductSearchResults() + { + unset($this->product_search_results); + } + + /** + * If present, product search has completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; + * @param \Google\Cloud\Vision\V1\ProductSearchResults $var + * @return $this + */ + public function setProductSearchResults($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSearchResults::class); + $this->product_search_results = $var; + + return $this; + } + + /** + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + * + * Generated from protobuf field .google.rpc.Status error = 9; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + * + * Generated from protobuf field .google.rpc.Status error = 9; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * If present, contextual information is needed to understand where this image + * comes from. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageAnnotationContext context = 21; + * @return \Google\Cloud\Vision\V1\ImageAnnotationContext|null + */ + public function getContext() + { + return $this->context; + } + + public function hasContext() + { + return isset($this->context); + } + + public function clearContext() + { + unset($this->context); + } + + /** + * If present, contextual information is needed to understand where this image + * comes from. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageAnnotationContext context = 21; + * @param \Google\Cloud\Vision\V1\ImageAnnotationContext $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageAnnotationContext::class); + $this->context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileRequest.php new file mode 100644 index 000000000000..c1ebfd6cc6dc --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileRequest.php @@ -0,0 +1,199 @@ +google.cloud.vision.v1.AsyncAnnotateFileRequest + */ +class AsyncAnnotateFileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Information about the input file. + * + * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; + */ + protected $input_config = null; + /** + * Required. Requested features. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; + */ + private $features; + /** + * Additional context that may accompany the image(s) in the file. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; + */ + protected $image_context = null; + /** + * Required. The desired output location and metadata (e.g. format). + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 4; + */ + protected $output_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\InputConfig $input_config + * Required. Information about the input file. + * @type array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $features + * Required. Requested features. + * @type \Google\Cloud\Vision\V1\ImageContext $image_context + * Additional context that may accompany the image(s) in the file. + * @type \Google\Cloud\Vision\V1\OutputConfig $output_config + * Required. The desired output location and metadata (e.g. format). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Required. Information about the input file. + * + * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; + * @return \Google\Cloud\Vision\V1\InputConfig|null + */ + public function getInputConfig() + { + return $this->input_config; + } + + public function hasInputConfig() + { + return isset($this->input_config); + } + + public function clearInputConfig() + { + unset($this->input_config); + } + + /** + * Required. Information about the input file. + * + * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; + * @param \Google\Cloud\Vision\V1\InputConfig $var + * @return $this + */ + public function setInputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\InputConfig::class); + $this->input_config = $var; + + return $this; + } + + /** + * Required. Requested features. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFeatures() + { + return $this->features; + } + + /** + * Required. Requested features. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; + * @param array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFeatures($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Feature::class); + $this->features = $arr; + + return $this; + } + + /** + * Additional context that may accompany the image(s) in the file. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; + * @return \Google\Cloud\Vision\V1\ImageContext|null + */ + public function getImageContext() + { + return $this->image_context; + } + + public function hasImageContext() + { + return isset($this->image_context); + } + + public function clearImageContext() + { + unset($this->image_context); + } + + /** + * Additional context that may accompany the image(s) in the file. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; + * @param \Google\Cloud\Vision\V1\ImageContext $var + * @return $this + */ + public function setImageContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageContext::class); + $this->image_context = $var; + + return $this; + } + + /** + * Required. The desired output location and metadata (e.g. format). + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 4; + * @return \Google\Cloud\Vision\V1\OutputConfig|null + */ + public function getOutputConfig() + { + return $this->output_config; + } + + public function hasOutputConfig() + { + return isset($this->output_config); + } + + public function clearOutputConfig() + { + unset($this->output_config); + } + + /** + * Required. The desired output location and metadata (e.g. format). + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 4; + * @param \Google\Cloud\Vision\V1\OutputConfig $var + * @return $this + */ + public function setOutputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\OutputConfig::class); + $this->output_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileResponse.php new file mode 100644 index 000000000000..1dbad5e843de --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileResponse.php @@ -0,0 +1,77 @@ +google.cloud.vision.v1.AsyncAnnotateFileResponse + */ +class AsyncAnnotateFileResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The output location and metadata from AsyncAnnotateFileRequest. + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; + */ + protected $output_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\OutputConfig $output_config + * The output location and metadata from AsyncAnnotateFileRequest. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * The output location and metadata from AsyncAnnotateFileRequest. + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; + * @return \Google\Cloud\Vision\V1\OutputConfig|null + */ + public function getOutputConfig() + { + return $this->output_config; + } + + public function hasOutputConfig() + { + return isset($this->output_config); + } + + public function clearOutputConfig() + { + unset($this->output_config); + } + + /** + * The output location and metadata from AsyncAnnotateFileRequest. + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; + * @param \Google\Cloud\Vision\V1\OutputConfig $var + * @return $this + */ + public function setOutputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\OutputConfig::class); + $this->output_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesRequest.php new file mode 100644 index 000000000000..89b4ff854f7b --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesRequest.php @@ -0,0 +1,143 @@ +google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest + */ +class AsyncBatchAnnotateFilesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Individual async file annotation requests for this batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 4; + */ + protected $parent = ''; + + /** + * @param \Google\Cloud\Vision\V1\AsyncAnnotateFileRequest[] $requests Required. Individual async file annotation requests for this batch. + * + * @return \Google\Cloud\Vision\V1\AsyncBatchAnnotateFilesRequest + * + * @experimental + */ + public static function build(array $requests): self + { + return (new self()) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\AsyncAnnotateFileRequest>|\Google\Protobuf\Internal\RepeatedField $requests + * Required. Individual async file annotation requests for this batch. + * @type string $parent + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Required. Individual async file annotation requests for this batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. Individual async file annotation requests for this batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Vision\V1\AsyncAnnotateFileRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AsyncAnnotateFileRequest::class); + $this->requests = $arr; + + return $this; + } + + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 4; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 4; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesResponse.php new file mode 100644 index 000000000000..475b70528eef --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesResponse.php @@ -0,0 +1,71 @@ +google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse + */ +class AsyncBatchAnnotateFilesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + private $responses; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\AsyncAnnotateFileResponse>|\Google\Protobuf\Internal\RepeatedField $responses + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResponses() + { + return $this->responses; + } + + /** + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + * @param array<\Google\Cloud\Vision\V1\AsyncAnnotateFileResponse>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResponses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AsyncAnnotateFileResponse::class); + $this->responses = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesRequest.php new file mode 100644 index 000000000000..57662728fa40 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesRequest.php @@ -0,0 +1,188 @@ +google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest + */ +class AsyncBatchAnnotateImagesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Individual image annotation requests for this batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + /** + * Required. The desired output location and metadata (e.g. format). + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $output_config = null; + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 4; + */ + protected $parent = ''; + + /** + * @param \Google\Cloud\Vision\V1\AnnotateImageRequest[] $requests Required. Individual image annotation requests for this batch. + * @param \Google\Cloud\Vision\V1\OutputConfig $outputConfig Required. The desired output location and metadata (e.g. format). + * + * @return \Google\Cloud\Vision\V1\AsyncBatchAnnotateImagesRequest + * + * @experimental + */ + public static function build(array $requests, \Google\Cloud\Vision\V1\OutputConfig $outputConfig): self + { + return (new self()) + ->setRequests($requests) + ->setOutputConfig($outputConfig); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\AnnotateImageRequest>|\Google\Protobuf\Internal\RepeatedField $requests + * Required. Individual image annotation requests for this batch. + * @type \Google\Cloud\Vision\V1\OutputConfig $output_config + * Required. The desired output location and metadata (e.g. format). + * @type string $parent + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Required. Individual image annotation requests for this batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. Individual image annotation requests for this batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Vision\V1\AnnotateImageRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateImageRequest::class); + $this->requests = $arr; + + return $this; + } + + /** + * Required. The desired output location and metadata (e.g. format). + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Vision\V1\OutputConfig|null + */ + public function getOutputConfig() + { + return $this->output_config; + } + + public function hasOutputConfig() + { + return isset($this->output_config); + } + + public function clearOutputConfig() + { + unset($this->output_config); + } + + /** + * Required. The desired output location and metadata (e.g. format). + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Vision\V1\OutputConfig $var + * @return $this + */ + public function setOutputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\OutputConfig::class); + $this->output_config = $var; + + return $this; + } + + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 4; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 4; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesResponse.php new file mode 100644 index 000000000000..6a424d1a37ce --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesResponse.php @@ -0,0 +1,77 @@ +google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse + */ +class AsyncBatchAnnotateImagesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The output location and metadata from AsyncBatchAnnotateImagesRequest. + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; + */ + protected $output_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\OutputConfig $output_config + * The output location and metadata from AsyncBatchAnnotateImagesRequest. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * The output location and metadata from AsyncBatchAnnotateImagesRequest. + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; + * @return \Google\Cloud\Vision\V1\OutputConfig|null + */ + public function getOutputConfig() + { + return $this->output_config; + } + + public function hasOutputConfig() + { + return isset($this->output_config); + } + + public function clearOutputConfig() + { + unset($this->output_config); + } + + /** + * The output location and metadata from AsyncBatchAnnotateImagesRequest. + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; + * @param \Google\Cloud\Vision\V1\OutputConfig $var + * @return $this + */ + public function setOutputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\OutputConfig::class); + $this->output_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesRequest.php new file mode 100644 index 000000000000..3146d9c883e1 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesRequest.php @@ -0,0 +1,147 @@ +google.cloud.vision.v1.BatchAnnotateFilesRequest + */ +class BatchAnnotateFilesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The list of file annotation requests. Right now we support only one + * AnnotateFileRequest in BatchAnnotateFilesRequest. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 3; + */ + protected $parent = ''; + + /** + * @param \Google\Cloud\Vision\V1\AnnotateFileRequest[] $requests Required. The list of file annotation requests. Right now we support only one + * AnnotateFileRequest in BatchAnnotateFilesRequest. + * + * @return \Google\Cloud\Vision\V1\BatchAnnotateFilesRequest + * + * @experimental + */ + public static function build(array $requests): self + { + return (new self()) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\AnnotateFileRequest>|\Google\Protobuf\Internal\RepeatedField $requests + * Required. The list of file annotation requests. Right now we support only one + * AnnotateFileRequest in BatchAnnotateFilesRequest. + * @type string $parent + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Required. The list of file annotation requests. Right now we support only one + * AnnotateFileRequest in BatchAnnotateFilesRequest. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The list of file annotation requests. Right now we support only one + * AnnotateFileRequest in BatchAnnotateFilesRequest. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Vision\V1\AnnotateFileRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateFileRequest::class); + $this->requests = $arr; + + return $this; + } + + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 3; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 3; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesResponse.php new file mode 100644 index 000000000000..2a6384a5d6a3 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesResponse.php @@ -0,0 +1,71 @@ +google.cloud.vision.v1.BatchAnnotateFilesResponse + */ +class BatchAnnotateFilesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of file annotation responses, each response corresponding to each + * AnnotateFileRequest in BatchAnnotateFilesRequest. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + private $responses; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\AnnotateFileResponse>|\Google\Protobuf\Internal\RepeatedField $responses + * The list of file annotation responses, each response corresponding to each + * AnnotateFileRequest in BatchAnnotateFilesRequest. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * The list of file annotation responses, each response corresponding to each + * AnnotateFileRequest in BatchAnnotateFilesRequest. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResponses() + { + return $this->responses; + } + + /** + * The list of file annotation responses, each response corresponding to each + * AnnotateFileRequest in BatchAnnotateFilesRequest. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + * @param array<\Google\Cloud\Vision\V1\AnnotateFileResponse>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResponses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateFileResponse::class); + $this->responses = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesRequest.php new file mode 100644 index 000000000000..be33dee8c896 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesRequest.php @@ -0,0 +1,142 @@ +google.cloud.vision.v1.BatchAnnotateImagesRequest + */ +class BatchAnnotateImagesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Individual image annotation requests for this batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 4; + */ + protected $parent = ''; + + /** + * @param \Google\Cloud\Vision\V1\AnnotateImageRequest[] $requests Required. Individual image annotation requests for this batch. + * + * @return \Google\Cloud\Vision\V1\BatchAnnotateImagesRequest + * + * @experimental + */ + public static function build(array $requests): self + { + return (new self()) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\AnnotateImageRequest>|\Google\Protobuf\Internal\RepeatedField $requests + * Required. Individual image annotation requests for this batch. + * @type string $parent + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Required. Individual image annotation requests for this batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. Individual image annotation requests for this batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Vision\V1\AnnotateImageRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateImageRequest::class); + $this->requests = $arr; + + return $this; + } + + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 4; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 4; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesResponse.php new file mode 100644 index 000000000000..94a35240ca6f --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesResponse.php @@ -0,0 +1,67 @@ +google.cloud.vision.v1.BatchAnnotateImagesResponse + */ +class BatchAnnotateImagesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Individual responses to image annotation requests within the batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + private $responses; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\AnnotateImageResponse>|\Google\Protobuf\Internal\RepeatedField $responses + * Individual responses to image annotation requests within the batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Individual responses to image annotation requests within the batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResponses() + { + return $this->responses; + } + + /** + * Individual responses to image annotation requests within the batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + * @param array<\Google\Cloud\Vision\V1\AnnotateImageResponse>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResponses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateImageResponse::class); + $this->responses = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata.php new file mode 100644 index 000000000000..12e0a5a4af97 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata.php @@ -0,0 +1,161 @@ +google.cloud.vision.v1.BatchOperationMetadata + */ +class BatchOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The current state of the batch operation. + * + * Generated from protobuf field .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; + */ + protected $state = 0; + /** + * The time when the batch request was submitted to the server. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 2; + */ + protected $submit_time = null; + /** + * The time when the batch request is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The current state of the batch operation. + * @type \Google\Protobuf\Timestamp $submit_time + * The time when the batch request was submitted to the server. + * @type \Google\Protobuf\Timestamp $end_time + * The time when the batch request is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * The current state of the batch operation. + * + * Generated from protobuf field .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current state of the batch operation. + * + * Generated from protobuf field .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\BatchOperationMetadata\State::class); + $this->state = $var; + + return $this; + } + + /** + * The time when the batch request was submitted to the server. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSubmitTime() + { + return $this->submit_time; + } + + public function hasSubmitTime() + { + return isset($this->submit_time); + } + + public function clearSubmitTime() + { + unset($this->submit_time); + } + + /** + * The time when the batch request was submitted to the server. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSubmitTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->submit_time = $var; + + return $this; + } + + /** + * The time when the batch request is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time when the batch request is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata/State.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata/State.php new file mode 100644 index 000000000000..cba5eccd4849 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata/State.php @@ -0,0 +1,81 @@ +google.cloud.vision.v1.BatchOperationMetadata.State + */ +class State +{ + /** + * Invalid. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Request is actively being processed. + * + * Generated from protobuf enum PROCESSING = 1; + */ + const PROCESSING = 1; + /** + * The request is done and at least one item has been successfully + * processed. + * + * Generated from protobuf enum SUCCESSFUL = 2; + */ + const SUCCESSFUL = 2; + /** + * The request is done and no item has been successfully processed. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + /** + * The request is done after the longrunning.Operations.CancelOperation has + * been called by the user. Any records that were processed before the + * cancel command are output as specified in the request. + * + * Generated from protobuf enum CANCELLED = 4; + */ + const CANCELLED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PROCESSING => 'PROCESSING', + self::SUCCESSFUL => 'SUCCESSFUL', + self::FAILED => 'FAILED', + self::CANCELLED => 'CANCELLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Vision\V1\BatchOperationMetadata_State::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block.php new file mode 100644 index 000000000000..d53227721f64 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block.php @@ -0,0 +1,279 @@ +google.cloud.vision.v1.Block + */ +class Block extends \Google\Protobuf\Internal\Message +{ + /** + * Additional information detected for the block. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + protected $property = null; + /** + * The bounding box for the block. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + protected $bounding_box = null; + /** + * List of paragraphs in this block (if this blocks is of type text). + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + private $paragraphs; + /** + * Detected block type (text, image etc) for this block. + * + * Generated from protobuf field .google.cloud.vision.v1.Block.BlockType block_type = 4; + */ + protected $block_type = 0; + /** + * Confidence of the OCR results on the block. Range [0, 1]. + * + * Generated from protobuf field float confidence = 5; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $property + * Additional information detected for the block. + * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_box + * The bounding box for the block. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * @type array<\Google\Cloud\Vision\V1\Paragraph>|\Google\Protobuf\Internal\RepeatedField $paragraphs + * List of paragraphs in this block (if this blocks is of type text). + * @type int $block_type + * Detected block type (text, image etc) for this block. + * @type float $confidence + * Confidence of the OCR results on the block. Range [0, 1]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); + parent::__construct($data); + } + + /** + * Additional information detected for the block. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return \Google\Cloud\Vision\V1\TextAnnotation\TextProperty|null + */ + public function getProperty() + { + return $this->property; + } + + public function hasProperty() + { + return isset($this->property); + } + + public function clearProperty() + { + unset($this->property); + } + + /** + * Additional information detected for the block. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @param \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $var + * @return $this + */ + public function setProperty($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\TextProperty::class); + $this->property = $var; + + return $this; + } + + /** + * The bounding box for the block. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return \Google\Cloud\Vision\V1\BoundingPoly|null + */ + public function getBoundingBox() + { + return $this->bounding_box; + } + + public function hasBoundingBox() + { + return isset($this->bounding_box); + } + + public function clearBoundingBox() + { + unset($this->bounding_box); + } + + /** + * The bounding box for the block. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @param \Google\Cloud\Vision\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingBox($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->bounding_box = $var; + + return $this; + } + + /** + * List of paragraphs in this block (if this blocks is of type text). + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getParagraphs() + { + return $this->paragraphs; + } + + /** + * List of paragraphs in this block (if this blocks is of type text). + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + * @param array<\Google\Cloud\Vision\V1\Paragraph>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setParagraphs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Paragraph::class); + $this->paragraphs = $arr; + + return $this; + } + + /** + * Detected block type (text, image etc) for this block. + * + * Generated from protobuf field .google.cloud.vision.v1.Block.BlockType block_type = 4; + * @return int + */ + public function getBlockType() + { + return $this->block_type; + } + + /** + * Detected block type (text, image etc) for this block. + * + * Generated from protobuf field .google.cloud.vision.v1.Block.BlockType block_type = 4; + * @param int $var + * @return $this + */ + public function setBlockType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Block\BlockType::class); + $this->block_type = $var; + + return $this; + } + + /** + * Confidence of the OCR results on the block. Range [0, 1]. + * + * Generated from protobuf field float confidence = 5; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Confidence of the OCR results on the block. Range [0, 1]. + * + * Generated from protobuf field float confidence = 5; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block/BlockType.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block/BlockType.php new file mode 100644 index 000000000000..eefde91942e3 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block/BlockType.php @@ -0,0 +1,85 @@ +google.cloud.vision.v1.Block.BlockType + */ +class BlockType +{ + /** + * Unknown block type. + * + * Generated from protobuf enum UNKNOWN = 0; + */ + const UNKNOWN = 0; + /** + * Regular text block. + * + * Generated from protobuf enum TEXT = 1; + */ + const TEXT = 1; + /** + * Table block. + * + * Generated from protobuf enum TABLE = 2; + */ + const TABLE = 2; + /** + * Image block. + * + * Generated from protobuf enum PICTURE = 3; + */ + const PICTURE = 3; + /** + * Horizontal/vertical line box. + * + * Generated from protobuf enum RULER = 4; + */ + const RULER = 4; + /** + * Barcode block. + * + * Generated from protobuf enum BARCODE = 5; + */ + const BARCODE = 5; + + private static $valueToName = [ + self::UNKNOWN => 'UNKNOWN', + self::TEXT => 'TEXT', + self::TABLE => 'TABLE', + self::PICTURE => 'PICTURE', + self::RULER => 'RULER', + self::BARCODE => 'BARCODE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BlockType::class, \Google\Cloud\Vision\V1\Block_BlockType::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BoundingPoly.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BoundingPoly.php new file mode 100644 index 000000000000..7bc296abfa82 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BoundingPoly.php @@ -0,0 +1,101 @@ +google.cloud.vision.v1.BoundingPoly + */ +class BoundingPoly extends \Google\Protobuf\Internal\Message +{ + /** + * The bounding polygon vertices. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + private $vertices; + /** + * The bounding polygon normalized vertices. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + private $normalized_vertices; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\Vertex>|\Google\Protobuf\Internal\RepeatedField $vertices + * The bounding polygon vertices. + * @type array<\Google\Cloud\Vision\V1\NormalizedVertex>|\Google\Protobuf\Internal\RepeatedField $normalized_vertices + * The bounding polygon normalized vertices. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\Geometry::initOnce(); + parent::__construct($data); + } + + /** + * The bounding polygon vertices. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Vertex vertices = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVertices() + { + return $this->vertices; + } + + /** + * The bounding polygon vertices. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Vertex vertices = 1; + * @param array<\Google\Cloud\Vision\V1\Vertex>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVertices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Vertex::class); + $this->vertices = $arr; + + return $this; + } + + /** + * The bounding polygon normalized vertices. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNormalizedVertices() + { + return $this->normalized_vertices; + } + + /** + * The bounding polygon normalized vertices. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + * @param array<\Google\Cloud\Vision\V1\NormalizedVertex>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNormalizedVertices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\NormalizedVertex::class); + $this->normalized_vertices = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ColorInfo.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ColorInfo.php new file mode 100644 index 000000000000..545a5de76ace --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ColorInfo.php @@ -0,0 +1,150 @@ +google.cloud.vision.v1.ColorInfo + */ +class ColorInfo extends \Google\Protobuf\Internal\Message +{ + /** + * RGB components of the color. + * + * Generated from protobuf field .google.type.Color color = 1; + */ + protected $color = null; + /** + * Image-specific score for this color. Value in range [0, 1]. + * + * Generated from protobuf field float score = 2; + */ + protected $score = 0.0; + /** + * The fraction of pixels the color occupies in the image. + * Value in range [0, 1]. + * + * Generated from protobuf field float pixel_fraction = 3; + */ + protected $pixel_fraction = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\Color $color + * RGB components of the color. + * @type float $score + * Image-specific score for this color. Value in range [0, 1]. + * @type float $pixel_fraction + * The fraction of pixels the color occupies in the image. + * Value in range [0, 1]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * RGB components of the color. + * + * Generated from protobuf field .google.type.Color color = 1; + * @return \Google\Type\Color|null + */ + public function getColor() + { + return $this->color; + } + + public function hasColor() + { + return isset($this->color); + } + + public function clearColor() + { + unset($this->color); + } + + /** + * RGB components of the color. + * + * Generated from protobuf field .google.type.Color color = 1; + * @param \Google\Type\Color $var + * @return $this + */ + public function setColor($var) + { + GPBUtil::checkMessage($var, \Google\Type\Color::class); + $this->color = $var; + + return $this; + } + + /** + * Image-specific score for this color. Value in range [0, 1]. + * + * Generated from protobuf field float score = 2; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * Image-specific score for this color. Value in range [0, 1]. + * + * Generated from protobuf field float score = 2; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * The fraction of pixels the color occupies in the image. + * Value in range [0, 1]. + * + * Generated from protobuf field float pixel_fraction = 3; + * @return float + */ + public function getPixelFraction() + { + return $this->pixel_fraction; + } + + /** + * The fraction of pixels the color occupies in the image. + * Value in range [0, 1]. + * + * Generated from protobuf field float pixel_fraction = 3; + * @param float $var + * @return $this + */ + public function setPixelFraction($var) + { + GPBUtil::checkFloat($var); + $this->pixel_fraction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductRequest.php new file mode 100644 index 000000000000..fbb905a23ca3 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductRequest.php @@ -0,0 +1,189 @@ +google.cloud.vision.v1.CreateProductRequest + */ +class CreateProductRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project in which the Product should be created. + * Format is + * `projects/PROJECT_ID/locations/LOC_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The product to create. + * + * Generated from protobuf field .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $product = null; + /** + * A user-supplied resource id for this Product. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * + * Generated from protobuf field string product_id = 3; + */ + protected $product_id = ''; + + /** + * @param string $parent Required. The project in which the Product should be created. + * + * Format is + * `projects/PROJECT_ID/locations/LOC_ID`. Please see + * {@see ProductSearchClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Vision\V1\Product $product Required. The product to create. + * @param string $productId A user-supplied resource id for this Product. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * + * @return \Google\Cloud\Vision\V1\CreateProductRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Vision\V1\Product $product, string $productId): self + { + return (new self()) + ->setParent($parent) + ->setProduct($product) + ->setProductId($productId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project in which the Product should be created. + * Format is + * `projects/PROJECT_ID/locations/LOC_ID`. + * @type \Google\Cloud\Vision\V1\Product $product + * Required. The product to create. + * @type string $product_id + * A user-supplied resource id for this Product. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project in which the Product should be created. + * Format is + * `projects/PROJECT_ID/locations/LOC_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project in which the Product should be created. + * Format is + * `projects/PROJECT_ID/locations/LOC_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The product to create. + * + * Generated from protobuf field .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Vision\V1\Product|null + */ + public function getProduct() + { + return $this->product; + } + + public function hasProduct() + { + return isset($this->product); + } + + public function clearProduct() + { + unset($this->product); + } + + /** + * Required. The product to create. + * + * Generated from protobuf field .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Vision\V1\Product $var + * @return $this + */ + public function setProduct($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Product::class); + $this->product = $var; + + return $this; + } + + /** + * A user-supplied resource id for this Product. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * + * Generated from protobuf field string product_id = 3; + * @return string + */ + public function getProductId() + { + return $this->product_id; + } + + /** + * A user-supplied resource id for this Product. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * + * Generated from protobuf field string product_id = 3; + * @param string $var + * @return $this + */ + public function setProductId($var) + { + GPBUtil::checkString($var, True); + $this->product_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductSetRequest.php new file mode 100644 index 000000000000..06f5ef2cf0cb --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductSetRequest.php @@ -0,0 +1,184 @@ +google.cloud.vision.v1.CreateProductSetRequest + */ +class CreateProductSetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project in which the ProductSet should be created. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ProductSet to create. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $product_set = null; + /** + * A user-supplied resource id for this ProductSet. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * + * Generated from protobuf field string product_set_id = 3; + */ + protected $product_set_id = ''; + + /** + * @param string $parent Required. The project in which the ProductSet should be created. + * + * Format is `projects/PROJECT_ID/locations/LOC_ID`. Please see + * {@see ProductSearchClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Vision\V1\ProductSet $productSet Required. The ProductSet to create. + * @param string $productSetId A user-supplied resource id for this ProductSet. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * + * @return \Google\Cloud\Vision\V1\CreateProductSetRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Vision\V1\ProductSet $productSet, string $productSetId): self + { + return (new self()) + ->setParent($parent) + ->setProductSet($productSet) + ->setProductSetId($productSetId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project in which the ProductSet should be created. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @type \Google\Cloud\Vision\V1\ProductSet $product_set + * Required. The ProductSet to create. + * @type string $product_set_id + * A user-supplied resource id for this ProductSet. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project in which the ProductSet should be created. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project in which the ProductSet should be created. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ProductSet to create. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Vision\V1\ProductSet|null + */ + public function getProductSet() + { + return $this->product_set; + } + + public function hasProductSet() + { + return isset($this->product_set); + } + + public function clearProductSet() + { + unset($this->product_set); + } + + /** + * Required. The ProductSet to create. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Vision\V1\ProductSet $var + * @return $this + */ + public function setProductSet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSet::class); + $this->product_set = $var; + + return $this; + } + + /** + * A user-supplied resource id for this ProductSet. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * + * Generated from protobuf field string product_set_id = 3; + * @return string + */ + public function getProductSetId() + { + return $this->product_set_id; + } + + /** + * A user-supplied resource id for this ProductSet. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * + * Generated from protobuf field string product_set_id = 3; + * @param string $var + * @return $this + */ + public function setProductSetId($var) + { + GPBUtil::checkString($var, True); + $this->product_set_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateReferenceImageRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateReferenceImageRequest.php new file mode 100644 index 000000000000..318b63962ef2 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateReferenceImageRequest.php @@ -0,0 +1,194 @@ +google.cloud.vision.v1.CreateReferenceImageRequest + */ +class CreateReferenceImageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the product in which to create the reference image. + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The reference image to create. + * If an image ID is specified, it is ignored. + * + * Generated from protobuf field .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reference_image = null; + /** + * A user-supplied resource id for the ReferenceImage to be added. If set, + * the server will attempt to use this value as the resource id. If it is + * already in use, an error is returned with code ALREADY_EXISTS. Must be at + * most 128 characters long. It cannot contain the character `/`. + * + * Generated from protobuf field string reference_image_id = 3; + */ + protected $reference_image_id = ''; + + /** + * @param string $parent Required. Resource name of the product in which to create the reference image. + * + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. Please see + * {@see ProductSearchClient::productName()} for help formatting this field. + * @param \Google\Cloud\Vision\V1\ReferenceImage $referenceImage Required. The reference image to create. + * If an image ID is specified, it is ignored. + * @param string $referenceImageId A user-supplied resource id for the ReferenceImage to be added. If set, + * the server will attempt to use this value as the resource id. If it is + * already in use, an error is returned with code ALREADY_EXISTS. Must be at + * most 128 characters long. It cannot contain the character `/`. + * + * @return \Google\Cloud\Vision\V1\CreateReferenceImageRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Vision\V1\ReferenceImage $referenceImage, string $referenceImageId): self + { + return (new self()) + ->setParent($parent) + ->setReferenceImage($referenceImage) + ->setReferenceImageId($referenceImageId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the product in which to create the reference image. + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * @type \Google\Cloud\Vision\V1\ReferenceImage $reference_image + * Required. The reference image to create. + * If an image ID is specified, it is ignored. + * @type string $reference_image_id + * A user-supplied resource id for the ReferenceImage to be added. If set, + * the server will attempt to use this value as the resource id. If it is + * already in use, an error is returned with code ALREADY_EXISTS. Must be at + * most 128 characters long. It cannot contain the character `/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the product in which to create the reference image. + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Resource name of the product in which to create the reference image. + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The reference image to create. + * If an image ID is specified, it is ignored. + * + * Generated from protobuf field .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Vision\V1\ReferenceImage|null + */ + public function getReferenceImage() + { + return $this->reference_image; + } + + public function hasReferenceImage() + { + return isset($this->reference_image); + } + + public function clearReferenceImage() + { + unset($this->reference_image); + } + + /** + * Required. The reference image to create. + * If an image ID is specified, it is ignored. + * + * Generated from protobuf field .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Vision\V1\ReferenceImage $var + * @return $this + */ + public function setReferenceImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ReferenceImage::class); + $this->reference_image = $var; + + return $this; + } + + /** + * A user-supplied resource id for the ReferenceImage to be added. If set, + * the server will attempt to use this value as the resource id. If it is + * already in use, an error is returned with code ALREADY_EXISTS. Must be at + * most 128 characters long. It cannot contain the character `/`. + * + * Generated from protobuf field string reference_image_id = 3; + * @return string + */ + public function getReferenceImageId() + { + return $this->reference_image_id; + } + + /** + * A user-supplied resource id for the ReferenceImage to be added. If set, + * the server will attempt to use this value as the resource id. If it is + * already in use, an error is returned with code ALREADY_EXISTS. Must be at + * most 128 characters long. It cannot contain the character `/`. + * + * Generated from protobuf field string reference_image_id = 3; + * @param string $var + * @return $this + */ + public function setReferenceImageId($var) + { + GPBUtil::checkString($var, True); + $this->reference_image_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHint.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHint.php new file mode 100644 index 000000000000..34593cd6e194 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHint.php @@ -0,0 +1,153 @@ +google.cloud.vision.v1.CropHint + */ +class CropHint extends \Google\Protobuf\Internal\Message +{ + /** + * The bounding polygon for the crop region. The coordinates of the bounding + * box are in the original image's scale. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + protected $bounding_poly = null; + /** + * Confidence of this being a salient region. Range [0, 1]. + * + * Generated from protobuf field float confidence = 2; + */ + protected $confidence = 0.0; + /** + * Fraction of importance of this salient region with respect to the original + * image. + * + * Generated from protobuf field float importance_fraction = 3; + */ + protected $importance_fraction = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly + * The bounding polygon for the crop region. The coordinates of the bounding + * box are in the original image's scale. + * @type float $confidence + * Confidence of this being a salient region. Range [0, 1]. + * @type float $importance_fraction + * Fraction of importance of this salient region with respect to the original + * image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * The bounding polygon for the crop region. The coordinates of the bounding + * box are in the original image's scale. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return \Google\Cloud\Vision\V1\BoundingPoly|null + */ + public function getBoundingPoly() + { + return $this->bounding_poly; + } + + public function hasBoundingPoly() + { + return isset($this->bounding_poly); + } + + public function clearBoundingPoly() + { + unset($this->bounding_poly); + } + + /** + * The bounding polygon for the crop region. The coordinates of the bounding + * box are in the original image's scale. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @param \Google\Cloud\Vision\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingPoly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->bounding_poly = $var; + + return $this; + } + + /** + * Confidence of this being a salient region. Range [0, 1]. + * + * Generated from protobuf field float confidence = 2; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Confidence of this being a salient region. Range [0, 1]. + * + * Generated from protobuf field float confidence = 2; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + + /** + * Fraction of importance of this salient region with respect to the original + * image. + * + * Generated from protobuf field float importance_fraction = 3; + * @return float + */ + public function getImportanceFraction() + { + return $this->importance_fraction; + } + + /** + * Fraction of importance of this salient region with respect to the original + * image. + * + * Generated from protobuf field float importance_fraction = 3; + * @param float $var + * @return $this + */ + public function setImportanceFraction($var) + { + GPBUtil::checkFloat($var); + $this->importance_fraction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsAnnotation.php new file mode 100644 index 000000000000..7edebe86ec09 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsAnnotation.php @@ -0,0 +1,67 @@ +google.cloud.vision.v1.CropHintsAnnotation + */ +class CropHintsAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * Crop hint results. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + private $crop_hints; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\CropHint>|\Google\Protobuf\Internal\RepeatedField $crop_hints + * Crop hint results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Crop hint results. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCropHints() + { + return $this->crop_hints; + } + + /** + * Crop hint results. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + * @param array<\Google\Cloud\Vision\V1\CropHint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCropHints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\CropHint::class); + $this->crop_hints = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsParams.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsParams.php new file mode 100644 index 000000000000..a1cc403bdb2e --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsParams.php @@ -0,0 +1,87 @@ +google.cloud.vision.v1.CropHintsParams + */ +class CropHintsParams extends \Google\Protobuf\Internal\Message +{ + /** + * Aspect ratios in floats, representing the ratio of the width to the height + * of the image. For example, if the desired aspect ratio is 4/3, the + * corresponding float value should be 1.33333. If not specified, the + * best possible crop is returned. The number of provided aspect ratios is + * limited to a maximum of 16; any aspect ratios provided after the 16th are + * ignored. + * + * Generated from protobuf field repeated float aspect_ratios = 1; + */ + private $aspect_ratios; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $aspect_ratios + * Aspect ratios in floats, representing the ratio of the width to the height + * of the image. For example, if the desired aspect ratio is 4/3, the + * corresponding float value should be 1.33333. If not specified, the + * best possible crop is returned. The number of provided aspect ratios is + * limited to a maximum of 16; any aspect ratios provided after the 16th are + * ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Aspect ratios in floats, representing the ratio of the width to the height + * of the image. For example, if the desired aspect ratio is 4/3, the + * corresponding float value should be 1.33333. If not specified, the + * best possible crop is returned. The number of provided aspect ratios is + * limited to a maximum of 16; any aspect ratios provided after the 16th are + * ignored. + * + * Generated from protobuf field repeated float aspect_ratios = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAspectRatios() + { + return $this->aspect_ratios; + } + + /** + * Aspect ratios in floats, representing the ratio of the width to the height + * of the image. For example, if the desired aspect ratio is 4/3, the + * corresponding float value should be 1.33333. If not specified, the + * best possible crop is returned. The number of provided aspect ratios is + * limited to a maximum of 16; any aspect ratios provided after the 16th are + * ignored. + * + * Generated from protobuf field repeated float aspect_ratios = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAspectRatios($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::FLOAT); + $this->aspect_ratios = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductRequest.php new file mode 100644 index 000000000000..744dae5b2622 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductRequest.php @@ -0,0 +1,92 @@ +google.cloud.vision.v1.DeleteProductRequest + */ +class DeleteProductRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of product to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of product to delete. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * Please see {@see ProductSearchClient::productName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\DeleteProductRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of product to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of product to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of product to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductSetRequest.php new file mode 100644 index 000000000000..aa0ce3fb5abb --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductSetRequest.php @@ -0,0 +1,92 @@ +google.cloud.vision.v1.DeleteProductSetRequest + */ +class DeleteProductSetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the ProductSet to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the ProductSet to delete. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\DeleteProductSetRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the ProductSet to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the ProductSet to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the ProductSet to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteReferenceImageRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteReferenceImageRequest.php new file mode 100644 index 000000000000..f40ed15cd650 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteReferenceImageRequest.php @@ -0,0 +1,92 @@ +google.cloud.vision.v1.DeleteReferenceImageRequest + */ +class DeleteReferenceImageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the reference image to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the reference image to delete. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` + * Please see {@see ProductSearchClient::referenceImageName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\DeleteReferenceImageRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the reference image to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the reference image to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the reference image to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DominantColorsAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DominantColorsAnnotation.php new file mode 100644 index 000000000000..ed9d31ab00c2 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DominantColorsAnnotation.php @@ -0,0 +1,67 @@ +google.cloud.vision.v1.DominantColorsAnnotation + */ +class DominantColorsAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * RGB color values with their score and pixel fraction. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + private $colors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\ColorInfo>|\Google\Protobuf\Internal\RepeatedField $colors + * RGB color values with their score and pixel fraction. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * RGB color values with their score and pixel fraction. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ColorInfo colors = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getColors() + { + return $this->colors; + } + + /** + * RGB color values with their score and pixel fraction. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ColorInfo colors = 1; + * @param array<\Google\Cloud\Vision\V1\ColorInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setColors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ColorInfo::class); + $this->colors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/EntityAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/EntityAnnotation.php new file mode 100644 index 000000000000..4ea1b12e776c --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/EntityAnnotation.php @@ -0,0 +1,422 @@ +google.cloud.vision.v1.EntityAnnotation + */ +class EntityAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * Opaque entity ID. Some IDs may be available in + * [Google Knowledge Graph Search + * API](https://developers.google.com/knowledge-graph/). + * + * Generated from protobuf field string mid = 1; + */ + protected $mid = ''; + /** + * The language code for the locale in which the entity textual + * `description` is expressed. + * + * Generated from protobuf field string locale = 2; + */ + protected $locale = ''; + /** + * Entity textual description, expressed in its `locale` language. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Overall score of the result. Range [0, 1]. + * + * Generated from protobuf field float score = 4; + */ + protected $score = 0.0; + /** + * **Deprecated. Use `score` instead.** + * The accuracy of the entity detection in an image. + * For example, for an image in which the "Eiffel Tower" entity is detected, + * this field represents the confidence that there is a tower in the query + * image. Range [0, 1]. + * + * Generated from protobuf field float confidence = 5 [deprecated = true]; + * @deprecated + */ + protected $confidence = 0.0; + /** + * The relevancy of the ICA (Image Content Annotation) label to the + * image. For example, the relevancy of "tower" is likely higher to an image + * containing the detected "Eiffel Tower" than to an image containing a + * detected distant towering building, even though the confidence that + * there is a tower in each image may be the same. Range [0, 1]. + * + * Generated from protobuf field float topicality = 6; + */ + protected $topicality = 0.0; + /** + * Image region to which this entity belongs. Not produced + * for `LABEL_DETECTION` features. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; + */ + protected $bounding_poly = null; + /** + * The location information for the detected entity. Multiple + * `LocationInfo` elements can be present because one location may + * indicate the location of the scene in the image, and another location + * may indicate the location of the place where the image was taken. + * Location information is usually present for landmarks. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + private $locations; + /** + * Some entities may have optional user-supplied `Property` (name/value) + * fields, such a score or string that qualifies the entity. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Property properties = 9; + */ + private $properties; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $mid + * Opaque entity ID. Some IDs may be available in + * [Google Knowledge Graph Search + * API](https://developers.google.com/knowledge-graph/). + * @type string $locale + * The language code for the locale in which the entity textual + * `description` is expressed. + * @type string $description + * Entity textual description, expressed in its `locale` language. + * @type float $score + * Overall score of the result. Range [0, 1]. + * @type float $confidence + * **Deprecated. Use `score` instead.** + * The accuracy of the entity detection in an image. + * For example, for an image in which the "Eiffel Tower" entity is detected, + * this field represents the confidence that there is a tower in the query + * image. Range [0, 1]. + * @type float $topicality + * The relevancy of the ICA (Image Content Annotation) label to the + * image. For example, the relevancy of "tower" is likely higher to an image + * containing the detected "Eiffel Tower" than to an image containing a + * detected distant towering building, even though the confidence that + * there is a tower in each image may be the same. Range [0, 1]. + * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly + * Image region to which this entity belongs. Not produced + * for `LABEL_DETECTION` features. + * @type array<\Google\Cloud\Vision\V1\LocationInfo>|\Google\Protobuf\Internal\RepeatedField $locations + * The location information for the detected entity. Multiple + * `LocationInfo` elements can be present because one location may + * indicate the location of the scene in the image, and another location + * may indicate the location of the place where the image was taken. + * Location information is usually present for landmarks. + * @type array<\Google\Cloud\Vision\V1\Property>|\Google\Protobuf\Internal\RepeatedField $properties + * Some entities may have optional user-supplied `Property` (name/value) + * fields, such a score or string that qualifies the entity. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Opaque entity ID. Some IDs may be available in + * [Google Knowledge Graph Search + * API](https://developers.google.com/knowledge-graph/). + * + * Generated from protobuf field string mid = 1; + * @return string + */ + public function getMid() + { + return $this->mid; + } + + /** + * Opaque entity ID. Some IDs may be available in + * [Google Knowledge Graph Search + * API](https://developers.google.com/knowledge-graph/). + * + * Generated from protobuf field string mid = 1; + * @param string $var + * @return $this + */ + public function setMid($var) + { + GPBUtil::checkString($var, True); + $this->mid = $var; + + return $this; + } + + /** + * The language code for the locale in which the entity textual + * `description` is expressed. + * + * Generated from protobuf field string locale = 2; + * @return string + */ + public function getLocale() + { + return $this->locale; + } + + /** + * The language code for the locale in which the entity textual + * `description` is expressed. + * + * Generated from protobuf field string locale = 2; + * @param string $var + * @return $this + */ + public function setLocale($var) + { + GPBUtil::checkString($var, True); + $this->locale = $var; + + return $this; + } + + /** + * Entity textual description, expressed in its `locale` language. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Entity textual description, expressed in its `locale` language. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Overall score of the result. Range [0, 1]. + * + * Generated from protobuf field float score = 4; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * Overall score of the result. Range [0, 1]. + * + * Generated from protobuf field float score = 4; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * **Deprecated. Use `score` instead.** + * The accuracy of the entity detection in an image. + * For example, for an image in which the "Eiffel Tower" entity is detected, + * this field represents the confidence that there is a tower in the query + * image. Range [0, 1]. + * + * Generated from protobuf field float confidence = 5 [deprecated = true]; + * @return float + * @deprecated + */ + public function getConfidence() + { + @trigger_error('confidence is deprecated.', E_USER_DEPRECATED); + return $this->confidence; + } + + /** + * **Deprecated. Use `score` instead.** + * The accuracy of the entity detection in an image. + * For example, for an image in which the "Eiffel Tower" entity is detected, + * this field represents the confidence that there is a tower in the query + * image. Range [0, 1]. + * + * Generated from protobuf field float confidence = 5 [deprecated = true]; + * @param float $var + * @return $this + * @deprecated + */ + public function setConfidence($var) + { + @trigger_error('confidence is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + + /** + * The relevancy of the ICA (Image Content Annotation) label to the + * image. For example, the relevancy of "tower" is likely higher to an image + * containing the detected "Eiffel Tower" than to an image containing a + * detected distant towering building, even though the confidence that + * there is a tower in each image may be the same. Range [0, 1]. + * + * Generated from protobuf field float topicality = 6; + * @return float + */ + public function getTopicality() + { + return $this->topicality; + } + + /** + * The relevancy of the ICA (Image Content Annotation) label to the + * image. For example, the relevancy of "tower" is likely higher to an image + * containing the detected "Eiffel Tower" than to an image containing a + * detected distant towering building, even though the confidence that + * there is a tower in each image may be the same. Range [0, 1]. + * + * Generated from protobuf field float topicality = 6; + * @param float $var + * @return $this + */ + public function setTopicality($var) + { + GPBUtil::checkFloat($var); + $this->topicality = $var; + + return $this; + } + + /** + * Image region to which this entity belongs. Not produced + * for `LABEL_DETECTION` features. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; + * @return \Google\Cloud\Vision\V1\BoundingPoly|null + */ + public function getBoundingPoly() + { + return $this->bounding_poly; + } + + public function hasBoundingPoly() + { + return isset($this->bounding_poly); + } + + public function clearBoundingPoly() + { + unset($this->bounding_poly); + } + + /** + * Image region to which this entity belongs. Not produced + * for `LABEL_DETECTION` features. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; + * @param \Google\Cloud\Vision\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingPoly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->bounding_poly = $var; + + return $this; + } + + /** + * The location information for the detected entity. Multiple + * `LocationInfo` elements can be present because one location may + * indicate the location of the scene in the image, and another location + * may indicate the location of the place where the image was taken. + * Location information is usually present for landmarks. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.LocationInfo locations = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLocations() + { + return $this->locations; + } + + /** + * The location information for the detected entity. Multiple + * `LocationInfo` elements can be present because one location may + * indicate the location of the scene in the image, and another location + * may indicate the location of the place where the image was taken. + * Location information is usually present for landmarks. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.LocationInfo locations = 8; + * @param array<\Google\Cloud\Vision\V1\LocationInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\LocationInfo::class); + $this->locations = $arr; + + return $this; + } + + /** + * Some entities may have optional user-supplied `Property` (name/value) + * fields, such a score or string that qualifies the entity. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Property properties = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProperties() + { + return $this->properties; + } + + /** + * Some entities may have optional user-supplied `Property` (name/value) + * fields, such a score or string that qualifies the entity. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Property properties = 9; + * @param array<\Google\Cloud\Vision\V1\Property>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProperties($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Property::class); + $this->properties = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation.php new file mode 100644 index 000000000000..b9af007fead8 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation.php @@ -0,0 +1,627 @@ +google.cloud.vision.v1.FaceAnnotation + */ +class FaceAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * The bounding polygon around the face. The coordinates of the bounding box + * are in the original image's scale. + * The bounding box is computed to "frame" the face in accordance with human + * expectations. It is based on the landmarker results. + * Note that one or more x and/or y coordinates may not be generated in the + * `BoundingPoly` (the polygon will be unbounded) if only a partial face + * appears in the image to be annotated. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + protected $bounding_poly = null; + /** + * The `fd_bounding_poly` bounding polygon is tighter than the + * `boundingPoly`, and encloses only the skin part of the face. Typically, it + * is used to eliminate the face from any image analysis that detects the + * "amount of skin" visible in an image. It is not based on the + * landmarker results, only on the initial face detection, hence + * the fd (face detection) prefix. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; + */ + protected $fd_bounding_poly = null; + /** + * Detected face landmarks. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + private $landmarks; + /** + * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation + * of the face relative to the image vertical about the axis perpendicular to + * the face. Range [-180,180]. + * + * Generated from protobuf field float roll_angle = 4; + */ + protected $roll_angle = 0.0; + /** + * Yaw angle, which indicates the leftward/rightward angle that the face is + * pointing relative to the vertical plane perpendicular to the image. Range + * [-180,180]. + * + * Generated from protobuf field float pan_angle = 5; + */ + protected $pan_angle = 0.0; + /** + * Pitch angle, which indicates the upwards/downwards angle that the face is + * pointing relative to the image's horizontal plane. Range [-180,180]. + * + * Generated from protobuf field float tilt_angle = 6; + */ + protected $tilt_angle = 0.0; + /** + * Detection confidence. Range [0, 1]. + * + * Generated from protobuf field float detection_confidence = 7; + */ + protected $detection_confidence = 0.0; + /** + * Face landmarking confidence. Range [0, 1]. + * + * Generated from protobuf field float landmarking_confidence = 8; + */ + protected $landmarking_confidence = 0.0; + /** + * Joy likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood joy_likelihood = 9; + */ + protected $joy_likelihood = 0; + /** + * Sorrow likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; + */ + protected $sorrow_likelihood = 0; + /** + * Anger likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood anger_likelihood = 11; + */ + protected $anger_likelihood = 0; + /** + * Surprise likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; + */ + protected $surprise_likelihood = 0; + /** + * Under-exposed likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; + */ + protected $under_exposed_likelihood = 0; + /** + * Blurred likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; + */ + protected $blurred_likelihood = 0; + /** + * Headwear likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; + */ + protected $headwear_likelihood = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly + * The bounding polygon around the face. The coordinates of the bounding box + * are in the original image's scale. + * The bounding box is computed to "frame" the face in accordance with human + * expectations. It is based on the landmarker results. + * Note that one or more x and/or y coordinates may not be generated in the + * `BoundingPoly` (the polygon will be unbounded) if only a partial face + * appears in the image to be annotated. + * @type \Google\Cloud\Vision\V1\BoundingPoly $fd_bounding_poly + * The `fd_bounding_poly` bounding polygon is tighter than the + * `boundingPoly`, and encloses only the skin part of the face. Typically, it + * is used to eliminate the face from any image analysis that detects the + * "amount of skin" visible in an image. It is not based on the + * landmarker results, only on the initial face detection, hence + * the fd (face detection) prefix. + * @type array<\Google\Cloud\Vision\V1\FaceAnnotation\Landmark>|\Google\Protobuf\Internal\RepeatedField $landmarks + * Detected face landmarks. + * @type float $roll_angle + * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation + * of the face relative to the image vertical about the axis perpendicular to + * the face. Range [-180,180]. + * @type float $pan_angle + * Yaw angle, which indicates the leftward/rightward angle that the face is + * pointing relative to the vertical plane perpendicular to the image. Range + * [-180,180]. + * @type float $tilt_angle + * Pitch angle, which indicates the upwards/downwards angle that the face is + * pointing relative to the image's horizontal plane. Range [-180,180]. + * @type float $detection_confidence + * Detection confidence. Range [0, 1]. + * @type float $landmarking_confidence + * Face landmarking confidence. Range [0, 1]. + * @type int $joy_likelihood + * Joy likelihood. + * @type int $sorrow_likelihood + * Sorrow likelihood. + * @type int $anger_likelihood + * Anger likelihood. + * @type int $surprise_likelihood + * Surprise likelihood. + * @type int $under_exposed_likelihood + * Under-exposed likelihood. + * @type int $blurred_likelihood + * Blurred likelihood. + * @type int $headwear_likelihood + * Headwear likelihood. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * The bounding polygon around the face. The coordinates of the bounding box + * are in the original image's scale. + * The bounding box is computed to "frame" the face in accordance with human + * expectations. It is based on the landmarker results. + * Note that one or more x and/or y coordinates may not be generated in the + * `BoundingPoly` (the polygon will be unbounded) if only a partial face + * appears in the image to be annotated. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return \Google\Cloud\Vision\V1\BoundingPoly|null + */ + public function getBoundingPoly() + { + return $this->bounding_poly; + } + + public function hasBoundingPoly() + { + return isset($this->bounding_poly); + } + + public function clearBoundingPoly() + { + unset($this->bounding_poly); + } + + /** + * The bounding polygon around the face. The coordinates of the bounding box + * are in the original image's scale. + * The bounding box is computed to "frame" the face in accordance with human + * expectations. It is based on the landmarker results. + * Note that one or more x and/or y coordinates may not be generated in the + * `BoundingPoly` (the polygon will be unbounded) if only a partial face + * appears in the image to be annotated. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @param \Google\Cloud\Vision\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingPoly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->bounding_poly = $var; + + return $this; + } + + /** + * The `fd_bounding_poly` bounding polygon is tighter than the + * `boundingPoly`, and encloses only the skin part of the face. Typically, it + * is used to eliminate the face from any image analysis that detects the + * "amount of skin" visible in an image. It is not based on the + * landmarker results, only on the initial face detection, hence + * the fd (face detection) prefix. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; + * @return \Google\Cloud\Vision\V1\BoundingPoly|null + */ + public function getFdBoundingPoly() + { + return $this->fd_bounding_poly; + } + + public function hasFdBoundingPoly() + { + return isset($this->fd_bounding_poly); + } + + public function clearFdBoundingPoly() + { + unset($this->fd_bounding_poly); + } + + /** + * The `fd_bounding_poly` bounding polygon is tighter than the + * `boundingPoly`, and encloses only the skin part of the face. Typically, it + * is used to eliminate the face from any image analysis that detects the + * "amount of skin" visible in an image. It is not based on the + * landmarker results, only on the initial face detection, hence + * the fd (face detection) prefix. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; + * @param \Google\Cloud\Vision\V1\BoundingPoly $var + * @return $this + */ + public function setFdBoundingPoly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->fd_bounding_poly = $var; + + return $this; + } + + /** + * Detected face landmarks. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLandmarks() + { + return $this->landmarks; + } + + /** + * Detected face landmarks. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + * @param array<\Google\Cloud\Vision\V1\FaceAnnotation\Landmark>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLandmarks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\FaceAnnotation\Landmark::class); + $this->landmarks = $arr; + + return $this; + } + + /** + * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation + * of the face relative to the image vertical about the axis perpendicular to + * the face. Range [-180,180]. + * + * Generated from protobuf field float roll_angle = 4; + * @return float + */ + public function getRollAngle() + { + return $this->roll_angle; + } + + /** + * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation + * of the face relative to the image vertical about the axis perpendicular to + * the face. Range [-180,180]. + * + * Generated from protobuf field float roll_angle = 4; + * @param float $var + * @return $this + */ + public function setRollAngle($var) + { + GPBUtil::checkFloat($var); + $this->roll_angle = $var; + + return $this; + } + + /** + * Yaw angle, which indicates the leftward/rightward angle that the face is + * pointing relative to the vertical plane perpendicular to the image. Range + * [-180,180]. + * + * Generated from protobuf field float pan_angle = 5; + * @return float + */ + public function getPanAngle() + { + return $this->pan_angle; + } + + /** + * Yaw angle, which indicates the leftward/rightward angle that the face is + * pointing relative to the vertical plane perpendicular to the image. Range + * [-180,180]. + * + * Generated from protobuf field float pan_angle = 5; + * @param float $var + * @return $this + */ + public function setPanAngle($var) + { + GPBUtil::checkFloat($var); + $this->pan_angle = $var; + + return $this; + } + + /** + * Pitch angle, which indicates the upwards/downwards angle that the face is + * pointing relative to the image's horizontal plane. Range [-180,180]. + * + * Generated from protobuf field float tilt_angle = 6; + * @return float + */ + public function getTiltAngle() + { + return $this->tilt_angle; + } + + /** + * Pitch angle, which indicates the upwards/downwards angle that the face is + * pointing relative to the image's horizontal plane. Range [-180,180]. + * + * Generated from protobuf field float tilt_angle = 6; + * @param float $var + * @return $this + */ + public function setTiltAngle($var) + { + GPBUtil::checkFloat($var); + $this->tilt_angle = $var; + + return $this; + } + + /** + * Detection confidence. Range [0, 1]. + * + * Generated from protobuf field float detection_confidence = 7; + * @return float + */ + public function getDetectionConfidence() + { + return $this->detection_confidence; + } + + /** + * Detection confidence. Range [0, 1]. + * + * Generated from protobuf field float detection_confidence = 7; + * @param float $var + * @return $this + */ + public function setDetectionConfidence($var) + { + GPBUtil::checkFloat($var); + $this->detection_confidence = $var; + + return $this; + } + + /** + * Face landmarking confidence. Range [0, 1]. + * + * Generated from protobuf field float landmarking_confidence = 8; + * @return float + */ + public function getLandmarkingConfidence() + { + return $this->landmarking_confidence; + } + + /** + * Face landmarking confidence. Range [0, 1]. + * + * Generated from protobuf field float landmarking_confidence = 8; + * @param float $var + * @return $this + */ + public function setLandmarkingConfidence($var) + { + GPBUtil::checkFloat($var); + $this->landmarking_confidence = $var; + + return $this; + } + + /** + * Joy likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood joy_likelihood = 9; + * @return int + */ + public function getJoyLikelihood() + { + return $this->joy_likelihood; + } + + /** + * Joy likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood joy_likelihood = 9; + * @param int $var + * @return $this + */ + public function setJoyLikelihood($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->joy_likelihood = $var; + + return $this; + } + + /** + * Sorrow likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; + * @return int + */ + public function getSorrowLikelihood() + { + return $this->sorrow_likelihood; + } + + /** + * Sorrow likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; + * @param int $var + * @return $this + */ + public function setSorrowLikelihood($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->sorrow_likelihood = $var; + + return $this; + } + + /** + * Anger likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood anger_likelihood = 11; + * @return int + */ + public function getAngerLikelihood() + { + return $this->anger_likelihood; + } + + /** + * Anger likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood anger_likelihood = 11; + * @param int $var + * @return $this + */ + public function setAngerLikelihood($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->anger_likelihood = $var; + + return $this; + } + + /** + * Surprise likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; + * @return int + */ + public function getSurpriseLikelihood() + { + return $this->surprise_likelihood; + } + + /** + * Surprise likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; + * @param int $var + * @return $this + */ + public function setSurpriseLikelihood($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->surprise_likelihood = $var; + + return $this; + } + + /** + * Under-exposed likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; + * @return int + */ + public function getUnderExposedLikelihood() + { + return $this->under_exposed_likelihood; + } + + /** + * Under-exposed likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; + * @param int $var + * @return $this + */ + public function setUnderExposedLikelihood($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->under_exposed_likelihood = $var; + + return $this; + } + + /** + * Blurred likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; + * @return int + */ + public function getBlurredLikelihood() + { + return $this->blurred_likelihood; + } + + /** + * Blurred likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; + * @param int $var + * @return $this + */ + public function setBlurredLikelihood($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->blurred_likelihood = $var; + + return $this; + } + + /** + * Headwear likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; + * @return int + */ + public function getHeadwearLikelihood() + { + return $this->headwear_likelihood; + } + + /** + * Headwear likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; + * @param int $var + * @return $this + */ + public function setHeadwearLikelihood($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->headwear_likelihood = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark.php new file mode 100644 index 000000000000..060f8f4295d4 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark.php @@ -0,0 +1,114 @@ +google.cloud.vision.v1.FaceAnnotation.Landmark + */ +class Landmark extends \Google\Protobuf\Internal\Message +{ + /** + * Face landmark type. + * + * Generated from protobuf field .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; + */ + protected $type = 0; + /** + * Face landmark position. + * + * Generated from protobuf field .google.cloud.vision.v1.Position position = 4; + */ + protected $position = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Face landmark type. + * @type \Google\Cloud\Vision\V1\Position $position + * Face landmark position. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Face landmark type. + * + * Generated from protobuf field .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Face landmark type. + * + * Generated from protobuf field .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\FaceAnnotation\Landmark\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Face landmark position. + * + * Generated from protobuf field .google.cloud.vision.v1.Position position = 4; + * @return \Google\Cloud\Vision\V1\Position|null + */ + public function getPosition() + { + return $this->position; + } + + public function hasPosition() + { + return isset($this->position); + } + + public function clearPosition() + { + unset($this->position); + } + + /** + * Face landmark position. + * + * Generated from protobuf field .google.cloud.vision.v1.Position position = 4; + * @param \Google\Cloud\Vision\V1\Position $var + * @return $this + */ + public function setPosition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Position::class); + $this->position = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Landmark::class, \Google\Cloud\Vision\V1\FaceAnnotation_Landmark::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark/Type.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark/Type.php new file mode 100644 index 000000000000..7aabc19d2a6d --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark/Type.php @@ -0,0 +1,305 @@ +google.cloud.vision.v1.FaceAnnotation.Landmark.Type + */ +class Type +{ + /** + * Unknown face landmark detected. Should not be filled. + * + * Generated from protobuf enum UNKNOWN_LANDMARK = 0; + */ + const UNKNOWN_LANDMARK = 0; + /** + * Left eye. + * + * Generated from protobuf enum LEFT_EYE = 1; + */ + const LEFT_EYE = 1; + /** + * Right eye. + * + * Generated from protobuf enum RIGHT_EYE = 2; + */ + const RIGHT_EYE = 2; + /** + * Left of left eyebrow. + * + * Generated from protobuf enum LEFT_OF_LEFT_EYEBROW = 3; + */ + const LEFT_OF_LEFT_EYEBROW = 3; + /** + * Right of left eyebrow. + * + * Generated from protobuf enum RIGHT_OF_LEFT_EYEBROW = 4; + */ + const RIGHT_OF_LEFT_EYEBROW = 4; + /** + * Left of right eyebrow. + * + * Generated from protobuf enum LEFT_OF_RIGHT_EYEBROW = 5; + */ + const LEFT_OF_RIGHT_EYEBROW = 5; + /** + * Right of right eyebrow. + * + * Generated from protobuf enum RIGHT_OF_RIGHT_EYEBROW = 6; + */ + const RIGHT_OF_RIGHT_EYEBROW = 6; + /** + * Midpoint between eyes. + * + * Generated from protobuf enum MIDPOINT_BETWEEN_EYES = 7; + */ + const MIDPOINT_BETWEEN_EYES = 7; + /** + * Nose tip. + * + * Generated from protobuf enum NOSE_TIP = 8; + */ + const NOSE_TIP = 8; + /** + * Upper lip. + * + * Generated from protobuf enum UPPER_LIP = 9; + */ + const UPPER_LIP = 9; + /** + * Lower lip. + * + * Generated from protobuf enum LOWER_LIP = 10; + */ + const LOWER_LIP = 10; + /** + * Mouth left. + * + * Generated from protobuf enum MOUTH_LEFT = 11; + */ + const MOUTH_LEFT = 11; + /** + * Mouth right. + * + * Generated from protobuf enum MOUTH_RIGHT = 12; + */ + const MOUTH_RIGHT = 12; + /** + * Mouth center. + * + * Generated from protobuf enum MOUTH_CENTER = 13; + */ + const MOUTH_CENTER = 13; + /** + * Nose, bottom right. + * + * Generated from protobuf enum NOSE_BOTTOM_RIGHT = 14; + */ + const NOSE_BOTTOM_RIGHT = 14; + /** + * Nose, bottom left. + * + * Generated from protobuf enum NOSE_BOTTOM_LEFT = 15; + */ + const NOSE_BOTTOM_LEFT = 15; + /** + * Nose, bottom center. + * + * Generated from protobuf enum NOSE_BOTTOM_CENTER = 16; + */ + const NOSE_BOTTOM_CENTER = 16; + /** + * Left eye, top boundary. + * + * Generated from protobuf enum LEFT_EYE_TOP_BOUNDARY = 17; + */ + const LEFT_EYE_TOP_BOUNDARY = 17; + /** + * Left eye, right corner. + * + * Generated from protobuf enum LEFT_EYE_RIGHT_CORNER = 18; + */ + const LEFT_EYE_RIGHT_CORNER = 18; + /** + * Left eye, bottom boundary. + * + * Generated from protobuf enum LEFT_EYE_BOTTOM_BOUNDARY = 19; + */ + const LEFT_EYE_BOTTOM_BOUNDARY = 19; + /** + * Left eye, left corner. + * + * Generated from protobuf enum LEFT_EYE_LEFT_CORNER = 20; + */ + const LEFT_EYE_LEFT_CORNER = 20; + /** + * Right eye, top boundary. + * + * Generated from protobuf enum RIGHT_EYE_TOP_BOUNDARY = 21; + */ + const RIGHT_EYE_TOP_BOUNDARY = 21; + /** + * Right eye, right corner. + * + * Generated from protobuf enum RIGHT_EYE_RIGHT_CORNER = 22; + */ + const RIGHT_EYE_RIGHT_CORNER = 22; + /** + * Right eye, bottom boundary. + * + * Generated from protobuf enum RIGHT_EYE_BOTTOM_BOUNDARY = 23; + */ + const RIGHT_EYE_BOTTOM_BOUNDARY = 23; + /** + * Right eye, left corner. + * + * Generated from protobuf enum RIGHT_EYE_LEFT_CORNER = 24; + */ + const RIGHT_EYE_LEFT_CORNER = 24; + /** + * Left eyebrow, upper midpoint. + * + * Generated from protobuf enum LEFT_EYEBROW_UPPER_MIDPOINT = 25; + */ + const LEFT_EYEBROW_UPPER_MIDPOINT = 25; + /** + * Right eyebrow, upper midpoint. + * + * Generated from protobuf enum RIGHT_EYEBROW_UPPER_MIDPOINT = 26; + */ + const RIGHT_EYEBROW_UPPER_MIDPOINT = 26; + /** + * Left ear tragion. + * + * Generated from protobuf enum LEFT_EAR_TRAGION = 27; + */ + const LEFT_EAR_TRAGION = 27; + /** + * Right ear tragion. + * + * Generated from protobuf enum RIGHT_EAR_TRAGION = 28; + */ + const RIGHT_EAR_TRAGION = 28; + /** + * Left eye pupil. + * + * Generated from protobuf enum LEFT_EYE_PUPIL = 29; + */ + const LEFT_EYE_PUPIL = 29; + /** + * Right eye pupil. + * + * Generated from protobuf enum RIGHT_EYE_PUPIL = 30; + */ + const RIGHT_EYE_PUPIL = 30; + /** + * Forehead glabella. + * + * Generated from protobuf enum FOREHEAD_GLABELLA = 31; + */ + const FOREHEAD_GLABELLA = 31; + /** + * Chin gnathion. + * + * Generated from protobuf enum CHIN_GNATHION = 32; + */ + const CHIN_GNATHION = 32; + /** + * Chin left gonion. + * + * Generated from protobuf enum CHIN_LEFT_GONION = 33; + */ + const CHIN_LEFT_GONION = 33; + /** + * Chin right gonion. + * + * Generated from protobuf enum CHIN_RIGHT_GONION = 34; + */ + const CHIN_RIGHT_GONION = 34; + /** + * Left cheek center. + * + * Generated from protobuf enum LEFT_CHEEK_CENTER = 35; + */ + const LEFT_CHEEK_CENTER = 35; + /** + * Right cheek center. + * + * Generated from protobuf enum RIGHT_CHEEK_CENTER = 36; + */ + const RIGHT_CHEEK_CENTER = 36; + + private static $valueToName = [ + self::UNKNOWN_LANDMARK => 'UNKNOWN_LANDMARK', + self::LEFT_EYE => 'LEFT_EYE', + self::RIGHT_EYE => 'RIGHT_EYE', + self::LEFT_OF_LEFT_EYEBROW => 'LEFT_OF_LEFT_EYEBROW', + self::RIGHT_OF_LEFT_EYEBROW => 'RIGHT_OF_LEFT_EYEBROW', + self::LEFT_OF_RIGHT_EYEBROW => 'LEFT_OF_RIGHT_EYEBROW', + self::RIGHT_OF_RIGHT_EYEBROW => 'RIGHT_OF_RIGHT_EYEBROW', + self::MIDPOINT_BETWEEN_EYES => 'MIDPOINT_BETWEEN_EYES', + self::NOSE_TIP => 'NOSE_TIP', + self::UPPER_LIP => 'UPPER_LIP', + self::LOWER_LIP => 'LOWER_LIP', + self::MOUTH_LEFT => 'MOUTH_LEFT', + self::MOUTH_RIGHT => 'MOUTH_RIGHT', + self::MOUTH_CENTER => 'MOUTH_CENTER', + self::NOSE_BOTTOM_RIGHT => 'NOSE_BOTTOM_RIGHT', + self::NOSE_BOTTOM_LEFT => 'NOSE_BOTTOM_LEFT', + self::NOSE_BOTTOM_CENTER => 'NOSE_BOTTOM_CENTER', + self::LEFT_EYE_TOP_BOUNDARY => 'LEFT_EYE_TOP_BOUNDARY', + self::LEFT_EYE_RIGHT_CORNER => 'LEFT_EYE_RIGHT_CORNER', + self::LEFT_EYE_BOTTOM_BOUNDARY => 'LEFT_EYE_BOTTOM_BOUNDARY', + self::LEFT_EYE_LEFT_CORNER => 'LEFT_EYE_LEFT_CORNER', + self::RIGHT_EYE_TOP_BOUNDARY => 'RIGHT_EYE_TOP_BOUNDARY', + self::RIGHT_EYE_RIGHT_CORNER => 'RIGHT_EYE_RIGHT_CORNER', + self::RIGHT_EYE_BOTTOM_BOUNDARY => 'RIGHT_EYE_BOTTOM_BOUNDARY', + self::RIGHT_EYE_LEFT_CORNER => 'RIGHT_EYE_LEFT_CORNER', + self::LEFT_EYEBROW_UPPER_MIDPOINT => 'LEFT_EYEBROW_UPPER_MIDPOINT', + self::RIGHT_EYEBROW_UPPER_MIDPOINT => 'RIGHT_EYEBROW_UPPER_MIDPOINT', + self::LEFT_EAR_TRAGION => 'LEFT_EAR_TRAGION', + self::RIGHT_EAR_TRAGION => 'RIGHT_EAR_TRAGION', + self::LEFT_EYE_PUPIL => 'LEFT_EYE_PUPIL', + self::RIGHT_EYE_PUPIL => 'RIGHT_EYE_PUPIL', + self::FOREHEAD_GLABELLA => 'FOREHEAD_GLABELLA', + self::CHIN_GNATHION => 'CHIN_GNATHION', + self::CHIN_LEFT_GONION => 'CHIN_LEFT_GONION', + self::CHIN_RIGHT_GONION => 'CHIN_RIGHT_GONION', + self::LEFT_CHEEK_CENTER => 'LEFT_CHEEK_CENTER', + self::RIGHT_CHEEK_CENTER => 'RIGHT_CHEEK_CENTER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\Vision\V1\FaceAnnotation_Landmark_Type::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature.php new file mode 100644 index 000000000000..ac1b22a40aa9 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature.php @@ -0,0 +1,153 @@ +google.cloud.vision.v1.Feature + */ +class Feature extends \Google\Protobuf\Internal\Message +{ + /** + * The feature type. + * + * Generated from protobuf field .google.cloud.vision.v1.Feature.Type type = 1; + */ + protected $type = 0; + /** + * Maximum number of results of this type. Does not apply to + * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. + * + * Generated from protobuf field int32 max_results = 2; + */ + protected $max_results = 0; + /** + * Model to use for the feature. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + * support "builtin/weekly" for the bleeding edge release updated weekly. + * + * Generated from protobuf field string model = 3; + */ + protected $model = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The feature type. + * @type int $max_results + * Maximum number of results of this type. Does not apply to + * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. + * @type string $model + * Model to use for the feature. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + * support "builtin/weekly" for the bleeding edge release updated weekly. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * The feature type. + * + * Generated from protobuf field .google.cloud.vision.v1.Feature.Type type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The feature type. + * + * Generated from protobuf field .google.cloud.vision.v1.Feature.Type type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Feature\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Maximum number of results of this type. Does not apply to + * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. + * + * Generated from protobuf field int32 max_results = 2; + * @return int + */ + public function getMaxResults() + { + return $this->max_results; + } + + /** + * Maximum number of results of this type. Does not apply to + * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. + * + * Generated from protobuf field int32 max_results = 2; + * @param int $var + * @return $this + */ + public function setMaxResults($var) + { + GPBUtil::checkInt32($var); + $this->max_results = $var; + + return $this; + } + + /** + * Model to use for the feature. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + * support "builtin/weekly" for the bleeding edge release updated weekly. + * + * Generated from protobuf field string model = 3; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Model to use for the feature. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + * support "builtin/weekly" for the bleeding edge release updated weekly. + * + * Generated from protobuf field string model = 3; + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature/Type.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature/Type.php new file mode 100644 index 000000000000..d905c7320a41 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature/Type.php @@ -0,0 +1,139 @@ +google.cloud.vision.v1.Feature.Type + */ +class Type +{ + /** + * Unspecified feature type. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Run face detection. + * + * Generated from protobuf enum FACE_DETECTION = 1; + */ + const FACE_DETECTION = 1; + /** + * Run landmark detection. + * + * Generated from protobuf enum LANDMARK_DETECTION = 2; + */ + const LANDMARK_DETECTION = 2; + /** + * Run logo detection. + * + * Generated from protobuf enum LOGO_DETECTION = 3; + */ + const LOGO_DETECTION = 3; + /** + * Run label detection. + * + * Generated from protobuf enum LABEL_DETECTION = 4; + */ + const LABEL_DETECTION = 4; + /** + * Run text detection / optical character recognition (OCR). Text detection + * is optimized for areas of text within a larger image; if the image is + * a document, use `DOCUMENT_TEXT_DETECTION` instead. + * + * Generated from protobuf enum TEXT_DETECTION = 5; + */ + const TEXT_DETECTION = 5; + /** + * Run dense text document OCR. Takes precedence when both + * `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present. + * + * Generated from protobuf enum DOCUMENT_TEXT_DETECTION = 11; + */ + const DOCUMENT_TEXT_DETECTION = 11; + /** + * Run Safe Search to detect potentially unsafe + * or undesirable content. + * + * Generated from protobuf enum SAFE_SEARCH_DETECTION = 6; + */ + const SAFE_SEARCH_DETECTION = 6; + /** + * Compute a set of image properties, such as the + * image's dominant colors. + * + * Generated from protobuf enum IMAGE_PROPERTIES = 7; + */ + const IMAGE_PROPERTIES = 7; + /** + * Run crop hints. + * + * Generated from protobuf enum CROP_HINTS = 9; + */ + const CROP_HINTS = 9; + /** + * Run web detection. + * + * Generated from protobuf enum WEB_DETECTION = 10; + */ + const WEB_DETECTION = 10; + /** + * Run Product Search. + * + * Generated from protobuf enum PRODUCT_SEARCH = 12; + */ + const PRODUCT_SEARCH = 12; + /** + * Run localizer for object detection. + * + * Generated from protobuf enum OBJECT_LOCALIZATION = 19; + */ + const OBJECT_LOCALIZATION = 19; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::FACE_DETECTION => 'FACE_DETECTION', + self::LANDMARK_DETECTION => 'LANDMARK_DETECTION', + self::LOGO_DETECTION => 'LOGO_DETECTION', + self::LABEL_DETECTION => 'LABEL_DETECTION', + self::TEXT_DETECTION => 'TEXT_DETECTION', + self::DOCUMENT_TEXT_DETECTION => 'DOCUMENT_TEXT_DETECTION', + self::SAFE_SEARCH_DETECTION => 'SAFE_SEARCH_DETECTION', + self::IMAGE_PROPERTIES => 'IMAGE_PROPERTIES', + self::CROP_HINTS => 'CROP_HINTS', + self::WEB_DETECTION => 'WEB_DETECTION', + self::PRODUCT_SEARCH => 'PRODUCT_SEARCH', + self::OBJECT_LOCALIZATION => 'OBJECT_LOCALIZATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\Vision\V1\Feature_Type::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsDestination.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsDestination.php new file mode 100644 index 000000000000..5e5f3f520ee1 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsDestination.php @@ -0,0 +1,135 @@ +google.cloud.vision.v1.GcsDestination + */ +class GcsDestination extends \Google\Protobuf\Internal\Message +{ + /** + * Google Cloud Storage URI prefix where the results will be stored. Results + * will be in JSON format and preceded by its corresponding input URI prefix. + * This field can either represent a gcs file prefix or gcs directory. In + * either case, the uri should be unique because in order to get all of the + * output files, you will need to do a wildcard gcs search on the uri prefix + * you provide. + * Examples: + * * File Prefix: gs://bucket-name/here/filenameprefix The output files + * will be created in gs://bucket-name/here/ and the names of the + * output files will begin with "filenameprefix". + * * Directory Prefix: gs://bucket-name/some/location/ The output files + * will be created in gs://bucket-name/some/location/ and the names of the + * output files could be anything because there was no filename prefix + * specified. + * If multiple outputs, each response is still AnnotateFileResponse, each of + * which contains some subset of the full list of AnnotateImageResponse. + * Multiple outputs can happen if, for example, the output JSON is too large + * and overflows into multiple sharded files. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Google Cloud Storage URI prefix where the results will be stored. Results + * will be in JSON format and preceded by its corresponding input URI prefix. + * This field can either represent a gcs file prefix or gcs directory. In + * either case, the uri should be unique because in order to get all of the + * output files, you will need to do a wildcard gcs search on the uri prefix + * you provide. + * Examples: + * * File Prefix: gs://bucket-name/here/filenameprefix The output files + * will be created in gs://bucket-name/here/ and the names of the + * output files will begin with "filenameprefix". + * * Directory Prefix: gs://bucket-name/some/location/ The output files + * will be created in gs://bucket-name/some/location/ and the names of the + * output files could be anything because there was no filename prefix + * specified. + * If multiple outputs, each response is still AnnotateFileResponse, each of + * which contains some subset of the full list of AnnotateImageResponse. + * Multiple outputs can happen if, for example, the output JSON is too large + * and overflows into multiple sharded files. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Google Cloud Storage URI prefix where the results will be stored. Results + * will be in JSON format and preceded by its corresponding input URI prefix. + * This field can either represent a gcs file prefix or gcs directory. In + * either case, the uri should be unique because in order to get all of the + * output files, you will need to do a wildcard gcs search on the uri prefix + * you provide. + * Examples: + * * File Prefix: gs://bucket-name/here/filenameprefix The output files + * will be created in gs://bucket-name/here/ and the names of the + * output files will begin with "filenameprefix". + * * Directory Prefix: gs://bucket-name/some/location/ The output files + * will be created in gs://bucket-name/some/location/ and the names of the + * output files could be anything because there was no filename prefix + * specified. + * If multiple outputs, each response is still AnnotateFileResponse, each of + * which contains some subset of the full list of AnnotateImageResponse. + * Multiple outputs can happen if, for example, the output JSON is too large + * and overflows into multiple sharded files. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Google Cloud Storage URI prefix where the results will be stored. Results + * will be in JSON format and preceded by its corresponding input URI prefix. + * This field can either represent a gcs file prefix or gcs directory. In + * either case, the uri should be unique because in order to get all of the + * output files, you will need to do a wildcard gcs search on the uri prefix + * you provide. + * Examples: + * * File Prefix: gs://bucket-name/here/filenameprefix The output files + * will be created in gs://bucket-name/here/ and the names of the + * output files will begin with "filenameprefix". + * * Directory Prefix: gs://bucket-name/some/location/ The output files + * will be created in gs://bucket-name/some/location/ and the names of the + * output files could be anything because there was no filename prefix + * specified. + * If multiple outputs, each response is still AnnotateFileResponse, each of + * which contains some subset of the full list of AnnotateImageResponse. + * Multiple outputs can happen if, for example, the output JSON is too large + * and overflows into multiple sharded files. + * + * Generated from protobuf field string uri = 1; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsSource.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsSource.php new file mode 100644 index 000000000000..e7c46ae00ad3 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsSource.php @@ -0,0 +1,71 @@ +google.cloud.vision.v1.GcsSource + */ +class GcsSource extends \Google\Protobuf\Internal\Message +{ + /** + * Google Cloud Storage URI for the input file. This must only be a + * Google Cloud Storage object. Wildcards are not currently supported. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Google Cloud Storage URI for the input file. This must only be a + * Google Cloud Storage object. Wildcards are not currently supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Google Cloud Storage URI for the input file. This must only be a + * Google Cloud Storage object. Wildcards are not currently supported. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Google Cloud Storage URI for the input file. This must only be a + * Google Cloud Storage object. Wildcards are not currently supported. + * + * Generated from protobuf field string uri = 1; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductRequest.php new file mode 100644 index 000000000000..8716aa759f18 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductRequest.php @@ -0,0 +1,92 @@ +google.cloud.vision.v1.GetProductRequest + */ +class GetProductRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the Product to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the Product to get. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * Please see {@see ProductSearchClient::productName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\GetProductRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the Product to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the Product to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the Product to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductSetRequest.php new file mode 100644 index 000000000000..f133d964a1f9 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductSetRequest.php @@ -0,0 +1,92 @@ +google.cloud.vision.v1.GetProductSetRequest + */ +class GetProductSetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the ProductSet to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the ProductSet to get. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\GetProductSetRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the ProductSet to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the ProductSet to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the ProductSet to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetReferenceImageRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetReferenceImageRequest.php new file mode 100644 index 000000000000..87a13da256c2 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetReferenceImageRequest.php @@ -0,0 +1,92 @@ +google.cloud.vision.v1.GetReferenceImageRequest + */ +class GetReferenceImageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the ReferenceImage to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the ReferenceImage to get. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. Please see + * {@see ProductSearchClient::referenceImageName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\GetReferenceImageRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the ReferenceImage to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the ReferenceImage to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the ReferenceImage to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Image.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Image.php new file mode 100644 index 000000000000..a829768dbbe8 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Image.php @@ -0,0 +1,135 @@ +google.cloud.vision.v1.Image + */ +class Image extends \Google\Protobuf\Internal\Message +{ + /** + * Image content, represented as a stream of bytes. + * Note: As with all `bytes` fields, protobuffers use a pure binary + * representation, whereas JSON representations use base64. + * Currently, this field only works for BatchAnnotateImages requests. It does + * not work for AsyncBatchAnnotateImages requests. + * + * Generated from protobuf field bytes content = 1; + */ + protected $content = ''; + /** + * Google Cloud Storage image location, or publicly-accessible image + * URL. If both `content` and `source` are provided for an image, `content` + * takes precedence and is used to perform the image annotation request. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageSource source = 2; + */ + protected $source = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $content + * Image content, represented as a stream of bytes. + * Note: As with all `bytes` fields, protobuffers use a pure binary + * representation, whereas JSON representations use base64. + * Currently, this field only works for BatchAnnotateImages requests. It does + * not work for AsyncBatchAnnotateImages requests. + * @type \Google\Cloud\Vision\V1\ImageSource $source + * Google Cloud Storage image location, or publicly-accessible image + * URL. If both `content` and `source` are provided for an image, `content` + * takes precedence and is used to perform the image annotation request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Image content, represented as a stream of bytes. + * Note: As with all `bytes` fields, protobuffers use a pure binary + * representation, whereas JSON representations use base64. + * Currently, this field only works for BatchAnnotateImages requests. It does + * not work for AsyncBatchAnnotateImages requests. + * + * Generated from protobuf field bytes content = 1; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Image content, represented as a stream of bytes. + * Note: As with all `bytes` fields, protobuffers use a pure binary + * representation, whereas JSON representations use base64. + * Currently, this field only works for BatchAnnotateImages requests. It does + * not work for AsyncBatchAnnotateImages requests. + * + * Generated from protobuf field bytes content = 1; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, False); + $this->content = $var; + + return $this; + } + + /** + * Google Cloud Storage image location, or publicly-accessible image + * URL. If both `content` and `source` are provided for an image, `content` + * takes precedence and is used to perform the image annotation request. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageSource source = 2; + * @return \Google\Cloud\Vision\V1\ImageSource|null + */ + public function getSource() + { + return $this->source; + } + + public function hasSource() + { + return isset($this->source); + } + + public function clearSource() + { + unset($this->source); + } + + /** + * Google Cloud Storage image location, or publicly-accessible image + * URL. If both `content` and `source` are provided for an image, `content` + * takes precedence and is used to perform the image annotation request. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageSource source = 2; + * @param \Google\Cloud\Vision\V1\ImageSource $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageSource::class); + $this->source = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotationContext.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotationContext.php new file mode 100644 index 000000000000..04aba2e4a1dc --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotationContext.php @@ -0,0 +1,106 @@ +google.cloud.vision.v1.ImageAnnotationContext + */ +class ImageAnnotationContext extends \Google\Protobuf\Internal\Message +{ + /** + * The URI of the file used to produce the image. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + /** + * If the file was a PDF or TIFF, this field gives the page number within + * the file used to produce the image. + * + * Generated from protobuf field int32 page_number = 2; + */ + protected $page_number = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * The URI of the file used to produce the image. + * @type int $page_number + * If the file was a PDF or TIFF, this field gives the page number within + * the file used to produce the image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * The URI of the file used to produce the image. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * The URI of the file used to produce the image. + * + * Generated from protobuf field string uri = 1; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * If the file was a PDF or TIFF, this field gives the page number within + * the file used to produce the image. + * + * Generated from protobuf field int32 page_number = 2; + * @return int + */ + public function getPageNumber() + { + return $this->page_number; + } + + /** + * If the file was a PDF or TIFF, this field gives the page number within + * the file used to produce the image. + * + * Generated from protobuf field int32 page_number = 2; + * @param int $var + * @return $this + */ + public function setPageNumber($var) + { + GPBUtil::checkInt32($var); + $this->page_number = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotatorGrpcClient.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotatorGrpcClient.php new file mode 100644 index 000000000000..9ed2b8e8a5f7 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotatorGrpcClient.php @@ -0,0 +1,116 @@ +_simpleRequest('/google.cloud.vision.v1.ImageAnnotator/BatchAnnotateImages', + $argument, + ['\Google\Cloud\Vision\V1\BatchAnnotateImagesResponse', 'decode'], + $metadata, $options); + } + + /** + * Service that performs image detection and annotation for a batch of files. + * Now only "application/pdf", "image/tiff" and "image/gif" are supported. + * + * This service will extract at most 5 (customers can specify which 5 in + * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each + * file provided and perform detection and annotation for each image + * extracted. + * @param \Google\Cloud\Vision\V1\BatchAnnotateFilesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function BatchAnnotateFiles(\Google\Cloud\Vision\V1\BatchAnnotateFilesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vision.v1.ImageAnnotator/BatchAnnotateFiles', + $argument, + ['\Google\Cloud\Vision\V1\BatchAnnotateFilesResponse', 'decode'], + $metadata, $options); + } + + /** + * Run asynchronous image detection and annotation for a list of images. + * + * Progress and results can be retrieved through the + * `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). + * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). + * + * This service will write image annotation outputs to json files in customer + * GCS bucket, each json file containing BatchAnnotateImagesResponse proto. + * @param \Google\Cloud\Vision\V1\AsyncBatchAnnotateImagesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function AsyncBatchAnnotateImages(\Google\Cloud\Vision\V1\AsyncBatchAnnotateImagesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateImages', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Run asynchronous image detection and annotation for a list of generic + * files, such as PDF files, which may contain multiple pages and multiple + * images per page. Progress and results can be retrieved through the + * `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). + * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). + * @param \Google\Cloud\Vision\V1\AsyncBatchAnnotateFilesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function AsyncBatchAnnotateFiles(\Google\Cloud\Vision\V1\AsyncBatchAnnotateFilesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateFiles', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageContext.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageContext.php new file mode 100644 index 000000000000..25a6e9b648ce --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageContext.php @@ -0,0 +1,315 @@ +google.cloud.vision.v1.ImageContext + */ +class ImageContext extends \Google\Protobuf\Internal\Message +{ + /** + * Not used. + * + * Generated from protobuf field .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; + */ + protected $lat_long_rect = null; + /** + * List of languages to use for TEXT_DETECTION. In most cases, an empty value + * yields the best results since it enables automatic language detection. For + * languages based on the Latin alphabet, setting `language_hints` is not + * needed. In rare cases, when the language of the text in the image is known, + * setting a hint will help get better results (although it will be a + * significant hindrance if the hint is wrong). Text detection returns an + * error if one or more of the specified languages is not one of the + * [supported languages](https://cloud.google.com/vision/docs/languages). + * + * Generated from protobuf field repeated string language_hints = 2; + */ + private $language_hints; + /** + * Parameters for crop hints annotation request. + * + * Generated from protobuf field .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; + */ + protected $crop_hints_params = null; + /** + * Parameters for product search. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; + */ + protected $product_search_params = null; + /** + * Parameters for web detection. + * + * Generated from protobuf field .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; + */ + protected $web_detection_params = null; + /** + * Parameters for text detection and document text detection. + * + * Generated from protobuf field .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; + */ + protected $text_detection_params = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\LatLongRect $lat_long_rect + * Not used. + * @type array|\Google\Protobuf\Internal\RepeatedField $language_hints + * List of languages to use for TEXT_DETECTION. In most cases, an empty value + * yields the best results since it enables automatic language detection. For + * languages based on the Latin alphabet, setting `language_hints` is not + * needed. In rare cases, when the language of the text in the image is known, + * setting a hint will help get better results (although it will be a + * significant hindrance if the hint is wrong). Text detection returns an + * error if one or more of the specified languages is not one of the + * [supported languages](https://cloud.google.com/vision/docs/languages). + * @type \Google\Cloud\Vision\V1\CropHintsParams $crop_hints_params + * Parameters for crop hints annotation request. + * @type \Google\Cloud\Vision\V1\ProductSearchParams $product_search_params + * Parameters for product search. + * @type \Google\Cloud\Vision\V1\WebDetectionParams $web_detection_params + * Parameters for web detection. + * @type \Google\Cloud\Vision\V1\TextDetectionParams $text_detection_params + * Parameters for text detection and document text detection. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Not used. + * + * Generated from protobuf field .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; + * @return \Google\Cloud\Vision\V1\LatLongRect|null + */ + public function getLatLongRect() + { + return $this->lat_long_rect; + } + + public function hasLatLongRect() + { + return isset($this->lat_long_rect); + } + + public function clearLatLongRect() + { + unset($this->lat_long_rect); + } + + /** + * Not used. + * + * Generated from protobuf field .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; + * @param \Google\Cloud\Vision\V1\LatLongRect $var + * @return $this + */ + public function setLatLongRect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\LatLongRect::class); + $this->lat_long_rect = $var; + + return $this; + } + + /** + * List of languages to use for TEXT_DETECTION. In most cases, an empty value + * yields the best results since it enables automatic language detection. For + * languages based on the Latin alphabet, setting `language_hints` is not + * needed. In rare cases, when the language of the text in the image is known, + * setting a hint will help get better results (although it will be a + * significant hindrance if the hint is wrong). Text detection returns an + * error if one or more of the specified languages is not one of the + * [supported languages](https://cloud.google.com/vision/docs/languages). + * + * Generated from protobuf field repeated string language_hints = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLanguageHints() + { + return $this->language_hints; + } + + /** + * List of languages to use for TEXT_DETECTION. In most cases, an empty value + * yields the best results since it enables automatic language detection. For + * languages based on the Latin alphabet, setting `language_hints` is not + * needed. In rare cases, when the language of the text in the image is known, + * setting a hint will help get better results (although it will be a + * significant hindrance if the hint is wrong). Text detection returns an + * error if one or more of the specified languages is not one of the + * [supported languages](https://cloud.google.com/vision/docs/languages). + * + * Generated from protobuf field repeated string language_hints = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLanguageHints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->language_hints = $arr; + + return $this; + } + + /** + * Parameters for crop hints annotation request. + * + * Generated from protobuf field .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; + * @return \Google\Cloud\Vision\V1\CropHintsParams|null + */ + public function getCropHintsParams() + { + return $this->crop_hints_params; + } + + public function hasCropHintsParams() + { + return isset($this->crop_hints_params); + } + + public function clearCropHintsParams() + { + unset($this->crop_hints_params); + } + + /** + * Parameters for crop hints annotation request. + * + * Generated from protobuf field .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; + * @param \Google\Cloud\Vision\V1\CropHintsParams $var + * @return $this + */ + public function setCropHintsParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\CropHintsParams::class); + $this->crop_hints_params = $var; + + return $this; + } + + /** + * Parameters for product search. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; + * @return \Google\Cloud\Vision\V1\ProductSearchParams|null + */ + public function getProductSearchParams() + { + return $this->product_search_params; + } + + public function hasProductSearchParams() + { + return isset($this->product_search_params); + } + + public function clearProductSearchParams() + { + unset($this->product_search_params); + } + + /** + * Parameters for product search. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; + * @param \Google\Cloud\Vision\V1\ProductSearchParams $var + * @return $this + */ + public function setProductSearchParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSearchParams::class); + $this->product_search_params = $var; + + return $this; + } + + /** + * Parameters for web detection. + * + * Generated from protobuf field .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; + * @return \Google\Cloud\Vision\V1\WebDetectionParams|null + */ + public function getWebDetectionParams() + { + return $this->web_detection_params; + } + + public function hasWebDetectionParams() + { + return isset($this->web_detection_params); + } + + public function clearWebDetectionParams() + { + unset($this->web_detection_params); + } + + /** + * Parameters for web detection. + * + * Generated from protobuf field .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; + * @param \Google\Cloud\Vision\V1\WebDetectionParams $var + * @return $this + */ + public function setWebDetectionParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\WebDetectionParams::class); + $this->web_detection_params = $var; + + return $this; + } + + /** + * Parameters for text detection and document text detection. + * + * Generated from protobuf field .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; + * @return \Google\Cloud\Vision\V1\TextDetectionParams|null + */ + public function getTextDetectionParams() + { + return $this->text_detection_params; + } + + public function hasTextDetectionParams() + { + return isset($this->text_detection_params); + } + + public function clearTextDetectionParams() + { + unset($this->text_detection_params); + } + + /** + * Parameters for text detection and document text detection. + * + * Generated from protobuf field .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; + * @param \Google\Cloud\Vision\V1\TextDetectionParams $var + * @return $this + */ + public function setTextDetectionParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextDetectionParams::class); + $this->text_detection_params = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageProperties.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageProperties.php new file mode 100644 index 000000000000..05d082b53f75 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageProperties.php @@ -0,0 +1,77 @@ +google.cloud.vision.v1.ImageProperties + */ +class ImageProperties extends \Google\Protobuf\Internal\Message +{ + /** + * If present, dominant colors completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; + */ + protected $dominant_colors = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\DominantColorsAnnotation $dominant_colors + * If present, dominant colors completed successfully. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * If present, dominant colors completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; + * @return \Google\Cloud\Vision\V1\DominantColorsAnnotation|null + */ + public function getDominantColors() + { + return $this->dominant_colors; + } + + public function hasDominantColors() + { + return isset($this->dominant_colors); + } + + public function clearDominantColors() + { + unset($this->dominant_colors); + } + + /** + * If present, dominant colors completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; + * @param \Google\Cloud\Vision\V1\DominantColorsAnnotation $var + * @return $this + */ + public function setDominantColors($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\DominantColorsAnnotation::class); + $this->dominant_colors = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageSource.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageSource.php new file mode 100644 index 000000000000..977a6a7406c4 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageSource.php @@ -0,0 +1,169 @@ +google.cloud.vision.v1.ImageSource + */ +class ImageSource extends \Google\Protobuf\Internal\Message +{ + /** + * **Use `image_uri` instead.** + * The Google Cloud Storage URI of the form + * `gs://bucket_name/object_name`. Object versioning is not supported. See + * [Google Cloud Storage Request + * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. + * + * Generated from protobuf field string gcs_image_uri = 1; + */ + protected $gcs_image_uri = ''; + /** + * The URI of the source image. Can be either: + * 1. A Google Cloud Storage URI of the form + * `gs://bucket_name/object_name`. Object versioning is not supported. See + * [Google Cloud Storage Request + * URIs](https://cloud.google.com/storage/docs/reference-uris) for more + * info. + * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from + * HTTP/HTTPS URLs, Google cannot guarantee that the request will be + * completed. Your request may fail if the specified host denies the + * request (e.g. due to request throttling or DOS prevention), or if Google + * throttles requests to the site for abuse prevention. You should not + * depend on externally-hosted images for production applications. + * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes + * precedence. + * + * Generated from protobuf field string image_uri = 2; + */ + protected $image_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcs_image_uri + * **Use `image_uri` instead.** + * The Google Cloud Storage URI of the form + * `gs://bucket_name/object_name`. Object versioning is not supported. See + * [Google Cloud Storage Request + * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. + * @type string $image_uri + * The URI of the source image. Can be either: + * 1. A Google Cloud Storage URI of the form + * `gs://bucket_name/object_name`. Object versioning is not supported. See + * [Google Cloud Storage Request + * URIs](https://cloud.google.com/storage/docs/reference-uris) for more + * info. + * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from + * HTTP/HTTPS URLs, Google cannot guarantee that the request will be + * completed. Your request may fail if the specified host denies the + * request (e.g. due to request throttling or DOS prevention), or if Google + * throttles requests to the site for abuse prevention. You should not + * depend on externally-hosted images for production applications. + * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes + * precedence. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * **Use `image_uri` instead.** + * The Google Cloud Storage URI of the form + * `gs://bucket_name/object_name`. Object versioning is not supported. See + * [Google Cloud Storage Request + * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. + * + * Generated from protobuf field string gcs_image_uri = 1; + * @return string + */ + public function getGcsImageUri() + { + return $this->gcs_image_uri; + } + + /** + * **Use `image_uri` instead.** + * The Google Cloud Storage URI of the form + * `gs://bucket_name/object_name`. Object versioning is not supported. See + * [Google Cloud Storage Request + * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. + * + * Generated from protobuf field string gcs_image_uri = 1; + * @param string $var + * @return $this + */ + public function setGcsImageUri($var) + { + GPBUtil::checkString($var, True); + $this->gcs_image_uri = $var; + + return $this; + } + + /** + * The URI of the source image. Can be either: + * 1. A Google Cloud Storage URI of the form + * `gs://bucket_name/object_name`. Object versioning is not supported. See + * [Google Cloud Storage Request + * URIs](https://cloud.google.com/storage/docs/reference-uris) for more + * info. + * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from + * HTTP/HTTPS URLs, Google cannot guarantee that the request will be + * completed. Your request may fail if the specified host denies the + * request (e.g. due to request throttling or DOS prevention), or if Google + * throttles requests to the site for abuse prevention. You should not + * depend on externally-hosted images for production applications. + * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes + * precedence. + * + * Generated from protobuf field string image_uri = 2; + * @return string + */ + public function getImageUri() + { + return $this->image_uri; + } + + /** + * The URI of the source image. Can be either: + * 1. A Google Cloud Storage URI of the form + * `gs://bucket_name/object_name`. Object versioning is not supported. See + * [Google Cloud Storage Request + * URIs](https://cloud.google.com/storage/docs/reference-uris) for more + * info. + * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from + * HTTP/HTTPS URLs, Google cannot guarantee that the request will be + * completed. Your request may fail if the specified host denies the + * request (e.g. due to request throttling or DOS prevention), or if Google + * throttles requests to the site for abuse prevention. You should not + * depend on externally-hosted images for production applications. + * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes + * precedence. + * + * Generated from protobuf field string image_uri = 2; + * @param string $var + * @return $this + */ + public function setImageUri($var) + { + GPBUtil::checkString($var, True); + $this->image_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsGcsSource.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsGcsSource.php new file mode 100644 index 000000000000..bc4cbe117db2 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsGcsSource.php @@ -0,0 +1,252 @@ +google.cloud.vision.v1.ImportProductSetsGcsSource + */ +class ImportProductSetsGcsSource extends \Google\Protobuf\Internal\Message +{ + /** + * The Google Cloud Storage URI of the input csv file. + * The URI must start with `gs://`. + * The format of the input csv file should be one image per line. + * In each line, there are 8 columns. + * 1. image-uri + * 2. image-id + * 3. product-set-id + * 4. product-id + * 5. product-category + * 6. product-display-name + * 7. labels + * 8. bounding-poly + * The `image-uri`, `product-set-id`, `product-id`, and `product-category` + * columns are required. All other columns are optional. + * If the `ProductSet` or `Product` specified by the `product-set-id` and + * `product-id` values does not exist, then the system will create a new + * `ProductSet` or `Product` for the image. In this case, the + * `product-display-name` column refers to + * [display_name][google.cloud.vision.v1.Product.display_name], the + * `product-category` column refers to + * [product_category][google.cloud.vision.v1.Product.product_category], and the + * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels]. + * The `image-id` column is optional but must be unique if provided. If it is + * empty, the system will automatically assign a unique id to the image. + * The `product-display-name` column is optional. If it is empty, the system + * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a + * space (" "). You can update the `display_name` later by using the API. + * If a `Product` with the specified `product-id` already exists, then the + * system ignores the `product-display-name`, `product-category`, and `labels` + * columns. + * The `labels` column (optional) is a line containing a list of + * comma-separated key-value pairs, in the following format: + * "key_1=value_1,key_2=value_2,...,key_n=value_n" + * The `bounding-poly` column (optional) identifies one region of + * interest from the image in the same manner as `CreateReferenceImage`. If + * you do not specify the `bounding-poly` column, then the system will try to + * detect regions of interest automatically. + * At most one `bounding-poly` column is allowed per line. If the image + * contains multiple regions of interest, add a line to the CSV file that + * includes the same product information, and the `bounding-poly` values for + * each region of interest. + * The `bounding-poly` column must contain an even number of comma-separated + * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use + * non-negative integers for absolute bounding polygons, and float values + * in [0, 1] for normalized bounding polygons. + * The system will resize the image if the image resolution is too + * large to process (larger than 20MP). + * + * Generated from protobuf field string csv_file_uri = 1; + */ + protected $csv_file_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $csv_file_uri + * The Google Cloud Storage URI of the input csv file. + * The URI must start with `gs://`. + * The format of the input csv file should be one image per line. + * In each line, there are 8 columns. + * 1. image-uri + * 2. image-id + * 3. product-set-id + * 4. product-id + * 5. product-category + * 6. product-display-name + * 7. labels + * 8. bounding-poly + * The `image-uri`, `product-set-id`, `product-id`, and `product-category` + * columns are required. All other columns are optional. + * If the `ProductSet` or `Product` specified by the `product-set-id` and + * `product-id` values does not exist, then the system will create a new + * `ProductSet` or `Product` for the image. In this case, the + * `product-display-name` column refers to + * [display_name][google.cloud.vision.v1.Product.display_name], the + * `product-category` column refers to + * [product_category][google.cloud.vision.v1.Product.product_category], and the + * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels]. + * The `image-id` column is optional but must be unique if provided. If it is + * empty, the system will automatically assign a unique id to the image. + * The `product-display-name` column is optional. If it is empty, the system + * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a + * space (" "). You can update the `display_name` later by using the API. + * If a `Product` with the specified `product-id` already exists, then the + * system ignores the `product-display-name`, `product-category`, and `labels` + * columns. + * The `labels` column (optional) is a line containing a list of + * comma-separated key-value pairs, in the following format: + * "key_1=value_1,key_2=value_2,...,key_n=value_n" + * The `bounding-poly` column (optional) identifies one region of + * interest from the image in the same manner as `CreateReferenceImage`. If + * you do not specify the `bounding-poly` column, then the system will try to + * detect regions of interest automatically. + * At most one `bounding-poly` column is allowed per line. If the image + * contains multiple regions of interest, add a line to the CSV file that + * includes the same product information, and the `bounding-poly` values for + * each region of interest. + * The `bounding-poly` column must contain an even number of comma-separated + * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use + * non-negative integers for absolute bounding polygons, and float values + * in [0, 1] for normalized bounding polygons. + * The system will resize the image if the image resolution is too + * large to process (larger than 20MP). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * The Google Cloud Storage URI of the input csv file. + * The URI must start with `gs://`. + * The format of the input csv file should be one image per line. + * In each line, there are 8 columns. + * 1. image-uri + * 2. image-id + * 3. product-set-id + * 4. product-id + * 5. product-category + * 6. product-display-name + * 7. labels + * 8. bounding-poly + * The `image-uri`, `product-set-id`, `product-id`, and `product-category` + * columns are required. All other columns are optional. + * If the `ProductSet` or `Product` specified by the `product-set-id` and + * `product-id` values does not exist, then the system will create a new + * `ProductSet` or `Product` for the image. In this case, the + * `product-display-name` column refers to + * [display_name][google.cloud.vision.v1.Product.display_name], the + * `product-category` column refers to + * [product_category][google.cloud.vision.v1.Product.product_category], and the + * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels]. + * The `image-id` column is optional but must be unique if provided. If it is + * empty, the system will automatically assign a unique id to the image. + * The `product-display-name` column is optional. If it is empty, the system + * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a + * space (" "). You can update the `display_name` later by using the API. + * If a `Product` with the specified `product-id` already exists, then the + * system ignores the `product-display-name`, `product-category`, and `labels` + * columns. + * The `labels` column (optional) is a line containing a list of + * comma-separated key-value pairs, in the following format: + * "key_1=value_1,key_2=value_2,...,key_n=value_n" + * The `bounding-poly` column (optional) identifies one region of + * interest from the image in the same manner as `CreateReferenceImage`. If + * you do not specify the `bounding-poly` column, then the system will try to + * detect regions of interest automatically. + * At most one `bounding-poly` column is allowed per line. If the image + * contains multiple regions of interest, add a line to the CSV file that + * includes the same product information, and the `bounding-poly` values for + * each region of interest. + * The `bounding-poly` column must contain an even number of comma-separated + * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use + * non-negative integers for absolute bounding polygons, and float values + * in [0, 1] for normalized bounding polygons. + * The system will resize the image if the image resolution is too + * large to process (larger than 20MP). + * + * Generated from protobuf field string csv_file_uri = 1; + * @return string + */ + public function getCsvFileUri() + { + return $this->csv_file_uri; + } + + /** + * The Google Cloud Storage URI of the input csv file. + * The URI must start with `gs://`. + * The format of the input csv file should be one image per line. + * In each line, there are 8 columns. + * 1. image-uri + * 2. image-id + * 3. product-set-id + * 4. product-id + * 5. product-category + * 6. product-display-name + * 7. labels + * 8. bounding-poly + * The `image-uri`, `product-set-id`, `product-id`, and `product-category` + * columns are required. All other columns are optional. + * If the `ProductSet` or `Product` specified by the `product-set-id` and + * `product-id` values does not exist, then the system will create a new + * `ProductSet` or `Product` for the image. In this case, the + * `product-display-name` column refers to + * [display_name][google.cloud.vision.v1.Product.display_name], the + * `product-category` column refers to + * [product_category][google.cloud.vision.v1.Product.product_category], and the + * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels]. + * The `image-id` column is optional but must be unique if provided. If it is + * empty, the system will automatically assign a unique id to the image. + * The `product-display-name` column is optional. If it is empty, the system + * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a + * space (" "). You can update the `display_name` later by using the API. + * If a `Product` with the specified `product-id` already exists, then the + * system ignores the `product-display-name`, `product-category`, and `labels` + * columns. + * The `labels` column (optional) is a line containing a list of + * comma-separated key-value pairs, in the following format: + * "key_1=value_1,key_2=value_2,...,key_n=value_n" + * The `bounding-poly` column (optional) identifies one region of + * interest from the image in the same manner as `CreateReferenceImage`. If + * you do not specify the `bounding-poly` column, then the system will try to + * detect regions of interest automatically. + * At most one `bounding-poly` column is allowed per line. If the image + * contains multiple regions of interest, add a line to the CSV file that + * includes the same product information, and the `bounding-poly` values for + * each region of interest. + * The `bounding-poly` column must contain an even number of comma-separated + * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use + * non-negative integers for absolute bounding polygons, and float values + * in [0, 1] for normalized bounding polygons. + * The system will resize the image if the image resolution is too + * large to process (larger than 20MP). + * + * Generated from protobuf field string csv_file_uri = 1; + * @param string $var + * @return $this + */ + public function setCsvFileUri($var) + { + GPBUtil::checkString($var, True); + $this->csv_file_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsInputConfig.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsInputConfig.php new file mode 100644 index 000000000000..181836273298 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsInputConfig.php @@ -0,0 +1,78 @@ +google.cloud.vision.v1.ImportProductSetsInputConfig + */ +class ImportProductSetsInputConfig extends \Google\Protobuf\Internal\Message +{ + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\ImportProductSetsGcsSource $gcs_source + * The Google Cloud Storage location for a csv file which preserves a list + * of ImportProductSetRequests in each line. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * The Google Cloud Storage location for a csv file which preserves a list + * of ImportProductSetRequests in each line. + * + * Generated from protobuf field .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; + * @return \Google\Cloud\Vision\V1\ImportProductSetsGcsSource|null + */ + public function getGcsSource() + { + return $this->readOneof(1); + } + + public function hasGcsSource() + { + return $this->hasOneof(1); + } + + /** + * The Google Cloud Storage location for a csv file which preserves a list + * of ImportProductSetRequests in each line. + * + * Generated from protobuf field .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; + * @param \Google\Cloud\Vision\V1\ImportProductSetsGcsSource $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImportProductSetsGcsSource::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsRequest.php new file mode 100644 index 000000000000..24ecfc858acb --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsRequest.php @@ -0,0 +1,133 @@ +google.cloud.vision.v1.ImportProductSetsRequest + */ +class ImportProductSetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project in which the ProductSets should be imported. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The input content for the list of requests. + * + * Generated from protobuf field .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_config = null; + + /** + * @param string $parent Required. The project in which the ProductSets should be imported. + * + * Format is `projects/PROJECT_ID/locations/LOC_ID`. Please see + * {@see ProductSearchClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Vision\V1\ImportProductSetsInputConfig $inputConfig Required. The input content for the list of requests. + * + * @return \Google\Cloud\Vision\V1\ImportProductSetsRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Vision\V1\ImportProductSetsInputConfig $inputConfig): self + { + return (new self()) + ->setParent($parent) + ->setInputConfig($inputConfig); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project in which the ProductSets should be imported. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @type \Google\Cloud\Vision\V1\ImportProductSetsInputConfig $input_config + * Required. The input content for the list of requests. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project in which the ProductSets should be imported. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project in which the ProductSets should be imported. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The input content for the list of requests. + * + * Generated from protobuf field .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Vision\V1\ImportProductSetsInputConfig|null + */ + public function getInputConfig() + { + return $this->input_config; + } + + public function hasInputConfig() + { + return isset($this->input_config); + } + + public function clearInputConfig() + { + unset($this->input_config); + } + + /** + * Required. The input content for the list of requests. + * + * Generated from protobuf field .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Vision\V1\ImportProductSetsInputConfig $var + * @return $this + */ + public function setInputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImportProductSetsInputConfig::class); + $this->input_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsResponse.php new file mode 100644 index 000000000000..89318b1ca8e7 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsResponse.php @@ -0,0 +1,120 @@ +google.cloud.vision.v1.ImportProductSetsResponse + */ +class ImportProductSetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of reference_images that are imported successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + private $reference_images; + /** + * The rpc status for each ImportProductSet request, including both successes + * and errors. + * The number of statuses here matches the number of lines in the csv file, + * and statuses[i] stores the success or failure status of processing the i-th + * line of the csv, starting from line 0. + * + * Generated from protobuf field repeated .google.rpc.Status statuses = 2; + */ + private $statuses; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\ReferenceImage>|\Google\Protobuf\Internal\RepeatedField $reference_images + * The list of reference_images that are imported successfully. + * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $statuses + * The rpc status for each ImportProductSet request, including both successes + * and errors. + * The number of statuses here matches the number of lines in the csv file, + * and statuses[i] stores the success or failure status of processing the i-th + * line of the csv, starting from line 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * The list of reference_images that are imported successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReferenceImages() + { + return $this->reference_images; + } + + /** + * The list of reference_images that are imported successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + * @param array<\Google\Cloud\Vision\V1\ReferenceImage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReferenceImages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ReferenceImage::class); + $this->reference_images = $arr; + + return $this; + } + + /** + * The rpc status for each ImportProductSet request, including both successes + * and errors. + * The number of statuses here matches the number of lines in the csv file, + * and statuses[i] stores the success or failure status of processing the i-th + * line of the csv, starting from line 0. + * + * Generated from protobuf field repeated .google.rpc.Status statuses = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStatuses() + { + return $this->statuses; + } + + /** + * The rpc status for each ImportProductSet request, including both successes + * and errors. + * The number of statuses here matches the number of lines in the csv file, + * and statuses[i] stores the success or failure status of processing the i-th + * line of the csv, starting from line 0. + * + * Generated from protobuf field repeated .google.rpc.Status statuses = 2; + * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStatuses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->statuses = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/InputConfig.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/InputConfig.php new file mode 100644 index 000000000000..7fc7ef2d630c --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/InputConfig.php @@ -0,0 +1,165 @@ +google.cloud.vision.v1.InputConfig + */ +class InputConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The Google Cloud Storage location to read the input from. + * + * Generated from protobuf field .google.cloud.vision.v1.GcsSource gcs_source = 1; + */ + protected $gcs_source = null; + /** + * File content, represented as a stream of bytes. + * Note: As with all `bytes` fields, protobuffers use a pure binary + * representation, whereas JSON representations use base64. + * Currently, this field only works for BatchAnnotateFiles requests. It does + * not work for AsyncBatchAnnotateFiles requests. + * + * Generated from protobuf field bytes content = 3; + */ + protected $content = ''; + /** + * The type of the file. Currently only "application/pdf", "image/tiff" and + * "image/gif" are supported. Wildcards are not supported. + * + * Generated from protobuf field string mime_type = 2; + */ + protected $mime_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\GcsSource $gcs_source + * The Google Cloud Storage location to read the input from. + * @type string $content + * File content, represented as a stream of bytes. + * Note: As with all `bytes` fields, protobuffers use a pure binary + * representation, whereas JSON representations use base64. + * Currently, this field only works for BatchAnnotateFiles requests. It does + * not work for AsyncBatchAnnotateFiles requests. + * @type string $mime_type + * The type of the file. Currently only "application/pdf", "image/tiff" and + * "image/gif" are supported. Wildcards are not supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * The Google Cloud Storage location to read the input from. + * + * Generated from protobuf field .google.cloud.vision.v1.GcsSource gcs_source = 1; + * @return \Google\Cloud\Vision\V1\GcsSource|null + */ + public function getGcsSource() + { + return $this->gcs_source; + } + + public function hasGcsSource() + { + return isset($this->gcs_source); + } + + public function clearGcsSource() + { + unset($this->gcs_source); + } + + /** + * The Google Cloud Storage location to read the input from. + * + * Generated from protobuf field .google.cloud.vision.v1.GcsSource gcs_source = 1; + * @param \Google\Cloud\Vision\V1\GcsSource $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\GcsSource::class); + $this->gcs_source = $var; + + return $this; + } + + /** + * File content, represented as a stream of bytes. + * Note: As with all `bytes` fields, protobuffers use a pure binary + * representation, whereas JSON representations use base64. + * Currently, this field only works for BatchAnnotateFiles requests. It does + * not work for AsyncBatchAnnotateFiles requests. + * + * Generated from protobuf field bytes content = 3; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * File content, represented as a stream of bytes. + * Note: As with all `bytes` fields, protobuffers use a pure binary + * representation, whereas JSON representations use base64. + * Currently, this field only works for BatchAnnotateFiles requests. It does + * not work for AsyncBatchAnnotateFiles requests. + * + * Generated from protobuf field bytes content = 3; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, False); + $this->content = $var; + + return $this; + } + + /** + * The type of the file. Currently only "application/pdf", "image/tiff" and + * "image/gif" are supported. Wildcards are not supported. + * + * Generated from protobuf field string mime_type = 2; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * The type of the file. Currently only "application/pdf", "image/tiff" and + * "image/gif" are supported. Wildcards are not supported. + * + * Generated from protobuf field string mime_type = 2; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LatLongRect.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LatLongRect.php new file mode 100644 index 000000000000..c582fe6217f4 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LatLongRect.php @@ -0,0 +1,121 @@ +google.cloud.vision.v1.LatLongRect + */ +class LatLongRect extends \Google\Protobuf\Internal\Message +{ + /** + * Min lat/long pair. + * + * Generated from protobuf field .google.type.LatLng min_lat_lng = 1; + */ + protected $min_lat_lng = null; + /** + * Max lat/long pair. + * + * Generated from protobuf field .google.type.LatLng max_lat_lng = 2; + */ + protected $max_lat_lng = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\LatLng $min_lat_lng + * Min lat/long pair. + * @type \Google\Type\LatLng $max_lat_lng + * Max lat/long pair. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Min lat/long pair. + * + * Generated from protobuf field .google.type.LatLng min_lat_lng = 1; + * @return \Google\Type\LatLng|null + */ + public function getMinLatLng() + { + return $this->min_lat_lng; + } + + public function hasMinLatLng() + { + return isset($this->min_lat_lng); + } + + public function clearMinLatLng() + { + unset($this->min_lat_lng); + } + + /** + * Min lat/long pair. + * + * Generated from protobuf field .google.type.LatLng min_lat_lng = 1; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setMinLatLng($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->min_lat_lng = $var; + + return $this; + } + + /** + * Max lat/long pair. + * + * Generated from protobuf field .google.type.LatLng max_lat_lng = 2; + * @return \Google\Type\LatLng|null + */ + public function getMaxLatLng() + { + return $this->max_lat_lng; + } + + public function hasMaxLatLng() + { + return isset($this->max_lat_lng); + } + + public function clearMaxLatLng() + { + unset($this->max_lat_lng); + } + + /** + * Max lat/long pair. + * + * Generated from protobuf field .google.type.LatLng max_lat_lng = 2; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setMaxLatLng($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->max_lat_lng = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Likelihood.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Likelihood.php new file mode 100644 index 000000000000..a38e9ab08c22 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Likelihood.php @@ -0,0 +1,83 @@ +google.cloud.vision.v1.Likelihood + */ +class Likelihood +{ + /** + * Unknown likelihood. + * + * Generated from protobuf enum UNKNOWN = 0; + */ + const UNKNOWN = 0; + /** + * It is very unlikely. + * + * Generated from protobuf enum VERY_UNLIKELY = 1; + */ + const VERY_UNLIKELY = 1; + /** + * It is unlikely. + * + * Generated from protobuf enum UNLIKELY = 2; + */ + const UNLIKELY = 2; + /** + * It is possible. + * + * Generated from protobuf enum POSSIBLE = 3; + */ + const POSSIBLE = 3; + /** + * It is likely. + * + * Generated from protobuf enum LIKELY = 4; + */ + const LIKELY = 4; + /** + * It is very likely. + * + * Generated from protobuf enum VERY_LIKELY = 5; + */ + const VERY_LIKELY = 5; + + private static $valueToName = [ + self::UNKNOWN => 'UNKNOWN', + self::VERY_UNLIKELY => 'VERY_UNLIKELY', + self::UNLIKELY => 'UNLIKELY', + self::POSSIBLE => 'POSSIBLE', + self::LIKELY => 'LIKELY', + self::VERY_LIKELY => 'VERY_LIKELY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsRequest.php new file mode 100644 index 000000000000..c2ca9f793d5a --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsRequest.php @@ -0,0 +1,155 @@ +google.cloud.vision.v1.ListProductSetsRequest + */ +class ListProductSetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project from which ProductSets should be listed. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project from which ProductSets should be listed. + * + * Format is `projects/PROJECT_ID/locations/LOC_ID`. Please see + * {@see ProductSearchClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\ListProductSetsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project from which ProductSets should be listed. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @type int $page_size + * The maximum number of items to return. Default 10, maximum 100. + * @type string $page_token + * The next_page_token returned from a previous List request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project from which ProductSets should be listed. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project from which ProductSets should be listed. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsResponse.php new file mode 100644 index 000000000000..6fb58f3ea6d7 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsResponse.php @@ -0,0 +1,105 @@ +google.cloud.vision.v1.ListProductSetsResponse + */ +class ListProductSetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of ProductSets. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + private $product_sets; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\ProductSet>|\Google\Protobuf\Internal\RepeatedField $product_sets + * List of ProductSets. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * List of ProductSets. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProductSets() + { + return $this->product_sets; + } + + /** + * List of ProductSets. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + * @param array<\Google\Cloud\Vision\V1\ProductSet>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProductSets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ProductSet::class); + $this->product_sets = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetRequest.php new file mode 100644 index 000000000000..70a71c26a951 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetRequest.php @@ -0,0 +1,160 @@ +google.cloud.vision.v1.ListProductsInProductSetRequest + */ +class ListProductsInProductSetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ProductSet resource for which to retrieve Products. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $name Required. The ProductSet resource for which to retrieve Products. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\ListProductsInProductSetRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The ProductSet resource for which to retrieve Products. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @type int $page_size + * The maximum number of items to return. Default 10, maximum 100. + * @type string $page_token + * The next_page_token returned from a previous List request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ProductSet resource for which to retrieve Products. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The ProductSet resource for which to retrieve Products. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetResponse.php new file mode 100644 index 000000000000..550e51fc19f7 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetResponse.php @@ -0,0 +1,105 @@ +google.cloud.vision.v1.ListProductsInProductSetResponse + */ +class ListProductsInProductSetResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Products. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; + */ + private $products; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\Product>|\Google\Protobuf\Internal\RepeatedField $products + * The list of Products. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * The list of Products. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProducts() + { + return $this->products; + } + + /** + * The list of Products. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; + * @param array<\Google\Cloud\Vision\V1\Product>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProducts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Product::class); + $this->products = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsRequest.php new file mode 100644 index 000000000000..e6efb131265a --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsRequest.php @@ -0,0 +1,160 @@ +google.cloud.vision.v1.ListProductsRequest + */ +class ListProductsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project OR ProductSet from which Products should be listed. + * Format: + * `projects/PROJECT_ID/locations/LOC_ID` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project OR ProductSet from which Products should be listed. + * + * Format: + * `projects/PROJECT_ID/locations/LOC_ID` + * Please see {@see ProductSearchClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\ListProductsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project OR ProductSet from which Products should be listed. + * Format: + * `projects/PROJECT_ID/locations/LOC_ID` + * @type int $page_size + * The maximum number of items to return. Default 10, maximum 100. + * @type string $page_token + * The next_page_token returned from a previous List request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project OR ProductSet from which Products should be listed. + * Format: + * `projects/PROJECT_ID/locations/LOC_ID` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project OR ProductSet from which Products should be listed. + * Format: + * `projects/PROJECT_ID/locations/LOC_ID` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsResponse.php new file mode 100644 index 000000000000..192d6f3a9a11 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsResponse.php @@ -0,0 +1,105 @@ +google.cloud.vision.v1.ListProductsResponse + */ +class ListProductsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of products. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; + */ + private $products; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\Product>|\Google\Protobuf\Internal\RepeatedField $products + * List of products. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * List of products. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProducts() + { + return $this->products; + } + + /** + * List of products. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; + * @param array<\Google\Cloud\Vision\V1\Product>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProducts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Product::class); + $this->products = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesRequest.php new file mode 100644 index 000000000000..fb833ada7722 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesRequest.php @@ -0,0 +1,168 @@ +google.cloud.vision.v1.ListReferenceImagesRequest + */ +class ListReferenceImagesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the product containing the reference images. + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results to be returned. This is the value + * of `nextPageToken` returned in a previous reference image list request. + * Defaults to the first page if not specified. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Resource name of the product containing the reference images. + * + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. Please see + * {@see ProductSearchClient::productName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\ListReferenceImagesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the product containing the reference images. + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * @type int $page_size + * The maximum number of items to return. Default 10, maximum 100. + * @type string $page_token + * A token identifying a page of results to be returned. This is the value + * of `nextPageToken` returned in a previous reference image list request. + * Defaults to the first page if not specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the product containing the reference images. + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Resource name of the product containing the reference images. + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results to be returned. This is the value + * of `nextPageToken` returned in a previous reference image list request. + * Defaults to the first page if not specified. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results to be returned. This is the value + * of `nextPageToken` returned in a previous reference image list request. + * Defaults to the first page if not specified. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesResponse.php new file mode 100644 index 000000000000..bf552bad802f --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesResponse.php @@ -0,0 +1,135 @@ +google.cloud.vision.v1.ListReferenceImagesResponse + */ +class ListReferenceImagesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of reference images. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + private $reference_images; + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token returned from a previous List request, if any. + * + * Generated from protobuf field string next_page_token = 3; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\ReferenceImage>|\Google\Protobuf\Internal\RepeatedField $reference_images + * The list of reference images. + * @type int $page_size + * The maximum number of items to return. Default 10, maximum 100. + * @type string $next_page_token + * The next_page_token returned from a previous List request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * The list of reference images. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReferenceImages() + { + return $this->reference_images; + } + + /** + * The list of reference images. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + * @param array<\Google\Cloud\Vision\V1\ReferenceImage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReferenceImages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ReferenceImage::class); + $this->reference_images = $arr; + + return $this; + } + + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token returned from a previous List request, if any. + * + * Generated from protobuf field string next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The next_page_token returned from a previous List request, if any. + * + * Generated from protobuf field string next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocalizedObjectAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocalizedObjectAnnotation.php new file mode 100644 index 000000000000..6e85feb7fede --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocalizedObjectAnnotation.php @@ -0,0 +1,221 @@ +google.cloud.vision.v1.LocalizedObjectAnnotation + */ +class LocalizedObjectAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * Object ID that should align with EntityAnnotation mid. + * + * Generated from protobuf field string mid = 1; + */ + protected $mid = ''; + /** + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 2; + */ + protected $language_code = ''; + /** + * Object name, expressed in its `language_code` language. + * + * Generated from protobuf field string name = 3; + */ + protected $name = ''; + /** + * Score of the result. Range [0, 1]. + * + * Generated from protobuf field float score = 4; + */ + protected $score = 0.0; + /** + * Image region to which this object belongs. This must be populated. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; + */ + protected $bounding_poly = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $mid + * Object ID that should align with EntityAnnotation mid. + * @type string $language_code + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * @type string $name + * Object name, expressed in its `language_code` language. + * @type float $score + * Score of the result. Range [0, 1]. + * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly + * Image region to which this object belongs. This must be populated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Object ID that should align with EntityAnnotation mid. + * + * Generated from protobuf field string mid = 1; + * @return string + */ + public function getMid() + { + return $this->mid; + } + + /** + * Object ID that should align with EntityAnnotation mid. + * + * Generated from protobuf field string mid = 1; + * @param string $var + * @return $this + */ + public function setMid($var) + { + GPBUtil::checkString($var, True); + $this->mid = $var; + + return $this; + } + + /** + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 2; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Object name, expressed in its `language_code` language. + * + * Generated from protobuf field string name = 3; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Object name, expressed in its `language_code` language. + * + * Generated from protobuf field string name = 3; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Score of the result. Range [0, 1]. + * + * Generated from protobuf field float score = 4; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * Score of the result. Range [0, 1]. + * + * Generated from protobuf field float score = 4; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Image region to which this object belongs. This must be populated. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; + * @return \Google\Cloud\Vision\V1\BoundingPoly|null + */ + public function getBoundingPoly() + { + return $this->bounding_poly; + } + + public function hasBoundingPoly() + { + return isset($this->bounding_poly); + } + + public function clearBoundingPoly() + { + unset($this->bounding_poly); + } + + /** + * Image region to which this object belongs. This must be populated. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; + * @param \Google\Cloud\Vision\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingPoly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->bounding_poly = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocationInfo.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocationInfo.php new file mode 100644 index 000000000000..02c79371bf4d --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocationInfo.php @@ -0,0 +1,77 @@ +google.cloud.vision.v1.LocationInfo + */ +class LocationInfo extends \Google\Protobuf\Internal\Message +{ + /** + * lat/long location coordinates. + * + * Generated from protobuf field .google.type.LatLng lat_lng = 1; + */ + protected $lat_lng = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\LatLng $lat_lng + * lat/long location coordinates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * lat/long location coordinates. + * + * Generated from protobuf field .google.type.LatLng lat_lng = 1; + * @return \Google\Type\LatLng|null + */ + public function getLatLng() + { + return $this->lat_lng; + } + + public function hasLatLng() + { + return isset($this->lat_lng); + } + + public function clearLatLng() + { + unset($this->lat_lng); + } + + /** + * lat/long location coordinates. + * + * Generated from protobuf field .google.type.LatLng lat_lng = 1; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setLatLng($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->lat_lng = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/NormalizedVertex.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/NormalizedVertex.php new file mode 100644 index 000000000000..20d663aa3bd5 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/NormalizedVertex.php @@ -0,0 +1,103 @@ +google.cloud.vision.v1.NormalizedVertex + */ +class NormalizedVertex extends \Google\Protobuf\Internal\Message +{ + /** + * X coordinate. + * + * Generated from protobuf field float x = 1; + */ + protected $x = 0.0; + /** + * Y coordinate. + * + * Generated from protobuf field float y = 2; + */ + protected $y = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $x + * X coordinate. + * @type float $y + * Y coordinate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\Geometry::initOnce(); + parent::__construct($data); + } + + /** + * X coordinate. + * + * Generated from protobuf field float x = 1; + * @return float + */ + public function getX() + { + return $this->x; + } + + /** + * X coordinate. + * + * Generated from protobuf field float x = 1; + * @param float $var + * @return $this + */ + public function setX($var) + { + GPBUtil::checkFloat($var); + $this->x = $var; + + return $this; + } + + /** + * Y coordinate. + * + * Generated from protobuf field float y = 2; + * @return float + */ + public function getY() + { + return $this->y; + } + + /** + * Y coordinate. + * + * Generated from protobuf field float y = 2; + * @param float $var + * @return $this + */ + public function setY($var) + { + GPBUtil::checkFloat($var); + $this->y = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata.php new file mode 100644 index 000000000000..ae546b7644c5 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata.php @@ -0,0 +1,155 @@ +google.cloud.vision.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Current state of the batch operation. + * + * Generated from protobuf field .google.cloud.vision.v1.OperationMetadata.State state = 1; + */ + protected $state = 0; + /** + * The time when the batch request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; + */ + protected $create_time = null; + /** + * The time when the operation result was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Current state of the batch operation. + * @type \Google\Protobuf\Timestamp $create_time + * The time when the batch request was received. + * @type \Google\Protobuf\Timestamp $update_time + * The time when the operation result was last updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Current state of the batch operation. + * + * Generated from protobuf field .google.cloud.vision.v1.OperationMetadata.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Current state of the batch operation. + * + * Generated from protobuf field .google.cloud.vision.v1.OperationMetadata.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\OperationMetadata\State::class); + $this->state = $var; + + return $this; + } + + /** + * The time when the batch request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * The time when the batch request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The time when the operation result was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * The time when the operation result was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata/State.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata/State.php new file mode 100644 index 000000000000..345f7bb0a591 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata/State.php @@ -0,0 +1,78 @@ +google.cloud.vision.v1.OperationMetadata.State + */ +class State +{ + /** + * Invalid. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Request is received. + * + * Generated from protobuf enum CREATED = 1; + */ + const CREATED = 1; + /** + * Request is actively being processed. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The batch processing is done. + * + * Generated from protobuf enum DONE = 3; + */ + const DONE = 3; + /** + * The batch processing was cancelled. + * + * Generated from protobuf enum CANCELLED = 4; + */ + const CANCELLED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATED => 'CREATED', + self::RUNNING => 'RUNNING', + self::DONE => 'DONE', + self::CANCELLED => 'CANCELLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Vision\V1\OperationMetadata_State::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OutputConfig.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OutputConfig.php new file mode 100644 index 000000000000..4273ce192966 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OutputConfig.php @@ -0,0 +1,143 @@ +google.cloud.vision.v1.OutputConfig + */ +class OutputConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The Google Cloud Storage location to write the output(s) to. + * + * Generated from protobuf field .google.cloud.vision.v1.GcsDestination gcs_destination = 1; + */ + protected $gcs_destination = null; + /** + * The max number of response protos to put into each output JSON file on + * Google Cloud Storage. + * The valid range is [1, 100]. If not specified, the default value is 20. + * For example, for one pdf file with 100 pages, 100 response protos will + * be generated. If `batch_size` = 20, then 5 json files each + * containing 20 response protos will be written under the prefix + * `gcs_destination`.`uri`. + * Currently, batch_size only applies to GcsDestination, with potential future + * support for other output configurations. + * + * Generated from protobuf field int32 batch_size = 2; + */ + protected $batch_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\GcsDestination $gcs_destination + * The Google Cloud Storage location to write the output(s) to. + * @type int $batch_size + * The max number of response protos to put into each output JSON file on + * Google Cloud Storage. + * The valid range is [1, 100]. If not specified, the default value is 20. + * For example, for one pdf file with 100 pages, 100 response protos will + * be generated. If `batch_size` = 20, then 5 json files each + * containing 20 response protos will be written under the prefix + * `gcs_destination`.`uri`. + * Currently, batch_size only applies to GcsDestination, with potential future + * support for other output configurations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * The Google Cloud Storage location to write the output(s) to. + * + * Generated from protobuf field .google.cloud.vision.v1.GcsDestination gcs_destination = 1; + * @return \Google\Cloud\Vision\V1\GcsDestination|null + */ + public function getGcsDestination() + { + return $this->gcs_destination; + } + + public function hasGcsDestination() + { + return isset($this->gcs_destination); + } + + public function clearGcsDestination() + { + unset($this->gcs_destination); + } + + /** + * The Google Cloud Storage location to write the output(s) to. + * + * Generated from protobuf field .google.cloud.vision.v1.GcsDestination gcs_destination = 1; + * @param \Google\Cloud\Vision\V1\GcsDestination $var + * @return $this + */ + public function setGcsDestination($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\GcsDestination::class); + $this->gcs_destination = $var; + + return $this; + } + + /** + * The max number of response protos to put into each output JSON file on + * Google Cloud Storage. + * The valid range is [1, 100]. If not specified, the default value is 20. + * For example, for one pdf file with 100 pages, 100 response protos will + * be generated. If `batch_size` = 20, then 5 json files each + * containing 20 response protos will be written under the prefix + * `gcs_destination`.`uri`. + * Currently, batch_size only applies to GcsDestination, with potential future + * support for other output configurations. + * + * Generated from protobuf field int32 batch_size = 2; + * @return int + */ + public function getBatchSize() + { + return $this->batch_size; + } + + /** + * The max number of response protos to put into each output JSON file on + * Google Cloud Storage. + * The valid range is [1, 100]. If not specified, the default value is 20. + * For example, for one pdf file with 100 pages, 100 response protos will + * be generated. If `batch_size` = 20, then 5 json files each + * containing 20 response protos will be written under the prefix + * `gcs_destination`.`uri`. + * Currently, batch_size only applies to GcsDestination, with potential future + * support for other output configurations. + * + * Generated from protobuf field int32 batch_size = 2; + * @param int $var + * @return $this + */ + public function setBatchSize($var) + { + GPBUtil::checkInt32($var); + $this->batch_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Page.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Page.php new file mode 100644 index 000000000000..26020d0280b5 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Page.php @@ -0,0 +1,221 @@ +google.cloud.vision.v1.Page + */ +class Page extends \Google\Protobuf\Internal\Message +{ + /** + * Additional information detected on the page. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + protected $property = null; + /** + * Page width. For PDFs the unit is points. For images (including + * TIFFs) the unit is pixels. + * + * Generated from protobuf field int32 width = 2; + */ + protected $width = 0; + /** + * Page height. For PDFs the unit is points. For images (including + * TIFFs) the unit is pixels. + * + * Generated from protobuf field int32 height = 3; + */ + protected $height = 0; + /** + * List of blocks of text, images etc on this page. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Block blocks = 4; + */ + private $blocks; + /** + * Confidence of the OCR results on the page. Range [0, 1]. + * + * Generated from protobuf field float confidence = 5; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $property + * Additional information detected on the page. + * @type int $width + * Page width. For PDFs the unit is points. For images (including + * TIFFs) the unit is pixels. + * @type int $height + * Page height. For PDFs the unit is points. For images (including + * TIFFs) the unit is pixels. + * @type array<\Google\Cloud\Vision\V1\Block>|\Google\Protobuf\Internal\RepeatedField $blocks + * List of blocks of text, images etc on this page. + * @type float $confidence + * Confidence of the OCR results on the page. Range [0, 1]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); + parent::__construct($data); + } + + /** + * Additional information detected on the page. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return \Google\Cloud\Vision\V1\TextAnnotation\TextProperty|null + */ + public function getProperty() + { + return $this->property; + } + + public function hasProperty() + { + return isset($this->property); + } + + public function clearProperty() + { + unset($this->property); + } + + /** + * Additional information detected on the page. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @param \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $var + * @return $this + */ + public function setProperty($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\TextProperty::class); + $this->property = $var; + + return $this; + } + + /** + * Page width. For PDFs the unit is points. For images (including + * TIFFs) the unit is pixels. + * + * Generated from protobuf field int32 width = 2; + * @return int + */ + public function getWidth() + { + return $this->width; + } + + /** + * Page width. For PDFs the unit is points. For images (including + * TIFFs) the unit is pixels. + * + * Generated from protobuf field int32 width = 2; + * @param int $var + * @return $this + */ + public function setWidth($var) + { + GPBUtil::checkInt32($var); + $this->width = $var; + + return $this; + } + + /** + * Page height. For PDFs the unit is points. For images (including + * TIFFs) the unit is pixels. + * + * Generated from protobuf field int32 height = 3; + * @return int + */ + public function getHeight() + { + return $this->height; + } + + /** + * Page height. For PDFs the unit is points. For images (including + * TIFFs) the unit is pixels. + * + * Generated from protobuf field int32 height = 3; + * @param int $var + * @return $this + */ + public function setHeight($var) + { + GPBUtil::checkInt32($var); + $this->height = $var; + + return $this; + } + + /** + * List of blocks of text, images etc on this page. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Block blocks = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBlocks() + { + return $this->blocks; + } + + /** + * List of blocks of text, images etc on this page. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Block blocks = 4; + * @param array<\Google\Cloud\Vision\V1\Block>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBlocks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Block::class); + $this->blocks = $arr; + + return $this; + } + + /** + * Confidence of the OCR results on the page. Range [0, 1]. + * + * Generated from protobuf field float confidence = 5; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Confidence of the OCR results on the page. Range [0, 1]. + * + * Generated from protobuf field float confidence = 5; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Paragraph.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Paragraph.php new file mode 100644 index 000000000000..0dbbb5b4367f --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Paragraph.php @@ -0,0 +1,245 @@ +google.cloud.vision.v1.Paragraph + */ +class Paragraph extends \Google\Protobuf\Internal\Message +{ + /** + * Additional information detected for the paragraph. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + protected $property = null; + /** + * The bounding box for the paragraph. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + protected $bounding_box = null; + /** + * List of all words in this paragraph. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Word words = 3; + */ + private $words; + /** + * Confidence of the OCR results for the paragraph. Range [0, 1]. + * + * Generated from protobuf field float confidence = 4; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $property + * Additional information detected for the paragraph. + * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_box + * The bounding box for the paragraph. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * @type array<\Google\Cloud\Vision\V1\Word>|\Google\Protobuf\Internal\RepeatedField $words + * List of all words in this paragraph. + * @type float $confidence + * Confidence of the OCR results for the paragraph. Range [0, 1]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); + parent::__construct($data); + } + + /** + * Additional information detected for the paragraph. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return \Google\Cloud\Vision\V1\TextAnnotation\TextProperty|null + */ + public function getProperty() + { + return $this->property; + } + + public function hasProperty() + { + return isset($this->property); + } + + public function clearProperty() + { + unset($this->property); + } + + /** + * Additional information detected for the paragraph. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @param \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $var + * @return $this + */ + public function setProperty($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\TextProperty::class); + $this->property = $var; + + return $this; + } + + /** + * The bounding box for the paragraph. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return \Google\Cloud\Vision\V1\BoundingPoly|null + */ + public function getBoundingBox() + { + return $this->bounding_box; + } + + public function hasBoundingBox() + { + return isset($this->bounding_box); + } + + public function clearBoundingBox() + { + unset($this->bounding_box); + } + + /** + * The bounding box for the paragraph. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @param \Google\Cloud\Vision\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingBox($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->bounding_box = $var; + + return $this; + } + + /** + * List of all words in this paragraph. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Word words = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWords() + { + return $this->words; + } + + /** + * List of all words in this paragraph. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Word words = 3; + * @param array<\Google\Cloud\Vision\V1\Word>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWords($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Word::class); + $this->words = $arr; + + return $this; + } + + /** + * Confidence of the OCR results for the paragraph. Range [0, 1]. + * + * Generated from protobuf field float confidence = 4; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Confidence of the OCR results for the paragraph. Range [0, 1]. + * + * Generated from protobuf field float confidence = 4; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Position.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Position.php new file mode 100644 index 000000000000..198ed9067d2e --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Position.php @@ -0,0 +1,137 @@ +google.cloud.vision.v1.Position + */ +class Position extends \Google\Protobuf\Internal\Message +{ + /** + * X coordinate. + * + * Generated from protobuf field float x = 1; + */ + protected $x = 0.0; + /** + * Y coordinate. + * + * Generated from protobuf field float y = 2; + */ + protected $y = 0.0; + /** + * Z coordinate (or depth). + * + * Generated from protobuf field float z = 3; + */ + protected $z = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $x + * X coordinate. + * @type float $y + * Y coordinate. + * @type float $z + * Z coordinate (or depth). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\Geometry::initOnce(); + parent::__construct($data); + } + + /** + * X coordinate. + * + * Generated from protobuf field float x = 1; + * @return float + */ + public function getX() + { + return $this->x; + } + + /** + * X coordinate. + * + * Generated from protobuf field float x = 1; + * @param float $var + * @return $this + */ + public function setX($var) + { + GPBUtil::checkFloat($var); + $this->x = $var; + + return $this; + } + + /** + * Y coordinate. + * + * Generated from protobuf field float y = 2; + * @return float + */ + public function getY() + { + return $this->y; + } + + /** + * Y coordinate. + * + * Generated from protobuf field float y = 2; + * @param float $var + * @return $this + */ + public function setY($var) + { + GPBUtil::checkFloat($var); + $this->y = $var; + + return $this; + } + + /** + * Z coordinate (or depth). + * + * Generated from protobuf field float z = 3; + * @return float + */ + public function getZ() + { + return $this->z; + } + + /** + * Z coordinate (or depth). + * + * Generated from protobuf field float z = 3; + * @param float $var + * @return $this + */ + public function setZ($var) + { + GPBUtil::checkFloat($var); + $this->z = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product.php new file mode 100644 index 000000000000..bca748b2244d --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product.php @@ -0,0 +1,271 @@ +google.cloud.vision.v1.Product + */ +class Product extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the product. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * This field is ignored when creating a product. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The user-provided name for this Product. Must not be empty. Must be at most + * 4096 characters long. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * User-provided metadata to be stored with this product. Must be at most 4096 + * characters long. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Immutable. The category for the product identified by the reference image. This should + * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or + * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are + * still supported, but these should not be used for new products. + * + * Generated from protobuf field string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $product_category = ''; + /** + * Key-value pairs that can be attached to a product. At query time, + * constraints can be specified based on the product_labels. + * Note that integer values can be provided as strings, e.g. "1199". Only + * strings with integer values can match a range-based restriction which is + * to be supported soon. + * Multiple values can be assigned to the same key. One product may have up to + * 500 product_labels. + * Notice that the total number of distinct product_labels over all products + * in one ProductSet cannot exceed 1M, otherwise the product search pipeline + * will refuse to work for that ProductSet. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + private $product_labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the product. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * This field is ignored when creating a product. + * @type string $display_name + * The user-provided name for this Product. Must not be empty. Must be at most + * 4096 characters long. + * @type string $description + * User-provided metadata to be stored with this product. Must be at most 4096 + * characters long. + * @type string $product_category + * Immutable. The category for the product identified by the reference image. This should + * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or + * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are + * still supported, but these should not be used for new products. + * @type array<\Google\Cloud\Vision\V1\Product\KeyValue>|\Google\Protobuf\Internal\RepeatedField $product_labels + * Key-value pairs that can be attached to a product. At query time, + * constraints can be specified based on the product_labels. + * Note that integer values can be provided as strings, e.g. "1199". Only + * strings with integer values can match a range-based restriction which is + * to be supported soon. + * Multiple values can be assigned to the same key. One product may have up to + * 500 product_labels. + * Notice that the total number of distinct product_labels over all products + * in one ProductSet cannot exceed 1M, otherwise the product search pipeline + * will refuse to work for that ProductSet. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the product. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * This field is ignored when creating a product. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the product. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * This field is ignored when creating a product. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The user-provided name for this Product. Must not be empty. Must be at most + * 4096 characters long. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The user-provided name for this Product. Must not be empty. Must be at most + * 4096 characters long. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * User-provided metadata to be stored with this product. Must be at most 4096 + * characters long. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User-provided metadata to be stored with this product. Must be at most 4096 + * characters long. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Immutable. The category for the product identified by the reference image. This should + * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or + * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are + * still supported, but these should not be used for new products. + * + * Generated from protobuf field string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getProductCategory() + { + return $this->product_category; + } + + /** + * Immutable. The category for the product identified by the reference image. This should + * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or + * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are + * still supported, but these should not be used for new products. + * + * Generated from protobuf field string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setProductCategory($var) + { + GPBUtil::checkString($var, True); + $this->product_category = $var; + + return $this; + } + + /** + * Key-value pairs that can be attached to a product. At query time, + * constraints can be specified based on the product_labels. + * Note that integer values can be provided as strings, e.g. "1199". Only + * strings with integer values can match a range-based restriction which is + * to be supported soon. + * Multiple values can be assigned to the same key. One product may have up to + * 500 product_labels. + * Notice that the total number of distinct product_labels over all products + * in one ProductSet cannot exceed 1M, otherwise the product search pipeline + * will refuse to work for that ProductSet. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProductLabels() + { + return $this->product_labels; + } + + /** + * Key-value pairs that can be attached to a product. At query time, + * constraints can be specified based on the product_labels. + * Note that integer values can be provided as strings, e.g. "1199". Only + * strings with integer values can match a range-based restriction which is + * to be supported soon. + * Multiple values can be assigned to the same key. One product may have up to + * 500 product_labels. + * Notice that the total number of distinct product_labels over all products + * in one ProductSet cannot exceed 1M, otherwise the product search pipeline + * will refuse to work for that ProductSet. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + * @param array<\Google\Cloud\Vision\V1\Product\KeyValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProductLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Product\KeyValue::class); + $this->product_labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product/KeyValue.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product/KeyValue.php new file mode 100644 index 000000000000..6f977cac6d14 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product/KeyValue.php @@ -0,0 +1,112 @@ +google.cloud.vision.v1.Product.KeyValue + */ +class KeyValue extends \Google\Protobuf\Internal\Message +{ + /** + * The key of the label attached to the product. Cannot be empty and cannot + * exceed 128 bytes. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * The value of the label attached to the product. Cannot be empty and + * cannot exceed 128 bytes. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * The key of the label attached to the product. Cannot be empty and cannot + * exceed 128 bytes. + * @type string $value + * The value of the label attached to the product. Cannot be empty and + * cannot exceed 128 bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * The key of the label attached to the product. Cannot be empty and cannot + * exceed 128 bytes. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * The key of the label attached to the product. Cannot be empty and cannot + * exceed 128 bytes. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * The value of the label attached to the product. Cannot be empty and + * cannot exceed 128 bytes. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The value of the label attached to the product. Cannot be empty and + * cannot exceed 128 bytes. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(KeyValue::class, \Google\Cloud\Vision\V1\Product_KeyValue::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchGrpcClient.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchGrpcClient.php new file mode 100644 index 000000000000..0d3768b48c6b --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchGrpcClient.php @@ -0,0 +1,470 @@ +_simpleRequest('/google.cloud.vision.v1.ProductSearch/CreateProductSet', + $argument, + ['\Google\Cloud\Vision\V1\ProductSet', 'decode'], + $metadata, $options); + } + + /** + * Lists ProductSets in an unspecified order. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less + * than 1. + * @param \Google\Cloud\Vision\V1\ListProductSetsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListProductSets(\Google\Cloud\Vision\V1\ListProductSetsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/ListProductSets', + $argument, + ['\Google\Cloud\Vision\V1\ListProductSetsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets information associated with a ProductSet. + * + * Possible errors: + * + * * Returns NOT_FOUND if the ProductSet does not exist. + * @param \Google\Cloud\Vision\V1\GetProductSetRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetProductSet(\Google\Cloud\Vision\V1\GetProductSetRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/GetProductSet', + $argument, + ['\Google\Cloud\Vision\V1\ProductSet', 'decode'], + $metadata, $options); + } + + /** + * Makes changes to a ProductSet resource. + * Only display_name can be updated currently. + * + * Possible errors: + * + * * Returns NOT_FOUND if the ProductSet does not exist. + * * Returns INVALID_ARGUMENT if display_name is present in update_mask but + * missing from the request or longer than 4096 characters. + * @param \Google\Cloud\Vision\V1\UpdateProductSetRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateProductSet(\Google\Cloud\Vision\V1\UpdateProductSetRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/UpdateProductSet', + $argument, + ['\Google\Cloud\Vision\V1\ProductSet', 'decode'], + $metadata, $options); + } + + /** + * Permanently deletes a ProductSet. Products and ReferenceImages in the + * ProductSet are not deleted. + * + * The actual image files are not deleted from Google Cloud Storage. + * @param \Google\Cloud\Vision\V1\DeleteProductSetRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteProductSet(\Google\Cloud\Vision\V1\DeleteProductSetRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/DeleteProductSet', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Creates and returns a new product resource. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 + * characters. + * * Returns INVALID_ARGUMENT if description is longer than 4096 characters. + * * Returns INVALID_ARGUMENT if product_category is missing or invalid. + * @param \Google\Cloud\Vision\V1\CreateProductRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateProduct(\Google\Cloud\Vision\V1\CreateProductRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/CreateProduct', + $argument, + ['\Google\Cloud\Vision\V1\Product', 'decode'], + $metadata, $options); + } + + /** + * Lists products in an unspecified order. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + * @param \Google\Cloud\Vision\V1\ListProductsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListProducts(\Google\Cloud\Vision\V1\ListProductsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/ListProducts', + $argument, + ['\Google\Cloud\Vision\V1\ListProductsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets information associated with a Product. + * + * Possible errors: + * + * * Returns NOT_FOUND if the Product does not exist. + * @param \Google\Cloud\Vision\V1\GetProductRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetProduct(\Google\Cloud\Vision\V1\GetProductRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/GetProduct', + $argument, + ['\Google\Cloud\Vision\V1\Product', 'decode'], + $metadata, $options); + } + + /** + * Makes changes to a Product resource. + * Only the `display_name`, `description`, and `labels` fields can be updated + * right now. + * + * If labels are updated, the change will not be reflected in queries until + * the next index time. + * + * Possible errors: + * + * * Returns NOT_FOUND if the Product does not exist. + * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is + * missing from the request or longer than 4096 characters. + * * Returns INVALID_ARGUMENT if description is present in update_mask but is + * longer than 4096 characters. + * * Returns INVALID_ARGUMENT if product_category is present in update_mask. + * @param \Google\Cloud\Vision\V1\UpdateProductRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateProduct(\Google\Cloud\Vision\V1\UpdateProductRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/UpdateProduct', + $argument, + ['\Google\Cloud\Vision\V1\Product', 'decode'], + $metadata, $options); + } + + /** + * Permanently deletes a product and its reference images. + * + * Metadata of the product and all its images will be deleted right away, but + * search queries against ProductSets containing the product may still work + * until all related caches are refreshed. + * @param \Google\Cloud\Vision\V1\DeleteProductRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteProduct(\Google\Cloud\Vision\V1\DeleteProductRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/DeleteProduct', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Creates and returns a new ReferenceImage resource. + * + * The `bounding_poly` field is optional. If `bounding_poly` is not specified, + * the system will try to detect regions of interest in the image that are + * compatible with the product_category on the parent product. If it is + * specified, detection is ALWAYS skipped. The system converts polygons into + * non-rotated rectangles. + * + * Note that the pipeline will resize the image if the image resolution is too + * large to process (above 50MP). + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 + * characters. + * * Returns INVALID_ARGUMENT if the product does not exist. + * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing + * compatible with the parent product's product_category is detected. + * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + * @param \Google\Cloud\Vision\V1\CreateReferenceImageRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateReferenceImage(\Google\Cloud\Vision\V1\CreateReferenceImageRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/CreateReferenceImage', + $argument, + ['\Google\Cloud\Vision\V1\ReferenceImage', 'decode'], + $metadata, $options); + } + + /** + * Permanently deletes a reference image. + * + * The image metadata will be deleted right away, but search queries + * against ProductSets containing the image may still work until all related + * caches are refreshed. + * + * The actual image files are not deleted from Google Cloud Storage. + * @param \Google\Cloud\Vision\V1\DeleteReferenceImageRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteReferenceImage(\Google\Cloud\Vision\V1\DeleteReferenceImageRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/DeleteReferenceImage', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Lists reference images. + * + * Possible errors: + * + * * Returns NOT_FOUND if the parent product does not exist. + * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less + * than 1. + * @param \Google\Cloud\Vision\V1\ListReferenceImagesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListReferenceImages(\Google\Cloud\Vision\V1\ListReferenceImagesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/ListReferenceImages', + $argument, + ['\Google\Cloud\Vision\V1\ListReferenceImagesResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets information associated with a ReferenceImage. + * + * Possible errors: + * + * * Returns NOT_FOUND if the specified image does not exist. + * @param \Google\Cloud\Vision\V1\GetReferenceImageRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetReferenceImage(\Google\Cloud\Vision\V1\GetReferenceImageRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/GetReferenceImage', + $argument, + ['\Google\Cloud\Vision\V1\ReferenceImage', 'decode'], + $metadata, $options); + } + + /** + * Adds a Product to the specified ProductSet. If the Product is already + * present, no change is made. + * + * One Product can be added to at most 100 ProductSets. + * + * Possible errors: + * + * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + * @param \Google\Cloud\Vision\V1\AddProductToProductSetRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function AddProductToProductSet(\Google\Cloud\Vision\V1\AddProductToProductSetRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/AddProductToProductSet', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Removes a Product from the specified ProductSet. + * @param \Google\Cloud\Vision\V1\RemoveProductFromProductSetRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RemoveProductFromProductSet(\Google\Cloud\Vision\V1\RemoveProductFromProductSetRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/RemoveProductFromProductSet', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Lists the Products in a ProductSet, in an unspecified order. If the + * ProductSet does not exist, the products field of the response will be + * empty. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + * @param \Google\Cloud\Vision\V1\ListProductsInProductSetRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListProductsInProductSet(\Google\Cloud\Vision\V1\ListProductsInProductSetRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/ListProductsInProductSet', + $argument, + ['\Google\Cloud\Vision\V1\ListProductsInProductSetResponse', 'decode'], + $metadata, $options); + } + + /** + * Asynchronous API that imports a list of reference images to specified + * product sets based on a list of image information. + * + * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the + * progress and results of the request. + * `Operation.metadata` contains `BatchOperationMetadata`. (progress) + * `Operation.response` contains `ImportProductSetsResponse`. (results) + * + * The input source of this method is a csv file on Google Cloud Storage. + * For the format of the csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. + * @param \Google\Cloud\Vision\V1\ImportProductSetsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ImportProductSets(\Google\Cloud\Vision\V1\ImportProductSetsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/ImportProductSets', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Asynchronous API to delete all Products in a ProductSet or all Products + * that are in no ProductSet. + * + * If a Product is a member of the specified ProductSet in addition to other + * ProductSets, the Product will still be deleted. + * + * It is recommended to not delete the specified ProductSet until after this + * operation has completed. It is also recommended to not add any of the + * Products involved in the batch delete to a new ProductSet while this + * operation is running because those Products may still end up deleted. + * + * It's not possible to undo the PurgeProducts operation. Therefore, it is + * recommended to keep the csv files used in ImportProductSets (if that was + * how you originally built the Product Set) before starting PurgeProducts, in + * case you need to re-import the data after deletion. + * + * If the plan is to purge all of the Products from a ProductSet and then + * re-use the empty ProductSet to re-import new Products into the empty + * ProductSet, you must wait until the PurgeProducts operation has finished + * for that ProductSet. + * + * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the + * progress and results of the request. + * `Operation.metadata` contains `BatchOperationMetadata`. (progress) + * @param \Google\Cloud\Vision\V1\PurgeProductsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function PurgeProducts(\Google\Cloud\Vision\V1\PurgeProductsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/PurgeProducts', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchParams.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchParams.php new file mode 100644 index 000000000000..8bf96a779274 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchParams.php @@ -0,0 +1,239 @@ +google.cloud.vision.v1.ProductSearchParams + */ +class ProductSearchParams extends \Google\Protobuf\Internal\Message +{ + /** + * The bounding polygon around the area of interest in the image. + * If it is not specified, system discretion will be applied. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; + */ + protected $bounding_poly = null; + /** + * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + * + * Generated from protobuf field string product_set = 6 [(.google.api.resource_reference) = { + */ + protected $product_set = ''; + /** + * The list of product categories to search in. Currently, we only consider + * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", + * "packagedgoods-v1", or "general-v1" should be specified. The legacy + * categories "homegoods", "apparel", and "toys" are still supported but will + * be deprecated. For new products, please use "homegoods-v2", "apparel-v2", + * or "toys-v2" for better product search accuracy. It is recommended to + * migrate existing products to these categories as well. + * + * Generated from protobuf field repeated string product_categories = 7; + */ + private $product_categories; + /** + * The filtering expression. This can be used to restrict search results based + * on Product labels. We currently support an AND of OR of key-value + * expressions, where each expression within an OR must have the same key. An + * '=' should be used to connect the key and value. + * For example, "(color = red OR color = blue) AND brand = Google" is + * acceptable, but "(color = red OR brand = Google)" is not acceptable. + * "color: red" is not acceptable because it uses a ':' instead of an '='. + * + * Generated from protobuf field string filter = 8; + */ + protected $filter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly + * The bounding polygon around the area of interest in the image. + * If it is not specified, system discretion will be applied. + * @type string $product_set + * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + * @type array|\Google\Protobuf\Internal\RepeatedField $product_categories + * The list of product categories to search in. Currently, we only consider + * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", + * "packagedgoods-v1", or "general-v1" should be specified. The legacy + * categories "homegoods", "apparel", and "toys" are still supported but will + * be deprecated. For new products, please use "homegoods-v2", "apparel-v2", + * or "toys-v2" for better product search accuracy. It is recommended to + * migrate existing products to these categories as well. + * @type string $filter + * The filtering expression. This can be used to restrict search results based + * on Product labels. We currently support an AND of OR of key-value + * expressions, where each expression within an OR must have the same key. An + * '=' should be used to connect the key and value. + * For example, "(color = red OR color = blue) AND brand = Google" is + * acceptable, but "(color = red OR brand = Google)" is not acceptable. + * "color: red" is not acceptable because it uses a ':' instead of an '='. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearch::initOnce(); + parent::__construct($data); + } + + /** + * The bounding polygon around the area of interest in the image. + * If it is not specified, system discretion will be applied. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; + * @return \Google\Cloud\Vision\V1\BoundingPoly|null + */ + public function getBoundingPoly() + { + return $this->bounding_poly; + } + + public function hasBoundingPoly() + { + return isset($this->bounding_poly); + } + + public function clearBoundingPoly() + { + unset($this->bounding_poly); + } + + /** + * The bounding polygon around the area of interest in the image. + * If it is not specified, system discretion will be applied. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; + * @param \Google\Cloud\Vision\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingPoly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->bounding_poly = $var; + + return $this; + } + + /** + * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + * + * Generated from protobuf field string product_set = 6 [(.google.api.resource_reference) = { + * @return string + */ + public function getProductSet() + { + return $this->product_set; + } + + /** + * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + * + * Generated from protobuf field string product_set = 6 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProductSet($var) + { + GPBUtil::checkString($var, True); + $this->product_set = $var; + + return $this; + } + + /** + * The list of product categories to search in. Currently, we only consider + * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", + * "packagedgoods-v1", or "general-v1" should be specified. The legacy + * categories "homegoods", "apparel", and "toys" are still supported but will + * be deprecated. For new products, please use "homegoods-v2", "apparel-v2", + * or "toys-v2" for better product search accuracy. It is recommended to + * migrate existing products to these categories as well. + * + * Generated from protobuf field repeated string product_categories = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProductCategories() + { + return $this->product_categories; + } + + /** + * The list of product categories to search in. Currently, we only consider + * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", + * "packagedgoods-v1", or "general-v1" should be specified. The legacy + * categories "homegoods", "apparel", and "toys" are still supported but will + * be deprecated. For new products, please use "homegoods-v2", "apparel-v2", + * or "toys-v2" for better product search accuracy. It is recommended to + * migrate existing products to these categories as well. + * + * Generated from protobuf field repeated string product_categories = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProductCategories($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->product_categories = $arr; + + return $this; + } + + /** + * The filtering expression. This can be used to restrict search results based + * on Product labels. We currently support an AND of OR of key-value + * expressions, where each expression within an OR must have the same key. An + * '=' should be used to connect the key and value. + * For example, "(color = red OR color = blue) AND brand = Google" is + * acceptable, but "(color = red OR brand = Google)" is not acceptable. + * "color: red" is not acceptable because it uses a ':' instead of an '='. + * + * Generated from protobuf field string filter = 8; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filtering expression. This can be used to restrict search results based + * on Product labels. We currently support an AND of OR of key-value + * expressions, where each expression within an OR must have the same key. An + * '=' should be used to connect the key and value. + * For example, "(color = red OR color = blue) AND brand = Google" is + * acceptable, but "(color = red OR brand = Google)" is not acceptable. + * "color: red" is not acceptable because it uses a ':' instead of an '='. + * + * Generated from protobuf field string filter = 8; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults.php new file mode 100644 index 000000000000..44d025f0d729 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults.php @@ -0,0 +1,165 @@ +google.cloud.vision.v1.ProductSearchResults + */ +class ProductSearchResults extends \Google\Protobuf\Internal\Message +{ + /** + * Timestamp of the index which provided these results. Products added to the + * product set and products removed from the product set after this time are + * not reflected in the current results. + * + * Generated from protobuf field .google.protobuf.Timestamp index_time = 2; + */ + protected $index_time = null; + /** + * List of results, one for each product match. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + private $results; + /** + * List of results grouped by products detected in the query image. Each entry + * corresponds to one bounding polygon in the query image, and contains the + * matching products specific to that region. There may be duplicate product + * matches in the union of all the per-product results. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + private $product_grouped_results; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $index_time + * Timestamp of the index which provided these results. Products added to the + * product set and products removed from the product set after this time are + * not reflected in the current results. + * @type array<\Google\Cloud\Vision\V1\ProductSearchResults\Result>|\Google\Protobuf\Internal\RepeatedField $results + * List of results, one for each product match. + * @type array<\Google\Cloud\Vision\V1\ProductSearchResults\GroupedResult>|\Google\Protobuf\Internal\RepeatedField $product_grouped_results + * List of results grouped by products detected in the query image. Each entry + * corresponds to one bounding polygon in the query image, and contains the + * matching products specific to that region. There may be duplicate product + * matches in the union of all the per-product results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearch::initOnce(); + parent::__construct($data); + } + + /** + * Timestamp of the index which provided these results. Products added to the + * product set and products removed from the product set after this time are + * not reflected in the current results. + * + * Generated from protobuf field .google.protobuf.Timestamp index_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getIndexTime() + { + return $this->index_time; + } + + public function hasIndexTime() + { + return isset($this->index_time); + } + + public function clearIndexTime() + { + unset($this->index_time); + } + + /** + * Timestamp of the index which provided these results. Products added to the + * product set and products removed from the product set after this time are + * not reflected in the current results. + * + * Generated from protobuf field .google.protobuf.Timestamp index_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setIndexTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->index_time = $var; + + return $this; + } + + /** + * List of results, one for each product match. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResults() + { + return $this->results; + } + + /** + * List of results, one for each product match. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + * @param array<\Google\Cloud\Vision\V1\ProductSearchResults\Result>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ProductSearchResults\Result::class); + $this->results = $arr; + + return $this; + } + + /** + * List of results grouped by products detected in the query image. Each entry + * corresponds to one bounding polygon in the query image, and contains the + * matching products specific to that region. There may be duplicate product + * matches in the union of all the per-product results. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProductGroupedResults() + { + return $this->product_grouped_results; + } + + /** + * List of results grouped by products detected in the query image. Each entry + * corresponds to one bounding polygon in the query image, and contains the + * matching products specific to that region. There may be duplicate product + * matches in the union of all the per-product results. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + * @param array<\Google\Cloud\Vision\V1\ProductSearchResults\GroupedResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProductGroupedResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ProductSearchResults\GroupedResult::class); + $this->product_grouped_results = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/GroupedResult.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/GroupedResult.php new file mode 100644 index 000000000000..9066aef0cfdf --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/GroupedResult.php @@ -0,0 +1,149 @@ +google.cloud.vision.v1.ProductSearchResults.GroupedResult + */ +class GroupedResult extends \Google\Protobuf\Internal\Message +{ + /** + * The bounding polygon around the product detected in the query image. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + protected $bounding_poly = null; + /** + * List of results, one for each product match. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + private $results; + /** + * List of generic predictions for the object in the bounding box. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + private $object_annotations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly + * The bounding polygon around the product detected in the query image. + * @type array<\Google\Cloud\Vision\V1\ProductSearchResults\Result>|\Google\Protobuf\Internal\RepeatedField $results + * List of results, one for each product match. + * @type array<\Google\Cloud\Vision\V1\ProductSearchResults\ObjectAnnotation>|\Google\Protobuf\Internal\RepeatedField $object_annotations + * List of generic predictions for the object in the bounding box. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearch::initOnce(); + parent::__construct($data); + } + + /** + * The bounding polygon around the product detected in the query image. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return \Google\Cloud\Vision\V1\BoundingPoly|null + */ + public function getBoundingPoly() + { + return $this->bounding_poly; + } + + public function hasBoundingPoly() + { + return isset($this->bounding_poly); + } + + public function clearBoundingPoly() + { + unset($this->bounding_poly); + } + + /** + * The bounding polygon around the product detected in the query image. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @param \Google\Cloud\Vision\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingPoly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->bounding_poly = $var; + + return $this; + } + + /** + * List of results, one for each product match. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResults() + { + return $this->results; + } + + /** + * List of results, one for each product match. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + * @param array<\Google\Cloud\Vision\V1\ProductSearchResults\Result>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ProductSearchResults\Result::class); + $this->results = $arr; + + return $this; + } + + /** + * List of generic predictions for the object in the bounding box. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getObjectAnnotations() + { + return $this->object_annotations; + } + + /** + * List of generic predictions for the object in the bounding box. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + * @param array<\Google\Cloud\Vision\V1\ProductSearchResults\ObjectAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setObjectAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ProductSearchResults\ObjectAnnotation::class); + $this->object_annotations = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GroupedResult::class, \Google\Cloud\Vision\V1\ProductSearchResults_GroupedResult::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/ObjectAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/ObjectAnnotation.php new file mode 100644 index 000000000000..a8005c3f6b30 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/ObjectAnnotation.php @@ -0,0 +1,180 @@ +google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation + */ +class ObjectAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * Object ID that should align with EntityAnnotation mid. + * + * Generated from protobuf field string mid = 1; + */ + protected $mid = ''; + /** + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 2; + */ + protected $language_code = ''; + /** + * Object name, expressed in its `language_code` language. + * + * Generated from protobuf field string name = 3; + */ + protected $name = ''; + /** + * Score of the result. Range [0, 1]. + * + * Generated from protobuf field float score = 4; + */ + protected $score = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $mid + * Object ID that should align with EntityAnnotation mid. + * @type string $language_code + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * @type string $name + * Object name, expressed in its `language_code` language. + * @type float $score + * Score of the result. Range [0, 1]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearch::initOnce(); + parent::__construct($data); + } + + /** + * Object ID that should align with EntityAnnotation mid. + * + * Generated from protobuf field string mid = 1; + * @return string + */ + public function getMid() + { + return $this->mid; + } + + /** + * Object ID that should align with EntityAnnotation mid. + * + * Generated from protobuf field string mid = 1; + * @param string $var + * @return $this + */ + public function setMid($var) + { + GPBUtil::checkString($var, True); + $this->mid = $var; + + return $this; + } + + /** + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 2; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Object name, expressed in its `language_code` language. + * + * Generated from protobuf field string name = 3; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Object name, expressed in its `language_code` language. + * + * Generated from protobuf field string name = 3; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Score of the result. Range [0, 1]. + * + * Generated from protobuf field float score = 4; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * Score of the result. Range [0, 1]. + * + * Generated from protobuf field float score = 4; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ObjectAnnotation::class, \Google\Cloud\Vision\V1\ProductSearchResults_ObjectAnnotation::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/Result.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/Result.php new file mode 100644 index 000000000000..4fa9d2e05b69 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/Result.php @@ -0,0 +1,156 @@ +google.cloud.vision.v1.ProductSearchResults.Result + */ +class Result extends \Google\Protobuf\Internal\Message +{ + /** + * The Product. + * + * Generated from protobuf field .google.cloud.vision.v1.Product product = 1; + */ + protected $product = null; + /** + * A confidence level on the match, ranging from 0 (no confidence) to + * 1 (full confidence). + * + * Generated from protobuf field float score = 2; + */ + protected $score = 0.0; + /** + * The resource name of the image from the product that is the closest match + * to the query. + * + * Generated from protobuf field string image = 3; + */ + protected $image = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\Product $product + * The Product. + * @type float $score + * A confidence level on the match, ranging from 0 (no confidence) to + * 1 (full confidence). + * @type string $image + * The resource name of the image from the product that is the closest match + * to the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearch::initOnce(); + parent::__construct($data); + } + + /** + * The Product. + * + * Generated from protobuf field .google.cloud.vision.v1.Product product = 1; + * @return \Google\Cloud\Vision\V1\Product|null + */ + public function getProduct() + { + return $this->product; + } + + public function hasProduct() + { + return isset($this->product); + } + + public function clearProduct() + { + unset($this->product); + } + + /** + * The Product. + * + * Generated from protobuf field .google.cloud.vision.v1.Product product = 1; + * @param \Google\Cloud\Vision\V1\Product $var + * @return $this + */ + public function setProduct($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Product::class); + $this->product = $var; + + return $this; + } + + /** + * A confidence level on the match, ranging from 0 (no confidence) to + * 1 (full confidence). + * + * Generated from protobuf field float score = 2; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * A confidence level on the match, ranging from 0 (no confidence) to + * 1 (full confidence). + * + * Generated from protobuf field float score = 2; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * The resource name of the image from the product that is the closest match + * to the query. + * + * Generated from protobuf field string image = 3; + * @return string + */ + public function getImage() + { + return $this->image; + } + + /** + * The resource name of the image from the product that is the closest match + * to the query. + * + * Generated from protobuf field string image = 3; + * @param string $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkString($var, True); + $this->image = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Result::class, \Google\Cloud\Vision\V1\ProductSearchResults_Result::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSet.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSet.php new file mode 100644 index 000000000000..fae1466b47f3 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSet.php @@ -0,0 +1,231 @@ +google.cloud.vision.v1.ProductSet + */ +class ProductSet extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + * This field is ignored when creating a ProductSet. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The user-provided name for this ProductSet. Must not be empty. Must be at + * most 4096 characters long. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Output only. The time at which this ProductSet was last indexed. Query + * results will reflect all updates before this time. If this ProductSet has + * never been indexed, this timestamp is the default value + * "1970-01-01T00:00:00Z". + * This field is ignored when creating a ProductSet. + * + * Generated from protobuf field .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $index_time = null; + /** + * Output only. If there was an error with indexing the product set, the field + * is populated. + * This field is ignored when creating a ProductSet. + * + * Generated from protobuf field .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $index_error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + * This field is ignored when creating a ProductSet. + * @type string $display_name + * The user-provided name for this ProductSet. Must not be empty. Must be at + * most 4096 characters long. + * @type \Google\Protobuf\Timestamp $index_time + * Output only. The time at which this ProductSet was last indexed. Query + * results will reflect all updates before this time. If this ProductSet has + * never been indexed, this timestamp is the default value + * "1970-01-01T00:00:00Z". + * This field is ignored when creating a ProductSet. + * @type \Google\Rpc\Status $index_error + * Output only. If there was an error with indexing the product set, the field + * is populated. + * This field is ignored when creating a ProductSet. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + * This field is ignored when creating a ProductSet. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + * This field is ignored when creating a ProductSet. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The user-provided name for this ProductSet. Must not be empty. Must be at + * most 4096 characters long. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The user-provided name for this ProductSet. Must not be empty. Must be at + * most 4096 characters long. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. The time at which this ProductSet was last indexed. Query + * results will reflect all updates before this time. If this ProductSet has + * never been indexed, this timestamp is the default value + * "1970-01-01T00:00:00Z". + * This field is ignored when creating a ProductSet. + * + * Generated from protobuf field .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getIndexTime() + { + return $this->index_time; + } + + public function hasIndexTime() + { + return isset($this->index_time); + } + + public function clearIndexTime() + { + unset($this->index_time); + } + + /** + * Output only. The time at which this ProductSet was last indexed. Query + * results will reflect all updates before this time. If this ProductSet has + * never been indexed, this timestamp is the default value + * "1970-01-01T00:00:00Z". + * This field is ignored when creating a ProductSet. + * + * Generated from protobuf field .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setIndexTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->index_time = $var; + + return $this; + } + + /** + * Output only. If there was an error with indexing the product set, the field + * is populated. + * This field is ignored when creating a ProductSet. + * + * Generated from protobuf field .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getIndexError() + { + return $this->index_error; + } + + public function hasIndexError() + { + return isset($this->index_error); + } + + public function clearIndexError() + { + unset($this->index_error); + } + + /** + * Output only. If there was an error with indexing the product set, the field + * is populated. + * This field is ignored when creating a ProductSet. + * + * Generated from protobuf field .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setIndexError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->index_error = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSetPurgeConfig.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSetPurgeConfig.php new file mode 100644 index 000000000000..b433c625acb4 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSetPurgeConfig.php @@ -0,0 +1,75 @@ +google.cloud.vision.v1.ProductSetPurgeConfig + */ +class ProductSetPurgeConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The ProductSet that contains the Products to delete. If a Product is a + * member of product_set_id in addition to other ProductSets, the Product will + * still be deleted. + * + * Generated from protobuf field string product_set_id = 1; + */ + protected $product_set_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $product_set_id + * The ProductSet that contains the Products to delete. If a Product is a + * member of product_set_id in addition to other ProductSets, the Product will + * still be deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * The ProductSet that contains the Products to delete. If a Product is a + * member of product_set_id in addition to other ProductSets, the Product will + * still be deleted. + * + * Generated from protobuf field string product_set_id = 1; + * @return string + */ + public function getProductSetId() + { + return $this->product_set_id; + } + + /** + * The ProductSet that contains the Products to delete. If a Product is a + * member of product_set_id in addition to other ProductSets, the Product will + * still be deleted. + * + * Generated from protobuf field string product_set_id = 1; + * @param string $var + * @return $this + */ + public function setProductSetId($var) + { + GPBUtil::checkString($var, True); + $this->product_set_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Property.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Property.php new file mode 100644 index 000000000000..3fb9058b77b0 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Property.php @@ -0,0 +1,135 @@ +google.cloud.vision.v1.Property + */ +class Property extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the property. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Value of the property. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + /** + * Value of numeric properties. + * + * Generated from protobuf field uint64 uint64_value = 3; + */ + protected $uint64_value = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the property. + * @type string $value + * Value of the property. + * @type int|string $uint64_value + * Value of numeric properties. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Name of the property. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the property. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Value of the property. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Value of the property. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + + /** + * Value of numeric properties. + * + * Generated from protobuf field uint64 uint64_value = 3; + * @return int|string + */ + public function getUint64Value() + { + return $this->uint64_value; + } + + /** + * Value of numeric properties. + * + * Generated from protobuf field uint64 uint64_value = 3; + * @param int|string $var + * @return $this + */ + public function setUint64Value($var) + { + GPBUtil::checkUint64($var); + $this->uint64_value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/PurgeProductsRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/PurgeProductsRequest.php new file mode 100644 index 000000000000..9633606d6678 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/PurgeProductsRequest.php @@ -0,0 +1,203 @@ +google.cloud.vision.v1.PurgeProductsRequest + */ +class PurgeProductsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location in which the Products should be deleted. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The default value is false. Override this value to true to actually perform + * the purge. + * + * Generated from protobuf field bool force = 4; + */ + protected $force = false; + protected $target; + + /** + * @param string $parent Required. The project and location in which the Products should be deleted. + * + * Format is `projects/PROJECT_ID/locations/LOC_ID`. Please see + * {@see ProductSearchClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\PurgeProductsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\ProductSetPurgeConfig $product_set_purge_config + * Specify which ProductSet contains the Products to be deleted. + * @type bool $delete_orphan_products + * If delete_orphan_products is true, all Products that are not in any + * ProductSet will be deleted. + * @type string $parent + * Required. The project and location in which the Products should be deleted. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @type bool $force + * The default value is false. Override this value to true to actually perform + * the purge. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Specify which ProductSet contains the Products to be deleted. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; + * @return \Google\Cloud\Vision\V1\ProductSetPurgeConfig|null + */ + public function getProductSetPurgeConfig() + { + return $this->readOneof(2); + } + + public function hasProductSetPurgeConfig() + { + return $this->hasOneof(2); + } + + /** + * Specify which ProductSet contains the Products to be deleted. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; + * @param \Google\Cloud\Vision\V1\ProductSetPurgeConfig $var + * @return $this + */ + public function setProductSetPurgeConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSetPurgeConfig::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * If delete_orphan_products is true, all Products that are not in any + * ProductSet will be deleted. + * + * Generated from protobuf field bool delete_orphan_products = 3; + * @return bool + */ + public function getDeleteOrphanProducts() + { + return $this->readOneof(3); + } + + public function hasDeleteOrphanProducts() + { + return $this->hasOneof(3); + } + + /** + * If delete_orphan_products is true, all Products that are not in any + * ProductSet will be deleted. + * + * Generated from protobuf field bool delete_orphan_products = 3; + * @param bool $var + * @return $this + */ + public function setDeleteOrphanProducts($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Required. The project and location in which the Products should be deleted. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project and location in which the Products should be deleted. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The default value is false. Override this value to true to actually perform + * the purge. + * + * Generated from protobuf field bool force = 4; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * The default value is false. Override this value to true to actually perform + * the purge. + * + * Generated from protobuf field bool force = 4; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + + /** + * @return string + */ + public function getTarget() + { + return $this->whichOneof("target"); + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ReferenceImage.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ReferenceImage.php new file mode 100644 index 000000000000..c5ec6e1a686d --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ReferenceImage.php @@ -0,0 +1,176 @@ +google.cloud.vision.v1.ReferenceImage + */ +class ReferenceImage extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the reference image. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + * This field is ignored when creating a reference image. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The Google Cloud Storage URI of the reference image. + * The URI must start with `gs://`. + * + * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + /** + * Optional. Bounding polygons around the areas of interest in the reference image. + * If this field is empty, the system will try to detect regions of + * interest. At most 10 bounding polygons will be used. + * The provided shape is converted into a non-rotated rectangle. Once + * converted, the small edge of the rectangle must be greater than or equal + * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 + * is not). + * + * Generated from protobuf field repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $bounding_polys; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the reference image. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + * This field is ignored when creating a reference image. + * @type string $uri + * Required. The Google Cloud Storage URI of the reference image. + * The URI must start with `gs://`. + * @type array<\Google\Cloud\Vision\V1\BoundingPoly>|\Google\Protobuf\Internal\RepeatedField $bounding_polys + * Optional. Bounding polygons around the areas of interest in the reference image. + * If this field is empty, the system will try to detect regions of + * interest. At most 10 bounding polygons will be used. + * The provided shape is converted into a non-rotated rectangle. Once + * converted, the small edge of the rectangle must be greater than or equal + * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 + * is not). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the reference image. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + * This field is ignored when creating a reference image. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the reference image. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + * This field is ignored when creating a reference image. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The Google Cloud Storage URI of the reference image. + * The URI must start with `gs://`. + * + * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. The Google Cloud Storage URI of the reference image. + * The URI must start with `gs://`. + * + * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Optional. Bounding polygons around the areas of interest in the reference image. + * If this field is empty, the system will try to detect regions of + * interest. At most 10 bounding polygons will be used. + * The provided shape is converted into a non-rotated rectangle. Once + * converted, the small edge of the rectangle must be greater than or equal + * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 + * is not). + * + * Generated from protobuf field repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBoundingPolys() + { + return $this->bounding_polys; + } + + /** + * Optional. Bounding polygons around the areas of interest in the reference image. + * If this field is empty, the system will try to detect regions of + * interest. At most 10 bounding polygons will be used. + * The provided shape is converted into a non-rotated rectangle. Once + * converted, the small edge of the rectangle must be greater than or equal + * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 + * is not). + * + * Generated from protobuf field repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Vision\V1\BoundingPoly>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBoundingPolys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->bounding_polys = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/RemoveProductFromProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/RemoveProductFromProductSetRequest.php new file mode 100644 index 000000000000..d539e005612b --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/RemoveProductFromProductSetRequest.php @@ -0,0 +1,140 @@ +google.cloud.vision.v1.RemoveProductFromProductSetRequest + */ +class RemoveProductFromProductSetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The resource name for the Product to be removed from this ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * + * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $product = ''; + + /** + * @param string $name Required. The resource name for the ProductSet to modify. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. + * @param string $product Required. The resource name for the Product to be removed from this ProductSet. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * Please see {@see ProductSearchClient::productName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\RemoveProductFromProductSetRequest + * + * @experimental + */ + public static function build(string $name, string $product): self + { + return (new self()) + ->setName($name) + ->setProduct($product); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @type string $product + * Required. The resource name for the Product to be removed from this ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The resource name for the Product to be removed from this ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * + * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getProduct() + { + return $this->product; + } + + /** + * Required. The resource name for the Product to be removed from this ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * + * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProduct($var) + { + GPBUtil::checkString($var, True); + $this->product = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/SafeSearchAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/SafeSearchAnnotation.php new file mode 100644 index 000000000000..d04921c5a8b8 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/SafeSearchAnnotation.php @@ -0,0 +1,233 @@ +google.cloud.vision.v1.SafeSearchAnnotation + */ +class SafeSearchAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * Represents the adult content likelihood for the image. Adult content may + * contain elements such as nudity, pornographic images or cartoons, or + * sexual activities. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood adult = 1; + */ + protected $adult = 0; + /** + * Spoof likelihood. The likelihood that an modification + * was made to the image's canonical version to make it appear + * funny or offensive. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood spoof = 2; + */ + protected $spoof = 0; + /** + * Likelihood that this is a medical image. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood medical = 3; + */ + protected $medical = 0; + /** + * Likelihood that this image contains violent content. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood violence = 4; + */ + protected $violence = 0; + /** + * Likelihood that the request image contains racy content. Racy content may + * include (but is not limited to) skimpy or sheer clothing, strategically + * covered nudity, lewd or provocative poses, or close-ups of sensitive + * body areas. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood racy = 9; + */ + protected $racy = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $adult + * Represents the adult content likelihood for the image. Adult content may + * contain elements such as nudity, pornographic images or cartoons, or + * sexual activities. + * @type int $spoof + * Spoof likelihood. The likelihood that an modification + * was made to the image's canonical version to make it appear + * funny or offensive. + * @type int $medical + * Likelihood that this is a medical image. + * @type int $violence + * Likelihood that this image contains violent content. + * @type int $racy + * Likelihood that the request image contains racy content. Racy content may + * include (but is not limited to) skimpy or sheer clothing, strategically + * covered nudity, lewd or provocative poses, or close-ups of sensitive + * body areas. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Represents the adult content likelihood for the image. Adult content may + * contain elements such as nudity, pornographic images or cartoons, or + * sexual activities. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood adult = 1; + * @return int + */ + public function getAdult() + { + return $this->adult; + } + + /** + * Represents the adult content likelihood for the image. Adult content may + * contain elements such as nudity, pornographic images or cartoons, or + * sexual activities. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood adult = 1; + * @param int $var + * @return $this + */ + public function setAdult($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->adult = $var; + + return $this; + } + + /** + * Spoof likelihood. The likelihood that an modification + * was made to the image's canonical version to make it appear + * funny or offensive. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood spoof = 2; + * @return int + */ + public function getSpoof() + { + return $this->spoof; + } + + /** + * Spoof likelihood. The likelihood that an modification + * was made to the image's canonical version to make it appear + * funny or offensive. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood spoof = 2; + * @param int $var + * @return $this + */ + public function setSpoof($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->spoof = $var; + + return $this; + } + + /** + * Likelihood that this is a medical image. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood medical = 3; + * @return int + */ + public function getMedical() + { + return $this->medical; + } + + /** + * Likelihood that this is a medical image. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood medical = 3; + * @param int $var + * @return $this + */ + public function setMedical($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->medical = $var; + + return $this; + } + + /** + * Likelihood that this image contains violent content. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood violence = 4; + * @return int + */ + public function getViolence() + { + return $this->violence; + } + + /** + * Likelihood that this image contains violent content. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood violence = 4; + * @param int $var + * @return $this + */ + public function setViolence($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->violence = $var; + + return $this; + } + + /** + * Likelihood that the request image contains racy content. Racy content may + * include (but is not limited to) skimpy or sheer clothing, strategically + * covered nudity, lewd or provocative poses, or close-ups of sensitive + * body areas. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood racy = 9; + * @return int + */ + public function getRacy() + { + return $this->racy; + } + + /** + * Likelihood that the request image contains racy content. Racy content may + * include (but is not limited to) skimpy or sheer clothing, strategically + * covered nudity, lewd or provocative poses, or close-ups of sensitive + * body areas. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood racy = 9; + * @param int $var + * @return $this + */ + public function setRacy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->racy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Symbol.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Symbol.php new file mode 100644 index 000000000000..4fe27114775f --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Symbol.php @@ -0,0 +1,245 @@ +google.cloud.vision.v1.Symbol + */ +class Symbol extends \Google\Protobuf\Internal\Message +{ + /** + * Additional information detected for the symbol. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + protected $property = null; + /** + * The bounding box for the symbol. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + protected $bounding_box = null; + /** + * The actual UTF-8 representation of the symbol. + * + * Generated from protobuf field string text = 3; + */ + protected $text = ''; + /** + * Confidence of the OCR results for the symbol. Range [0, 1]. + * + * Generated from protobuf field float confidence = 4; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $property + * Additional information detected for the symbol. + * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_box + * The bounding box for the symbol. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * @type string $text + * The actual UTF-8 representation of the symbol. + * @type float $confidence + * Confidence of the OCR results for the symbol. Range [0, 1]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); + parent::__construct($data); + } + + /** + * Additional information detected for the symbol. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return \Google\Cloud\Vision\V1\TextAnnotation\TextProperty|null + */ + public function getProperty() + { + return $this->property; + } + + public function hasProperty() + { + return isset($this->property); + } + + public function clearProperty() + { + unset($this->property); + } + + /** + * Additional information detected for the symbol. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @param \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $var + * @return $this + */ + public function setProperty($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\TextProperty::class); + $this->property = $var; + + return $this; + } + + /** + * The bounding box for the symbol. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return \Google\Cloud\Vision\V1\BoundingPoly|null + */ + public function getBoundingBox() + { + return $this->bounding_box; + } + + public function hasBoundingBox() + { + return isset($this->bounding_box); + } + + public function clearBoundingBox() + { + unset($this->bounding_box); + } + + /** + * The bounding box for the symbol. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @param \Google\Cloud\Vision\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingBox($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->bounding_box = $var; + + return $this; + } + + /** + * The actual UTF-8 representation of the symbol. + * + * Generated from protobuf field string text = 3; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * The actual UTF-8 representation of the symbol. + * + * Generated from protobuf field string text = 3; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * Confidence of the OCR results for the symbol. Range [0, 1]. + * + * Generated from protobuf field float confidence = 4; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Confidence of the OCR results for the symbol. Range [0, 1]. + * + * Generated from protobuf field float confidence = 4; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation.php new file mode 100644 index 000000000000..b9449e3014dc --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation.php @@ -0,0 +1,107 @@ + Page -> Block -> Paragraph -> Word -> Symbol + * Each structural component, starting from Page, may further have their own + * properties. Properties describe detected languages, breaks etc.. Please refer + * to the [TextAnnotation.TextProperty][google.cloud.vision.v1.TextAnnotation.TextProperty] message definition below for more + * detail. + * + * Generated from protobuf message google.cloud.vision.v1.TextAnnotation + */ +class TextAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * List of pages detected by OCR. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Page pages = 1; + */ + private $pages; + /** + * UTF-8 text detected on the pages. + * + * Generated from protobuf field string text = 2; + */ + protected $text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\Page>|\Google\Protobuf\Internal\RepeatedField $pages + * List of pages detected by OCR. + * @type string $text + * UTF-8 text detected on the pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); + parent::__construct($data); + } + + /** + * List of pages detected by OCR. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Page pages = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPages() + { + return $this->pages; + } + + /** + * List of pages detected by OCR. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Page pages = 1; + * @param array<\Google\Cloud\Vision\V1\Page>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Page::class); + $this->pages = $arr; + + return $this; + } + + /** + * UTF-8 text detected on the pages. + * + * Generated from protobuf field string text = 2; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * UTF-8 text detected on the pages. + * + * Generated from protobuf field string text = 2; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak.php new file mode 100644 index 000000000000..7844b2387083 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak.php @@ -0,0 +1,104 @@ +google.cloud.vision.v1.TextAnnotation.DetectedBreak + */ +class DetectedBreak extends \Google\Protobuf\Internal\Message +{ + /** + * Detected break type. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; + */ + protected $type = 0; + /** + * True if break prepends the element. + * + * Generated from protobuf field bool is_prefix = 2; + */ + protected $is_prefix = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Detected break type. + * @type bool $is_prefix + * True if break prepends the element. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); + parent::__construct($data); + } + + /** + * Detected break type. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Detected break type. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\TextAnnotation\DetectedBreak\BreakType::class); + $this->type = $var; + + return $this; + } + + /** + * True if break prepends the element. + * + * Generated from protobuf field bool is_prefix = 2; + * @return bool + */ + public function getIsPrefix() + { + return $this->is_prefix; + } + + /** + * True if break prepends the element. + * + * Generated from protobuf field bool is_prefix = 2; + * @param bool $var + * @return $this + */ + public function setIsPrefix($var) + { + GPBUtil::checkBool($var); + $this->is_prefix = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DetectedBreak::class, \Google\Cloud\Vision\V1\TextAnnotation_DetectedBreak::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak/BreakType.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak/BreakType.php new file mode 100644 index 000000000000..455626c48545 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak/BreakType.php @@ -0,0 +1,86 @@ +google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType + */ +class BreakType +{ + /** + * Unknown break label type. + * + * Generated from protobuf enum UNKNOWN = 0; + */ + const UNKNOWN = 0; + /** + * Regular space. + * + * Generated from protobuf enum SPACE = 1; + */ + const SPACE = 1; + /** + * Sure space (very wide). + * + * Generated from protobuf enum SURE_SPACE = 2; + */ + const SURE_SPACE = 2; + /** + * Line-wrapping break. + * + * Generated from protobuf enum EOL_SURE_SPACE = 3; + */ + const EOL_SURE_SPACE = 3; + /** + * End-line hyphen that is not present in text; does not co-occur with + * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`. + * + * Generated from protobuf enum HYPHEN = 4; + */ + const HYPHEN = 4; + /** + * Line break that ends a paragraph. + * + * Generated from protobuf enum LINE_BREAK = 5; + */ + const LINE_BREAK = 5; + + private static $valueToName = [ + self::UNKNOWN => 'UNKNOWN', + self::SPACE => 'SPACE', + self::SURE_SPACE => 'SURE_SPACE', + self::EOL_SURE_SPACE => 'EOL_SURE_SPACE', + self::HYPHEN => 'HYPHEN', + self::LINE_BREAK => 'LINE_BREAK', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BreakType::class, \Google\Cloud\Vision\V1\TextAnnotation_DetectedBreak_BreakType::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedLanguage.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedLanguage.php new file mode 100644 index 000000000000..d2c4a7623404 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedLanguage.php @@ -0,0 +1,112 @@ +google.cloud.vision.v1.TextAnnotation.DetectedLanguage + */ +class DetectedLanguage extends \Google\Protobuf\Internal\Message +{ + /** + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 1; + */ + protected $language_code = ''; + /** + * Confidence of detected language. Range [0, 1]. + * + * Generated from protobuf field float confidence = 2; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $language_code + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * @type float $confidence + * Confidence of detected language. Range [0, 1]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); + parent::__construct($data); + } + + /** + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 1; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 1; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Confidence of detected language. Range [0, 1]. + * + * Generated from protobuf field float confidence = 2; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Confidence of detected language. Range [0, 1]. + * + * Generated from protobuf field float confidence = 2; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DetectedLanguage::class, \Google\Cloud\Vision\V1\TextAnnotation_DetectedLanguage::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/TextProperty.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/TextProperty.php new file mode 100644 index 000000000000..3dbed38cafb6 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/TextProperty.php @@ -0,0 +1,114 @@ +google.cloud.vision.v1.TextAnnotation.TextProperty + */ +class TextProperty extends \Google\Protobuf\Internal\Message +{ + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + private $detected_languages; + /** + * Detected start or end of a text segment. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; + */ + protected $detected_break = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\TextAnnotation\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $detected_languages + * A list of detected languages together with confidence. + * @type \Google\Cloud\Vision\V1\TextAnnotation\DetectedBreak $detected_break + * Detected start or end of a text segment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); + parent::__construct($data); + } + + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDetectedLanguages() + { + return $this->detected_languages; + } + + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + * @param array<\Google\Cloud\Vision\V1\TextAnnotation\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDetectedLanguages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\TextAnnotation\DetectedLanguage::class); + $this->detected_languages = $arr; + + return $this; + } + + /** + * Detected start or end of a text segment. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; + * @return \Google\Cloud\Vision\V1\TextAnnotation\DetectedBreak|null + */ + public function getDetectedBreak() + { + return $this->detected_break; + } + + public function hasDetectedBreak() + { + return isset($this->detected_break); + } + + public function clearDetectedBreak() + { + unset($this->detected_break); + } + + /** + * Detected start or end of a text segment. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; + * @param \Google\Cloud\Vision\V1\TextAnnotation\DetectedBreak $var + * @return $this + */ + public function setDetectedBreak($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\DetectedBreak::class); + $this->detected_break = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TextProperty::class, \Google\Cloud\Vision\V1\TextAnnotation_TextProperty::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextDetectionParams.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextDetectionParams.php new file mode 100644 index 000000000000..49aa253b71bb --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextDetectionParams.php @@ -0,0 +1,110 @@ +google.cloud.vision.v1.TextDetectionParams + */ +class TextDetectionParams extends \Google\Protobuf\Internal\Message +{ + /** + * By default, Cloud Vision API only includes confidence score for + * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence + * score for TEXT_DETECTION as well. + * + * Generated from protobuf field bool enable_text_detection_confidence_score = 9; + */ + protected $enable_text_detection_confidence_score = false; + /** + * A list of advanced OCR options to fine-tune OCR behavior. + * + * Generated from protobuf field repeated string advanced_ocr_options = 11; + */ + private $advanced_ocr_options; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_text_detection_confidence_score + * By default, Cloud Vision API only includes confidence score for + * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence + * score for TEXT_DETECTION as well. + * @type array|\Google\Protobuf\Internal\RepeatedField $advanced_ocr_options + * A list of advanced OCR options to fine-tune OCR behavior. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * By default, Cloud Vision API only includes confidence score for + * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence + * score for TEXT_DETECTION as well. + * + * Generated from protobuf field bool enable_text_detection_confidence_score = 9; + * @return bool + */ + public function getEnableTextDetectionConfidenceScore() + { + return $this->enable_text_detection_confidence_score; + } + + /** + * By default, Cloud Vision API only includes confidence score for + * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence + * score for TEXT_DETECTION as well. + * + * Generated from protobuf field bool enable_text_detection_confidence_score = 9; + * @param bool $var + * @return $this + */ + public function setEnableTextDetectionConfidenceScore($var) + { + GPBUtil::checkBool($var); + $this->enable_text_detection_confidence_score = $var; + + return $this; + } + + /** + * A list of advanced OCR options to fine-tune OCR behavior. + * + * Generated from protobuf field repeated string advanced_ocr_options = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdvancedOcrOptions() + { + return $this->advanced_ocr_options; + } + + /** + * A list of advanced OCR options to fine-tune OCR behavior. + * + * Generated from protobuf field repeated string advanced_ocr_options = 11; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdvancedOcrOptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->advanced_ocr_options = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductRequest.php new file mode 100644 index 000000000000..91ab72f3f77e --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductRequest.php @@ -0,0 +1,161 @@ +google.cloud.vision.v1.UpdateProductRequest + */ +class UpdateProductRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Product resource which replaces the one on the server. + * product.name is immutable. + * + * Generated from protobuf field .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $product = null; + /** + * The [FieldMask][google.protobuf.FieldMask] that specifies which fields + * to update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask paths include `product_labels`, `display_name`, and + * `description`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Vision\V1\Product $product Required. The Product resource which replaces the one on the server. + * product.name is immutable. + * @param \Google\Protobuf\FieldMask $updateMask The [FieldMask][google.protobuf.FieldMask] that specifies which fields + * to update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask paths include `product_labels`, `display_name`, and + * `description`. + * + * @return \Google\Cloud\Vision\V1\UpdateProductRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Vision\V1\Product $product, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setProduct($product) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\Product $product + * Required. The Product resource which replaces the one on the server. + * product.name is immutable. + * @type \Google\Protobuf\FieldMask $update_mask + * The [FieldMask][google.protobuf.FieldMask] that specifies which fields + * to update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask paths include `product_labels`, `display_name`, and + * `description`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Product resource which replaces the one on the server. + * product.name is immutable. + * + * Generated from protobuf field .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Vision\V1\Product|null + */ + public function getProduct() + { + return $this->product; + } + + public function hasProduct() + { + return isset($this->product); + } + + public function clearProduct() + { + unset($this->product); + } + + /** + * Required. The Product resource which replaces the one on the server. + * product.name is immutable. + * + * Generated from protobuf field .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Vision\V1\Product $var + * @return $this + */ + public function setProduct($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Product::class); + $this->product = $var; + + return $this; + } + + /** + * The [FieldMask][google.protobuf.FieldMask] that specifies which fields + * to update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask paths include `product_labels`, `display_name`, and + * `description`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The [FieldMask][google.protobuf.FieldMask] that specifies which fields + * to update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask paths include `product_labels`, `display_name`, and + * `description`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductSetRequest.php new file mode 100644 index 000000000000..f3efd0e6405a --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductSetRequest.php @@ -0,0 +1,151 @@ +google.cloud.vision.v1.UpdateProductSetRequest + */ +class UpdateProductSetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ProductSet resource which replaces the one on the server. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $product_set = null; + /** + * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to + * update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask path is `display_name`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Vision\V1\ProductSet $productSet Required. The ProductSet resource which replaces the one on the server. + * @param \Google\Protobuf\FieldMask $updateMask The [FieldMask][google.protobuf.FieldMask] that specifies which fields to + * update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask path is `display_name`. + * + * @return \Google\Cloud\Vision\V1\UpdateProductSetRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Vision\V1\ProductSet $productSet, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setProductSet($productSet) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\ProductSet $product_set + * Required. The ProductSet resource which replaces the one on the server. + * @type \Google\Protobuf\FieldMask $update_mask + * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to + * update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask path is `display_name`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ProductSet resource which replaces the one on the server. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Vision\V1\ProductSet|null + */ + public function getProductSet() + { + return $this->product_set; + } + + public function hasProductSet() + { + return isset($this->product_set); + } + + public function clearProductSet() + { + unset($this->product_set); + } + + /** + * Required. The ProductSet resource which replaces the one on the server. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Vision\V1\ProductSet $var + * @return $this + */ + public function setProductSet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSet::class); + $this->product_set = $var; + + return $this; + } + + /** + * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to + * update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask path is `display_name`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to + * update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask path is `display_name`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Vertex.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Vertex.php new file mode 100644 index 000000000000..2944b434c7a6 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Vertex.php @@ -0,0 +1,102 @@ +google.cloud.vision.v1.Vertex + */ +class Vertex extends \Google\Protobuf\Internal\Message +{ + /** + * X coordinate. + * + * Generated from protobuf field int32 x = 1; + */ + protected $x = 0; + /** + * Y coordinate. + * + * Generated from protobuf field int32 y = 2; + */ + protected $y = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $x + * X coordinate. + * @type int $y + * Y coordinate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\Geometry::initOnce(); + parent::__construct($data); + } + + /** + * X coordinate. + * + * Generated from protobuf field int32 x = 1; + * @return int + */ + public function getX() + { + return $this->x; + } + + /** + * X coordinate. + * + * Generated from protobuf field int32 x = 1; + * @param int $var + * @return $this + */ + public function setX($var) + { + GPBUtil::checkInt32($var); + $this->x = $var; + + return $this; + } + + /** + * Y coordinate. + * + * Generated from protobuf field int32 y = 2; + * @return int + */ + public function getY() + { + return $this->y; + } + + /** + * Y coordinate. + * + * Generated from protobuf field int32 y = 2; + * @param int $var + * @return $this + */ + public function setY($var) + { + GPBUtil::checkInt32($var); + $this->y = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection.php new file mode 100644 index 000000000000..7210409bd479 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection.php @@ -0,0 +1,253 @@ +google.cloud.vision.v1.WebDetection + */ +class WebDetection extends \Google\Protobuf\Internal\Message +{ + /** + * Deduced entities from similar images on the Internet. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + private $web_entities; + /** + * Fully matching images from the Internet. + * Can include resized copies of the query image. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + private $full_matching_images; + /** + * Partial matching images from the Internet. + * Those images are similar enough to share some key-point features. For + * example an original image will likely have partial matching for its crops. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + private $partial_matching_images; + /** + * Web pages containing the matching images from the Internet. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + private $pages_with_matching_images; + /** + * The visually similar image results. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + private $visually_similar_images; + /** + * The service's best guess as to the topic of the request image. + * Inferred from similar images on the open web. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + private $best_guess_labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\WebDetection\WebEntity>|\Google\Protobuf\Internal\RepeatedField $web_entities + * Deduced entities from similar images on the Internet. + * @type array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $full_matching_images + * Fully matching images from the Internet. + * Can include resized copies of the query image. + * @type array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $partial_matching_images + * Partial matching images from the Internet. + * Those images are similar enough to share some key-point features. For + * example an original image will likely have partial matching for its crops. + * @type array<\Google\Cloud\Vision\V1\WebDetection\WebPage>|\Google\Protobuf\Internal\RepeatedField $pages_with_matching_images + * Web pages containing the matching images from the Internet. + * @type array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $visually_similar_images + * The visually similar image results. + * @type array<\Google\Cloud\Vision\V1\WebDetection\WebLabel>|\Google\Protobuf\Internal\RepeatedField $best_guess_labels + * The service's best guess as to the topic of the request image. + * Inferred from similar images on the open web. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\WebDetection::initOnce(); + parent::__construct($data); + } + + /** + * Deduced entities from similar images on the Internet. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWebEntities() + { + return $this->web_entities; + } + + /** + * Deduced entities from similar images on the Internet. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + * @param array<\Google\Cloud\Vision\V1\WebDetection\WebEntity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWebEntities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebEntity::class); + $this->web_entities = $arr; + + return $this; + } + + /** + * Fully matching images from the Internet. + * Can include resized copies of the query image. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFullMatchingImages() + { + return $this->full_matching_images; + } + + /** + * Fully matching images from the Internet. + * Can include resized copies of the query image. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + * @param array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFullMatchingImages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); + $this->full_matching_images = $arr; + + return $this; + } + + /** + * Partial matching images from the Internet. + * Those images are similar enough to share some key-point features. For + * example an original image will likely have partial matching for its crops. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPartialMatchingImages() + { + return $this->partial_matching_images; + } + + /** + * Partial matching images from the Internet. + * Those images are similar enough to share some key-point features. For + * example an original image will likely have partial matching for its crops. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + * @param array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPartialMatchingImages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); + $this->partial_matching_images = $arr; + + return $this; + } + + /** + * Web pages containing the matching images from the Internet. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPagesWithMatchingImages() + { + return $this->pages_with_matching_images; + } + + /** + * Web pages containing the matching images from the Internet. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + * @param array<\Google\Cloud\Vision\V1\WebDetection\WebPage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPagesWithMatchingImages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebPage::class); + $this->pages_with_matching_images = $arr; + + return $this; + } + + /** + * The visually similar image results. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVisuallySimilarImages() + { + return $this->visually_similar_images; + } + + /** + * The visually similar image results. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + * @param array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVisuallySimilarImages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); + $this->visually_similar_images = $arr; + + return $this; + } + + /** + * The service's best guess as to the topic of the request image. + * Inferred from similar images on the open web. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBestGuessLabels() + { + return $this->best_guess_labels; + } + + /** + * The service's best guess as to the topic of the request image. + * Inferred from similar images on the open web. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + * @param array<\Google\Cloud\Vision\V1\WebDetection\WebLabel>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBestGuessLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebLabel::class); + $this->best_guess_labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebEntity.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebEntity.php new file mode 100644 index 000000000000..7ed5190c9507 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebEntity.php @@ -0,0 +1,142 @@ +google.cloud.vision.v1.WebDetection.WebEntity + */ +class WebEntity extends \Google\Protobuf\Internal\Message +{ + /** + * Opaque entity ID. + * + * Generated from protobuf field string entity_id = 1; + */ + protected $entity_id = ''; + /** + * Overall relevancy score for the entity. + * Not normalized and not comparable across different image queries. + * + * Generated from protobuf field float score = 2; + */ + protected $score = 0.0; + /** + * Canonical description of the entity, in English. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $entity_id + * Opaque entity ID. + * @type float $score + * Overall relevancy score for the entity. + * Not normalized and not comparable across different image queries. + * @type string $description + * Canonical description of the entity, in English. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\WebDetection::initOnce(); + parent::__construct($data); + } + + /** + * Opaque entity ID. + * + * Generated from protobuf field string entity_id = 1; + * @return string + */ + public function getEntityId() + { + return $this->entity_id; + } + + /** + * Opaque entity ID. + * + * Generated from protobuf field string entity_id = 1; + * @param string $var + * @return $this + */ + public function setEntityId($var) + { + GPBUtil::checkString($var, True); + $this->entity_id = $var; + + return $this; + } + + /** + * Overall relevancy score for the entity. + * Not normalized and not comparable across different image queries. + * + * Generated from protobuf field float score = 2; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * Overall relevancy score for the entity. + * Not normalized and not comparable across different image queries. + * + * Generated from protobuf field float score = 2; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Canonical description of the entity, in English. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Canonical description of the entity, in English. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WebEntity::class, \Google\Cloud\Vision\V1\WebDetection_WebEntity::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebImage.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebImage.php new file mode 100644 index 000000000000..0a74c6f6392c --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebImage.php @@ -0,0 +1,104 @@ +google.cloud.vision.v1.WebDetection.WebImage + */ +class WebImage extends \Google\Protobuf\Internal\Message +{ + /** + * The result image URL. + * + * Generated from protobuf field string url = 1; + */ + protected $url = ''; + /** + * (Deprecated) Overall relevancy score for the image. + * + * Generated from protobuf field float score = 2; + */ + protected $score = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * The result image URL. + * @type float $score + * (Deprecated) Overall relevancy score for the image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\WebDetection::initOnce(); + parent::__construct($data); + } + + /** + * The result image URL. + * + * Generated from protobuf field string url = 1; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * The result image URL. + * + * Generated from protobuf field string url = 1; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + + /** + * (Deprecated) Overall relevancy score for the image. + * + * Generated from protobuf field float score = 2; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * (Deprecated) Overall relevancy score for the image. + * + * Generated from protobuf field float score = 2; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WebImage::class, \Google\Cloud\Vision\V1\WebDetection_WebImage::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebLabel.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebLabel.php new file mode 100644 index 000000000000..455b38bf8f91 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebLabel.php @@ -0,0 +1,112 @@ +google.cloud.vision.v1.WebDetection.WebLabel + */ +class WebLabel extends \Google\Protobuf\Internal\Message +{ + /** + * Label for extra metadata. + * + * Generated from protobuf field string label = 1; + */ + protected $label = ''; + /** + * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". + * For more information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 2; + */ + protected $language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $label + * Label for extra metadata. + * @type string $language_code + * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". + * For more information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\WebDetection::initOnce(); + parent::__construct($data); + } + + /** + * Label for extra metadata. + * + * Generated from protobuf field string label = 1; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Label for extra metadata. + * + * Generated from protobuf field string label = 1; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". + * For more information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". + * For more information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 2; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WebLabel::class, \Google\Cloud\Vision\V1\WebDetection_WebLabel::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebPage.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebPage.php new file mode 100644 index 000000000000..a7ebc3422453 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebPage.php @@ -0,0 +1,222 @@ +google.cloud.vision.v1.WebDetection.WebPage + */ +class WebPage extends \Google\Protobuf\Internal\Message +{ + /** + * The result web page URL. + * + * Generated from protobuf field string url = 1; + */ + protected $url = ''; + /** + * (Deprecated) Overall relevancy score for the web page. + * + * Generated from protobuf field float score = 2; + */ + protected $score = 0.0; + /** + * Title for the web page, may contain HTML markups. + * + * Generated from protobuf field string page_title = 3; + */ + protected $page_title = ''; + /** + * Fully matching images on the page. + * Can include resized copies of the query image. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + private $full_matching_images; + /** + * Partial matching images on the page. + * Those images are similar enough to share some key-point features. For + * example an original image will likely have partial matching for its + * crops. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + private $partial_matching_images; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * The result web page URL. + * @type float $score + * (Deprecated) Overall relevancy score for the web page. + * @type string $page_title + * Title for the web page, may contain HTML markups. + * @type array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $full_matching_images + * Fully matching images on the page. + * Can include resized copies of the query image. + * @type array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $partial_matching_images + * Partial matching images on the page. + * Those images are similar enough to share some key-point features. For + * example an original image will likely have partial matching for its + * crops. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\WebDetection::initOnce(); + parent::__construct($data); + } + + /** + * The result web page URL. + * + * Generated from protobuf field string url = 1; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * The result web page URL. + * + * Generated from protobuf field string url = 1; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + + /** + * (Deprecated) Overall relevancy score for the web page. + * + * Generated from protobuf field float score = 2; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * (Deprecated) Overall relevancy score for the web page. + * + * Generated from protobuf field float score = 2; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Title for the web page, may contain HTML markups. + * + * Generated from protobuf field string page_title = 3; + * @return string + */ + public function getPageTitle() + { + return $this->page_title; + } + + /** + * Title for the web page, may contain HTML markups. + * + * Generated from protobuf field string page_title = 3; + * @param string $var + * @return $this + */ + public function setPageTitle($var) + { + GPBUtil::checkString($var, True); + $this->page_title = $var; + + return $this; + } + + /** + * Fully matching images on the page. + * Can include resized copies of the query image. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFullMatchingImages() + { + return $this->full_matching_images; + } + + /** + * Fully matching images on the page. + * Can include resized copies of the query image. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + * @param array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFullMatchingImages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); + $this->full_matching_images = $arr; + + return $this; + } + + /** + * Partial matching images on the page. + * Those images are similar enough to share some key-point features. For + * example an original image will likely have partial matching for its + * crops. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPartialMatchingImages() + { + return $this->partial_matching_images; + } + + /** + * Partial matching images on the page. + * Those images are similar enough to share some key-point features. For + * example an original image will likely have partial matching for its + * crops. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + * @param array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPartialMatchingImages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); + $this->partial_matching_images = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WebPage::class, \Google\Cloud\Vision\V1\WebDetection_WebPage::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetectionParams.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetectionParams.php new file mode 100644 index 000000000000..586162fd8928 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetectionParams.php @@ -0,0 +1,67 @@ +google.cloud.vision.v1.WebDetectionParams + */ +class WebDetectionParams extends \Google\Protobuf\Internal\Message +{ + /** + * Whether to include results derived from the geo information in the image. + * + * Generated from protobuf field bool include_geo_results = 2; + */ + protected $include_geo_results = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $include_geo_results + * Whether to include results derived from the geo information in the image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Whether to include results derived from the geo information in the image. + * + * Generated from protobuf field bool include_geo_results = 2; + * @return bool + */ + public function getIncludeGeoResults() + { + return $this->include_geo_results; + } + + /** + * Whether to include results derived from the geo information in the image. + * + * Generated from protobuf field bool include_geo_results = 2; + * @param bool $var + * @return $this + */ + public function setIncludeGeoResults($var) + { + GPBUtil::checkBool($var); + $this->include_geo_results = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Word.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Word.php new file mode 100644 index 000000000000..e753e3772569 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Word.php @@ -0,0 +1,249 @@ +google.cloud.vision.v1.Word + */ +class Word extends \Google\Protobuf\Internal\Message +{ + /** + * Additional information detected for the word. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + protected $property = null; + /** + * The bounding box for the word. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + protected $bounding_box = null; + /** + * List of symbols in the word. + * The order of the symbols follows the natural reading order. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + private $symbols; + /** + * Confidence of the OCR results for the word. Range [0, 1]. + * + * Generated from protobuf field float confidence = 4; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $property + * Additional information detected for the word. + * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_box + * The bounding box for the word. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * @type array<\Google\Cloud\Vision\V1\Symbol>|\Google\Protobuf\Internal\RepeatedField $symbols + * List of symbols in the word. + * The order of the symbols follows the natural reading order. + * @type float $confidence + * Confidence of the OCR results for the word. Range [0, 1]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); + parent::__construct($data); + } + + /** + * Additional information detected for the word. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return \Google\Cloud\Vision\V1\TextAnnotation\TextProperty|null + */ + public function getProperty() + { + return $this->property; + } + + public function hasProperty() + { + return isset($this->property); + } + + public function clearProperty() + { + unset($this->property); + } + + /** + * Additional information detected for the word. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @param \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $var + * @return $this + */ + public function setProperty($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\TextProperty::class); + $this->property = $var; + + return $this; + } + + /** + * The bounding box for the word. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return \Google\Cloud\Vision\V1\BoundingPoly|null + */ + public function getBoundingBox() + { + return $this->bounding_box; + } + + public function hasBoundingBox() + { + return isset($this->bounding_box); + } + + public function clearBoundingBox() + { + unset($this->bounding_box); + } + + /** + * The bounding box for the word. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @param \Google\Cloud\Vision\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingBox($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->bounding_box = $var; + + return $this; + } + + /** + * List of symbols in the word. + * The order of the symbols follows the natural reading order. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Symbol symbols = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSymbols() + { + return $this->symbols; + } + + /** + * List of symbols in the word. + * The order of the symbols follows the natural reading order. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Symbol symbols = 3; + * @param array<\Google\Cloud\Vision\V1\Symbol>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSymbols($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Symbol::class); + $this->symbols = $arr; + + return $this; + } + + /** + * Confidence of the OCR results for the word. Range [0, 1]. + * + * Generated from protobuf field float confidence = 4; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Confidence of the OCR results for the word. Range [0, 1]. + * + * Generated from protobuf field float confidence = 4; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_files.php b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_files.php new file mode 100644 index 000000000000..081ca3b1a85b --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_files.php @@ -0,0 +1,74 @@ +asyncBatchAnnotateFiles($requests); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AsyncBatchAnnotateFilesResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_images.php b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_images.php new file mode 100644 index 000000000000..377f30c09d05 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_images.php @@ -0,0 +1,79 @@ +asyncBatchAnnotateImages($requests, $outputConfig); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AsyncBatchAnnotateImagesResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateImages_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_files.php b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_files.php new file mode 100644 index 000000000000..9d87ae097455 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_files.php @@ -0,0 +1,63 @@ +batchAnnotateFiles($requests); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END vision_v1_generated_ImageAnnotator_BatchAnnotateFiles_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_images.php b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_images.php new file mode 100644 index 000000000000..6731ba9d6c66 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_images.php @@ -0,0 +1,57 @@ +batchAnnotateImages($requests); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END vision_v1_generated_ImageAnnotator_BatchAnnotateImages_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/add_product_to_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/add_product_to_product_set.php new file mode 100644 index 000000000000..fb4b0504cea6 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/add_product_to_product_set.php @@ -0,0 +1,80 @@ +addProductToProductSet($formattedName, $formattedProduct); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ProductSearchClient::productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $formattedProduct = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + + add_product_to_product_set_sample($formattedName, $formattedProduct); +} +// [END vision_v1_generated_ProductSearch_AddProductToProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product.php new file mode 100644 index 000000000000..97ff3f2028f7 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product.php @@ -0,0 +1,79 @@ +createProduct($formattedParent, $product); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); + + create_product_sample($formattedParent); +} +// [END vision_v1_generated_ProductSearch_CreateProduct_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product_set.php new file mode 100644 index 000000000000..633e41e3610d --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product_set.php @@ -0,0 +1,76 @@ +createProductSet($formattedParent, $productSet); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); + + create_product_set_sample($formattedParent); +} +// [END vision_v1_generated_ProductSearch_CreateProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_reference_image.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_reference_image.php new file mode 100644 index 000000000000..e17703ebad54 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_reference_image.php @@ -0,0 +1,95 @@ +setUri($referenceImageUri); + + // Call the API and handle any network failures. + try { + /** @var ReferenceImage $response */ + $response = $productSearchClient->createReferenceImage($formattedParent, $referenceImage); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $referenceImageUri = '[URI]'; + + create_reference_image_sample($formattedParent, $referenceImageUri); +} +// [END vision_v1_generated_ProductSearch_CreateReferenceImage_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product.php new file mode 100644 index 000000000000..05ddeb9e065f --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product.php @@ -0,0 +1,71 @@ +deleteProduct($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + + delete_product_sample($formattedName); +} +// [END vision_v1_generated_ProductSearch_DeleteProduct_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product_set.php new file mode 100644 index 000000000000..d4cb125c0850 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product_set.php @@ -0,0 +1,70 @@ +deleteProductSet($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ProductSearchClient::productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + + delete_product_set_sample($formattedName); +} +// [END vision_v1_generated_ProductSearch_DeleteProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_reference_image.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_reference_image.php new file mode 100644 index 000000000000..a5a5ae5bf852 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_reference_image.php @@ -0,0 +1,78 @@ +deleteReferenceImage($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ProductSearchClient::referenceImageName( + '[PROJECT]', + '[LOCATION]', + '[PRODUCT]', + '[REFERENCE_IMAGE]' + ); + + delete_reference_image_sample($formattedName); +} +// [END vision_v1_generated_ProductSearch_DeleteReferenceImage_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product.php new file mode 100644 index 000000000000..9deedec661d3 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product.php @@ -0,0 +1,73 @@ +getProduct($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + + get_product_sample($formattedName); +} +// [END vision_v1_generated_ProductSearch_GetProduct_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product_set.php new file mode 100644 index 000000000000..c006d001ffb7 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product_set.php @@ -0,0 +1,73 @@ +getProductSet($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ProductSearchClient::productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + + get_product_set_sample($formattedName); +} +// [END vision_v1_generated_ProductSearch_GetProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_reference_image.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_reference_image.php new file mode 100644 index 000000000000..925d70e882f0 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_reference_image.php @@ -0,0 +1,78 @@ +getReferenceImage($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ProductSearchClient::referenceImageName( + '[PROJECT]', + '[LOCATION]', + '[PRODUCT]', + '[REFERENCE_IMAGE]' + ); + + get_reference_image_sample($formattedName); +} +// [END vision_v1_generated_ProductSearch_GetReferenceImage_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/import_product_sets.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/import_product_sets.php new file mode 100644 index 000000000000..f99a4a0c533b --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/import_product_sets.php @@ -0,0 +1,94 @@ +importProductSets($formattedParent, $inputConfig); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportProductSetsResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); + + import_product_sets_sample($formattedParent); +} +// [END vision_v1_generated_ProductSearch_ImportProductSets_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_product_sets.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_product_sets.php new file mode 100644 index 000000000000..02281b647f31 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_product_sets.php @@ -0,0 +1,78 @@ +listProductSets($formattedParent); + + /** @var ProductSet $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); + + list_product_sets_sample($formattedParent); +} +// [END vision_v1_generated_ProductSearch_ListProductSets_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products.php new file mode 100644 index 000000000000..21701335c941 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products.php @@ -0,0 +1,78 @@ +listProducts($formattedParent); + + /** @var Product $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); + + list_products_sample($formattedParent); +} +// [END vision_v1_generated_ProductSearch_ListProducts_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products_in_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products_in_product_set.php new file mode 100644 index 000000000000..e420a719929d --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products_in_product_set.php @@ -0,0 +1,80 @@ +listProductsInProductSet($formattedName); + + /** @var Product $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ProductSearchClient::productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + + list_products_in_product_set_sample($formattedName); +} +// [END vision_v1_generated_ProductSearch_ListProductsInProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_reference_images.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_reference_images.php new file mode 100644 index 000000000000..d954b90a9681 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_reference_images.php @@ -0,0 +1,80 @@ +listReferenceImages($formattedParent); + + /** @var ReferenceImage $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + + list_reference_images_sample($formattedParent); +} +// [END vision_v1_generated_ProductSearch_ListReferenceImages_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/purge_products.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/purge_products.php new file mode 100644 index 000000000000..e2333ea4171f --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/purge_products.php @@ -0,0 +1,100 @@ +purgeProducts($formattedParent); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); + + purge_products_sample($formattedParent); +} +// [END vision_v1_generated_ProductSearch_PurgeProducts_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/remove_product_from_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/remove_product_from_product_set.php new file mode 100644 index 000000000000..b4da45abe3a0 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/remove_product_from_product_set.php @@ -0,0 +1,75 @@ +removeProductFromProductSet($formattedName, $formattedProduct); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ProductSearchClient::productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $formattedProduct = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + + remove_product_from_product_set_sample($formattedName, $formattedProduct); +} +// [END vision_v1_generated_ProductSearch_RemoveProductFromProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product.php new file mode 100644 index 000000000000..9a3b9810fabd --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product.php @@ -0,0 +1,70 @@ +updateProduct($product); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END vision_v1_generated_ProductSearch_UpdateProduct_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product_set.php new file mode 100644 index 000000000000..67a0759ff741 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product_set.php @@ -0,0 +1,63 @@ +updateProductSet($productSet); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END vision_v1_generated_ProductSearch_UpdateProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/src/V1/Client/BaseClient/ImageAnnotatorBaseClient.php b/owl-bot-staging/Vision/V1/src/V1/Client/BaseClient/ImageAnnotatorBaseClient.php new file mode 100644 index 000000000000..400f0b7dd704 --- /dev/null +++ b/owl-bot-staging/Vision/V1/src/V1/Client/BaseClient/ImageAnnotatorBaseClient.php @@ -0,0 +1,376 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/image_annotator_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/image_annotator_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/image_annotator_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/image_annotator_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a product_set + * resource. + * + * @param string $project + * @param string $location + * @param string $productSet + * + * @return string The formatted product_set resource. + */ + public static function productSetName(string $project, string $location, string $productSet): string + { + return self::getPathTemplate('productSet')->render([ + 'project' => $project, + 'location' => $location, + 'product_set' => $productSet, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - productSet: projects/{project}/locations/{location}/productSets/{product_set} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'vision.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Run asynchronous image detection and annotation for a list of generic + * files, such as PDF files, which may contain multiple pages and multiple + * images per page. Progress and results can be retrieved through the + * `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). + * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). + * + * The async variant is {@see self::asyncBatchAnnotateFilesAsync()} . + * + * @param AsyncBatchAnnotateFilesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function asyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('AsyncBatchAnnotateFiles', $request, $callOptions)->wait(); + } + + /** + * Run asynchronous image detection and annotation for a list of images. + * + * Progress and results can be retrieved through the + * `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). + * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). + * + * This service will write image annotation outputs to json files in customer + * GCS bucket, each json file containing BatchAnnotateImagesResponse proto. + * + * The async variant is {@see self::asyncBatchAnnotateImagesAsync()} . + * + * @param AsyncBatchAnnotateImagesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function asyncBatchAnnotateImages(AsyncBatchAnnotateImagesRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('AsyncBatchAnnotateImages', $request, $callOptions)->wait(); + } + + /** + * Service that performs image detection and annotation for a batch of files. + * Now only "application/pdf", "image/tiff" and "image/gif" are supported. + * + * This service will extract at most 5 (customers can specify which 5 in + * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each + * file provided and perform detection and annotation for each image + * extracted. + * + * The async variant is {@see self::batchAnnotateFilesAsync()} . + * + * @param BatchAnnotateFilesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchAnnotateFilesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchAnnotateFiles(BatchAnnotateFilesRequest $request, array $callOptions = []): BatchAnnotateFilesResponse + { + return $this->startApiCall('BatchAnnotateFiles', $request, $callOptions)->wait(); + } + + /** + * Run image detection and annotation for a batch of images. + * + * The async variant is {@see self::batchAnnotateImagesAsync()} . + * + * @param BatchAnnotateImagesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchAnnotateImagesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchAnnotateImages(BatchAnnotateImagesRequest $request, array $callOptions = []): BatchAnnotateImagesResponse + { + return $this->startApiCall('BatchAnnotateImages', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Vision/V1/src/V1/Client/BaseClient/ProductSearchBaseClient.php b/owl-bot-staging/Vision/V1/src/V1/Client/BaseClient/ProductSearchBaseClient.php new file mode 100644 index 000000000000..39749869dae0 --- /dev/null +++ b/owl-bot-staging/Vision/V1/src/V1/Client/BaseClient/ProductSearchBaseClient.php @@ -0,0 +1,945 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/product_search_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/product_search_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/product_search_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/product_search_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a product + * resource. + * + * @param string $project + * @param string $location + * @param string $product + * + * @return string The formatted product resource. + */ + public static function productName(string $project, string $location, string $product): string + { + return self::getPathTemplate('product')->render([ + 'project' => $project, + 'location' => $location, + 'product' => $product, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a product_set + * resource. + * + * @param string $project + * @param string $location + * @param string $productSet + * + * @return string The formatted product_set resource. + */ + public static function productSetName(string $project, string $location, string $productSet): string + { + return self::getPathTemplate('productSet')->render([ + 'project' => $project, + 'location' => $location, + 'product_set' => $productSet, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * reference_image resource. + * + * @param string $project + * @param string $location + * @param string $product + * @param string $referenceImage + * + * @return string The formatted reference_image resource. + */ + public static function referenceImageName(string $project, string $location, string $product, string $referenceImage): string + { + return self::getPathTemplate('referenceImage')->render([ + 'project' => $project, + 'location' => $location, + 'product' => $product, + 'reference_image' => $referenceImage, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - product: projects/{project}/locations/{location}/products/{product} + * - productSet: projects/{project}/locations/{location}/productSets/{product_set} + * - referenceImage: projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'vision.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Adds a Product to the specified ProductSet. If the Product is already + * present, no change is made. + * + * One Product can be added to at most 100 ProductSets. + * + * Possible errors: + * + * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + * + * The async variant is {@see self::addProductToProductSetAsync()} . + * + * @param AddProductToProductSetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function addProductToProductSet(AddProductToProductSetRequest $request, array $callOptions = []): void + { + $this->startApiCall('AddProductToProductSet', $request, $callOptions)->wait(); + } + + /** + * Creates and returns a new product resource. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 + * characters. + * * Returns INVALID_ARGUMENT if description is longer than 4096 characters. + * * Returns INVALID_ARGUMENT if product_category is missing or invalid. + * + * The async variant is {@see self::createProductAsync()} . + * + * @param CreateProductRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Product + * + * @throws ApiException Thrown if the API call fails. + */ + public function createProduct(CreateProductRequest $request, array $callOptions = []): Product + { + return $this->startApiCall('CreateProduct', $request, $callOptions)->wait(); + } + + /** + * Creates and returns a new ProductSet resource. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than + * 4096 characters. + * + * The async variant is {@see self::createProductSetAsync()} . + * + * @param CreateProductSetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ProductSet + * + * @throws ApiException Thrown if the API call fails. + */ + public function createProductSet(CreateProductSetRequest $request, array $callOptions = []): ProductSet + { + return $this->startApiCall('CreateProductSet', $request, $callOptions)->wait(); + } + + /** + * Creates and returns a new ReferenceImage resource. + * + * The `bounding_poly` field is optional. If `bounding_poly` is not specified, + * the system will try to detect regions of interest in the image that are + * compatible with the product_category on the parent product. If it is + * specified, detection is ALWAYS skipped. The system converts polygons into + * non-rotated rectangles. + * + * Note that the pipeline will resize the image if the image resolution is too + * large to process (above 50MP). + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 + * characters. + * * Returns INVALID_ARGUMENT if the product does not exist. + * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing + * compatible with the parent product's product_category is detected. + * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + * + * The async variant is {@see self::createReferenceImageAsync()} . + * + * @param CreateReferenceImageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ReferenceImage + * + * @throws ApiException Thrown if the API call fails. + */ + public function createReferenceImage(CreateReferenceImageRequest $request, array $callOptions = []): ReferenceImage + { + return $this->startApiCall('CreateReferenceImage', $request, $callOptions)->wait(); + } + + /** + * Permanently deletes a product and its reference images. + * + * Metadata of the product and all its images will be deleted right away, but + * search queries against ProductSets containing the product may still work + * until all related caches are refreshed. + * + * The async variant is {@see self::deleteProductAsync()} . + * + * @param DeleteProductRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteProduct(DeleteProductRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteProduct', $request, $callOptions)->wait(); + } + + /** + * Permanently deletes a ProductSet. Products and ReferenceImages in the + * ProductSet are not deleted. + * + * The actual image files are not deleted from Google Cloud Storage. + * + * The async variant is {@see self::deleteProductSetAsync()} . + * + * @param DeleteProductSetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteProductSet(DeleteProductSetRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteProductSet', $request, $callOptions)->wait(); + } + + /** + * Permanently deletes a reference image. + * + * The image metadata will be deleted right away, but search queries + * against ProductSets containing the image may still work until all related + * caches are refreshed. + * + * The actual image files are not deleted from Google Cloud Storage. + * + * The async variant is {@see self::deleteReferenceImageAsync()} . + * + * @param DeleteReferenceImageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteReferenceImage(DeleteReferenceImageRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteReferenceImage', $request, $callOptions)->wait(); + } + + /** + * Gets information associated with a Product. + * + * Possible errors: + * + * * Returns NOT_FOUND if the Product does not exist. + * + * The async variant is {@see self::getProductAsync()} . + * + * @param GetProductRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Product + * + * @throws ApiException Thrown if the API call fails. + */ + public function getProduct(GetProductRequest $request, array $callOptions = []): Product + { + return $this->startApiCall('GetProduct', $request, $callOptions)->wait(); + } + + /** + * Gets information associated with a ProductSet. + * + * Possible errors: + * + * * Returns NOT_FOUND if the ProductSet does not exist. + * + * The async variant is {@see self::getProductSetAsync()} . + * + * @param GetProductSetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ProductSet + * + * @throws ApiException Thrown if the API call fails. + */ + public function getProductSet(GetProductSetRequest $request, array $callOptions = []): ProductSet + { + return $this->startApiCall('GetProductSet', $request, $callOptions)->wait(); + } + + /** + * Gets information associated with a ReferenceImage. + * + * Possible errors: + * + * * Returns NOT_FOUND if the specified image does not exist. + * + * The async variant is {@see self::getReferenceImageAsync()} . + * + * @param GetReferenceImageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ReferenceImage + * + * @throws ApiException Thrown if the API call fails. + */ + public function getReferenceImage(GetReferenceImageRequest $request, array $callOptions = []): ReferenceImage + { + return $this->startApiCall('GetReferenceImage', $request, $callOptions)->wait(); + } + + /** + * Asynchronous API that imports a list of reference images to specified + * product sets based on a list of image information. + * + * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the + * progress and results of the request. + * `Operation.metadata` contains `BatchOperationMetadata`. (progress) + * `Operation.response` contains `ImportProductSetsResponse`. (results) + * + * The input source of this method is a csv file on Google Cloud Storage. + * For the format of the csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. + * + * The async variant is {@see self::importProductSetsAsync()} . + * + * @param ImportProductSetsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function importProductSets(ImportProductSetsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ImportProductSets', $request, $callOptions)->wait(); + } + + /** + * Lists ProductSets in an unspecified order. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less + * than 1. + * + * The async variant is {@see self::listProductSetsAsync()} . + * + * @param ListProductSetsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listProductSets(ListProductSetsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListProductSets', $request, $callOptions); + } + + /** + * Lists products in an unspecified order. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + * + * The async variant is {@see self::listProductsAsync()} . + * + * @param ListProductsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listProducts(ListProductsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListProducts', $request, $callOptions); + } + + /** + * Lists the Products in a ProductSet, in an unspecified order. If the + * ProductSet does not exist, the products field of the response will be + * empty. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + * + * The async variant is {@see self::listProductsInProductSetAsync()} . + * + * @param ListProductsInProductSetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listProductsInProductSet(ListProductsInProductSetRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListProductsInProductSet', $request, $callOptions); + } + + /** + * Lists reference images. + * + * Possible errors: + * + * * Returns NOT_FOUND if the parent product does not exist. + * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less + * than 1. + * + * The async variant is {@see self::listReferenceImagesAsync()} . + * + * @param ListReferenceImagesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listReferenceImages(ListReferenceImagesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListReferenceImages', $request, $callOptions); + } + + /** + * Asynchronous API to delete all Products in a ProductSet or all Products + * that are in no ProductSet. + * + * If a Product is a member of the specified ProductSet in addition to other + * ProductSets, the Product will still be deleted. + * + * It is recommended to not delete the specified ProductSet until after this + * operation has completed. It is also recommended to not add any of the + * Products involved in the batch delete to a new ProductSet while this + * operation is running because those Products may still end up deleted. + * + * It's not possible to undo the PurgeProducts operation. Therefore, it is + * recommended to keep the csv files used in ImportProductSets (if that was + * how you originally built the Product Set) before starting PurgeProducts, in + * case you need to re-import the data after deletion. + * + * If the plan is to purge all of the Products from a ProductSet and then + * re-use the empty ProductSet to re-import new Products into the empty + * ProductSet, you must wait until the PurgeProducts operation has finished + * for that ProductSet. + * + * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the + * progress and results of the request. + * `Operation.metadata` contains `BatchOperationMetadata`. (progress) + * + * The async variant is {@see self::purgeProductsAsync()} . + * + * @param PurgeProductsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function purgeProducts(PurgeProductsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('PurgeProducts', $request, $callOptions)->wait(); + } + + /** + * Removes a Product from the specified ProductSet. + * + * The async variant is {@see self::removeProductFromProductSetAsync()} . + * + * @param RemoveProductFromProductSetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function removeProductFromProductSet(RemoveProductFromProductSetRequest $request, array $callOptions = []): void + { + $this->startApiCall('RemoveProductFromProductSet', $request, $callOptions)->wait(); + } + + /** + * Makes changes to a Product resource. + * Only the `display_name`, `description`, and `labels` fields can be updated + * right now. + * + * If labels are updated, the change will not be reflected in queries until + * the next index time. + * + * Possible errors: + * + * * Returns NOT_FOUND if the Product does not exist. + * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is + * missing from the request or longer than 4096 characters. + * * Returns INVALID_ARGUMENT if description is present in update_mask but is + * longer than 4096 characters. + * * Returns INVALID_ARGUMENT if product_category is present in update_mask. + * + * The async variant is {@see self::updateProductAsync()} . + * + * @param UpdateProductRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Product + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateProduct(UpdateProductRequest $request, array $callOptions = []): Product + { + return $this->startApiCall('UpdateProduct', $request, $callOptions)->wait(); + } + + /** + * Makes changes to a ProductSet resource. + * Only display_name can be updated currently. + * + * Possible errors: + * + * * Returns NOT_FOUND if the ProductSet does not exist. + * * Returns INVALID_ARGUMENT if display_name is present in update_mask but + * missing from the request or longer than 4096 characters. + * + * The async variant is {@see self::updateProductSetAsync()} . + * + * @param UpdateProductSetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ProductSet + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateProductSet(UpdateProductSetRequest $request, array $callOptions = []): ProductSet + { + return $this->startApiCall('UpdateProductSet', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Vision/V1/src/V1/Client/ImageAnnotatorClient.php b/owl-bot-staging/Vision/V1/src/V1/Client/ImageAnnotatorClient.php new file mode 100644 index 000000000000..1f37298a8baa --- /dev/null +++ b/owl-bot-staging/Vision/V1/src/V1/Client/ImageAnnotatorClient.php @@ -0,0 +1,40 @@ +asyncBatchAnnotateFiles($requests); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $imageAnnotatorClient->asyncBatchAnnotateFiles($requests); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $imageAnnotatorClient->resumeOperation($operationName, 'asyncBatchAnnotateFiles'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $imageAnnotatorClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + */ +class ImageAnnotatorGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.vision.v1.ImageAnnotator'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'vision.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-vision', + ]; + + private static $productSetNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/image_annotator_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/image_annotator_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/image_annotator_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/image_annotator_rest_client_config.php', + ], + ], + ]; + } + + private static function getProductSetNameTemplate() + { + if (self::$productSetNameTemplate == null) { + self::$productSetNameTemplate = new PathTemplate('projects/{project}/locations/{location}/productSets/{product_set}'); + } + + return self::$productSetNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'productSet' => self::getProductSetNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a product_set + * resource. + * + * @param string $project + * @param string $location + * @param string $productSet + * + * @return string The formatted product_set resource. + */ + public static function productSetName($project, $location, $productSet) + { + return self::getProductSetNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'product_set' => $productSet, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - productSet: projects/{project}/locations/{location}/productSets/{product_set} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'vision.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Run asynchronous image detection and annotation for a list of generic + * files, such as PDF files, which may contain multiple pages and multiple + * images per page. Progress and results can be retrieved through the + * `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). + * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). + * + * Sample code: + * ``` + * $imageAnnotatorClient = new ImageAnnotatorClient(); + * try { + * $requests = []; + * $operationResponse = $imageAnnotatorClient->asyncBatchAnnotateFiles($requests); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $imageAnnotatorClient->asyncBatchAnnotateFiles($requests); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $imageAnnotatorClient->resumeOperation($operationName, 'asyncBatchAnnotateFiles'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $imageAnnotatorClient->close(); + * } + * ``` + * + * @param AsyncAnnotateFileRequest[] $requests Required. Individual async file annotation requests for this batch. + * @param array $optionalArgs { + * Optional. + * + * @type string $parent + * Optional. Target project and location to make a call. + * + * Format: `projects/{project-id}/locations/{location-id}`. + * + * If no parent is specified, a region will be chosen automatically. + * + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * + * Example: `projects/project-A/locations/eu`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function asyncBatchAnnotateFiles($requests, array $optionalArgs = []) + { + $request = new AsyncBatchAnnotateFilesRequest(); + $requestParamHeaders = []; + $request->setRequests($requests); + if (isset($optionalArgs['parent'])) { + $request->setParent($optionalArgs['parent']); + $requestParamHeaders['parent'] = $optionalArgs['parent']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('AsyncBatchAnnotateFiles', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Run asynchronous image detection and annotation for a list of images. + * + * Progress and results can be retrieved through the + * `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). + * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). + * + * This service will write image annotation outputs to json files in customer + * GCS bucket, each json file containing BatchAnnotateImagesResponse proto. + * + * Sample code: + * ``` + * $imageAnnotatorClient = new ImageAnnotatorClient(); + * try { + * $requests = []; + * $outputConfig = new OutputConfig(); + * $operationResponse = $imageAnnotatorClient->asyncBatchAnnotateImages($requests, $outputConfig); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $imageAnnotatorClient->asyncBatchAnnotateImages($requests, $outputConfig); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $imageAnnotatorClient->resumeOperation($operationName, 'asyncBatchAnnotateImages'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $imageAnnotatorClient->close(); + * } + * ``` + * + * @param AnnotateImageRequest[] $requests Required. Individual image annotation requests for this batch. + * @param OutputConfig $outputConfig Required. The desired output location and metadata (e.g. format). + * @param array $optionalArgs { + * Optional. + * + * @type string $parent + * Optional. Target project and location to make a call. + * + * Format: `projects/{project-id}/locations/{location-id}`. + * + * If no parent is specified, a region will be chosen automatically. + * + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * + * Example: `projects/project-A/locations/eu`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function asyncBatchAnnotateImages($requests, $outputConfig, array $optionalArgs = []) + { + $request = new AsyncBatchAnnotateImagesRequest(); + $requestParamHeaders = []; + $request->setRequests($requests); + $request->setOutputConfig($outputConfig); + if (isset($optionalArgs['parent'])) { + $request->setParent($optionalArgs['parent']); + $requestParamHeaders['parent'] = $optionalArgs['parent']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('AsyncBatchAnnotateImages', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Service that performs image detection and annotation for a batch of files. + * Now only "application/pdf", "image/tiff" and "image/gif" are supported. + * + * This service will extract at most 5 (customers can specify which 5 in + * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each + * file provided and perform detection and annotation for each image + * extracted. + * + * Sample code: + * ``` + * $imageAnnotatorClient = new ImageAnnotatorClient(); + * try { + * $requests = []; + * $response = $imageAnnotatorClient->batchAnnotateFiles($requests); + * } finally { + * $imageAnnotatorClient->close(); + * } + * ``` + * + * @param AnnotateFileRequest[] $requests Required. The list of file annotation requests. Right now we support only one + * AnnotateFileRequest in BatchAnnotateFilesRequest. + * @param array $optionalArgs { + * Optional. + * + * @type string $parent + * Optional. Target project and location to make a call. + * + * Format: `projects/{project-id}/locations/{location-id}`. + * + * If no parent is specified, a region will be chosen automatically. + * + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * + * Example: `projects/project-A/locations/eu`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Vision\V1\BatchAnnotateFilesResponse + * + * @throws ApiException if the remote call fails + */ + public function batchAnnotateFiles($requests, array $optionalArgs = []) + { + $request = new BatchAnnotateFilesRequest(); + $requestParamHeaders = []; + $request->setRequests($requests); + if (isset($optionalArgs['parent'])) { + $request->setParent($optionalArgs['parent']); + $requestParamHeaders['parent'] = $optionalArgs['parent']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('BatchAnnotateFiles', BatchAnnotateFilesResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Run image detection and annotation for a batch of images. + * + * Sample code: + * ``` + * $imageAnnotatorClient = new ImageAnnotatorClient(); + * try { + * $requests = []; + * $response = $imageAnnotatorClient->batchAnnotateImages($requests); + * } finally { + * $imageAnnotatorClient->close(); + * } + * ``` + * + * @param AnnotateImageRequest[] $requests Required. Individual image annotation requests for this batch. + * @param array $optionalArgs { + * Optional. + * + * @type string $parent + * Optional. Target project and location to make a call. + * + * Format: `projects/{project-id}/locations/{location-id}`. + * + * If no parent is specified, a region will be chosen automatically. + * + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * + * Example: `projects/project-A/locations/eu`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Vision\V1\BatchAnnotateImagesResponse + * + * @throws ApiException if the remote call fails + */ + public function batchAnnotateImages($requests, array $optionalArgs = []) + { + $request = new BatchAnnotateImagesRequest(); + $requestParamHeaders = []; + $request->setRequests($requests); + if (isset($optionalArgs['parent'])) { + $request->setParent($optionalArgs['parent']); + $requestParamHeaders['parent'] = $optionalArgs['parent']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('BatchAnnotateImages', BatchAnnotateImagesResponse::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/Vision/V1/src/V1/Gapic/ProductSearchGapicClient.php b/owl-bot-staging/Vision/V1/src/V1/Gapic/ProductSearchGapicClient.php new file mode 100644 index 000000000000..6135ce2cbb53 --- /dev/null +++ b/owl-bot-staging/Vision/V1/src/V1/Gapic/ProductSearchGapicClient.php @@ -0,0 +1,1590 @@ +productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + * $formattedProduct = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + * $productSearchClient->addProductToProductSet($formattedName, $formattedProduct); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + */ +class ProductSearchGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.vision.v1.ProductSearch'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'vision.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-vision', + ]; + + private static $locationNameTemplate; + + private static $productNameTemplate; + + private static $productSetNameTemplate; + + private static $referenceImageNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/product_search_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/product_search_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/product_search_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/product_search_rest_client_config.php', + ], + ], + ]; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getProductNameTemplate() + { + if (self::$productNameTemplate == null) { + self::$productNameTemplate = new PathTemplate('projects/{project}/locations/{location}/products/{product}'); + } + + return self::$productNameTemplate; + } + + private static function getProductSetNameTemplate() + { + if (self::$productSetNameTemplate == null) { + self::$productSetNameTemplate = new PathTemplate('projects/{project}/locations/{location}/productSets/{product_set}'); + } + + return self::$productSetNameTemplate; + } + + private static function getReferenceImageNameTemplate() + { + if (self::$referenceImageNameTemplate == null) { + self::$referenceImageNameTemplate = new PathTemplate('projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}'); + } + + return self::$referenceImageNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'location' => self::getLocationNameTemplate(), + 'product' => self::getProductNameTemplate(), + 'productSet' => self::getProductSetNameTemplate(), + 'referenceImage' => self::getReferenceImageNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a product + * resource. + * + * @param string $project + * @param string $location + * @param string $product + * + * @return string The formatted product resource. + */ + public static function productName($project, $location, $product) + { + return self::getProductNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'product' => $product, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a product_set + * resource. + * + * @param string $project + * @param string $location + * @param string $productSet + * + * @return string The formatted product_set resource. + */ + public static function productSetName($project, $location, $productSet) + { + return self::getProductSetNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'product_set' => $productSet, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * reference_image resource. + * + * @param string $project + * @param string $location + * @param string $product + * @param string $referenceImage + * + * @return string The formatted reference_image resource. + */ + public static function referenceImageName($project, $location, $product, $referenceImage) + { + return self::getReferenceImageNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'product' => $product, + 'reference_image' => $referenceImage, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - product: projects/{project}/locations/{location}/products/{product} + * - productSet: projects/{project}/locations/{location}/productSets/{product_set} + * - referenceImage: projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'vision.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Adds a Product to the specified ProductSet. If the Product is already + * present, no change is made. + * + * One Product can be added to at most 100 ProductSets. + * + * Possible errors: + * + * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedName = $productSearchClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + * $formattedProduct = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + * $productSearchClient->addProductToProductSet($formattedName, $formattedProduct); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name for the ProductSet to modify. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param string $product Required. The resource name for the Product to be added to this ProductSet. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function addProductToProductSet($name, $product, array $optionalArgs = []) + { + $request = new AddProductToProductSetRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setProduct($product); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('AddProductToProductSet', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates and returns a new product resource. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 + * characters. + * * Returns INVALID_ARGUMENT if description is longer than 4096 characters. + * * Returns INVALID_ARGUMENT if product_category is missing or invalid. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); + * $product = new Product(); + * $response = $productSearchClient->createProduct($formattedParent, $product); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $parent Required. The project in which the Product should be created. + * + * Format is + * `projects/PROJECT_ID/locations/LOC_ID`. + * @param Product $product Required. The product to create. + * @param array $optionalArgs { + * Optional. + * + * @type string $productId + * A user-supplied resource id for this Product. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Vision\V1\Product + * + * @throws ApiException if the remote call fails + */ + public function createProduct($parent, $product, array $optionalArgs = []) + { + $request = new CreateProductRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setProduct($product); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['productId'])) { + $request->setProductId($optionalArgs['productId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateProduct', Product::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates and returns a new ProductSet resource. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than + * 4096 characters. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); + * $productSet = new ProductSet(); + * $response = $productSearchClient->createProductSet($formattedParent, $productSet); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $parent Required. The project in which the ProductSet should be created. + * + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param ProductSet $productSet Required. The ProductSet to create. + * @param array $optionalArgs { + * Optional. + * + * @type string $productSetId + * A user-supplied resource id for this ProductSet. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Vision\V1\ProductSet + * + * @throws ApiException if the remote call fails + */ + public function createProductSet($parent, $productSet, array $optionalArgs = []) + { + $request = new CreateProductSetRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setProductSet($productSet); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['productSetId'])) { + $request->setProductSetId($optionalArgs['productSetId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateProductSet', ProductSet::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates and returns a new ReferenceImage resource. + * + * The `bounding_poly` field is optional. If `bounding_poly` is not specified, + * the system will try to detect regions of interest in the image that are + * compatible with the product_category on the parent product. If it is + * specified, detection is ALWAYS skipped. The system converts polygons into + * non-rotated rectangles. + * + * Note that the pipeline will resize the image if the image resolution is too + * large to process (above 50MP). + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 + * characters. + * * Returns INVALID_ARGUMENT if the product does not exist. + * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing + * compatible with the parent product's product_category is detected. + * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedParent = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + * $referenceImage = new ReferenceImage(); + * $response = $productSearchClient->createReferenceImage($formattedParent, $referenceImage); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the product in which to create the reference image. + * + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * @param ReferenceImage $referenceImage Required. The reference image to create. + * If an image ID is specified, it is ignored. + * @param array $optionalArgs { + * Optional. + * + * @type string $referenceImageId + * A user-supplied resource id for the ReferenceImage to be added. If set, + * the server will attempt to use this value as the resource id. If it is + * already in use, an error is returned with code ALREADY_EXISTS. Must be at + * most 128 characters long. It cannot contain the character `/`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Vision\V1\ReferenceImage + * + * @throws ApiException if the remote call fails + */ + public function createReferenceImage($parent, $referenceImage, array $optionalArgs = []) + { + $request = new CreateReferenceImageRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setReferenceImage($referenceImage); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['referenceImageId'])) { + $request->setReferenceImageId($optionalArgs['referenceImageId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateReferenceImage', ReferenceImage::class, $optionalArgs, $request)->wait(); + } + + /** + * Permanently deletes a product and its reference images. + * + * Metadata of the product and all its images will be deleted right away, but + * search queries against ProductSets containing the product may still work + * until all related caches are refreshed. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedName = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + * $productSearchClient->deleteProduct($formattedName); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $name Required. Resource name of product to delete. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteProduct($name, array $optionalArgs = []) + { + $request = new DeleteProductRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteProduct', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Permanently deletes a ProductSet. Products and ReferenceImages in the + * ProductSet are not deleted. + * + * The actual image files are not deleted from Google Cloud Storage. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedName = $productSearchClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + * $productSearchClient->deleteProductSet($formattedName); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $name Required. Resource name of the ProductSet to delete. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteProductSet($name, array $optionalArgs = []) + { + $request = new DeleteProductSetRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteProductSet', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Permanently deletes a reference image. + * + * The image metadata will be deleted right away, but search queries + * against ProductSets containing the image may still work until all related + * caches are refreshed. + * + * The actual image files are not deleted from Google Cloud Storage. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedName = $productSearchClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); + * $productSearchClient->deleteReferenceImage($formattedName); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the reference image to delete. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteReferenceImage($name, array $optionalArgs = []) + { + $request = new DeleteReferenceImageRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteReferenceImage', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information associated with a Product. + * + * Possible errors: + * + * * Returns NOT_FOUND if the Product does not exist. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedName = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + * $response = $productSearchClient->getProduct($formattedName); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $name Required. Resource name of the Product to get. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Vision\V1\Product + * + * @throws ApiException if the remote call fails + */ + public function getProduct($name, array $optionalArgs = []) + { + $request = new GetProductRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetProduct', Product::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information associated with a ProductSet. + * + * Possible errors: + * + * * Returns NOT_FOUND if the ProductSet does not exist. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedName = $productSearchClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + * $response = $productSearchClient->getProductSet($formattedName); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $name Required. Resource name of the ProductSet to get. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Vision\V1\ProductSet + * + * @throws ApiException if the remote call fails + */ + public function getProductSet($name, array $optionalArgs = []) + { + $request = new GetProductSetRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetProductSet', ProductSet::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information associated with a ReferenceImage. + * + * Possible errors: + * + * * Returns NOT_FOUND if the specified image does not exist. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedName = $productSearchClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); + * $response = $productSearchClient->getReferenceImage($formattedName); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the ReferenceImage to get. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Vision\V1\ReferenceImage + * + * @throws ApiException if the remote call fails + */ + public function getReferenceImage($name, array $optionalArgs = []) + { + $request = new GetReferenceImageRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetReferenceImage', ReferenceImage::class, $optionalArgs, $request)->wait(); + } + + /** + * Asynchronous API that imports a list of reference images to specified + * product sets based on a list of image information. + * + * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the + * progress and results of the request. + * `Operation.metadata` contains `BatchOperationMetadata`. (progress) + * `Operation.response` contains `ImportProductSetsResponse`. (results) + * + * The input source of this method is a csv file on Google Cloud Storage. + * For the format of the csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); + * $inputConfig = new ImportProductSetsInputConfig(); + * $operationResponse = $productSearchClient->importProductSets($formattedParent, $inputConfig); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $productSearchClient->importProductSets($formattedParent, $inputConfig); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $productSearchClient->resumeOperation($operationName, 'importProductSets'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $parent Required. The project in which the ProductSets should be imported. + * + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param ImportProductSetsInputConfig $inputConfig Required. The input content for the list of requests. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function importProductSets($parent, $inputConfig, array $optionalArgs = []) + { + $request = new ImportProductSetsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setInputConfig($inputConfig); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ImportProductSets', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Lists ProductSets in an unspecified order. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less + * than 1. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $productSearchClient->listProductSets($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $productSearchClient->listProductSets($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $parent Required. The project from which ProductSets should be listed. + * + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listProductSets($parent, array $optionalArgs = []) + { + $request = new ListProductSetsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListProductSets', $optionalArgs, ListProductSetsResponse::class, $request); + } + + /** + * Lists products in an unspecified order. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $productSearchClient->listProducts($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $productSearchClient->listProducts($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $parent Required. The project OR ProductSet from which Products should be listed. + * + * Format: + * `projects/PROJECT_ID/locations/LOC_ID` + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listProducts($parent, array $optionalArgs = []) + { + $request = new ListProductsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListProducts', $optionalArgs, ListProductsResponse::class, $request); + } + + /** + * Lists the Products in a ProductSet, in an unspecified order. If the + * ProductSet does not exist, the products field of the response will be + * empty. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedName = $productSearchClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + * // Iterate over pages of elements + * $pagedResponse = $productSearchClient->listProductsInProductSet($formattedName); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $productSearchClient->listProductsInProductSet($formattedName); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $name Required. The ProductSet resource for which to retrieve Products. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listProductsInProductSet($name, array $optionalArgs = []) + { + $request = new ListProductsInProductSetRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListProductsInProductSet', $optionalArgs, ListProductsInProductSetResponse::class, $request); + } + + /** + * Lists reference images. + * + * Possible errors: + * + * * Returns NOT_FOUND if the parent product does not exist. + * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less + * than 1. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedParent = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + * // Iterate over pages of elements + * $pagedResponse = $productSearchClient->listReferenceImages($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $productSearchClient->listReferenceImages($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the product containing the reference images. + * + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listReferenceImages($parent, array $optionalArgs = []) + { + $request = new ListReferenceImagesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListReferenceImages', $optionalArgs, ListReferenceImagesResponse::class, $request); + } + + /** + * Asynchronous API to delete all Products in a ProductSet or all Products + * that are in no ProductSet. + * + * If a Product is a member of the specified ProductSet in addition to other + * ProductSets, the Product will still be deleted. + * + * It is recommended to not delete the specified ProductSet until after this + * operation has completed. It is also recommended to not add any of the + * Products involved in the batch delete to a new ProductSet while this + * operation is running because those Products may still end up deleted. + * + * It's not possible to undo the PurgeProducts operation. Therefore, it is + * recommended to keep the csv files used in ImportProductSets (if that was + * how you originally built the Product Set) before starting PurgeProducts, in + * case you need to re-import the data after deletion. + * + * If the plan is to purge all of the Products from a ProductSet and then + * re-use the empty ProductSet to re-import new Products into the empty + * ProductSet, you must wait until the PurgeProducts operation has finished + * for that ProductSet. + * + * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the + * progress and results of the request. + * `Operation.metadata` contains `BatchOperationMetadata`. (progress) + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); + * $operationResponse = $productSearchClient->purgeProducts($formattedParent); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $productSearchClient->purgeProducts($formattedParent); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $productSearchClient->resumeOperation($operationName, 'purgeProducts'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $parent Required. The project and location in which the Products should be deleted. + * + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param array $optionalArgs { + * Optional. + * + * @type ProductSetPurgeConfig $productSetPurgeConfig + * Specify which ProductSet contains the Products to be deleted. + * @type bool $deleteOrphanProducts + * If delete_orphan_products is true, all Products that are not in any + * ProductSet will be deleted. + * @type bool $force + * The default value is false. Override this value to true to actually perform + * the purge. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function purgeProducts($parent, array $optionalArgs = []) + { + $request = new PurgeProductsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['productSetPurgeConfig'])) { + $request->setProductSetPurgeConfig($optionalArgs['productSetPurgeConfig']); + } + + if (isset($optionalArgs['deleteOrphanProducts'])) { + $request->setDeleteOrphanProducts($optionalArgs['deleteOrphanProducts']); + } + + if (isset($optionalArgs['force'])) { + $request->setForce($optionalArgs['force']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('PurgeProducts', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Removes a Product from the specified ProductSet. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedName = $productSearchClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + * $formattedProduct = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + * $productSearchClient->removeProductFromProductSet($formattedName, $formattedProduct); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name for the ProductSet to modify. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param string $product Required. The resource name for the Product to be removed from this ProductSet. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function removeProductFromProductSet($name, $product, array $optionalArgs = []) + { + $request = new RemoveProductFromProductSetRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setProduct($product); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RemoveProductFromProductSet', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Makes changes to a Product resource. + * Only the `display_name`, `description`, and `labels` fields can be updated + * right now. + * + * If labels are updated, the change will not be reflected in queries until + * the next index time. + * + * Possible errors: + * + * * Returns NOT_FOUND if the Product does not exist. + * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is + * missing from the request or longer than 4096 characters. + * * Returns INVALID_ARGUMENT if description is present in update_mask but is + * longer than 4096 characters. + * * Returns INVALID_ARGUMENT if product_category is present in update_mask. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $product = new Product(); + * $response = $productSearchClient->updateProduct($product); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param Product $product Required. The Product resource which replaces the one on the server. + * product.name is immutable. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The [FieldMask][google.protobuf.FieldMask] that specifies which fields + * to update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask paths include `product_labels`, `display_name`, and + * `description`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Vision\V1\Product + * + * @throws ApiException if the remote call fails + */ + public function updateProduct($product, array $optionalArgs = []) + { + $request = new UpdateProductRequest(); + $requestParamHeaders = []; + $request->setProduct($product); + $requestParamHeaders['product.name'] = $product->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateProduct', Product::class, $optionalArgs, $request)->wait(); + } + + /** + * Makes changes to a ProductSet resource. + * Only display_name can be updated currently. + * + * Possible errors: + * + * * Returns NOT_FOUND if the ProductSet does not exist. + * * Returns INVALID_ARGUMENT if display_name is present in update_mask but + * missing from the request or longer than 4096 characters. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $productSet = new ProductSet(); + * $response = $productSearchClient->updateProductSet($productSet); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param ProductSet $productSet Required. The ProductSet resource which replaces the one on the server. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to + * update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask path is `display_name`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Vision\V1\ProductSet + * + * @throws ApiException if the remote call fails + */ + public function updateProductSet($productSet, array $optionalArgs = []) + { + $request = new UpdateProductSetRequest(); + $requestParamHeaders = []; + $request->setProductSet($productSet); + $requestParamHeaders['product_set.name'] = $productSet->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateProductSet', ProductSet::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/Vision/V1/src/V1/ImageAnnotatorClient.php b/owl-bot-staging/Vision/V1/src/V1/ImageAnnotatorClient.php new file mode 100644 index 000000000000..420be2268364 --- /dev/null +++ b/owl-bot-staging/Vision/V1/src/V1/ImageAnnotatorClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.vision.v1.ImageAnnotator' => [ + 'AsyncBatchAnnotateFiles' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Vision\V1\AsyncBatchAnnotateFilesResponse', + 'metadataReturnType' => '\Google\Cloud\Vision\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'AsyncBatchAnnotateImages' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Vision\V1\AsyncBatchAnnotateImagesResponse', + 'metadataReturnType' => '\Google\Cloud\Vision\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchAnnotateFiles' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\BatchAnnotateFilesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchAnnotateImages' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\BatchAnnotateImagesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'productSet' => 'projects/{project}/locations/{location}/productSets/{product_set}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_rest_client_config.php b/owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_rest_client_config.php new file mode 100644 index 000000000000..5ca910208251 --- /dev/null +++ b/owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_rest_client_config.php @@ -0,0 +1,132 @@ + [ + 'google.cloud.vision.v1.ImageAnnotator' => [ + 'AsyncBatchAnnotateFiles' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/files:asyncBatchAnnotate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/files:asyncBatchAnnotate', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/files:asyncBatchAnnotate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'AsyncBatchAnnotateImages' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/images:asyncBatchAnnotate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/images:asyncBatchAnnotate', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/images:asyncBatchAnnotate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchAnnotateFiles' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/files:annotate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/files:annotate', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/files:annotate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchAnnotateImages' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/images:annotate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/images:annotate', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/images:annotate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Vision/V1/src/V1/resources/product_search_client_config.json b/owl-bot-staging/Vision/V1/src/V1/resources/product_search_client_config.json new file mode 100644 index 000000000000..393b5b951284 --- /dev/null +++ b/owl-bot-staging/Vision/V1/src/V1/resources/product_search_client_config.json @@ -0,0 +1,140 @@ +{ + "interfaces": { + "google.cloud.vision.v1.ProductSearch": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_2_codes": [], + "retry_policy_3_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "AddProductToProductSet": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "CreateProduct": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "CreateProductSet": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "CreateReferenceImage": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "DeleteProduct": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "DeleteProductSet": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "DeleteReferenceImage": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "GetProduct": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "GetProductSet": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "GetReferenceImage": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ImportProductSets": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ListProductSets": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ListProducts": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ListProductsInProductSet": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ListReferenceImages": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "PurgeProducts": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "RemoveProductFromProductSet": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "UpdateProduct": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "UpdateProductSet": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + } + } + } + } +} diff --git a/owl-bot-staging/Vision/V1/src/V1/resources/product_search_descriptor_config.php b/owl-bot-staging/Vision/V1/src/V1/resources/product_search_descriptor_config.php new file mode 100644 index 000000000000..62781007ff5c --- /dev/null +++ b/owl-bot-staging/Vision/V1/src/V1/resources/product_search_descriptor_config.php @@ -0,0 +1,290 @@ + [ + 'google.cloud.vision.v1.ProductSearch' => [ + 'ImportProductSets' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Vision\V1\ImportProductSetsResponse', + 'metadataReturnType' => '\Google\Cloud\Vision\V1\BatchOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'PurgeProducts' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Vision\V1\BatchOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'AddProductToProductSet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateProduct' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\Product', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateProductSet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ProductSet', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateReferenceImage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ReferenceImage', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteProduct' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteProductSet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteReferenceImage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetProduct' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\Product', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetProductSet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ProductSet', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetReferenceImage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ReferenceImage', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListProductSets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getProductSets', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ListProductSetsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListProducts' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getProducts', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ListProductsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListProductsInProductSet' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getProducts', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ListProductsInProductSetResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListReferenceImages' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getReferenceImages', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ListReferenceImagesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'RemoveProductFromProductSet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateProduct' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\Product', + 'headerParams' => [ + [ + 'keyName' => 'product.name', + 'fieldAccessors' => [ + 'getProduct', + 'getName', + ], + ], + ], + ], + 'UpdateProductSet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ProductSet', + 'headerParams' => [ + [ + 'keyName' => 'product_set.name', + 'fieldAccessors' => [ + 'getProductSet', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'location' => 'projects/{project}/locations/{location}', + 'product' => 'projects/{project}/locations/{location}/products/{product}', + 'productSet' => 'projects/{project}/locations/{location}/productSets/{product_set}', + 'referenceImage' => 'projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Vision/V1/src/V1/resources/product_search_rest_client_config.php b/owl-bot-staging/Vision/V1/src/V1/resources/product_search_rest_client_config.php new file mode 100644 index 000000000000..9ce3ae045331 --- /dev/null +++ b/owl-bot-staging/Vision/V1/src/V1/resources/product_search_rest_client_config.php @@ -0,0 +1,256 @@ + [ + 'google.cloud.vision.v1.ProductSearch' => [ + 'AddProductToProductSet' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/productSets/*}:addProduct', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateProduct' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/products', + 'body' => 'product', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateProductSet' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/productSets', + 'body' => 'product_set', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateReferenceImage' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/products/*}/referenceImages', + 'body' => 'reference_image', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteProduct' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/products/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteProductSet' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/productSets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteReferenceImage' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/products/*/referenceImages/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetProduct' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/products/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetProductSet' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/productSets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetReferenceImage' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/products/*/referenceImages/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportProductSets' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/productSets:import', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListProductSets' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/productSets', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListProducts' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/products', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListProductsInProductSet' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/productSets/*}/products', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListReferenceImages' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/products/*}/referenceImages', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'PurgeProducts' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/products:purge', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RemoveProductFromProductSet' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/productSets/*}:removeProduct', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateProduct' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{product.name=projects/*/locations/*/products/*}', + 'body' => 'product', + 'placeholders' => [ + 'product.name' => [ + 'getters' => [ + 'getProduct', + 'getName', + ], + ], + ], + ], + 'UpdateProductSet' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{product_set.name=projects/*/locations/*/productSets/*}', + 'body' => 'product_set', + 'placeholders' => [ + 'product_set.name' => [ + 'getters' => [ + 'getProductSet', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ImageAnnotatorClientTest.php b/owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ImageAnnotatorClientTest.php new file mode 100644 index 000000000000..2778ff0e51bb --- /dev/null +++ b/owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ImageAnnotatorClientTest.php @@ -0,0 +1,509 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ImageAnnotatorClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ImageAnnotatorClient($options); + } + + /** @test */ + public function asyncBatchAnnotateFilesTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/asyncBatchAnnotateFilesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AsyncBatchAnnotateFilesResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/asyncBatchAnnotateFilesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $requests = []; + $request = (new AsyncBatchAnnotateFilesRequest()) + ->setRequests($requests); + $response = $gapicClient->asyncBatchAnnotateFiles($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateFiles', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateFilesTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function asyncBatchAnnotateFilesExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/asyncBatchAnnotateFilesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $requests = []; + $request = (new AsyncBatchAnnotateFilesRequest()) + ->setRequests($requests); + $response = $gapicClient->asyncBatchAnnotateFiles($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateFilesTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function asyncBatchAnnotateImagesTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/asyncBatchAnnotateImagesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AsyncBatchAnnotateImagesResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/asyncBatchAnnotateImagesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $requests = []; + $outputConfig = new OutputConfig(); + $request = (new AsyncBatchAnnotateImagesRequest()) + ->setRequests($requests) + ->setOutputConfig($outputConfig); + $response = $gapicClient->asyncBatchAnnotateImages($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateImages', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $actualValue = $actualApiRequestObject->getOutputConfig(); + $this->assertProtobufEquals($outputConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateImagesTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function asyncBatchAnnotateImagesExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/asyncBatchAnnotateImagesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $requests = []; + $outputConfig = new OutputConfig(); + $request = (new AsyncBatchAnnotateImagesRequest()) + ->setRequests($requests) + ->setOutputConfig($outputConfig); + $response = $gapicClient->asyncBatchAnnotateImages($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateImagesTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function batchAnnotateFilesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchAnnotateFilesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $requests = []; + $request = (new BatchAnnotateFilesRequest()) + ->setRequests($requests); + $response = $gapicClient->batchAnnotateFiles($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ImageAnnotator/BatchAnnotateFiles', $actualFuncCall); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchAnnotateFilesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $requests = []; + $request = (new BatchAnnotateFilesRequest()) + ->setRequests($requests); + try { + $gapicClient->batchAnnotateFiles($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchAnnotateImagesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchAnnotateImagesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $requests = []; + $request = (new BatchAnnotateImagesRequest()) + ->setRequests($requests); + $response = $gapicClient->batchAnnotateImages($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ImageAnnotator/BatchAnnotateImages', $actualFuncCall); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchAnnotateImagesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $requests = []; + $request = (new BatchAnnotateImagesRequest()) + ->setRequests($requests); + try { + $gapicClient->batchAnnotateImages($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function asyncBatchAnnotateFilesAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/asyncBatchAnnotateFilesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AsyncBatchAnnotateFilesResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/asyncBatchAnnotateFilesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $requests = []; + $request = (new AsyncBatchAnnotateFilesRequest()) + ->setRequests($requests); + $response = $gapicClient->asyncBatchAnnotateFilesAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateFiles', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateFilesTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ProductSearchClientTest.php b/owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ProductSearchClientTest.php new file mode 100644 index 000000000000..783e73837e72 --- /dev/null +++ b/owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ProductSearchClientTest.php @@ -0,0 +1,1540 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ProductSearchClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ProductSearchClient($options); + } + + /** @test */ + public function addProductToProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $request = (new AddProductToProductSetRequest()) + ->setName($formattedName) + ->setProduct($formattedProduct); + $gapicClient->addProductToProductSet($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/AddProductToProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getProduct(); + $this->assertProtobufEquals($formattedProduct, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function addProductToProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $request = (new AddProductToProductSetRequest()) + ->setName($formattedName) + ->setProduct($formattedProduct); + try { + $gapicClient->addProductToProductSet($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createProductTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $productCategory = 'productCategory-1607451058'; + $expectedResponse = new Product(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setProductCategory($productCategory); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $product = new Product(); + $request = (new CreateProductRequest()) + ->setParent($formattedParent) + ->setProduct($product); + $response = $gapicClient->createProduct($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/CreateProduct', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getProduct(); + $this->assertProtobufEquals($product, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createProductExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $product = new Product(); + $request = (new CreateProductRequest()) + ->setParent($formattedParent) + ->setProduct($product); + try { + $gapicClient->createProduct($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ProductSet(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $productSet = new ProductSet(); + $request = (new CreateProductSetRequest()) + ->setParent($formattedParent) + ->setProductSet($productSet); + $response = $gapicClient->createProductSet($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/CreateProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getProductSet(); + $this->assertProtobufEquals($productSet, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $productSet = new ProductSet(); + $request = (new CreateProductSetRequest()) + ->setParent($formattedParent) + ->setProductSet($productSet); + try { + $gapicClient->createProductSet($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createReferenceImageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $uri = 'uri116076'; + $expectedResponse = new ReferenceImage(); + $expectedResponse->setName($name); + $expectedResponse->setUri($uri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $referenceImage = new ReferenceImage(); + $referenceImageUri = 'referenceImageUri-707360132'; + $referenceImage->setUri($referenceImageUri); + $request = (new CreateReferenceImageRequest()) + ->setParent($formattedParent) + ->setReferenceImage($referenceImage); + $response = $gapicClient->createReferenceImage($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/CreateReferenceImage', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getReferenceImage(); + $this->assertProtobufEquals($referenceImage, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createReferenceImageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $referenceImage = new ReferenceImage(); + $referenceImageUri = 'referenceImageUri-707360132'; + $referenceImage->setUri($referenceImageUri); + $request = (new CreateReferenceImageRequest()) + ->setParent($formattedParent) + ->setReferenceImage($referenceImage); + try { + $gapicClient->createReferenceImage($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteProductTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $request = (new DeleteProductRequest()) + ->setName($formattedName); + $gapicClient->deleteProduct($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/DeleteProduct', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteProductExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $request = (new DeleteProductRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteProduct($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $request = (new DeleteProductSetRequest()) + ->setName($formattedName); + $gapicClient->deleteProductSet($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/DeleteProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $request = (new DeleteProductSetRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteProductSet($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteReferenceImageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); + $request = (new DeleteReferenceImageRequest()) + ->setName($formattedName); + $gapicClient->deleteReferenceImage($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/DeleteReferenceImage', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteReferenceImageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); + $request = (new DeleteReferenceImageRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteReferenceImage($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProductTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $productCategory = 'productCategory-1607451058'; + $expectedResponse = new Product(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setProductCategory($productCategory); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $request = (new GetProductRequest()) + ->setName($formattedName); + $response = $gapicClient->getProduct($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/GetProduct', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProductExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $request = (new GetProductRequest()) + ->setName($formattedName); + try { + $gapicClient->getProduct($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ProductSet(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $request = (new GetProductSetRequest()) + ->setName($formattedName); + $response = $gapicClient->getProductSet($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/GetProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $request = (new GetProductSetRequest()) + ->setName($formattedName); + try { + $gapicClient->getProductSet($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReferenceImageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uri = 'uri116076'; + $expectedResponse = new ReferenceImage(); + $expectedResponse->setName($name2); + $expectedResponse->setUri($uri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); + $request = (new GetReferenceImageRequest()) + ->setName($formattedName); + $response = $gapicClient->getReferenceImage($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/GetReferenceImage', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReferenceImageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); + $request = (new GetReferenceImageRequest()) + ->setName($formattedName); + try { + $gapicClient->getReferenceImage($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importProductSetsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importProductSetsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ImportProductSetsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importProductSetsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $inputConfig = new ImportProductSetsInputConfig(); + $request = (new ImportProductSetsRequest()) + ->setParent($formattedParent) + ->setInputConfig($inputConfig); + $response = $gapicClient->importProductSets($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/ImportProductSets', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getInputConfig(); + $this->assertProtobufEquals($inputConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importProductSetsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function importProductSetsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importProductSetsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $inputConfig = new ImportProductSetsInputConfig(); + $request = (new ImportProductSetsRequest()) + ->setParent($formattedParent) + ->setInputConfig($inputConfig); + $response = $gapicClient->importProductSets($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importProductSetsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function listProductSetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $productSetsElement = new ProductSet(); + $productSets = [ + $productSetsElement, + ]; + $expectedResponse = new ListProductSetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setProductSets($productSets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListProductSetsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listProductSets($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getProductSets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListProductSets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProductSetsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListProductSetsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listProductSets($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProductsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $productsElement = new Product(); + $products = [ + $productsElement, + ]; + $expectedResponse = new ListProductsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setProducts($products); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListProductsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listProducts($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getProducts()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListProducts', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProductsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListProductsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listProducts($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProductsInProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $productsElement = new Product(); + $products = [ + $productsElement, + ]; + $expectedResponse = new ListProductsInProductSetResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setProducts($products); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $request = (new ListProductsInProductSetRequest()) + ->setName($formattedName); + $response = $gapicClient->listProductsInProductSet($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getProducts()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListProductsInProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProductsInProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $request = (new ListProductsInProductSetRequest()) + ->setName($formattedName); + try { + $gapicClient->listProductsInProductSet($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReferenceImagesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $pageSize2 = 1024500956; + $nextPageToken = ''; + $referenceImagesElement = new ReferenceImage(); + $referenceImages = [ + $referenceImagesElement, + ]; + $expectedResponse = new ListReferenceImagesResponse(); + $expectedResponse->setPageSize($pageSize2); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setReferenceImages($referenceImages); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $request = (new ListReferenceImagesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listReferenceImages($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getReferenceImages()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListReferenceImages', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReferenceImagesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $request = (new ListReferenceImagesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listReferenceImages($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function purgeProductsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/purgeProductsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/purgeProductsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new PurgeProductsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->purgeProducts($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/PurgeProducts', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/purgeProductsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function purgeProductsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/purgeProductsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new PurgeProductsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->purgeProducts($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/purgeProductsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function removeProductFromProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $request = (new RemoveProductFromProductSetRequest()) + ->setName($formattedName) + ->setProduct($formattedProduct); + $gapicClient->removeProductFromProductSet($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/RemoveProductFromProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getProduct(); + $this->assertProtobufEquals($formattedProduct, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function removeProductFromProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $request = (new RemoveProductFromProductSetRequest()) + ->setName($formattedName) + ->setProduct($formattedProduct); + try { + $gapicClient->removeProductFromProductSet($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateProductTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $productCategory = 'productCategory-1607451058'; + $expectedResponse = new Product(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setProductCategory($productCategory); + $transport->addResponse($expectedResponse); + // Mock request + $product = new Product(); + $request = (new UpdateProductRequest()) + ->setProduct($product); + $response = $gapicClient->updateProduct($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/UpdateProduct', $actualFuncCall); + $actualValue = $actualRequestObject->getProduct(); + $this->assertProtobufEquals($product, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateProductExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $product = new Product(); + $request = (new UpdateProductRequest()) + ->setProduct($product); + try { + $gapicClient->updateProduct($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ProductSet(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $productSet = new ProductSet(); + $request = (new UpdateProductSetRequest()) + ->setProductSet($productSet); + $response = $gapicClient->updateProductSet($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/UpdateProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getProductSet(); + $this->assertProtobufEquals($productSet, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $productSet = new ProductSet(); + $request = (new UpdateProductSetRequest()) + ->setProductSet($productSet); + try { + $gapicClient->updateProductSet($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function addProductToProductSetAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $request = (new AddProductToProductSetRequest()) + ->setName($formattedName) + ->setProduct($formattedProduct); + $gapicClient->addProductToProductSetAsync($request)->wait(); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/AddProductToProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getProduct(); + $this->assertProtobufEquals($formattedProduct, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Vision/V1/tests/Unit/V1/ImageAnnotatorClientTest.php b/owl-bot-staging/Vision/V1/tests/Unit/V1/ImageAnnotatorClientTest.php new file mode 100644 index 000000000000..b5efaf7a89b5 --- /dev/null +++ b/owl-bot-staging/Vision/V1/tests/Unit/V1/ImageAnnotatorClientTest.php @@ -0,0 +1,423 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ImageAnnotatorClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ImageAnnotatorClient($options); + } + + /** @test */ + public function asyncBatchAnnotateFilesTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/asyncBatchAnnotateFilesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AsyncBatchAnnotateFilesResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/asyncBatchAnnotateFilesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $requests = []; + $response = $gapicClient->asyncBatchAnnotateFiles($requests); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateFiles', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateFilesTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function asyncBatchAnnotateFilesExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/asyncBatchAnnotateFilesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $requests = []; + $response = $gapicClient->asyncBatchAnnotateFiles($requests); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateFilesTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function asyncBatchAnnotateImagesTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/asyncBatchAnnotateImagesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AsyncBatchAnnotateImagesResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/asyncBatchAnnotateImagesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $requests = []; + $outputConfig = new OutputConfig(); + $response = $gapicClient->asyncBatchAnnotateImages($requests, $outputConfig); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateImages', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $actualValue = $actualApiRequestObject->getOutputConfig(); + $this->assertProtobufEquals($outputConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateImagesTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function asyncBatchAnnotateImagesExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/asyncBatchAnnotateImagesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $requests = []; + $outputConfig = new OutputConfig(); + $response = $gapicClient->asyncBatchAnnotateImages($requests, $outputConfig); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateImagesTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function batchAnnotateFilesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchAnnotateFilesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $requests = []; + $response = $gapicClient->batchAnnotateFiles($requests); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ImageAnnotator/BatchAnnotateFiles', $actualFuncCall); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchAnnotateFilesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $requests = []; + try { + $gapicClient->batchAnnotateFiles($requests); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchAnnotateImagesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchAnnotateImagesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $requests = []; + $response = $gapicClient->batchAnnotateImages($requests); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ImageAnnotator/BatchAnnotateImages', $actualFuncCall); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchAnnotateImagesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $requests = []; + try { + $gapicClient->batchAnnotateImages($requests); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Vision/V1/tests/Unit/V1/ProductSearchClientTest.php b/owl-bot-staging/Vision/V1/tests/Unit/V1/ProductSearchClientTest.php new file mode 100644 index 000000000000..7d83b8a979ce --- /dev/null +++ b/owl-bot-staging/Vision/V1/tests/Unit/V1/ProductSearchClientTest.php @@ -0,0 +1,1403 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ProductSearchClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ProductSearchClient($options); + } + + /** @test */ + public function addProductToProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $gapicClient->addProductToProductSet($formattedName, $formattedProduct); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/AddProductToProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getProduct(); + $this->assertProtobufEquals($formattedProduct, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function addProductToProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + try { + $gapicClient->addProductToProductSet($formattedName, $formattedProduct); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createProductTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $productCategory = 'productCategory-1607451058'; + $expectedResponse = new Product(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setProductCategory($productCategory); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $product = new Product(); + $response = $gapicClient->createProduct($formattedParent, $product); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/CreateProduct', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getProduct(); + $this->assertProtobufEquals($product, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createProductExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $product = new Product(); + try { + $gapicClient->createProduct($formattedParent, $product); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ProductSet(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $productSet = new ProductSet(); + $response = $gapicClient->createProductSet($formattedParent, $productSet); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/CreateProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getProductSet(); + $this->assertProtobufEquals($productSet, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $productSet = new ProductSet(); + try { + $gapicClient->createProductSet($formattedParent, $productSet); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createReferenceImageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $uri = 'uri116076'; + $expectedResponse = new ReferenceImage(); + $expectedResponse->setName($name); + $expectedResponse->setUri($uri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $referenceImage = new ReferenceImage(); + $referenceImageUri = 'referenceImageUri-707360132'; + $referenceImage->setUri($referenceImageUri); + $response = $gapicClient->createReferenceImage($formattedParent, $referenceImage); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/CreateReferenceImage', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getReferenceImage(); + $this->assertProtobufEquals($referenceImage, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createReferenceImageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $referenceImage = new ReferenceImage(); + $referenceImageUri = 'referenceImageUri-707360132'; + $referenceImage->setUri($referenceImageUri); + try { + $gapicClient->createReferenceImage($formattedParent, $referenceImage); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteProductTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $gapicClient->deleteProduct($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/DeleteProduct', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteProductExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + try { + $gapicClient->deleteProduct($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $gapicClient->deleteProductSet($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/DeleteProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + try { + $gapicClient->deleteProductSet($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteReferenceImageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); + $gapicClient->deleteReferenceImage($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/DeleteReferenceImage', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteReferenceImageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); + try { + $gapicClient->deleteReferenceImage($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProductTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $productCategory = 'productCategory-1607451058'; + $expectedResponse = new Product(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setProductCategory($productCategory); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $response = $gapicClient->getProduct($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/GetProduct', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProductExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + try { + $gapicClient->getProduct($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ProductSet(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $response = $gapicClient->getProductSet($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/GetProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + try { + $gapicClient->getProductSet($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReferenceImageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uri = 'uri116076'; + $expectedResponse = new ReferenceImage(); + $expectedResponse->setName($name2); + $expectedResponse->setUri($uri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); + $response = $gapicClient->getReferenceImage($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/GetReferenceImage', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReferenceImageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); + try { + $gapicClient->getReferenceImage($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importProductSetsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importProductSetsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ImportProductSetsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importProductSetsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $inputConfig = new ImportProductSetsInputConfig(); + $response = $gapicClient->importProductSets($formattedParent, $inputConfig); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/ImportProductSets', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getInputConfig(); + $this->assertProtobufEquals($inputConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importProductSetsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function importProductSetsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importProductSetsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $inputConfig = new ImportProductSetsInputConfig(); + $response = $gapicClient->importProductSets($formattedParent, $inputConfig); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importProductSetsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function listProductSetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $productSetsElement = new ProductSet(); + $productSets = [ + $productSetsElement, + ]; + $expectedResponse = new ListProductSetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setProductSets($productSets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listProductSets($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getProductSets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListProductSets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProductSetsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listProductSets($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProductsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $productsElement = new Product(); + $products = [ + $productsElement, + ]; + $expectedResponse = new ListProductsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setProducts($products); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listProducts($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getProducts()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListProducts', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProductsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listProducts($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProductsInProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $productsElement = new Product(); + $products = [ + $productsElement, + ]; + $expectedResponse = new ListProductsInProductSetResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setProducts($products); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $response = $gapicClient->listProductsInProductSet($formattedName); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getProducts()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListProductsInProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProductsInProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + try { + $gapicClient->listProductsInProductSet($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReferenceImagesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $pageSize2 = 1024500956; + $nextPageToken = ''; + $referenceImagesElement = new ReferenceImage(); + $referenceImages = [ + $referenceImagesElement, + ]; + $expectedResponse = new ListReferenceImagesResponse(); + $expectedResponse->setPageSize($pageSize2); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setReferenceImages($referenceImages); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $response = $gapicClient->listReferenceImages($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getReferenceImages()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListReferenceImages', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReferenceImagesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + try { + $gapicClient->listReferenceImages($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function purgeProductsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/purgeProductsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/purgeProductsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->purgeProducts($formattedParent); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/PurgeProducts', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/purgeProductsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function purgeProductsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/purgeProductsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->purgeProducts($formattedParent); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/purgeProductsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function removeProductFromProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $gapicClient->removeProductFromProductSet($formattedName, $formattedProduct); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/RemoveProductFromProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getProduct(); + $this->assertProtobufEquals($formattedProduct, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function removeProductFromProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + try { + $gapicClient->removeProductFromProductSet($formattedName, $formattedProduct); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateProductTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $productCategory = 'productCategory-1607451058'; + $expectedResponse = new Product(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setProductCategory($productCategory); + $transport->addResponse($expectedResponse); + // Mock request + $product = new Product(); + $response = $gapicClient->updateProduct($product); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/UpdateProduct', $actualFuncCall); + $actualValue = $actualRequestObject->getProduct(); + $this->assertProtobufEquals($product, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateProductExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $product = new Product(); + try { + $gapicClient->updateProduct($product); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ProductSet(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $productSet = new ProductSet(); + $response = $gapicClient->updateProductSet($productSet); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/UpdateProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getProductSet(); + $this->assertProtobufEquals($productSet, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $productSet = new ProductSet(); + try { + $gapicClient->updateProductSet($productSet); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/VmMigration/v1/proto/src/GPBMetadata/Google/Cloud/Vmmigration/V1/Vmmigration.php b/owl-bot-staging/VmMigration/v1/proto/src/GPBMetadata/Google/Cloud/Vmmigration/V1/Vmmigration.php new file mode 100644 index 0000000000000000000000000000000000000000..5b7c3d9240be601a7e0a0d24a17537f175058315 GIT binary patch literal 37746 zcmeHwYit}>mfkjBA}=M1D!p2iWw%QnTc#z_qCK+Rk~~u+n^M~(o5Pnahn}8hvq<)s z?Cx}RQ>&TfVt0bY?k1UiU|+MDWD_6@B-w0UK#)O#4R#YGL0}{Z@mZymecC>IIH6ivvLi}sCIQ@kdPeW_Xj1@5ObSW83{5M(1;uG_V8VQ*vBc8ax9 zwO*+$VQ4zNW7l0$(vusns?XALrR~%WhB2LP0rGyTUTfIiucuNqyWXgk?@G97fkXFS z8zDrqs-+F9T&@rmDrF~~ZsOEjqTR%qy^>w7cQQl-}2)MZ<-O~*ja zSIRrJM!8%n?`-6%#H`&R>F(WZgXeY*usc;EyijmHIl|o468ODd*spdzcez^J$kb|; z+APGQwAaOs(##d`L8Hwa$=J8vEh#p(wzgcZor9F$aQTe5?iKOh|4fg#)s=i3S9$n^ zR0k6tbue*od+f4Wt57XLUl8N5Rv3H1^J1I0E5E7OOAWZ<8BkL^q+VTDulAaZGFfpM zMGbmh4U$R-l03PkxIw+wTFiaVQ0!yR)d&ruJEE>PHt>mBwK!?h?&Y_5`_y}lJiRAv z&~W&L`R#r&x@=dW$s}*jJSpzk#%a+~Gq&q`=dDV?qcl zRIBF+lw<&#b?c5U+WKfj0?q;7q{6P6h!sz5xn;-7eOh$#1HE9Zv35m_hJN|MPH?)hQnF zKMp6A{VngT@8hZaSN>rCaIzNQG7RuM%1ahIG{4^?hMI)m*bqtAszM3pJu{NMl8|p} zLWb^PR-0r@_TWjo`tXO088PfGSl&tY$pvplF6b^&-cgIZC(c$YPCXA&6~T4*kYu>w zsmaKNmM~|@oubw{j!^YT=p#gMdO-9!K-|10u13(s1iPFKplO^J!z_=RPwKWK#l6=^ zicw8I8%k5YAt-u{+u~JtP0$UGEBXCWxq&(P!U62(j?LppHuH{MtdzIpKK2@Kikm!T zw^XY?iJwKA)oWf5Mk^uBj0b^AdF4sDXiSL_xx9lvI#gNauMdmi1@?Jt`+dW*Y*-(tU8AEb~ zDCQ+ZXjY>NpIyx&OB88!7}HrX zpzG(BX`~`7!~+^{%!+}%!lu3FBuAz7d^7UnUJA_1X_<1p_Qc4Db2XdHavlmBBJ}mj zrjtA;7yLrxf-^Myy~-wI@v=6j=OqzC%qfq{iu3w&jd}$th(CBiesJTJ=r8gN{mrpk zV%Uqxu;~57ej;_@5X^4>L1C|9vlyj&-cFd`OT^prrOe_i+w&pOznrmVAHkfD2r-vk zURlkrJX)NANr!p2W>&N7nbAIDRGgk!TV2JRd~Q9nJbH?}0z8p_4D!@PYo4bLdAtPS zzRP|@UmPY+VJ?fY*^l5UoHhVJW_dZcJbEVm<8T^&RJ0^GYE0Jl+MU)Fnd_H3>&Sd7vLGC9pP=Asb3>as{ur+Hfu}H0qo=X1`xc}!9;(7%8 zYoZ!oe-^w?=`5-0;3CU^lFm9L-uFs`WJmKqk-w~oh(Ki+DXnT9PH4X3C=WTBKP)vq zx1xN|oG_|z>k2hmgk-PeeBvnI_;#e!Ea_?M3$rvyE%>pxQYs^UDkC{2A={Te6Z`u*9n?md^k8 z>T0wzEfJ!wEUm664j+l}S(>D2udrg%2dr$bg`@%~qtVZ=U46#BXIp(XCeC0t;j{A~1{`vKB;{6~b&`;|U1>>;MHBF3PxkPmJ+-UI=s6qFL|&Qpeg|4>|Zb{lo6 zu(m3X%gvBX>B28YZuW|rJBz6*CesRQMu_ba^7zu5R|>Fe@WQn;OUB7-X->QS;A`nI zk!(kJ^Y16b#TglLYU{mh|Ir50<1&yfP<+L{{Pb(zw|YLezF>6Z0bD_LluPSw35~e;9c_ zf}LTMDHFCPNn|F<;I86sVRO&MZucs0-Grn*uw4>r3Lay>zSSoNSf#+<8#vg14BnMS zX?W`ONS(AUhw@aFAA+L0Cwh@_QfcXEJ>=$>nzOaN_av4Ap;3HZGAy;j$=%qXu(4j5^{q)y9vpyCtMi@}FTW=rLcuvFnbYx;rrvuGxaXw@_ zkscUCy#!TaRg)PaIjN$6{TRZ+xe4OeK2k0Rl!bu+m8w!X4bijuE^0hgxc+seaDH|` zj0U&e_^KE!6e-!AM*<{|Jl>Y0@@mtO3>aK!!jh}JZ$E)z-U2kJo;zSkXacY#Z269x zZ6v7sjR)G5ByAX1h-vwnEUvJ)y3QZ@q{CBfoxcTPl*$KytWtY|Z0}Bf59$!YM#>}F z%(i@ewXkEnES_&JhxB)&Rzj{@rsHI~)j@#^io>XjYaAp2e~^Lq-pSL}5)=+Ht^~nC zchu%c1WW2dxU+@@0hg1JsX0>2vZ;Ysg1ln(a>o|Lg|LkRYn}110c@010><;m(b!;$ zdcOJA!+K*cie92cMEY#Z5--F78!=sG-)6c=zBLPIGLxXPZN1Zm7$xpjoSCmbsoLh} z1LFKF+D2G%8jCP00QfpmLQV8aW*bj+1i>*E= z6>Zv-N<&pehmid^g`}uMawc^jDm??6jp8RZak=II<2@~RyxtP2LKW3)@{!Pwvt2_Ks@5o?qs7i^JY`jz)xgFpVyrpdschHDn7Sh= z_EwSJqA&^v=!YQduHQQ{g&voMxAe3%S-Eid%MZjzql#vwE%-sQ9*?9tVKyE~+BKd+ zimbs4nM>X9Ida9hxw-l5VkS^EZl==u(tipO;V&nIuYV#?G7i~dW9z8aZ4w2Ypfn*4 zY(CASOvplZX#R4KIOC&&mxEdVxam<6rjZz*$hQ`=X|q(%PDqGx2y{Pi;W&bcsZ{EQ zsG1MS^bDDE@%!g1`nSmen149|Lmgl>BPWt&`!Sq`>R#oEWL=lrrLvCYT`f!NtRsv$ zakf;>qdW-l;!2#4@{Ckto^na z;O8pP?vzsDVfHTqa8}oTz$e}MGc{)^5o(otw`I?0g2k5os9;G$Z|=bJ0LKT(dDQ(O zKiiXGAP7|yT@n}P?0RuGt9@V13fMVCW)Ao|X9n^Xw<~DKf>K z8MkRc7E||WgINz?rpFlIv4j+U<|WVL*8T)^u{9bPEmZ=wJNOzKr1mxD#c;Lq7+y6Q zVOzRDBU91I_5iRGOEjM>vW+f_p<=ZGb4C6Yxk~-?Xy4wa=wW|T_DS?pm_;=eHH`f1 zek2zzplZ2as-qhkuvBEH3}%oE*GrmihcZ=Av(X9<$m^|Chir2>jj)^2q}d+96+F)FmO;Uk~m7wnS20$=;|a#WH=h1JW>%a z_mfznPsXxm<>ct5N*~Fa5i3Oe8%XI%-+9RRBjWr4n#UT{f-k#S84Idck4(KAX*zxD zukWw>mRSWYj74#}P%G}1>WKCbO(dx?YGf)pB_3GS^2{H5O$;^hhzn-dPfR4KT|_sX z^c_<^KNJ^2N%gWY*BA2Z+2z$W>MpUQw68u|3ih)?w6SUMS=2yh1R{W02ej>krO0}RU_bj@rOwU)-&G*F_$sq1} z>EL>=cFeQpe@KW+L6fb#NYtASWabz3c5dB_bJsPb8ZxBhfNKFMIa-0EqUb=?hZv?G zDa|oGj9zBd&*+$cdO)08tCzHFqq(h8tG8)v^jUf~3lDV)gTRl|kS*V7pTLNX{n#wH z35=M8V<36X1-(`e)9tJ0)#s79MH_w|`3@w0IY|?(np!cWCFf|q@s=2o3!%$ZHSBko zr9rM44I}LSNWX@myDNH$Z#Zij-8Z?u?*S}}Mn@AVUv{qAG{v7r?-v^9sC@^r@9Tc| zbp;{N9%`aECN8aJ7c%*|WeflHx7kCJe2~e!kJX?(7IKTL51~l#@KMHE9_>y4BGMy2 zmk>82^8Fqh6q|nS$jOmLkmZpY@jRn~H{{^ZM0xXE3-#a~oO5Mg*A7(J(v`A;2vdin zbjsPMnnNhm1WjcDqEq5N@NoLBRw_Cq@|P7 zM_i*MfrmQGTyA;;4Z6Pc#+x#|F=2Gasu|IDP_iG(9UYmPiZnqju&iSy34H?os;A0J zEE8Jgl|DF4=%K{3s`ARvj92kid1ZcDJ~n?NA)aqX3uX0|#CZ>YDlyS@-)JS&f)#!A z=mp@vm=ITyQ)yXM$JEol^orWFF7?aFY?}FBL03-Lw1xI$m<&bn*4M% z>w*-sNNvR&hM>!n?vSi!9*XBVrP3DRlh~fNi57HNq==DcLsH2%ecw!m zYi5ov`iHE1Ja$HdHMlusSjh z9SQ|nxmtl>fiVA3LcGvkYPhNEq*%je$B00ocFdz?ns&@JZf(1j{_vEz8gU*>*0%Qf zAQq=WGh#&bfGdZRbD`6>KDWljjR=>N51K9U!A?5hEAuAo%E5=)N8^$_(1uh8&gIog zIOHe6r@X26CHGpF4;?U{dNcd%kX>_r+-(h_lf<$EhdI z#zl9E`qrN3*%HL8I4i4l$Ox-NRg+dsLqFBk>@Bqt>-zVEQB)@v9X^ML=6-dCEZW>E z=+x;w%%Y>9GW~~>oJbra^_RFYi0qgz4NbmnT#W6*yP1V#fIk$2`|5fQb=qw1$Qz{Z z`QRoOFneKZ3x&iAwcskk@(HvdDl+a?oO<)*W0$R9W0T^H|8sGfz27<|#(b2}+$E29 zv?>4;Nqv(4|3w+?-}+o4i}FnOoFa++>?C>iBqSM4IL}y!1Eqvx2(j@&i~MGex+{Kp z`T-N)f*5TvT@X=a1y%hLafj2`)Xz8_2`ws3Bq<@c0TU0=VJt8Cp@$ry{J8{<9{F@S zTABN#`6HhouEE7WbwXMe0EAkSHY)7(rA427cR`GXr0S9WTFjwqNS5c8tVa(xB{uyi zH;*#kZzK8Kv=EDxE!*105eM`(`n&uV(X%ZtN2%0Qdf{FqSA?%Q!8h@s<&G*-bm*3H z(rBAB-xh=JyQH{~Tgoh3tGVSseh)>1tvdvaYUKnm@7-d=}Z-ST;71@8mx#U8+(NP=BhZ?ipzEJ0!q3Mb2zoUU}YCq zGmCWOGC+A`XIC@J3pjMVO00xZ)I#bla+aS z%2L)CB_j`-|2!d*9ImRyRk|@kM@{br!qf>F6W=g8Jz3JtkV4C8jTw08 z`j!ehQb|tz@Kp3!G!KxxNLX&6){$uT z>!2C;OohPKb>mc!sR^uOGPMkL%@0MAb1NZG9*ctLX}pL^RZVXVwb^qjVm2V4oGj^b zgXox6aCwyu!H1XVnkDF@7Q#mmAW>J|E4Rk=)s}+NL+@_@)1l62YlJ)X{G7crDg0Q zm1X{>$Vg+PAoCroJ4oylQ=;^HkZhG*srVCB#@5@XTe#LvhwmNo{MQn=gE%;C#wa z+kt-<0J2--TU2k}@yUzBLVgqjId`0s@V{5?O_vl1&$FY9IL0O`6uYjCRx7YoLWseJk+K^@x7%*9*~b0o}#e#%ZBoGZ6c$v9kio)6GsJ8{E9EOqPz* zAAe?jB;qf$y3?t8lLz#m1m*u9QuX;9Nv$M{t7_2d?W?}yVlA8^@8n{wXR2a;LLG(B zz$(@9mKb2HRO^}<8Fk9Z$I~RpX2S%?g|zm#<5T^LUh(^8{tckSO3Am}(Ki5H29g*7 z-E&9Zl*Sy|A&J6O4K5TiSk?Go?pnpTFtMy15hm6swlG+u_&_@1uC&)6h**+z*)Lrp z*W#r)~cn-1@@F;Qi1U06}^Zz8KnYQ9NBSJxkxh|g5x|B_1E_~2G*e;T)y zG&e}QlU?o5(Nh=bpMVKyf^{-m_+vfDN6M@+N_x6jaKzKt-uwAFbY@WQX9rbsyE-il zR|%&)H#vjPb`x@gJS~pxy7x%AZEn;mc&Wz80u+0TlGFD%yGSXlL0$n@jNr~@efU^* z`SRz?-|iD5u4a{&w z6&%Z?-#u91JF;K8F*>i|;SyK3L521(^vt$+VJN zTSkI=9VZ-S`Gf<%?7>;CqUJZX|(y47<30Ck&i1-7e26B z&Uu8K6Z@Tnc#ae`+F?=Cl5!*OyLHv|Ou**7A#L6*qpMrdpQ+CN3kh!S4M9O^Zd^cs zR&R|T-)*M#cl5!l;F>HnN6iT2#Tb-$a80esai+_Y%~5pj>h}3@+<@KEi%FSzYL&ho z!r$xJ%m;xw6Z-b2t(EKymn-Mi=I2Ly#`ncprRb1U8gILEVV2Jsc9Xe z7l+npeW^Z&AmyU3vBPaWx*=Yg$t^6c;eP+j;se~pke|)2ydPHO`hs||?MRfy7H6&H zS>Tuw&$S=6LO&1?wa~ORPbvY&HOFyzR?-Layr&(B$RGF&lv`$TCBvZ4X6CH5`BnT* z!At1e^dsmSD9gu*xKXmS+%x_&-*-)>@mCYL6&lKi^`2uy-$3OVsYGThx^L7sK{=-PzV$DE{}+0ozUWtu zzR5|4`))2{-1A!v5*19LB#&;DT$tUHdAvh4jMucQfZN{mulJ~)0eFa}Bcc1E*$ws5>eTyF>oSx3 zrX$a#ssBS1^r>~#y_GG*9sM^z%X^_f3|iiy9ir8cXx*Edl1#ziO>{>4CU)wW^vwoe zvQL*B#31&Mffy$d6hlStmv?A~i0v>pjq`qWhLPf?Ptg>6G5C`-nf)sIQbP6!sEqiJ zP#V#vU;KkLI?)H2gL9NfFGwWcHST$KFJ5TU+rCR0AmhC6#_y}pwZ)J+Mp{b;E<L(>IClr2~q(PtmS zrs&;^?uKpol9}^i)e(1wpfuT3fPbw==Wbd)W<=AUbz#dajaiIZ{9Zz0vTh!Gf6^gG zd!Aa8N^v%thX&Q5tedTmq(Xf;^t^9tsQ*9UBCuX*!99jzZDw^yu^-{BA7_Fcf9t!` zR{vSGsDvC5ag6A;Iui1*X&UeQv0@%RTM7D#q|2-^-JPIsxksGbJM}!G{_mjCAh#hO zj?rl0lQgO^)~XdGlhv5UuCrYaL(L=df44_mVc`u!FM2oH&eIsii2dJVvH!?Cf!#`n z9*=rzy`eDP8%hxGeVX7+I=-$}4TcWU6L zdc`+V&aZLGv`h3A5tt* z{@)}E5eHO%MoGncsNlq~L~yvKLNxJOXDJKtz7&dk#xaP~bn^Z-+;S*!4>mDwxqq-m zrQ`NYGwXxCGm&<;3H$2N>^}*XH2HU#B|n&YAX(Cd2wc=z9O(b` zMhInqKa<`i{UKsJQ~pQvOt7x)oDwbLJEX(`Z{Rqy-*GmuJ6-&T;8cH$W(=qL2X}~_ zQa$VDS6cQtUjMpV$b6bcNy^i(3a$Ip^6mPk)@$wBPQz62|CB!+>FWqJqT}I~{!ZC4 zI~K$1e^T+fxqJdNsQFu1rRllZw(~R$?f-_2_qWK#Y`lMPha3OL8R?VR_^PjASmKPG z4#LIyJPc)&&(5{9$Ho}jmhl}T{%0BSN9O7Y?DlrBYdDPQCn9=(!>B=$&#r|2sf-u~ z@DJ{g4odP@%sEL1b{D#q`R1>SrJFxb^3=Mfybt#`GH$y6l77cE&u{F7I2{PWNBqAc z5=Q~<=b&HYzz-~TNP%xNCoG!_k^)Cj?M?Jyr_)?(mny8n91Cnp7#yL947?`3wtPiA#duW^xCp5jS-$FS94wObHrkvp!sj=zoCsoWf z9|FhTNL@boHo_q#TW+UNjPDy9t`UhbL4RJGpohm3Mi)#c?d_dJA6pxD{{P#itN8?E9@^3O9pR?XZoMALyX&%?r^1b;~3rq>m(zzh|5nhcw0XA3*Vt@VSV^C?4NfjaA2OUnZ*?jmgoZ z)dkfXAfc675cy<}rDH^A-Xb&fMsAJWWgT&9|4T6wz zNhA9DJUvVU+CiVL`Hl~^C?Ydpo;dTLLTj@gW8k9c;u)#oi&1uE3ECTG7i3HGuS`F+ zE-F1HfxapKD|OeHd#<20r4PG0%yDoh_;^Nkh)-4G^Ul=kk_{wGkukCyA$5|*>YRM! zkAkBx`iH=XD!p zox9uIp+d0LTzYrBZ=YK5>_fn5@8Kc0d?BpYI;O-JHl;(Xf0D7zs6w1XEFSAxNUORJ z@!Qco<6%+Fr|Rg4@4%5`MF08^DQW)%jd%35`eE~w9i5T9{ieaK4Uu8b;UqWXE~%r4 zO^f+GctX(1KG0%3q2O?hNEgSsOv?v*lwA4&_b7K<{HcCL!w-BkJz2^7W@z|hl)VZw zXU!wfI~_Q!_te^WMd^RWPoD|B>Hkw&1heH#ZL4KK-a-8`hYvL)niy;$d^0*EhRUk0 zOj%L~`Js-q89Y=oBKfl|v>Ed+=eH)EP~-RTJ0)x@e7MC>BVH%3t#gwwpS}JFzwDmN^>7_zswmsY(^)r8qAci}C(rvxy~`Sf8vl8+o}=xv8f9 zJ$4j&CkR2zj)u(8*hV+_1;1l{>_aeWhq=`VPEi28R_vO(Y;5sUYpne(h5y2u*sa&A zPI_|k@#Dv8hjHe?nLy|GWT8>trR+^(>lO}t*70L9`_um#H$mcE6f;cY;(k?gsFWd& z^~zG>BTKI1PQ&Uul}Qg^llUr{D?LxDn|FPG{YKB#2bIdso;`tF2^y)^7u=6btl$1r zzunl7uQxV4@A1d&&w8Hc>FKl_kWPCB;E&sz166|cjaNiU{qJT9KV@gXdRMql=s-!S dm`=Y`a`0n!xYLdgVWjTMk$2^|Lvbj?{{ayf?iv69 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AdaptingOSStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AdaptingOSStep.php new file mode 100644 index 000000000000..6fc60a510df5 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AdaptingOSStep.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.AdaptingOSStep + */ +class AdaptingOSStep extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationRequest.php new file mode 100644 index 000000000000..d4a9f9a19d65 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationRequest.php @@ -0,0 +1,115 @@ +google.cloud.vmmigration.v1.AddGroupMigrationRequest + */ +class AddGroupMigrationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full path name of the Group to add to. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $group = ''; + /** + * The full path name of the MigratingVm to add. + * + * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { + */ + protected $migrating_vm = ''; + + /** + * @param string $group Required. The full path name of the Group to add to. Please see + * {@see VmMigrationClient::groupName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\AddGroupMigrationRequest + * + * @experimental + */ + public static function build(string $group): self + { + return (new self()) + ->setGroup($group); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $group + * Required. The full path name of the Group to add to. + * @type string $migrating_vm + * The full path name of the MigratingVm to add. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full path name of the Group to add to. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getGroup() + { + return $this->group; + } + + /** + * Required. The full path name of the Group to add to. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkString($var, True); + $this->group = $var; + + return $this; + } + + /** + * The full path name of the MigratingVm to add. + * + * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getMigratingVm() + { + return $this->migrating_vm; + } + + /** + * The full path name of the MigratingVm to add. + * + * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMigratingVm($var) + { + GPBUtil::checkString($var, True); + $this->migrating_vm = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationResponse.php new file mode 100644 index 000000000000..d1f198d54029 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationResponse.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.AddGroupMigrationResponse + */ +class AddGroupMigrationResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ApplianceVersion.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ApplianceVersion.php new file mode 100644 index 000000000000..da08b27da901 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ApplianceVersion.php @@ -0,0 +1,169 @@ +google.cloud.vmmigration.v1.ApplianceVersion + */ +class ApplianceVersion extends \Google\Protobuf\Internal\Message +{ + /** + * The appliance version. + * + * Generated from protobuf field string version = 1; + */ + protected $version = ''; + /** + * A link for downloading the version. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * Determine whether it's critical to upgrade the appliance to this version. + * + * Generated from protobuf field bool critical = 3; + */ + protected $critical = false; + /** + * Link to a page that contains the version release notes. + * + * Generated from protobuf field string release_notes_uri = 4; + */ + protected $release_notes_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $version + * The appliance version. + * @type string $uri + * A link for downloading the version. + * @type bool $critical + * Determine whether it's critical to upgrade the appliance to this version. + * @type string $release_notes_uri + * Link to a page that contains the version release notes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The appliance version. + * + * Generated from protobuf field string version = 1; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * The appliance version. + * + * Generated from protobuf field string version = 1; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * A link for downloading the version. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * A link for downloading the version. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Determine whether it's critical to upgrade the appliance to this version. + * + * Generated from protobuf field bool critical = 3; + * @return bool + */ + public function getCritical() + { + return $this->critical; + } + + /** + * Determine whether it's critical to upgrade the appliance to this version. + * + * Generated from protobuf field bool critical = 3; + * @param bool $var + * @return $this + */ + public function setCritical($var) + { + GPBUtil::checkBool($var); + $this->critical = $var; + + return $this; + } + + /** + * Link to a page that contains the version release notes. + * + * Generated from protobuf field string release_notes_uri = 4; + * @return string + */ + public function getReleaseNotesUri() + { + return $this->release_notes_uri; + } + + /** + * Link to a page that contains the version release notes. + * + * Generated from protobuf field string release_notes_uri = 4; + * @param string $var + * @return $this + */ + public function setReleaseNotesUri($var) + { + GPBUtil::checkString($var, True); + $this->release_notes_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense.php new file mode 100644 index 000000000000..c015b9cf1649 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense.php @@ -0,0 +1,101 @@ +google.cloud.vmmigration.v1.AppliedLicense + */ +class AppliedLicense extends \Google\Protobuf\Internal\Message +{ + /** + * The license type that was used in OS adaptation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense.Type type = 1; + */ + protected $type = 0; + /** + * The OS license returned from the adaptation module's report. + * + * Generated from protobuf field string os_license = 2; + */ + protected $os_license = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The license type that was used in OS adaptation. + * @type string $os_license + * The OS license returned from the adaptation module's report. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The license type that was used in OS adaptation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense.Type type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The license type that was used in OS adaptation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense.Type type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AppliedLicense\Type::class); + $this->type = $var; + + return $this; + } + + /** + * The OS license returned from the adaptation module's report. + * + * Generated from protobuf field string os_license = 2; + * @return string + */ + public function getOsLicense() + { + return $this->os_license; + } + + /** + * The OS license returned from the adaptation module's report. + * + * Generated from protobuf field string os_license = 2; + * @param string $var + * @return $this + */ + public function setOsLicense($var) + { + GPBUtil::checkString($var, True); + $this->os_license = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense/Type.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense/Type.php new file mode 100644 index 000000000000..27008d8cc57e --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense/Type.php @@ -0,0 +1,71 @@ +google.cloud.vmmigration.v1.AppliedLicense.Type + */ +class Type +{ + /** + * Unspecified license for the OS. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * No license available for the OS. + * + * Generated from protobuf enum NONE = 1; + */ + const NONE = 1; + /** + * The license type is Pay As You Go license type. + * + * Generated from protobuf enum PAYG = 2; + */ + const PAYG = 2; + /** + * The license type is Bring Your Own License type. + * + * Generated from protobuf enum BYOL = 3; + */ + const BYOL = 3; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::NONE => 'NONE', + self::PAYG => 'PAYG', + self::BYOL => 'BYOL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\VMMigration\V1\AppliedLicense_Type::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AvailableUpdates.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AvailableUpdates.php new file mode 100644 index 000000000000..a32202170f8c --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AvailableUpdates.php @@ -0,0 +1,137 @@ +google.cloud.vmmigration.v1.AvailableUpdates + */ +class AvailableUpdates extends \Google\Protobuf\Internal\Message +{ + /** + * The newest deployable version of the appliance. + * The current appliance can't be updated into this version, and the owner + * must manually deploy this OVA to a new appliance. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion new_deployable_appliance = 1; + */ + protected $new_deployable_appliance = null; + /** + * The latest version for in place update. + * The current appliance can be updated to this version using the API or m4c + * CLI. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion in_place_update = 2; + */ + protected $in_place_update = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\ApplianceVersion $new_deployable_appliance + * The newest deployable version of the appliance. + * The current appliance can't be updated into this version, and the owner + * must manually deploy this OVA to a new appliance. + * @type \Google\Cloud\VMMigration\V1\ApplianceVersion $in_place_update + * The latest version for in place update. + * The current appliance can be updated to this version using the API or m4c + * CLI. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The newest deployable version of the appliance. + * The current appliance can't be updated into this version, and the owner + * must manually deploy this OVA to a new appliance. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion new_deployable_appliance = 1; + * @return \Google\Cloud\VMMigration\V1\ApplianceVersion|null + */ + public function getNewDeployableAppliance() + { + return $this->new_deployable_appliance; + } + + public function hasNewDeployableAppliance() + { + return isset($this->new_deployable_appliance); + } + + public function clearNewDeployableAppliance() + { + unset($this->new_deployable_appliance); + } + + /** + * The newest deployable version of the appliance. + * The current appliance can't be updated into this version, and the owner + * must manually deploy this OVA to a new appliance. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion new_deployable_appliance = 1; + * @param \Google\Cloud\VMMigration\V1\ApplianceVersion $var + * @return $this + */ + public function setNewDeployableAppliance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ApplianceVersion::class); + $this->new_deployable_appliance = $var; + + return $this; + } + + /** + * The latest version for in place update. + * The current appliance can be updated to this version using the API or m4c + * CLI. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion in_place_update = 2; + * @return \Google\Cloud\VMMigration\V1\ApplianceVersion|null + */ + public function getInPlaceUpdate() + { + return $this->in_place_update; + } + + public function hasInPlaceUpdate() + { + return isset($this->in_place_update); + } + + public function clearInPlaceUpdate() + { + unset($this->in_place_update); + } + + /** + * The latest version for in place update. + * The current appliance can be updated to this version using the API or m4c + * CLI. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion in_place_update = 2; + * @param \Google\Cloud\VMMigration\V1\ApplianceVersion $var + * @return $this + */ + public function setInPlaceUpdate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ApplianceVersion::class); + $this->in_place_update = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSecurityGroup.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSecurityGroup.php new file mode 100644 index 000000000000..ee8d6768c507 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSecurityGroup.php @@ -0,0 +1,101 @@ +google.cloud.vmmigration.v1.AwsSecurityGroup + */ +class AwsSecurityGroup extends \Google\Protobuf\Internal\Message +{ + /** + * The AWS security group id. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * The AWS security group name. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * The AWS security group id. + * @type string $name + * The AWS security group name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The AWS security group id. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * The AWS security group id. + * + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The AWS security group name. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The AWS security group name. + * + * Generated from protobuf field string name = 2; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails.php new file mode 100644 index 000000000000..31c465db770b --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails.php @@ -0,0 +1,348 @@ +google.cloud.vmmigration.v1.AwsSourceDetails + */ +class AwsSourceDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The AWS region that the source VMs will be migrated from. + * + * Generated from protobuf field string aws_region = 3 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $aws_region = ''; + /** + * Output only. State of the source as determined by the health check. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Provides details on the state of the Source in case of an + * error. + * + * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * AWS resource tags to limit the scope of the source inventory. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSourceDetails.Tag inventory_tag_list = 10; + */ + private $inventory_tag_list; + /** + * AWS security group names to limit the scope of the source + * inventory. + * + * Generated from protobuf field repeated string inventory_security_group_names = 7; + */ + private $inventory_security_group_names; + /** + * User specified tags to add to every M2VM generated resource in AWS. + * These tags will be set in addition to the default tags that are set as part + * of the migration process. The tags must not begin with the reserved prefix + * `m2vm`. + * + * Generated from protobuf field map migration_resources_user_tags = 8; + */ + private $migration_resources_user_tags; + /** + * Output only. The source's public IP. All communication initiated by this + * source will originate from this IP. + * + * Generated from protobuf field string public_ip = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $public_ip = ''; + protected $credentials_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\AwsSourceDetails\AccessKeyCredentials $access_key_creds + * AWS Credentials using access key id and secret. + * @type string $aws_region + * Immutable. The AWS region that the source VMs will be migrated from. + * @type int $state + * Output only. State of the source as determined by the health check. + * @type \Google\Rpc\Status $error + * Output only. Provides details on the state of the Source in case of an + * error. + * @type array<\Google\Cloud\VMMigration\V1\AwsSourceDetails\Tag>|\Google\Protobuf\Internal\RepeatedField $inventory_tag_list + * AWS resource tags to limit the scope of the source inventory. + * @type array|\Google\Protobuf\Internal\RepeatedField $inventory_security_group_names + * AWS security group names to limit the scope of the source + * inventory. + * @type array|\Google\Protobuf\Internal\MapField $migration_resources_user_tags + * User specified tags to add to every M2VM generated resource in AWS. + * These tags will be set in addition to the default tags that are set as part + * of the migration process. The tags must not begin with the reserved prefix + * `m2vm`. + * @type string $public_ip + * Output only. The source's public IP. All communication initiated by this + * source will originate from this IP. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * AWS Credentials using access key id and secret. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails.AccessKeyCredentials access_key_creds = 11; + * @return \Google\Cloud\VMMigration\V1\AwsSourceDetails\AccessKeyCredentials|null + */ + public function getAccessKeyCreds() + { + return $this->readOneof(11); + } + + public function hasAccessKeyCreds() + { + return $this->hasOneof(11); + } + + /** + * AWS Credentials using access key id and secret. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails.AccessKeyCredentials access_key_creds = 11; + * @param \Google\Cloud\VMMigration\V1\AwsSourceDetails\AccessKeyCredentials $var + * @return $this + */ + public function setAccessKeyCreds($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AwsSourceDetails\AccessKeyCredentials::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Immutable. The AWS region that the source VMs will be migrated from. + * + * Generated from protobuf field string aws_region = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getAwsRegion() + { + return $this->aws_region; + } + + /** + * Immutable. The AWS region that the source VMs will be migrated from. + * + * Generated from protobuf field string aws_region = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setAwsRegion($var) + { + GPBUtil::checkString($var, True); + $this->aws_region = $var; + + return $this; + } + + /** + * Output only. State of the source as determined by the health check. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the source as determined by the health check. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsSourceDetails\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Provides details on the state of the Source in case of an + * error. + * + * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. Provides details on the state of the Source in case of an + * error. + * + * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * AWS resource tags to limit the scope of the source inventory. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSourceDetails.Tag inventory_tag_list = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInventoryTagList() + { + return $this->inventory_tag_list; + } + + /** + * AWS resource tags to limit the scope of the source inventory. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSourceDetails.Tag inventory_tag_list = 10; + * @param array<\Google\Cloud\VMMigration\V1\AwsSourceDetails\Tag>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInventoryTagList($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\AwsSourceDetails\Tag::class); + $this->inventory_tag_list = $arr; + + return $this; + } + + /** + * AWS security group names to limit the scope of the source + * inventory. + * + * Generated from protobuf field repeated string inventory_security_group_names = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInventorySecurityGroupNames() + { + return $this->inventory_security_group_names; + } + + /** + * AWS security group names to limit the scope of the source + * inventory. + * + * Generated from protobuf field repeated string inventory_security_group_names = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInventorySecurityGroupNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->inventory_security_group_names = $arr; + + return $this; + } + + /** + * User specified tags to add to every M2VM generated resource in AWS. + * These tags will be set in addition to the default tags that are set as part + * of the migration process. The tags must not begin with the reserved prefix + * `m2vm`. + * + * Generated from protobuf field map migration_resources_user_tags = 8; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMigrationResourcesUserTags() + { + return $this->migration_resources_user_tags; + } + + /** + * User specified tags to add to every M2VM generated resource in AWS. + * These tags will be set in addition to the default tags that are set as part + * of the migration process. The tags must not begin with the reserved prefix + * `m2vm`. + * + * Generated from protobuf field map migration_resources_user_tags = 8; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMigrationResourcesUserTags($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->migration_resources_user_tags = $arr; + + return $this; + } + + /** + * Output only. The source's public IP. All communication initiated by this + * source will originate from this IP. + * + * Generated from protobuf field string public_ip = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPublicIp() + { + return $this->public_ip; + } + + /** + * Output only. The source's public IP. All communication initiated by this + * source will originate from this IP. + * + * Generated from protobuf field string public_ip = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPublicIp($var) + { + GPBUtil::checkString($var, True); + $this->public_ip = $var; + + return $this; + } + + /** + * @return string + */ + public function getCredentialsType() + { + return $this->whichOneof("credentials_type"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/AccessKeyCredentials.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/AccessKeyCredentials.php new file mode 100644 index 000000000000..42e4c86fab4a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/AccessKeyCredentials.php @@ -0,0 +1,104 @@ +google.cloud.vmmigration.v1.AwsSourceDetails.AccessKeyCredentials + */ +class AccessKeyCredentials extends \Google\Protobuf\Internal\Message +{ + /** + * AWS access key ID. + * + * Generated from protobuf field string access_key_id = 1; + */ + protected $access_key_id = ''; + /** + * Input only. AWS secret access key. + * + * Generated from protobuf field string secret_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $secret_access_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $access_key_id + * AWS access key ID. + * @type string $secret_access_key + * Input only. AWS secret access key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * AWS access key ID. + * + * Generated from protobuf field string access_key_id = 1; + * @return string + */ + public function getAccessKeyId() + { + return $this->access_key_id; + } + + /** + * AWS access key ID. + * + * Generated from protobuf field string access_key_id = 1; + * @param string $var + * @return $this + */ + public function setAccessKeyId($var) + { + GPBUtil::checkString($var, True); + $this->access_key_id = $var; + + return $this; + } + + /** + * Input only. AWS secret access key. + * + * Generated from protobuf field string secret_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getSecretAccessKey() + { + return $this->secret_access_key; + } + + /** + * Input only. AWS secret access key. + * + * Generated from protobuf field string secret_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSecretAccessKey($var) + { + GPBUtil::checkString($var, True); + $this->secret_access_key = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AccessKeyCredentials::class, \Google\Cloud\VMMigration\V1\AwsSourceDetails_AccessKeyCredentials::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/State.php new file mode 100644 index 000000000000..64b61a6c73a5 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/State.php @@ -0,0 +1,74 @@ +google.cloud.vmmigration.v1.AwsSourceDetails.State + */ +class State +{ + /** + * The state is unknown. This is used for API compatibility only and is not + * used by the system. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The state was not sampled by the health checks yet. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The source is available but might not be usable yet due to invalid + * credentials or another reason. + * The error message will contain further details. + * + * Generated from protobuf enum FAILED = 2; + */ + const FAILED = 2; + /** + * The source exists and its credentials were verified. + * + * Generated from protobuf enum ACTIVE = 3; + */ + const ACTIVE = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::FAILED => 'FAILED', + self::ACTIVE => 'ACTIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VMMigration\V1\AwsSourceDetails_State::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/Tag.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/Tag.php new file mode 100644 index 000000000000..7604d5c11845 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/Tag.php @@ -0,0 +1,104 @@ +google.cloud.vmmigration.v1.AwsSourceDetails.Tag + */ +class Tag extends \Google\Protobuf\Internal\Message +{ + /** + * Key of tag. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * Value of tag. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * Key of tag. + * @type string $value + * Value of tag. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Key of tag. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Key of tag. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * Value of tag. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Value of tag. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Tag::class, \Google\Cloud\VMMigration\V1\AwsSourceDetails_Tag::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails.php new file mode 100644 index 000000000000..b8365eebfd4d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails.php @@ -0,0 +1,101 @@ +google.cloud.vmmigration.v1.AwsSourceVmDetails + */ +class AwsSourceVmDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The firmware type of the source VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1; + */ + protected $firmware = 0; + /** + * The total size of the disks being migrated in bytes. + * + * Generated from protobuf field int64 committed_storage_bytes = 2; + */ + protected $committed_storage_bytes = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $firmware + * The firmware type of the source VM. + * @type int|string $committed_storage_bytes + * The total size of the disks being migrated in bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The firmware type of the source VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1; + * @return int + */ + public function getFirmware() + { + return $this->firmware; + } + + /** + * The firmware type of the source VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1; + * @param int $var + * @return $this + */ + public function setFirmware($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsSourceVmDetails\Firmware::class); + $this->firmware = $var; + + return $this; + } + + /** + * The total size of the disks being migrated in bytes. + * + * Generated from protobuf field int64 committed_storage_bytes = 2; + * @return int|string + */ + public function getCommittedStorageBytes() + { + return $this->committed_storage_bytes; + } + + /** + * The total size of the disks being migrated in bytes. + * + * Generated from protobuf field int64 committed_storage_bytes = 2; + * @param int|string $var + * @return $this + */ + public function setCommittedStorageBytes($var) + { + GPBUtil::checkInt64($var); + $this->committed_storage_bytes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails/Firmware.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails/Firmware.php new file mode 100644 index 000000000000..5a55b923fe10 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails/Firmware.php @@ -0,0 +1,64 @@ +google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware + */ +class Firmware +{ + /** + * The firmware is unknown. + * + * Generated from protobuf enum FIRMWARE_UNSPECIFIED = 0; + */ + const FIRMWARE_UNSPECIFIED = 0; + /** + * The firmware is EFI. + * + * Generated from protobuf enum EFI = 1; + */ + const EFI = 1; + /** + * The firmware is BIOS. + * + * Generated from protobuf enum BIOS = 2; + */ + const BIOS = 2; + + private static $valueToName = [ + self::FIRMWARE_UNSPECIFIED => 'FIRMWARE_UNSPECIFIED', + self::EFI => 'EFI', + self::BIOS => 'BIOS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Firmware::class, \Google\Cloud\VMMigration\V1\AwsSourceVmDetails_Firmware::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails.php new file mode 100644 index 000000000000..7535504cdd78 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails.php @@ -0,0 +1,645 @@ +google.cloud.vmmigration.v1.AwsVmDetails + */ +class AwsVmDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The VM ID in AWS. + * + * Generated from protobuf field string vm_id = 1; + */ + protected $vm_id = ''; + /** + * The display name of the VM. Note that this value is not necessarily unique. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * The id of the AWS's source this VM is connected to. + * + * Generated from protobuf field string source_id = 3; + */ + protected $source_id = ''; + /** + * The descriptive name of the AWS's source this VM is connected to. + * + * Generated from protobuf field string source_description = 4; + */ + protected $source_description = ''; + /** + * Output only. The power state of the VM at the moment list was taken. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.PowerState power_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $power_state = 0; + /** + * The number of cpus the VM has. + * + * Generated from protobuf field int32 cpu_count = 6; + */ + protected $cpu_count = 0; + /** + * The memory size of the VM in MB. + * + * Generated from protobuf field int32 memory_mb = 7; + */ + protected $memory_mb = 0; + /** + * The number of disks the VM has. + * + * Generated from protobuf field int32 disk_count = 8; + */ + protected $disk_count = 0; + /** + * The total size of the storage allocated to the VM in MB. + * + * Generated from protobuf field int64 committed_storage_mb = 9; + */ + protected $committed_storage_mb = 0; + /** + * The VM's OS. + * + * Generated from protobuf field string os_description = 10; + */ + protected $os_description = ''; + /** + * The VM Boot Option. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.BootOption boot_option = 11; + */ + protected $boot_option = 0; + /** + * The instance type of the VM. + * + * Generated from protobuf field string instance_type = 12; + */ + protected $instance_type = ''; + /** + * The VPC ID the VM belongs to. + * + * Generated from protobuf field string vpc_id = 13; + */ + protected $vpc_id = ''; + /** + * The security groups the VM belongs to. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSecurityGroup security_groups = 14; + */ + private $security_groups; + /** + * The tags of the VM. + * + * Generated from protobuf field map tags = 15; + */ + private $tags; + /** + * The AWS zone of the VM. + * + * Generated from protobuf field string zone = 16; + */ + protected $zone = ''; + /** + * The virtualization type. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmVirtualizationType virtualization_type = 17; + */ + protected $virtualization_type = 0; + /** + * The CPU architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmArchitecture architecture = 18; + */ + protected $architecture = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $vm_id + * The VM ID in AWS. + * @type string $display_name + * The display name of the VM. Note that this value is not necessarily unique. + * @type string $source_id + * The id of the AWS's source this VM is connected to. + * @type string $source_description + * The descriptive name of the AWS's source this VM is connected to. + * @type int $power_state + * Output only. The power state of the VM at the moment list was taken. + * @type int $cpu_count + * The number of cpus the VM has. + * @type int $memory_mb + * The memory size of the VM in MB. + * @type int $disk_count + * The number of disks the VM has. + * @type int|string $committed_storage_mb + * The total size of the storage allocated to the VM in MB. + * @type string $os_description + * The VM's OS. + * @type int $boot_option + * The VM Boot Option. + * @type string $instance_type + * The instance type of the VM. + * @type string $vpc_id + * The VPC ID the VM belongs to. + * @type array<\Google\Cloud\VMMigration\V1\AwsSecurityGroup>|\Google\Protobuf\Internal\RepeatedField $security_groups + * The security groups the VM belongs to. + * @type array|\Google\Protobuf\Internal\MapField $tags + * The tags of the VM. + * @type string $zone + * The AWS zone of the VM. + * @type int $virtualization_type + * The virtualization type. + * @type int $architecture + * The CPU architecture. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The VM ID in AWS. + * + * Generated from protobuf field string vm_id = 1; + * @return string + */ + public function getVmId() + { + return $this->vm_id; + } + + /** + * The VM ID in AWS. + * + * Generated from protobuf field string vm_id = 1; + * @param string $var + * @return $this + */ + public function setVmId($var) + { + GPBUtil::checkString($var, True); + $this->vm_id = $var; + + return $this; + } + + /** + * The display name of the VM. Note that this value is not necessarily unique. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the VM. Note that this value is not necessarily unique. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The id of the AWS's source this VM is connected to. + * + * Generated from protobuf field string source_id = 3; + * @return string + */ + public function getSourceId() + { + return $this->source_id; + } + + /** + * The id of the AWS's source this VM is connected to. + * + * Generated from protobuf field string source_id = 3; + * @param string $var + * @return $this + */ + public function setSourceId($var) + { + GPBUtil::checkString($var, True); + $this->source_id = $var; + + return $this; + } + + /** + * The descriptive name of the AWS's source this VM is connected to. + * + * Generated from protobuf field string source_description = 4; + * @return string + */ + public function getSourceDescription() + { + return $this->source_description; + } + + /** + * The descriptive name of the AWS's source this VM is connected to. + * + * Generated from protobuf field string source_description = 4; + * @param string $var + * @return $this + */ + public function setSourceDescription($var) + { + GPBUtil::checkString($var, True); + $this->source_description = $var; + + return $this; + } + + /** + * Output only. The power state of the VM at the moment list was taken. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.PowerState power_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getPowerState() + { + return $this->power_state; + } + + /** + * Output only. The power state of the VM at the moment list was taken. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.PowerState power_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setPowerState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsVmDetails\PowerState::class); + $this->power_state = $var; + + return $this; + } + + /** + * The number of cpus the VM has. + * + * Generated from protobuf field int32 cpu_count = 6; + * @return int + */ + public function getCpuCount() + { + return $this->cpu_count; + } + + /** + * The number of cpus the VM has. + * + * Generated from protobuf field int32 cpu_count = 6; + * @param int $var + * @return $this + */ + public function setCpuCount($var) + { + GPBUtil::checkInt32($var); + $this->cpu_count = $var; + + return $this; + } + + /** + * The memory size of the VM in MB. + * + * Generated from protobuf field int32 memory_mb = 7; + * @return int + */ + public function getMemoryMb() + { + return $this->memory_mb; + } + + /** + * The memory size of the VM in MB. + * + * Generated from protobuf field int32 memory_mb = 7; + * @param int $var + * @return $this + */ + public function setMemoryMb($var) + { + GPBUtil::checkInt32($var); + $this->memory_mb = $var; + + return $this; + } + + /** + * The number of disks the VM has. + * + * Generated from protobuf field int32 disk_count = 8; + * @return int + */ + public function getDiskCount() + { + return $this->disk_count; + } + + /** + * The number of disks the VM has. + * + * Generated from protobuf field int32 disk_count = 8; + * @param int $var + * @return $this + */ + public function setDiskCount($var) + { + GPBUtil::checkInt32($var); + $this->disk_count = $var; + + return $this; + } + + /** + * The total size of the storage allocated to the VM in MB. + * + * Generated from protobuf field int64 committed_storage_mb = 9; + * @return int|string + */ + public function getCommittedStorageMb() + { + return $this->committed_storage_mb; + } + + /** + * The total size of the storage allocated to the VM in MB. + * + * Generated from protobuf field int64 committed_storage_mb = 9; + * @param int|string $var + * @return $this + */ + public function setCommittedStorageMb($var) + { + GPBUtil::checkInt64($var); + $this->committed_storage_mb = $var; + + return $this; + } + + /** + * The VM's OS. + * + * Generated from protobuf field string os_description = 10; + * @return string + */ + public function getOsDescription() + { + return $this->os_description; + } + + /** + * The VM's OS. + * + * Generated from protobuf field string os_description = 10; + * @param string $var + * @return $this + */ + public function setOsDescription($var) + { + GPBUtil::checkString($var, True); + $this->os_description = $var; + + return $this; + } + + /** + * The VM Boot Option. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.BootOption boot_option = 11; + * @return int + */ + public function getBootOption() + { + return $this->boot_option; + } + + /** + * The VM Boot Option. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.BootOption boot_option = 11; + * @param int $var + * @return $this + */ + public function setBootOption($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsVmDetails\BootOption::class); + $this->boot_option = $var; + + return $this; + } + + /** + * The instance type of the VM. + * + * Generated from protobuf field string instance_type = 12; + * @return string + */ + public function getInstanceType() + { + return $this->instance_type; + } + + /** + * The instance type of the VM. + * + * Generated from protobuf field string instance_type = 12; + * @param string $var + * @return $this + */ + public function setInstanceType($var) + { + GPBUtil::checkString($var, True); + $this->instance_type = $var; + + return $this; + } + + /** + * The VPC ID the VM belongs to. + * + * Generated from protobuf field string vpc_id = 13; + * @return string + */ + public function getVpcId() + { + return $this->vpc_id; + } + + /** + * The VPC ID the VM belongs to. + * + * Generated from protobuf field string vpc_id = 13; + * @param string $var + * @return $this + */ + public function setVpcId($var) + { + GPBUtil::checkString($var, True); + $this->vpc_id = $var; + + return $this; + } + + /** + * The security groups the VM belongs to. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSecurityGroup security_groups = 14; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSecurityGroups() + { + return $this->security_groups; + } + + /** + * The security groups the VM belongs to. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSecurityGroup security_groups = 14; + * @param array<\Google\Cloud\VMMigration\V1\AwsSecurityGroup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSecurityGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\AwsSecurityGroup::class); + $this->security_groups = $arr; + + return $this; + } + + /** + * The tags of the VM. + * + * Generated from protobuf field map tags = 15; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTags() + { + return $this->tags; + } + + /** + * The tags of the VM. + * + * Generated from protobuf field map tags = 15; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + + /** + * The AWS zone of the VM. + * + * Generated from protobuf field string zone = 16; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The AWS zone of the VM. + * + * Generated from protobuf field string zone = 16; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + + /** + * The virtualization type. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmVirtualizationType virtualization_type = 17; + * @return int + */ + public function getVirtualizationType() + { + return $this->virtualization_type; + } + + /** + * The virtualization type. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmVirtualizationType virtualization_type = 17; + * @param int $var + * @return $this + */ + public function setVirtualizationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsVmDetails\VmVirtualizationType::class); + $this->virtualization_type = $var; + + return $this; + } + + /** + * The CPU architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmArchitecture architecture = 18; + * @return int + */ + public function getArchitecture() + { + return $this->architecture; + } + + /** + * The CPU architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmArchitecture architecture = 18; + * @param int $var + * @return $this + */ + public function setArchitecture($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsVmDetails\VmArchitecture::class); + $this->architecture = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/BootOption.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/BootOption.php new file mode 100644 index 000000000000..208852fafad7 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/BootOption.php @@ -0,0 +1,64 @@ +google.cloud.vmmigration.v1.AwsVmDetails.BootOption + */ +class BootOption +{ + /** + * The boot option is unknown. + * + * Generated from protobuf enum BOOT_OPTION_UNSPECIFIED = 0; + */ + const BOOT_OPTION_UNSPECIFIED = 0; + /** + * The boot option is UEFI. + * + * Generated from protobuf enum EFI = 1; + */ + const EFI = 1; + /** + * The boot option is LEGACY-BIOS. + * + * Generated from protobuf enum BIOS = 2; + */ + const BIOS = 2; + + private static $valueToName = [ + self::BOOT_OPTION_UNSPECIFIED => 'BOOT_OPTION_UNSPECIFIED', + self::EFI => 'EFI', + self::BIOS => 'BIOS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BootOption::class, \Google\Cloud\VMMigration\V1\AwsVmDetails_BootOption::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/PowerState.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/PowerState.php new file mode 100644 index 000000000000..5d90c29f7821 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/PowerState.php @@ -0,0 +1,79 @@ +google.cloud.vmmigration.v1.AwsVmDetails.PowerState + */ +class PowerState +{ + /** + * Power state is not specified. + * + * Generated from protobuf enum POWER_STATE_UNSPECIFIED = 0; + */ + const POWER_STATE_UNSPECIFIED = 0; + /** + * The VM is turned on. + * + * Generated from protobuf enum ON = 1; + */ + const ON = 1; + /** + * The VM is turned off. + * + * Generated from protobuf enum OFF = 2; + */ + const OFF = 2; + /** + * The VM is suspended. This is similar to hibernation or sleep + * mode. + * + * Generated from protobuf enum SUSPENDED = 3; + */ + const SUSPENDED = 3; + /** + * The VM is starting. + * + * Generated from protobuf enum PENDING = 4; + */ + const PENDING = 4; + + private static $valueToName = [ + self::POWER_STATE_UNSPECIFIED => 'POWER_STATE_UNSPECIFIED', + self::ON => 'ON', + self::OFF => 'OFF', + self::SUSPENDED => 'SUSPENDED', + self::PENDING => 'PENDING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PowerState::class, \Google\Cloud\VMMigration\V1\AwsVmDetails_PowerState::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmArchitecture.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmArchitecture.php new file mode 100644 index 000000000000..7f6c05454f56 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmArchitecture.php @@ -0,0 +1,78 @@ +google.cloud.vmmigration.v1.AwsVmDetails.VmArchitecture + */ +class VmArchitecture +{ + /** + * The architecture is unknown. + * + * Generated from protobuf enum VM_ARCHITECTURE_UNSPECIFIED = 0; + */ + const VM_ARCHITECTURE_UNSPECIFIED = 0; + /** + * The architecture is I386. + * + * Generated from protobuf enum I386 = 1; + */ + const I386 = 1; + /** + * The architecture is X86_64. + * + * Generated from protobuf enum X86_64 = 2; + */ + const X86_64 = 2; + /** + * The architecture is ARM64. + * + * Generated from protobuf enum ARM64 = 3; + */ + const ARM64 = 3; + /** + * The architecture is X86_64_MAC. + * + * Generated from protobuf enum X86_64_MAC = 4; + */ + const X86_64_MAC = 4; + + private static $valueToName = [ + self::VM_ARCHITECTURE_UNSPECIFIED => 'VM_ARCHITECTURE_UNSPECIFIED', + self::I386 => 'I386', + self::X86_64 => 'X86_64', + self::ARM64 => 'ARM64', + self::X86_64_MAC => 'X86_64_MAC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VmArchitecture::class, \Google\Cloud\VMMigration\V1\AwsVmDetails_VmArchitecture::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmVirtualizationType.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmVirtualizationType.php new file mode 100644 index 000000000000..ce8c03686351 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmVirtualizationType.php @@ -0,0 +1,64 @@ +google.cloud.vmmigration.v1.AwsVmDetails.VmVirtualizationType + */ +class VmVirtualizationType +{ + /** + * The virtualization type is unknown. + * + * Generated from protobuf enum VM_VIRTUALIZATION_TYPE_UNSPECIFIED = 0; + */ + const VM_VIRTUALIZATION_TYPE_UNSPECIFIED = 0; + /** + * The virtualziation type is HVM. + * + * Generated from protobuf enum HVM = 1; + */ + const HVM = 1; + /** + * The virtualziation type is PARAVIRTUAL. + * + * Generated from protobuf enum PARAVIRTUAL = 2; + */ + const PARAVIRTUAL = 2; + + private static $valueToName = [ + self::VM_VIRTUALIZATION_TYPE_UNSPECIFIED => 'VM_VIRTUALIZATION_TYPE_UNSPECIFIED', + self::HVM => 'HVM', + self::PARAVIRTUAL => 'PARAVIRTUAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VmVirtualizationType::class, \Google\Cloud\VMMigration\V1\AwsVmDetails_VmVirtualizationType::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmsDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmsDetails.php new file mode 100644 index 000000000000..c5027ecbc764 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmsDetails.php @@ -0,0 +1,67 @@ +google.cloud.vmmigration.v1.AwsVmsDetails + */ +class AwsVmsDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The details of the AWS VMs. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsVmDetails details = 1; + */ + private $details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\AwsVmDetails>|\Google\Protobuf\Internal\RepeatedField $details + * The details of the AWS VMs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The details of the AWS VMs. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsVmDetails details = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDetails() + { + return $this->details; + } + + /** + * The details of the AWS VMs. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsVmDetails details = 1; + * @param array<\Google\Cloud\VMMigration\V1\AwsVmDetails>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\AwsVmDetails::class); + $this->details = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobRequest.php new file mode 100644 index 000000000000..77cdadd56226 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.CancelCloneJobRequest + */ +class CancelCloneJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The clone job id + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The clone job id + * Please see {@see VmMigrationClient::cloneJobName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\CancelCloneJobRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The clone job id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The clone job id + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The clone job id + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobResponse.php new file mode 100644 index 000000000000..cd231e22cc6d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobResponse.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.CancelCloneJobResponse + */ +class CancelCloneJobResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobRequest.php new file mode 100644 index 000000000000..71738014938e --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.CancelCutoverJobRequest + */ +class CancelCutoverJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The cutover job id + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The cutover job id + * Please see {@see VmMigrationClient::cutoverJobName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\CancelCutoverJobRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The cutover job id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The cutover job id + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The cutover job id + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobResponse.php new file mode 100644 index 000000000000..9c3a234caabd --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobResponse.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.CancelCutoverJobResponse + */ +class CancelCutoverJobResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob.php new file mode 100644 index 000000000000..dd34db7de2c9 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob.php @@ -0,0 +1,370 @@ +google.cloud.vmmigration.v1.CloneJob + */ +class CloneJob extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the clone job was created (as an API call, not when + * it was actually created in the target). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the clone job was ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. The name of the clone. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. State of the clone job. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The time the state was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_time = null; + /** + * Output only. Provides details for the errors that led to the Clone Job's + * state. + * + * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * Output only. The clone steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneStep steps = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $steps; + protected $target_vm_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails $compute_engine_target_details + * Output only. Details of the target VM in Compute Engine. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the clone job was created (as an API call, not when + * it was actually created in the target). + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the clone job was ended. + * @type string $name + * Output only. The name of the clone. + * @type int $state + * Output only. State of the clone job. + * @type \Google\Protobuf\Timestamp $state_time + * Output only. The time the state was last updated. + * @type \Google\Rpc\Status $error + * Output only. Provides details for the errors that led to the Clone Job's + * state. + * @type array<\Google\Cloud\VMMigration\V1\CloneStep>|\Google\Protobuf\Internal\RepeatedField $steps + * Output only. The clone steps list representing its progress. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Details of the target VM in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDetails compute_engine_target_details = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails|null + */ + public function getComputeEngineTargetDetails() + { + return $this->readOneof(20); + } + + public function hasComputeEngineTargetDetails() + { + return $this->hasOneof(20); + } + + /** + * Output only. Details of the target VM in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDetails compute_engine_target_details = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails $var + * @return $this + */ + public function setComputeEngineTargetDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails::class); + $this->writeOneof(20, $var); + + return $this; + } + + /** + * Output only. The time the clone job was created (as an API call, not when + * it was actually created in the target). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the clone job was created (as an API call, not when + * it was actually created in the target). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the clone job was ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the clone job was ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. The name of the clone. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the clone. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. State of the clone job. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the clone job. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\CloneJob\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time the state was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStateTime() + { + return $this->state_time; + } + + public function hasStateTime() + { + return isset($this->state_time); + } + + public function clearStateTime() + { + unset($this->state_time); + } + + /** + * Output only. The time the state was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->state_time = $var; + + return $this; + } + + /** + * Output only. Provides details for the errors that led to the Clone Job's + * state. + * + * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. Provides details for the errors that led to the Clone Job's + * state. + * + * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * Output only. The clone steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneStep steps = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSteps() + { + return $this->steps; + } + + /** + * Output only. The clone steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneStep steps = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\CloneStep>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSteps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CloneStep::class); + $this->steps = $arr; + + return $this; + } + + /** + * @return string + */ + public function getTargetVmDetails() + { + return $this->whichOneof("target_vm_details"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob/State.php new file mode 100644 index 000000000000..a60e309260f0 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob/State.php @@ -0,0 +1,100 @@ +google.cloud.vmmigration.v1.CloneJob.State + */ +class State +{ + /** + * The state is unknown. This is used for API compatibility only and is not + * used by the system. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The clone job has not yet started. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The clone job is active and running. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * The clone job finished with errors. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + /** + * The clone job finished successfully. + * + * Generated from protobuf enum SUCCEEDED = 4; + */ + const SUCCEEDED = 4; + /** + * The clone job was cancelled. + * + * Generated from protobuf enum CANCELLED = 5; + */ + const CANCELLED = 5; + /** + * The clone job is being cancelled. + * + * Generated from protobuf enum CANCELLING = 6; + */ + const CANCELLING = 6; + /** + * OS adaptation is running as part of the clone job to generate license. + * + * Generated from protobuf enum ADAPTING_OS = 7; + */ + const ADAPTING_OS = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::ACTIVE => 'ACTIVE', + self::FAILED => 'FAILED', + self::SUCCEEDED => 'SUCCEEDED', + self::CANCELLED => 'CANCELLED', + self::CANCELLING => 'CANCELLING', + self::ADAPTING_OS => 'ADAPTING_OS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VMMigration\V1\CloneJob_State::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneStep.php new file mode 100644 index 000000000000..38ffc545d9b1 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneStep.php @@ -0,0 +1,229 @@ +google.cloud.vmmigration.v1.CloneStep + */ +class CloneStep extends \Google\Protobuf\Internal\Message +{ + /** + * The time the step has started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time the step has ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + protected $step; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\AdaptingOSStep $adapting_os + * Adapting OS step. + * @type \Google\Cloud\VMMigration\V1\PreparingVMDisksStep $preparing_vm_disks + * Preparing VM disks step. + * @type \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep $instantiating_migrated_vm + * Instantiating migrated VM step. + * @type \Google\Protobuf\Timestamp $start_time + * The time the step has started. + * @type \Google\Protobuf\Timestamp $end_time + * The time the step has ended. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Adapting OS step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AdaptingOSStep adapting_os = 3; + * @return \Google\Cloud\VMMigration\V1\AdaptingOSStep|null + */ + public function getAdaptingOs() + { + return $this->readOneof(3); + } + + public function hasAdaptingOs() + { + return $this->hasOneof(3); + } + + /** + * Adapting OS step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AdaptingOSStep adapting_os = 3; + * @param \Google\Cloud\VMMigration\V1\AdaptingOSStep $var + * @return $this + */ + public function setAdaptingOs($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AdaptingOSStep::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Preparing VM disks step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.PreparingVMDisksStep preparing_vm_disks = 4; + * @return \Google\Cloud\VMMigration\V1\PreparingVMDisksStep|null + */ + public function getPreparingVmDisks() + { + return $this->readOneof(4); + } + + public function hasPreparingVmDisks() + { + return $this->hasOneof(4); + } + + /** + * Preparing VM disks step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.PreparingVMDisksStep preparing_vm_disks = 4; + * @param \Google\Cloud\VMMigration\V1\PreparingVMDisksStep $var + * @return $this + */ + public function setPreparingVmDisks($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\PreparingVMDisksStep::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Instantiating migrated VM step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.InstantiatingMigratedVMStep instantiating_migrated_vm = 5; + * @return \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep|null + */ + public function getInstantiatingMigratedVm() + { + return $this->readOneof(5); + } + + public function hasInstantiatingMigratedVm() + { + return $this->hasOneof(5); + } + + /** + * Instantiating migrated VM step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.InstantiatingMigratedVMStep instantiating_migrated_vm = 5; + * @param \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep $var + * @return $this + */ + public function setInstantiatingMigratedVm($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The time the step has started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The time the step has started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time the step has ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time the step has ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getStep() + { + return $this->whichOneof("step"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineBootOption.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineBootOption.php new file mode 100644 index 000000000000..efcc0ffce13f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineBootOption.php @@ -0,0 +1,61 @@ +google.cloud.vmmigration.v1.ComputeEngineBootOption + */ +class ComputeEngineBootOption +{ + /** + * The boot option is unknown. + * + * Generated from protobuf enum COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED = 0; + */ + const COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED = 0; + /** + * The boot option is EFI. + * + * Generated from protobuf enum COMPUTE_ENGINE_BOOT_OPTION_EFI = 1; + */ + const COMPUTE_ENGINE_BOOT_OPTION_EFI = 1; + /** + * The boot option is BIOS. + * + * Generated from protobuf enum COMPUTE_ENGINE_BOOT_OPTION_BIOS = 2; + */ + const COMPUTE_ENGINE_BOOT_OPTION_BIOS = 2; + + private static $valueToName = [ + self::COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED => 'COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED', + self::COMPUTE_ENGINE_BOOT_OPTION_EFI => 'COMPUTE_ENGINE_BOOT_OPTION_EFI', + self::COMPUTE_ENGINE_BOOT_OPTION_BIOS => 'COMPUTE_ENGINE_BOOT_OPTION_BIOS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDiskType.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDiskType.php new file mode 100644 index 000000000000..6dd7104b8f4d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDiskType.php @@ -0,0 +1,69 @@ +google.cloud.vmmigration.v1.ComputeEngineDiskType + */ +class ComputeEngineDiskType +{ + /** + * An unspecified disk type. Will be used as STANDARD. + * + * Generated from protobuf enum COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED = 0; + */ + const COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED = 0; + /** + * A Standard disk type. + * + * Generated from protobuf enum COMPUTE_ENGINE_DISK_TYPE_STANDARD = 1; + */ + const COMPUTE_ENGINE_DISK_TYPE_STANDARD = 1; + /** + * SSD hard disk type. + * + * Generated from protobuf enum COMPUTE_ENGINE_DISK_TYPE_SSD = 2; + */ + const COMPUTE_ENGINE_DISK_TYPE_SSD = 2; + /** + * An alternative to SSD persistent disks that balance performance and + * cost. + * + * Generated from protobuf enum COMPUTE_ENGINE_DISK_TYPE_BALANCED = 3; + */ + const COMPUTE_ENGINE_DISK_TYPE_BALANCED = 3; + + private static $valueToName = [ + self::COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED => 'COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED', + self::COMPUTE_ENGINE_DISK_TYPE_STANDARD => 'COMPUTE_ENGINE_DISK_TYPE_STANDARD', + self::COMPUTE_ENGINE_DISK_TYPE_SSD => 'COMPUTE_ENGINE_DISK_TYPE_SSD', + self::COMPUTE_ENGINE_DISK_TYPE_BALANCED => 'COMPUTE_ENGINE_DISK_TYPE_BALANCED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineLicenseType.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineLicenseType.php new file mode 100644 index 000000000000..427ea82b29bf --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineLicenseType.php @@ -0,0 +1,61 @@ +google.cloud.vmmigration.v1.ComputeEngineLicenseType + */ +class ComputeEngineLicenseType +{ + /** + * The license type is the default for the OS. + * + * Generated from protobuf enum COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT = 0; + */ + const COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT = 0; + /** + * The license type is Pay As You Go license type. + * + * Generated from protobuf enum COMPUTE_ENGINE_LICENSE_TYPE_PAYG = 1; + */ + const COMPUTE_ENGINE_LICENSE_TYPE_PAYG = 1; + /** + * The license type is Bring Your Own License type. + * + * Generated from protobuf enum COMPUTE_ENGINE_LICENSE_TYPE_BYOL = 2; + */ + const COMPUTE_ENGINE_LICENSE_TYPE_BYOL = 2; + + private static $valueToName = [ + self::COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT => 'COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT', + self::COMPUTE_ENGINE_LICENSE_TYPE_PAYG => 'COMPUTE_ENGINE_LICENSE_TYPE_PAYG', + self::COMPUTE_ENGINE_LICENSE_TYPE_BYOL => 'COMPUTE_ENGINE_LICENSE_TYPE_BYOL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDefaults.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDefaults.php new file mode 100644 index 000000000000..2745c0b602a8 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDefaults.php @@ -0,0 +1,674 @@ +google.cloud.vmmigration.v1.ComputeEngineTargetDefaults + */ +class ComputeEngineTargetDefaults extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the VM to create. + * + * Generated from protobuf field string vm_name = 1; + */ + protected $vm_name = ''; + /** + * The full path of the resource of type TargetProject which represents the + * Compute Engine project in which to create this VM. + * + * Generated from protobuf field string target_project = 2 [(.google.api.resource_reference) = { + */ + protected $target_project = ''; + /** + * The zone in which to create the VM. + * + * Generated from protobuf field string zone = 3; + */ + protected $zone = ''; + /** + * The machine type series to create the VM with. + * + * Generated from protobuf field string machine_type_series = 4; + */ + protected $machine_type_series = ''; + /** + * The machine type to create the VM with. + * + * Generated from protobuf field string machine_type = 5; + */ + protected $machine_type = ''; + /** + * A map of network tags to associate with the VM. + * + * Generated from protobuf field repeated string network_tags = 6; + */ + private $network_tags; + /** + * List of NICs connected to this VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; + */ + private $network_interfaces; + /** + * The service account to associate the VM with. + * + * Generated from protobuf field string service_account = 8; + */ + protected $service_account = ''; + /** + * The disk type to use in the VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; + */ + protected $disk_type = 0; + /** + * A map of labels to associate with the VM. + * + * Generated from protobuf field map labels = 10; + */ + private $labels; + /** + * The license type to use in OS adaptation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; + */ + protected $license_type = 0; + /** + * Output only. The OS license returned from the adaptation module report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $applied_license = null; + /** + * Compute instance scheduling information (if empty default is used). + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; + */ + protected $compute_scheduling = null; + /** + * Defines whether the instance has Secure Boot enabled. + * This can be set to true only if the vm boot option is EFI. + * + * Generated from protobuf field bool secure_boot = 14; + */ + protected $secure_boot = false; + /** + * Output only. The VM Boot Option, as set in the source vm. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $boot_option = 0; + /** + * The metadata key/value pairs to assign to the VM. + * + * Generated from protobuf field map metadata = 16; + */ + private $metadata; + /** + * Additional licenses to assign to the VM. + * + * Generated from protobuf field repeated string additional_licenses = 17; + */ + private $additional_licenses; + /** + * The hostname to assign to the VM. + * + * Generated from protobuf field string hostname = 18; + */ + protected $hostname = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $vm_name + * The name of the VM to create. + * @type string $target_project + * The full path of the resource of type TargetProject which represents the + * Compute Engine project in which to create this VM. + * @type string $zone + * The zone in which to create the VM. + * @type string $machine_type_series + * The machine type series to create the VM with. + * @type string $machine_type + * The machine type to create the VM with. + * @type array|\Google\Protobuf\Internal\RepeatedField $network_tags + * A map of network tags to associate with the VM. + * @type array<\Google\Cloud\VMMigration\V1\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $network_interfaces + * List of NICs connected to this VM. + * @type string $service_account + * The service account to associate the VM with. + * @type int $disk_type + * The disk type to use in the VM. + * @type array|\Google\Protobuf\Internal\MapField $labels + * A map of labels to associate with the VM. + * @type int $license_type + * The license type to use in OS adaptation. + * @type \Google\Cloud\VMMigration\V1\AppliedLicense $applied_license + * Output only. The OS license returned from the adaptation module report. + * @type \Google\Cloud\VMMigration\V1\ComputeScheduling $compute_scheduling + * Compute instance scheduling information (if empty default is used). + * @type bool $secure_boot + * Defines whether the instance has Secure Boot enabled. + * This can be set to true only if the vm boot option is EFI. + * @type int $boot_option + * Output only. The VM Boot Option, as set in the source vm. + * @type array|\Google\Protobuf\Internal\MapField $metadata + * The metadata key/value pairs to assign to the VM. + * @type array|\Google\Protobuf\Internal\RepeatedField $additional_licenses + * Additional licenses to assign to the VM. + * @type string $hostname + * The hostname to assign to the VM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The name of the VM to create. + * + * Generated from protobuf field string vm_name = 1; + * @return string + */ + public function getVmName() + { + return $this->vm_name; + } + + /** + * The name of the VM to create. + * + * Generated from protobuf field string vm_name = 1; + * @param string $var + * @return $this + */ + public function setVmName($var) + { + GPBUtil::checkString($var, True); + $this->vm_name = $var; + + return $this; + } + + /** + * The full path of the resource of type TargetProject which represents the + * Compute Engine project in which to create this VM. + * + * Generated from protobuf field string target_project = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getTargetProject() + { + return $this->target_project; + } + + /** + * The full path of the resource of type TargetProject which represents the + * Compute Engine project in which to create this VM. + * + * Generated from protobuf field string target_project = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTargetProject($var) + { + GPBUtil::checkString($var, True); + $this->target_project = $var; + + return $this; + } + + /** + * The zone in which to create the VM. + * + * Generated from protobuf field string zone = 3; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The zone in which to create the VM. + * + * Generated from protobuf field string zone = 3; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + + /** + * The machine type series to create the VM with. + * + * Generated from protobuf field string machine_type_series = 4; + * @return string + */ + public function getMachineTypeSeries() + { + return $this->machine_type_series; + } + + /** + * The machine type series to create the VM with. + * + * Generated from protobuf field string machine_type_series = 4; + * @param string $var + * @return $this + */ + public function setMachineTypeSeries($var) + { + GPBUtil::checkString($var, True); + $this->machine_type_series = $var; + + return $this; + } + + /** + * The machine type to create the VM with. + * + * Generated from protobuf field string machine_type = 5; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * The machine type to create the VM with. + * + * Generated from protobuf field string machine_type = 5; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + + /** + * A map of network tags to associate with the VM. + * + * Generated from protobuf field repeated string network_tags = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkTags() + { + return $this->network_tags; + } + + /** + * A map of network tags to associate with the VM. + * + * Generated from protobuf field repeated string network_tags = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->network_tags = $arr; + + return $this; + } + + /** + * List of NICs connected to this VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkInterfaces() + { + return $this->network_interfaces; + } + + /** + * List of NICs connected to this VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; + * @param array<\Google\Cloud\VMMigration\V1\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkInterfaces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\NetworkInterface::class); + $this->network_interfaces = $arr; + + return $this; + } + + /** + * The service account to associate the VM with. + * + * Generated from protobuf field string service_account = 8; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * The service account to associate the VM with. + * + * Generated from protobuf field string service_account = 8; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * The disk type to use in the VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; + * @return int + */ + public function getDiskType() + { + return $this->disk_type; + } + + /** + * The disk type to use in the VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; + * @param int $var + * @return $this + */ + public function setDiskType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineDiskType::class); + $this->disk_type = $var; + + return $this; + } + + /** + * A map of labels to associate with the VM. + * + * Generated from protobuf field map labels = 10; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * A map of labels to associate with the VM. + * + * Generated from protobuf field map labels = 10; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * The license type to use in OS adaptation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; + * @return int + */ + public function getLicenseType() + { + return $this->license_type; + } + + /** + * The license type to use in OS adaptation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; + * @param int $var + * @return $this + */ + public function setLicenseType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineLicenseType::class); + $this->license_type = $var; + + return $this; + } + + /** + * Output only. The OS license returned from the adaptation module report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\AppliedLicense|null + */ + public function getAppliedLicense() + { + return $this->applied_license; + } + + public function hasAppliedLicense() + { + return isset($this->applied_license); + } + + public function clearAppliedLicense() + { + unset($this->applied_license); + } + + /** + * Output only. The OS license returned from the adaptation module report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\AppliedLicense $var + * @return $this + */ + public function setAppliedLicense($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AppliedLicense::class); + $this->applied_license = $var; + + return $this; + } + + /** + * Compute instance scheduling information (if empty default is used). + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; + * @return \Google\Cloud\VMMigration\V1\ComputeScheduling|null + */ + public function getComputeScheduling() + { + return $this->compute_scheduling; + } + + public function hasComputeScheduling() + { + return isset($this->compute_scheduling); + } + + public function clearComputeScheduling() + { + unset($this->compute_scheduling); + } + + /** + * Compute instance scheduling information (if empty default is used). + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; + * @param \Google\Cloud\VMMigration\V1\ComputeScheduling $var + * @return $this + */ + public function setComputeScheduling($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeScheduling::class); + $this->compute_scheduling = $var; + + return $this; + } + + /** + * Defines whether the instance has Secure Boot enabled. + * This can be set to true only if the vm boot option is EFI. + * + * Generated from protobuf field bool secure_boot = 14; + * @return bool + */ + public function getSecureBoot() + { + return $this->secure_boot; + } + + /** + * Defines whether the instance has Secure Boot enabled. + * This can be set to true only if the vm boot option is EFI. + * + * Generated from protobuf field bool secure_boot = 14; + * @param bool $var + * @return $this + */ + public function setSecureBoot($var) + { + GPBUtil::checkBool($var); + $this->secure_boot = $var; + + return $this; + } + + /** + * Output only. The VM Boot Option, as set in the source vm. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getBootOption() + { + return $this->boot_option; + } + + /** + * Output only. The VM Boot Option, as set in the source vm. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setBootOption($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineBootOption::class); + $this->boot_option = $var; + + return $this; + } + + /** + * The metadata key/value pairs to assign to the VM. + * + * Generated from protobuf field map metadata = 16; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * The metadata key/value pairs to assign to the VM. + * + * Generated from protobuf field map metadata = 16; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->metadata = $arr; + + return $this; + } + + /** + * Additional licenses to assign to the VM. + * + * Generated from protobuf field repeated string additional_licenses = 17; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdditionalLicenses() + { + return $this->additional_licenses; + } + + /** + * Additional licenses to assign to the VM. + * + * Generated from protobuf field repeated string additional_licenses = 17; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdditionalLicenses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->additional_licenses = $arr; + + return $this; + } + + /** + * The hostname to assign to the VM. + * + * Generated from protobuf field string hostname = 18; + * @return string + */ + public function getHostname() + { + return $this->hostname; + } + + /** + * The hostname to assign to the VM. + * + * Generated from protobuf field string hostname = 18; + * @param string $var + * @return $this + */ + public function setHostname($var) + { + GPBUtil::checkString($var, True); + $this->hostname = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDetails.php new file mode 100644 index 000000000000..aaca78c78818 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDetails.php @@ -0,0 +1,670 @@ +google.cloud.vmmigration.v1.ComputeEngineTargetDetails + */ +class ComputeEngineTargetDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the VM to create. + * + * Generated from protobuf field string vm_name = 1; + */ + protected $vm_name = ''; + /** + * The Google Cloud target project ID or project name. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * The zone in which to create the VM. + * + * Generated from protobuf field string zone = 3; + */ + protected $zone = ''; + /** + * The machine type series to create the VM with. + * + * Generated from protobuf field string machine_type_series = 4; + */ + protected $machine_type_series = ''; + /** + * The machine type to create the VM with. + * + * Generated from protobuf field string machine_type = 5; + */ + protected $machine_type = ''; + /** + * A map of network tags to associate with the VM. + * + * Generated from protobuf field repeated string network_tags = 6; + */ + private $network_tags; + /** + * List of NICs connected to this VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; + */ + private $network_interfaces; + /** + * The service account to associate the VM with. + * + * Generated from protobuf field string service_account = 8; + */ + protected $service_account = ''; + /** + * The disk type to use in the VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; + */ + protected $disk_type = 0; + /** + * A map of labels to associate with the VM. + * + * Generated from protobuf field map labels = 10; + */ + private $labels; + /** + * The license type to use in OS adaptation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; + */ + protected $license_type = 0; + /** + * The OS license returned from the adaptation module report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12; + */ + protected $applied_license = null; + /** + * Compute instance scheduling information (if empty default is used). + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; + */ + protected $compute_scheduling = null; + /** + * Defines whether the instance has Secure Boot enabled. + * This can be set to true only if the vm boot option is EFI. + * + * Generated from protobuf field bool secure_boot = 14; + */ + protected $secure_boot = false; + /** + * The VM Boot Option, as set in the source vm. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15; + */ + protected $boot_option = 0; + /** + * The metadata key/value pairs to assign to the VM. + * + * Generated from protobuf field map metadata = 16; + */ + private $metadata; + /** + * Additional licenses to assign to the VM. + * + * Generated from protobuf field repeated string additional_licenses = 17; + */ + private $additional_licenses; + /** + * The hostname to assign to the VM. + * + * Generated from protobuf field string hostname = 18; + */ + protected $hostname = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $vm_name + * The name of the VM to create. + * @type string $project + * The Google Cloud target project ID or project name. + * @type string $zone + * The zone in which to create the VM. + * @type string $machine_type_series + * The machine type series to create the VM with. + * @type string $machine_type + * The machine type to create the VM with. + * @type array|\Google\Protobuf\Internal\RepeatedField $network_tags + * A map of network tags to associate with the VM. + * @type array<\Google\Cloud\VMMigration\V1\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $network_interfaces + * List of NICs connected to this VM. + * @type string $service_account + * The service account to associate the VM with. + * @type int $disk_type + * The disk type to use in the VM. + * @type array|\Google\Protobuf\Internal\MapField $labels + * A map of labels to associate with the VM. + * @type int $license_type + * The license type to use in OS adaptation. + * @type \Google\Cloud\VMMigration\V1\AppliedLicense $applied_license + * The OS license returned from the adaptation module report. + * @type \Google\Cloud\VMMigration\V1\ComputeScheduling $compute_scheduling + * Compute instance scheduling information (if empty default is used). + * @type bool $secure_boot + * Defines whether the instance has Secure Boot enabled. + * This can be set to true only if the vm boot option is EFI. + * @type int $boot_option + * The VM Boot Option, as set in the source vm. + * @type array|\Google\Protobuf\Internal\MapField $metadata + * The metadata key/value pairs to assign to the VM. + * @type array|\Google\Protobuf\Internal\RepeatedField $additional_licenses + * Additional licenses to assign to the VM. + * @type string $hostname + * The hostname to assign to the VM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The name of the VM to create. + * + * Generated from protobuf field string vm_name = 1; + * @return string + */ + public function getVmName() + { + return $this->vm_name; + } + + /** + * The name of the VM to create. + * + * Generated from protobuf field string vm_name = 1; + * @param string $var + * @return $this + */ + public function setVmName($var) + { + GPBUtil::checkString($var, True); + $this->vm_name = $var; + + return $this; + } + + /** + * The Google Cloud target project ID or project name. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * The Google Cloud target project ID or project name. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * The zone in which to create the VM. + * + * Generated from protobuf field string zone = 3; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The zone in which to create the VM. + * + * Generated from protobuf field string zone = 3; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + + /** + * The machine type series to create the VM with. + * + * Generated from protobuf field string machine_type_series = 4; + * @return string + */ + public function getMachineTypeSeries() + { + return $this->machine_type_series; + } + + /** + * The machine type series to create the VM with. + * + * Generated from protobuf field string machine_type_series = 4; + * @param string $var + * @return $this + */ + public function setMachineTypeSeries($var) + { + GPBUtil::checkString($var, True); + $this->machine_type_series = $var; + + return $this; + } + + /** + * The machine type to create the VM with. + * + * Generated from protobuf field string machine_type = 5; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * The machine type to create the VM with. + * + * Generated from protobuf field string machine_type = 5; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + + /** + * A map of network tags to associate with the VM. + * + * Generated from protobuf field repeated string network_tags = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkTags() + { + return $this->network_tags; + } + + /** + * A map of network tags to associate with the VM. + * + * Generated from protobuf field repeated string network_tags = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->network_tags = $arr; + + return $this; + } + + /** + * List of NICs connected to this VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkInterfaces() + { + return $this->network_interfaces; + } + + /** + * List of NICs connected to this VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; + * @param array<\Google\Cloud\VMMigration\V1\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkInterfaces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\NetworkInterface::class); + $this->network_interfaces = $arr; + + return $this; + } + + /** + * The service account to associate the VM with. + * + * Generated from protobuf field string service_account = 8; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * The service account to associate the VM with. + * + * Generated from protobuf field string service_account = 8; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * The disk type to use in the VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; + * @return int + */ + public function getDiskType() + { + return $this->disk_type; + } + + /** + * The disk type to use in the VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; + * @param int $var + * @return $this + */ + public function setDiskType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineDiskType::class); + $this->disk_type = $var; + + return $this; + } + + /** + * A map of labels to associate with the VM. + * + * Generated from protobuf field map labels = 10; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * A map of labels to associate with the VM. + * + * Generated from protobuf field map labels = 10; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * The license type to use in OS adaptation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; + * @return int + */ + public function getLicenseType() + { + return $this->license_type; + } + + /** + * The license type to use in OS adaptation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; + * @param int $var + * @return $this + */ + public function setLicenseType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineLicenseType::class); + $this->license_type = $var; + + return $this; + } + + /** + * The OS license returned from the adaptation module report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12; + * @return \Google\Cloud\VMMigration\V1\AppliedLicense|null + */ + public function getAppliedLicense() + { + return $this->applied_license; + } + + public function hasAppliedLicense() + { + return isset($this->applied_license); + } + + public function clearAppliedLicense() + { + unset($this->applied_license); + } + + /** + * The OS license returned from the adaptation module report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12; + * @param \Google\Cloud\VMMigration\V1\AppliedLicense $var + * @return $this + */ + public function setAppliedLicense($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AppliedLicense::class); + $this->applied_license = $var; + + return $this; + } + + /** + * Compute instance scheduling information (if empty default is used). + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; + * @return \Google\Cloud\VMMigration\V1\ComputeScheduling|null + */ + public function getComputeScheduling() + { + return $this->compute_scheduling; + } + + public function hasComputeScheduling() + { + return isset($this->compute_scheduling); + } + + public function clearComputeScheduling() + { + unset($this->compute_scheduling); + } + + /** + * Compute instance scheduling information (if empty default is used). + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; + * @param \Google\Cloud\VMMigration\V1\ComputeScheduling $var + * @return $this + */ + public function setComputeScheduling($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeScheduling::class); + $this->compute_scheduling = $var; + + return $this; + } + + /** + * Defines whether the instance has Secure Boot enabled. + * This can be set to true only if the vm boot option is EFI. + * + * Generated from protobuf field bool secure_boot = 14; + * @return bool + */ + public function getSecureBoot() + { + return $this->secure_boot; + } + + /** + * Defines whether the instance has Secure Boot enabled. + * This can be set to true only if the vm boot option is EFI. + * + * Generated from protobuf field bool secure_boot = 14; + * @param bool $var + * @return $this + */ + public function setSecureBoot($var) + { + GPBUtil::checkBool($var); + $this->secure_boot = $var; + + return $this; + } + + /** + * The VM Boot Option, as set in the source vm. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15; + * @return int + */ + public function getBootOption() + { + return $this->boot_option; + } + + /** + * The VM Boot Option, as set in the source vm. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15; + * @param int $var + * @return $this + */ + public function setBootOption($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineBootOption::class); + $this->boot_option = $var; + + return $this; + } + + /** + * The metadata key/value pairs to assign to the VM. + * + * Generated from protobuf field map metadata = 16; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * The metadata key/value pairs to assign to the VM. + * + * Generated from protobuf field map metadata = 16; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->metadata = $arr; + + return $this; + } + + /** + * Additional licenses to assign to the VM. + * + * Generated from protobuf field repeated string additional_licenses = 17; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdditionalLicenses() + { + return $this->additional_licenses; + } + + /** + * Additional licenses to assign to the VM. + * + * Generated from protobuf field repeated string additional_licenses = 17; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdditionalLicenses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->additional_licenses = $arr; + + return $this; + } + + /** + * The hostname to assign to the VM. + * + * Generated from protobuf field string hostname = 18; + * @return string + */ + public function getHostname() + { + return $this->hostname; + } + + /** + * The hostname to assign to the VM. + * + * Generated from protobuf field string hostname = 18; + * @param string $var + * @return $this + */ + public function setHostname($var) + { + GPBUtil::checkString($var, True); + $this->hostname = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling.php new file mode 100644 index 000000000000..bc30aaa06e34 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling.php @@ -0,0 +1,206 @@ +google.cloud.vmmigration.v1.ComputeScheduling + */ +class ComputeScheduling extends \Google\Protobuf\Internal\Message +{ + /** + * How the instance should behave when the host machine undergoes + * maintenance that may temporarily impact instance performance. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.OnHostMaintenance on_host_maintenance = 1; + */ + protected $on_host_maintenance = 0; + /** + * Whether the Instance should be automatically restarted whenever it is + * terminated by Compute Engine (not terminated by user). + * This configuration is identical to `automaticRestart` field in Compute + * Engine create instance under scheduling. + * It was changed to an enum (instead of a boolean) to match the default + * value in Compute Engine which is automatic restart. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.RestartType restart_type = 5; + */ + protected $restart_type = 0; + /** + * A set of node affinity and anti-affinity configurations for sole tenant + * nodes. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.SchedulingNodeAffinity node_affinities = 3; + */ + private $node_affinities; + /** + * The minimum number of virtual CPUs this instance will consume when + * running on a sole-tenant node. Ignored if no node_affinites are + * configured. + * + * Generated from protobuf field int32 min_node_cpus = 4; + */ + protected $min_node_cpus = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $on_host_maintenance + * How the instance should behave when the host machine undergoes + * maintenance that may temporarily impact instance performance. + * @type int $restart_type + * Whether the Instance should be automatically restarted whenever it is + * terminated by Compute Engine (not terminated by user). + * This configuration is identical to `automaticRestart` field in Compute + * Engine create instance under scheduling. + * It was changed to an enum (instead of a boolean) to match the default + * value in Compute Engine which is automatic restart. + * @type array<\Google\Cloud\VMMigration\V1\SchedulingNodeAffinity>|\Google\Protobuf\Internal\RepeatedField $node_affinities + * A set of node affinity and anti-affinity configurations for sole tenant + * nodes. + * @type int $min_node_cpus + * The minimum number of virtual CPUs this instance will consume when + * running on a sole-tenant node. Ignored if no node_affinites are + * configured. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * How the instance should behave when the host machine undergoes + * maintenance that may temporarily impact instance performance. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.OnHostMaintenance on_host_maintenance = 1; + * @return int + */ + public function getOnHostMaintenance() + { + return $this->on_host_maintenance; + } + + /** + * How the instance should behave when the host machine undergoes + * maintenance that may temporarily impact instance performance. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.OnHostMaintenance on_host_maintenance = 1; + * @param int $var + * @return $this + */ + public function setOnHostMaintenance($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeScheduling\OnHostMaintenance::class); + $this->on_host_maintenance = $var; + + return $this; + } + + /** + * Whether the Instance should be automatically restarted whenever it is + * terminated by Compute Engine (not terminated by user). + * This configuration is identical to `automaticRestart` field in Compute + * Engine create instance under scheduling. + * It was changed to an enum (instead of a boolean) to match the default + * value in Compute Engine which is automatic restart. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.RestartType restart_type = 5; + * @return int + */ + public function getRestartType() + { + return $this->restart_type; + } + + /** + * Whether the Instance should be automatically restarted whenever it is + * terminated by Compute Engine (not terminated by user). + * This configuration is identical to `automaticRestart` field in Compute + * Engine create instance under scheduling. + * It was changed to an enum (instead of a boolean) to match the default + * value in Compute Engine which is automatic restart. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.RestartType restart_type = 5; + * @param int $var + * @return $this + */ + public function setRestartType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeScheduling\RestartType::class); + $this->restart_type = $var; + + return $this; + } + + /** + * A set of node affinity and anti-affinity configurations for sole tenant + * nodes. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.SchedulingNodeAffinity node_affinities = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNodeAffinities() + { + return $this->node_affinities; + } + + /** + * A set of node affinity and anti-affinity configurations for sole tenant + * nodes. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.SchedulingNodeAffinity node_affinities = 3; + * @param array<\Google\Cloud\VMMigration\V1\SchedulingNodeAffinity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNodeAffinities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\SchedulingNodeAffinity::class); + $this->node_affinities = $arr; + + return $this; + } + + /** + * The minimum number of virtual CPUs this instance will consume when + * running on a sole-tenant node. Ignored if no node_affinites are + * configured. + * + * Generated from protobuf field int32 min_node_cpus = 4; + * @return int + */ + public function getMinNodeCpus() + { + return $this->min_node_cpus; + } + + /** + * The minimum number of virtual CPUs this instance will consume when + * running on a sole-tenant node. Ignored if no node_affinites are + * configured. + * + * Generated from protobuf field int32 min_node_cpus = 4; + * @param int $var + * @return $this + */ + public function setMinNodeCpus($var) + { + GPBUtil::checkInt32($var); + $this->min_node_cpus = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/OnHostMaintenance.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/OnHostMaintenance.php new file mode 100644 index 000000000000..2289facddca5 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/OnHostMaintenance.php @@ -0,0 +1,62 @@ +google.cloud.vmmigration.v1.ComputeScheduling.OnHostMaintenance + */ +class OnHostMaintenance +{ + /** + * An unknown, unexpected behavior. + * + * Generated from protobuf enum ON_HOST_MAINTENANCE_UNSPECIFIED = 0; + */ + const ON_HOST_MAINTENANCE_UNSPECIFIED = 0; + /** + * Terminate the instance when the host machine undergoes maintenance. + * + * Generated from protobuf enum TERMINATE = 1; + */ + const TERMINATE = 1; + /** + * Migrate the instance when the host machine undergoes maintenance. + * + * Generated from protobuf enum MIGRATE = 2; + */ + const MIGRATE = 2; + + private static $valueToName = [ + self::ON_HOST_MAINTENANCE_UNSPECIFIED => 'ON_HOST_MAINTENANCE_UNSPECIFIED', + self::TERMINATE => 'TERMINATE', + self::MIGRATE => 'MIGRATE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OnHostMaintenance::class, \Google\Cloud\VMMigration\V1\ComputeScheduling_OnHostMaintenance::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/RestartType.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/RestartType.php new file mode 100644 index 000000000000..f84ad38270f2 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/RestartType.php @@ -0,0 +1,67 @@ +google.cloud.vmmigration.v1.ComputeScheduling.RestartType + */ +class RestartType +{ + /** + * Unspecified behavior. This will use the default. + * + * Generated from protobuf enum RESTART_TYPE_UNSPECIFIED = 0; + */ + const RESTART_TYPE_UNSPECIFIED = 0; + /** + * The Instance should be automatically restarted whenever it is + * terminated by Compute Engine. + * + * Generated from protobuf enum AUTOMATIC_RESTART = 1; + */ + const AUTOMATIC_RESTART = 1; + /** + * The Instance isn't automatically restarted whenever it is + * terminated by Compute Engine. + * + * Generated from protobuf enum NO_AUTOMATIC_RESTART = 2; + */ + const NO_AUTOMATIC_RESTART = 2; + + private static $valueToName = [ + self::RESTART_TYPE_UNSPECIFIED => 'RESTART_TYPE_UNSPECIFIED', + self::AUTOMATIC_RESTART => 'AUTOMATIC_RESTART', + self::NO_AUTOMATIC_RESTART => 'NO_AUTOMATIC_RESTART', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RestartType::class, \Google\Cloud\VMMigration\V1\ComputeScheduling_RestartType::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCloneJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCloneJobRequest.php new file mode 100644 index 000000000000..41851b8961e2 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCloneJobRequest.php @@ -0,0 +1,237 @@ +google.cloud.vmmigration.v1.CreateCloneJobRequest + */ +class CreateCloneJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Clone's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The clone job identifier. + * + * Generated from protobuf field string clone_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $clone_job_id = ''; + /** + * Required. The clone request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob clone_job = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $clone_job = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The Clone's parent. Please see + * {@see VmMigrationClient::migratingVmName()} for help formatting this field. + * @param \Google\Cloud\VMMigration\V1\CloneJob $cloneJob Required. The clone request body. + * @param string $cloneJobId Required. The clone job identifier. + * + * @return \Google\Cloud\VMMigration\V1\CreateCloneJobRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VMMigration\V1\CloneJob $cloneJob, string $cloneJobId): self + { + return (new self()) + ->setParent($parent) + ->setCloneJob($cloneJob) + ->setCloneJobId($cloneJobId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The Clone's parent. + * @type string $clone_job_id + * Required. The clone job identifier. + * @type \Google\Cloud\VMMigration\V1\CloneJob $clone_job + * Required. The clone request body. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Clone's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The Clone's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The clone job identifier. + * + * Generated from protobuf field string clone_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCloneJobId() + { + return $this->clone_job_id; + } + + /** + * Required. The clone job identifier. + * + * Generated from protobuf field string clone_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCloneJobId($var) + { + GPBUtil::checkString($var, True); + $this->clone_job_id = $var; + + return $this; + } + + /** + * Required. The clone request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob clone_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\CloneJob|null + */ + public function getCloneJob() + { + return $this->clone_job; + } + + public function hasCloneJob() + { + return isset($this->clone_job); + } + + public function clearCloneJob() + { + unset($this->clone_job); + } + + /** + * Required. The clone request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob clone_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\CloneJob $var + * @return $this + */ + public function setCloneJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\CloneJob::class); + $this->clone_job = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCutoverJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCutoverJobRequest.php new file mode 100644 index 000000000000..ca9cc7598345 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCutoverJobRequest.php @@ -0,0 +1,237 @@ +google.cloud.vmmigration.v1.CreateCutoverJobRequest + */ +class CreateCutoverJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Cutover's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The cutover job identifier. + * + * Generated from protobuf field string cutover_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cutover_job_id = ''; + /** + * Required. The cutover request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob cutover_job = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cutover_job = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The Cutover's parent. Please see + * {@see VmMigrationClient::migratingVmName()} for help formatting this field. + * @param \Google\Cloud\VMMigration\V1\CutoverJob $cutoverJob Required. The cutover request body. + * @param string $cutoverJobId Required. The cutover job identifier. + * + * @return \Google\Cloud\VMMigration\V1\CreateCutoverJobRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VMMigration\V1\CutoverJob $cutoverJob, string $cutoverJobId): self + { + return (new self()) + ->setParent($parent) + ->setCutoverJob($cutoverJob) + ->setCutoverJobId($cutoverJobId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The Cutover's parent. + * @type string $cutover_job_id + * Required. The cutover job identifier. + * @type \Google\Cloud\VMMigration\V1\CutoverJob $cutover_job + * Required. The cutover request body. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Cutover's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The Cutover's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The cutover job identifier. + * + * Generated from protobuf field string cutover_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCutoverJobId() + { + return $this->cutover_job_id; + } + + /** + * Required. The cutover job identifier. + * + * Generated from protobuf field string cutover_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCutoverJobId($var) + { + GPBUtil::checkString($var, True); + $this->cutover_job_id = $var; + + return $this; + } + + /** + * Required. The cutover request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob cutover_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\CutoverJob|null + */ + public function getCutoverJob() + { + return $this->cutover_job; + } + + public function hasCutoverJob() + { + return isset($this->cutover_job); + } + + public function clearCutoverJob() + { + unset($this->cutover_job); + } + + /** + * Required. The cutover request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob cutover_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\CutoverJob $var + * @return $this + */ + public function setCutoverJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\CutoverJob::class); + $this->cutover_job = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateDatacenterConnectorRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateDatacenterConnectorRequest.php new file mode 100644 index 000000000000..ec4aaf84d99f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateDatacenterConnectorRequest.php @@ -0,0 +1,252 @@ +google.cloud.vmmigration.v1.CreateDatacenterConnectorRequest + */ +class CreateDatacenterConnectorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The DatacenterConnector's parent. + * Required. The Source in where the new DatacenterConnector will be created. + * For example: + * `projects/my-project/locations/us-central1/sources/my-source` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The datacenterConnector identifier. + * + * Generated from protobuf field string datacenter_connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $datacenter_connector_id = ''; + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $datacenter_connector = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The DatacenterConnector's parent. + * Required. The Source in where the new DatacenterConnector will be created. + * For example: + * `projects/my-project/locations/us-central1/sources/my-source` + * Please see {@see VmMigrationClient::sourceName()} for help formatting this field. + * @param \Google\Cloud\VMMigration\V1\DatacenterConnector $datacenterConnector Required. The create request body. + * @param string $datacenterConnectorId Required. The datacenterConnector identifier. + * + * @return \Google\Cloud\VMMigration\V1\CreateDatacenterConnectorRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VMMigration\V1\DatacenterConnector $datacenterConnector, string $datacenterConnectorId): self + { + return (new self()) + ->setParent($parent) + ->setDatacenterConnector($datacenterConnector) + ->setDatacenterConnectorId($datacenterConnectorId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The DatacenterConnector's parent. + * Required. The Source in where the new DatacenterConnector will be created. + * For example: + * `projects/my-project/locations/us-central1/sources/my-source` + * @type string $datacenter_connector_id + * Required. The datacenterConnector identifier. + * @type \Google\Cloud\VMMigration\V1\DatacenterConnector $datacenter_connector + * Required. The create request body. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The DatacenterConnector's parent. + * Required. The Source in where the new DatacenterConnector will be created. + * For example: + * `projects/my-project/locations/us-central1/sources/my-source` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The DatacenterConnector's parent. + * Required. The Source in where the new DatacenterConnector will be created. + * For example: + * `projects/my-project/locations/us-central1/sources/my-source` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The datacenterConnector identifier. + * + * Generated from protobuf field string datacenter_connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatacenterConnectorId() + { + return $this->datacenter_connector_id; + } + + /** + * Required. The datacenterConnector identifier. + * + * Generated from protobuf field string datacenter_connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatacenterConnectorId($var) + { + GPBUtil::checkString($var, True); + $this->datacenter_connector_id = $var; + + return $this; + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\DatacenterConnector|null + */ + public function getDatacenterConnector() + { + return $this->datacenter_connector; + } + + public function hasDatacenterConnector() + { + return isset($this->datacenter_connector); + } + + public function clearDatacenterConnector() + { + unset($this->datacenter_connector); + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\DatacenterConnector $var + * @return $this + */ + public function setDatacenterConnector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\DatacenterConnector::class); + $this->datacenter_connector = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateGroupRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateGroupRequest.php new file mode 100644 index 000000000000..de9bfaea8932 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateGroupRequest.php @@ -0,0 +1,237 @@ +google.cloud.vmmigration.v1.CreateGroupRequest + */ +class CreateGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Group's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The group identifier. + * + * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group_id = ''; + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The Group's parent. Please see + * {@see VmMigrationClient::locationName()} for help formatting this field. + * @param \Google\Cloud\VMMigration\V1\Group $group Required. The create request body. + * @param string $groupId Required. The group identifier. + * + * @return \Google\Cloud\VMMigration\V1\CreateGroupRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VMMigration\V1\Group $group, string $groupId): self + { + return (new self()) + ->setParent($parent) + ->setGroup($group) + ->setGroupId($groupId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The Group's parent. + * @type string $group_id + * Required. The group identifier. + * @type \Google\Cloud\VMMigration\V1\Group $group + * Required. The create request body. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Group's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The Group's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The group identifier. + * + * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGroupId() + { + return $this->group_id; + } + + /** + * Required. The group identifier. + * + * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGroupId($var) + { + GPBUtil::checkString($var, True); + $this->group_id = $var; + + return $this; + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\Group|null + */ + public function getGroup() + { + return $this->group; + } + + public function hasGroup() + { + return isset($this->group); + } + + public function clearGroup() + { + unset($this->group); + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\Group $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Group::class); + $this->group = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateMigratingVmRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateMigratingVmRequest.php new file mode 100644 index 000000000000..c12c649f5023 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateMigratingVmRequest.php @@ -0,0 +1,237 @@ +google.cloud.vmmigration.v1.CreateMigratingVmRequest + */ +class CreateMigratingVmRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The MigratingVm's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The migratingVm identifier. + * + * Generated from protobuf field string migrating_vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $migrating_vm_id = ''; + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $migrating_vm = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The MigratingVm's parent. Please see + * {@see VmMigrationClient::sourceName()} for help formatting this field. + * @param \Google\Cloud\VMMigration\V1\MigratingVm $migratingVm Required. The create request body. + * @param string $migratingVmId Required. The migratingVm identifier. + * + * @return \Google\Cloud\VMMigration\V1\CreateMigratingVmRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VMMigration\V1\MigratingVm $migratingVm, string $migratingVmId): self + { + return (new self()) + ->setParent($parent) + ->setMigratingVm($migratingVm) + ->setMigratingVmId($migratingVmId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The MigratingVm's parent. + * @type string $migrating_vm_id + * Required. The migratingVm identifier. + * @type \Google\Cloud\VMMigration\V1\MigratingVm $migrating_vm + * Required. The create request body. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The MigratingVm's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The MigratingVm's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The migratingVm identifier. + * + * Generated from protobuf field string migrating_vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMigratingVmId() + { + return $this->migrating_vm_id; + } + + /** + * Required. The migratingVm identifier. + * + * Generated from protobuf field string migrating_vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMigratingVmId($var) + { + GPBUtil::checkString($var, True); + $this->migrating_vm_id = $var; + + return $this; + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\MigratingVm|null + */ + public function getMigratingVm() + { + return $this->migrating_vm; + } + + public function hasMigratingVm() + { + return isset($this->migrating_vm); + } + + public function clearMigratingVm() + { + unset($this->migrating_vm); + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\MigratingVm $var + * @return $this + */ + public function setMigratingVm($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\MigratingVm::class); + $this->migrating_vm = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateSourceRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateSourceRequest.php new file mode 100644 index 000000000000..525bb5819b4a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateSourceRequest.php @@ -0,0 +1,237 @@ +google.cloud.vmmigration.v1.CreateSourceRequest + */ +class CreateSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Source's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The source identifier. + * + * Generated from protobuf field string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source_id = ''; + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The Source's parent. Please see + * {@see VmMigrationClient::locationName()} for help formatting this field. + * @param \Google\Cloud\VMMigration\V1\Source $source Required. The create request body. + * @param string $sourceId Required. The source identifier. + * + * @return \Google\Cloud\VMMigration\V1\CreateSourceRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VMMigration\V1\Source $source, string $sourceId): self + { + return (new self()) + ->setParent($parent) + ->setSource($source) + ->setSourceId($sourceId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The Source's parent. + * @type string $source_id + * Required. The source identifier. + * @type \Google\Cloud\VMMigration\V1\Source $source + * Required. The create request body. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Source's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The Source's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The source identifier. + * + * Generated from protobuf field string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSourceId() + { + return $this->source_id; + } + + /** + * Required. The source identifier. + * + * Generated from protobuf field string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSourceId($var) + { + GPBUtil::checkString($var, True); + $this->source_id = $var; + + return $this; + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\Source|null + */ + public function getSource() + { + return $this->source; + } + + public function hasSource() + { + return isset($this->source); + } + + public function clearSource() + { + unset($this->source); + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\Source $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Source::class); + $this->source = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateTargetProjectRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateTargetProjectRequest.php new file mode 100644 index 000000000000..fa7e25ef6158 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateTargetProjectRequest.php @@ -0,0 +1,237 @@ +google.cloud.vmmigration.v1.CreateTargetProjectRequest + */ +class CreateTargetProjectRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The TargetProject's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The target_project identifier. + * + * Generated from protobuf field string target_project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $target_project_id = ''; + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $target_project = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The TargetProject's parent. Please see + * {@see VmMigrationClient::locationName()} for help formatting this field. + * @param \Google\Cloud\VMMigration\V1\TargetProject $targetProject Required. The create request body. + * @param string $targetProjectId Required. The target_project identifier. + * + * @return \Google\Cloud\VMMigration\V1\CreateTargetProjectRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VMMigration\V1\TargetProject $targetProject, string $targetProjectId): self + { + return (new self()) + ->setParent($parent) + ->setTargetProject($targetProject) + ->setTargetProjectId($targetProjectId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The TargetProject's parent. + * @type string $target_project_id + * Required. The target_project identifier. + * @type \Google\Cloud\VMMigration\V1\TargetProject $target_project + * Required. The create request body. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The TargetProject's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The TargetProject's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The target_project identifier. + * + * Generated from protobuf field string target_project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTargetProjectId() + { + return $this->target_project_id; + } + + /** + * Required. The target_project identifier. + * + * Generated from protobuf field string target_project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTargetProjectId($var) + { + GPBUtil::checkString($var, True); + $this->target_project_id = $var; + + return $this; + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\TargetProject|null + */ + public function getTargetProject() + { + return $this->target_project; + } + + public function hasTargetProject() + { + return isset($this->target_project); + } + + public function clearTargetProject() + { + unset($this->target_project); + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\TargetProject $var + * @return $this + */ + public function setTargetProject($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\TargetProject::class); + $this->target_project = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateUtilizationReportRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateUtilizationReportRequest.php new file mode 100644 index 000000000000..80a507c49703 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateUtilizationReportRequest.php @@ -0,0 +1,258 @@ +google.cloud.vmmigration.v1.CreateUtilizationReportRequest + */ +class CreateUtilizationReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Utilization Report's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The report to create. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport utilization_report = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $utilization_report = null; + /** + * Required. The ID to use for the report, which will become the final + * component of the reports's resource name. + * This value maximum length is 63 characters, and valid characters + * are /[a-z][0-9]-/. It must start with an english letter and must not + * end with a hyphen. + * + * Generated from protobuf field string utilization_report_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $utilization_report_id = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The Utilization Report's parent. Please see + * {@see VmMigrationClient::sourceName()} for help formatting this field. + * @param \Google\Cloud\VMMigration\V1\UtilizationReport $utilizationReport Required. The report to create. + * @param string $utilizationReportId Required. The ID to use for the report, which will become the final + * component of the reports's resource name. + * + * This value maximum length is 63 characters, and valid characters + * are /[a-z][0-9]-/. It must start with an english letter and must not + * end with a hyphen. + * + * @return \Google\Cloud\VMMigration\V1\CreateUtilizationReportRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VMMigration\V1\UtilizationReport $utilizationReport, string $utilizationReportId): self + { + return (new self()) + ->setParent($parent) + ->setUtilizationReport($utilizationReport) + ->setUtilizationReportId($utilizationReportId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The Utilization Report's parent. + * @type \Google\Cloud\VMMigration\V1\UtilizationReport $utilization_report + * Required. The report to create. + * @type string $utilization_report_id + * Required. The ID to use for the report, which will become the final + * component of the reports's resource name. + * This value maximum length is 63 characters, and valid characters + * are /[a-z][0-9]-/. It must start with an english letter and must not + * end with a hyphen. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Utilization Report's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The Utilization Report's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The report to create. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport utilization_report = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\UtilizationReport|null + */ + public function getUtilizationReport() + { + return $this->utilization_report; + } + + public function hasUtilizationReport() + { + return isset($this->utilization_report); + } + + public function clearUtilizationReport() + { + unset($this->utilization_report); + } + + /** + * Required. The report to create. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport utilization_report = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\UtilizationReport $var + * @return $this + */ + public function setUtilizationReport($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\UtilizationReport::class); + $this->utilization_report = $var; + + return $this; + } + + /** + * Required. The ID to use for the report, which will become the final + * component of the reports's resource name. + * This value maximum length is 63 characters, and valid characters + * are /[a-z][0-9]-/. It must start with an english letter and must not + * end with a hyphen. + * + * Generated from protobuf field string utilization_report_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUtilizationReportId() + { + return $this->utilization_report_id; + } + + /** + * Required. The ID to use for the report, which will become the final + * component of the reports's resource name. + * This value maximum length is 63 characters, and valid characters + * are /[a-z][0-9]-/. It must start with an english letter and must not + * end with a hyphen. + * + * Generated from protobuf field string utilization_report_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUtilizationReportId($var) + { + GPBUtil::checkString($var, True); + $this->utilization_report_id = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob.php new file mode 100644 index 000000000000..3fafe9c8c7e7 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob.php @@ -0,0 +1,435 @@ +google.cloud.vmmigration.v1.CutoverJob + */ +class CutoverJob extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the cutover job was created (as an API call, not when + * it was actually created in the target). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the cutover job had finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. The name of the cutover job. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. State of the cutover job. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The time the state was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_time = null; + /** + * Output only. The current progress in percentage of the cutover job. + * + * Generated from protobuf field int32 progress_percent = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $progress_percent = 0; + /** + * Output only. Provides details for the errors that led to the Cutover Job's + * state. + * + * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * Output only. A message providing possible extra details about the current + * state. + * + * Generated from protobuf field string state_message = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_message = ''; + /** + * Output only. The cutover steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverStep steps = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $steps; + protected $target_vm_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails $compute_engine_target_details + * Output only. Details of the target VM in Compute Engine. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the cutover job was created (as an API call, not when + * it was actually created in the target). + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the cutover job had finished. + * @type string $name + * Output only. The name of the cutover job. + * @type int $state + * Output only. State of the cutover job. + * @type \Google\Protobuf\Timestamp $state_time + * Output only. The time the state was last updated. + * @type int $progress_percent + * Output only. The current progress in percentage of the cutover job. + * @type \Google\Rpc\Status $error + * Output only. Provides details for the errors that led to the Cutover Job's + * state. + * @type string $state_message + * Output only. A message providing possible extra details about the current + * state. + * @type array<\Google\Cloud\VMMigration\V1\CutoverStep>|\Google\Protobuf\Internal\RepeatedField $steps + * Output only. The cutover steps list representing its progress. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Details of the target VM in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDetails compute_engine_target_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails|null + */ + public function getComputeEngineTargetDetails() + { + return $this->readOneof(14); + } + + public function hasComputeEngineTargetDetails() + { + return $this->hasOneof(14); + } + + /** + * Output only. Details of the target VM in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDetails compute_engine_target_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails $var + * @return $this + */ + public function setComputeEngineTargetDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * Output only. The time the cutover job was created (as an API call, not when + * it was actually created in the target). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the cutover job was created (as an API call, not when + * it was actually created in the target). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the cutover job had finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the cutover job had finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. The name of the cutover job. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the cutover job. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. State of the cutover job. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the cutover job. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\CutoverJob\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time the state was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStateTime() + { + return $this->state_time; + } + + public function hasStateTime() + { + return isset($this->state_time); + } + + public function clearStateTime() + { + unset($this->state_time); + } + + /** + * Output only. The time the state was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->state_time = $var; + + return $this; + } + + /** + * Output only. The current progress in percentage of the cutover job. + * + * Generated from protobuf field int32 progress_percent = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getProgressPercent() + { + return $this->progress_percent; + } + + /** + * Output only. The current progress in percentage of the cutover job. + * + * Generated from protobuf field int32 progress_percent = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setProgressPercent($var) + { + GPBUtil::checkInt32($var); + $this->progress_percent = $var; + + return $this; + } + + /** + * Output only. Provides details for the errors that led to the Cutover Job's + * state. + * + * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. Provides details for the errors that led to the Cutover Job's + * state. + * + * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * Output only. A message providing possible extra details about the current + * state. + * + * Generated from protobuf field string state_message = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStateMessage() + { + return $this->state_message; + } + + /** + * Output only. A message providing possible extra details about the current + * state. + * + * Generated from protobuf field string state_message = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStateMessage($var) + { + GPBUtil::checkString($var, True); + $this->state_message = $var; + + return $this; + } + + /** + * Output only. The cutover steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverStep steps = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSteps() + { + return $this->steps; + } + + /** + * Output only. The cutover steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverStep steps = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\CutoverStep>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSteps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CutoverStep::class); + $this->steps = $arr; + + return $this; + } + + /** + * @return string + */ + public function getTargetVmDetails() + { + return $this->whichOneof("target_vm_details"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob/State.php new file mode 100644 index 000000000000..b1810e6a5d30 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob/State.php @@ -0,0 +1,100 @@ +google.cloud.vmmigration.v1.CutoverJob.State + */ +class State +{ + /** + * The state is unknown. This is used for API compatibility only and is not + * used by the system. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The cutover job has not yet started. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The cutover job finished with errors. + * + * Generated from protobuf enum FAILED = 2; + */ + const FAILED = 2; + /** + * The cutover job finished successfully. + * + * Generated from protobuf enum SUCCEEDED = 3; + */ + const SUCCEEDED = 3; + /** + * The cutover job was cancelled. + * + * Generated from protobuf enum CANCELLED = 4; + */ + const CANCELLED = 4; + /** + * The cutover job is being cancelled. + * + * Generated from protobuf enum CANCELLING = 5; + */ + const CANCELLING = 5; + /** + * The cutover job is active and running. + * + * Generated from protobuf enum ACTIVE = 6; + */ + const ACTIVE = 6; + /** + * OS adaptation is running as part of the cutover job to generate license. + * + * Generated from protobuf enum ADAPTING_OS = 7; + */ + const ADAPTING_OS = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::FAILED => 'FAILED', + self::SUCCEEDED => 'SUCCEEDED', + self::CANCELLED => 'CANCELLED', + self::CANCELLING => 'CANCELLING', + self::ACTIVE => 'ACTIVE', + self::ADAPTING_OS => 'ADAPTING_OS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VMMigration\V1\CutoverJob_State::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverStep.php new file mode 100644 index 000000000000..68550eca3b97 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverStep.php @@ -0,0 +1,295 @@ +google.cloud.vmmigration.v1.CutoverStep + */ +class CutoverStep extends \Google\Protobuf\Internal\Message +{ + /** + * The time the step has started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time the step has ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + protected $step; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\ReplicationCycle $previous_replication_cycle + * A replication cycle prior cutover step. + * @type \Google\Cloud\VMMigration\V1\ShuttingDownSourceVMStep $shutting_down_source_vm + * Shutting down VM step. + * @type \Google\Cloud\VMMigration\V1\ReplicationCycle $final_sync + * Final sync step. + * @type \Google\Cloud\VMMigration\V1\PreparingVMDisksStep $preparing_vm_disks + * Preparing VM disks step. + * @type \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep $instantiating_migrated_vm + * Instantiating migrated VM step. + * @type \Google\Protobuf\Timestamp $start_time + * The time the step has started. + * @type \Google\Protobuf\Timestamp $end_time + * The time the step has ended. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * A replication cycle prior cutover step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle previous_replication_cycle = 3; + * @return \Google\Cloud\VMMigration\V1\ReplicationCycle|null + */ + public function getPreviousReplicationCycle() + { + return $this->readOneof(3); + } + + public function hasPreviousReplicationCycle() + { + return $this->hasOneof(3); + } + + /** + * A replication cycle prior cutover step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle previous_replication_cycle = 3; + * @param \Google\Cloud\VMMigration\V1\ReplicationCycle $var + * @return $this + */ + public function setPreviousReplicationCycle($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicationCycle::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Shutting down VM step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ShuttingDownSourceVMStep shutting_down_source_vm = 4; + * @return \Google\Cloud\VMMigration\V1\ShuttingDownSourceVMStep|null + */ + public function getShuttingDownSourceVm() + { + return $this->readOneof(4); + } + + public function hasShuttingDownSourceVm() + { + return $this->hasOneof(4); + } + + /** + * Shutting down VM step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ShuttingDownSourceVMStep shutting_down_source_vm = 4; + * @param \Google\Cloud\VMMigration\V1\ShuttingDownSourceVMStep $var + * @return $this + */ + public function setShuttingDownSourceVm($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ShuttingDownSourceVMStep::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Final sync step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle final_sync = 5; + * @return \Google\Cloud\VMMigration\V1\ReplicationCycle|null + */ + public function getFinalSync() + { + return $this->readOneof(5); + } + + public function hasFinalSync() + { + return $this->hasOneof(5); + } + + /** + * Final sync step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle final_sync = 5; + * @param \Google\Cloud\VMMigration\V1\ReplicationCycle $var + * @return $this + */ + public function setFinalSync($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicationCycle::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Preparing VM disks step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.PreparingVMDisksStep preparing_vm_disks = 6; + * @return \Google\Cloud\VMMigration\V1\PreparingVMDisksStep|null + */ + public function getPreparingVmDisks() + { + return $this->readOneof(6); + } + + public function hasPreparingVmDisks() + { + return $this->hasOneof(6); + } + + /** + * Preparing VM disks step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.PreparingVMDisksStep preparing_vm_disks = 6; + * @param \Google\Cloud\VMMigration\V1\PreparingVMDisksStep $var + * @return $this + */ + public function setPreparingVmDisks($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\PreparingVMDisksStep::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Instantiating migrated VM step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.InstantiatingMigratedVMStep instantiating_migrated_vm = 7; + * @return \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep|null + */ + public function getInstantiatingMigratedVm() + { + return $this->readOneof(7); + } + + public function hasInstantiatingMigratedVm() + { + return $this->hasOneof(7); + } + + /** + * Instantiating migrated VM step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.InstantiatingMigratedVMStep instantiating_migrated_vm = 7; + * @param \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep $var + * @return $this + */ + public function setInstantiatingMigratedVm($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * The time the step has started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The time the step has started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time the step has ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time the step has ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getStep() + { + return $this->whichOneof("step"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CycleStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CycleStep.php new file mode 100644 index 000000000000..a081411451d2 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CycleStep.php @@ -0,0 +1,229 @@ +google.cloud.vmmigration.v1.CycleStep + */ +class CycleStep extends \Google\Protobuf\Internal\Message +{ + /** + * The time the cycle step has started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time the cycle step has ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + protected $step; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\InitializingReplicationStep $initializing_replication + * Initializing replication step. + * @type \Google\Cloud\VMMigration\V1\ReplicatingStep $replicating + * Replicating step. + * @type \Google\Cloud\VMMigration\V1\PostProcessingStep $post_processing + * Post processing step. + * @type \Google\Protobuf\Timestamp $start_time + * The time the cycle step has started. + * @type \Google\Protobuf\Timestamp $end_time + * The time the cycle step has ended. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Initializing replication step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.InitializingReplicationStep initializing_replication = 3; + * @return \Google\Cloud\VMMigration\V1\InitializingReplicationStep|null + */ + public function getInitializingReplication() + { + return $this->readOneof(3); + } + + public function hasInitializingReplication() + { + return $this->hasOneof(3); + } + + /** + * Initializing replication step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.InitializingReplicationStep initializing_replication = 3; + * @param \Google\Cloud\VMMigration\V1\InitializingReplicationStep $var + * @return $this + */ + public function setInitializingReplication($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\InitializingReplicationStep::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Replicating step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicatingStep replicating = 4; + * @return \Google\Cloud\VMMigration\V1\ReplicatingStep|null + */ + public function getReplicating() + { + return $this->readOneof(4); + } + + public function hasReplicating() + { + return $this->hasOneof(4); + } + + /** + * Replicating step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicatingStep replicating = 4; + * @param \Google\Cloud\VMMigration\V1\ReplicatingStep $var + * @return $this + */ + public function setReplicating($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicatingStep::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Post processing step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.PostProcessingStep post_processing = 5; + * @return \Google\Cloud\VMMigration\V1\PostProcessingStep|null + */ + public function getPostProcessing() + { + return $this->readOneof(5); + } + + public function hasPostProcessing() + { + return $this->hasOneof(5); + } + + /** + * Post processing step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.PostProcessingStep post_processing = 5; + * @param \Google\Cloud\VMMigration\V1\PostProcessingStep $var + * @return $this + */ + public function setPostProcessing($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\PostProcessingStep::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The time the cycle step has started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The time the cycle step has started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time the cycle step has ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time the cycle step has ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getStep() + { + return $this->whichOneof("step"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector.php new file mode 100644 index 000000000000..20244d65ed0b --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector.php @@ -0,0 +1,620 @@ +google.cloud.vmmigration.v1.DatacenterConnector + */ +class DatacenterConnector extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the connector was created (as an API call, not when + * it was actually installed). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last time the connector was updated with an API call. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The connector's name. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Immutable. A unique key for this connector. This key is internal to the OVA + * connector and is supplied with its creation during the registration process + * and can not be modified. + * + * Generated from protobuf field string registration_id = 12 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $registration_id = ''; + /** + * The service account to use in the connector when communicating with the + * cloud. + * + * Generated from protobuf field string service_account = 5; + */ + protected $service_account = ''; + /** + * The version running in the DatacenterConnector. This is supplied by the OVA + * connector during the registration process and can not be modified. + * + * Generated from protobuf field string version = 6; + */ + protected $version = ''; + /** + * Output only. The communication channel between the datacenter connector and + * Google Cloud. + * + * Generated from protobuf field string bucket = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $bucket = ''; + /** + * Output only. State of the DatacenterConnector, as determined by the health + * checks. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The time the state was last set. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_time = null; + /** + * Output only. Provides details on the state of the Datacenter Connector in + * case of an error. + * + * Generated from protobuf field .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * Output only. Appliance OVA version. + * This is the OVA which is manually installed by the user and contains the + * infrastructure for the automatically updatable components on the appliance. + * + * Generated from protobuf field string appliance_infrastructure_version = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $appliance_infrastructure_version = ''; + /** + * Output only. Appliance last installed update bundle version. + * This is the version of the automatically updatable components on the + * appliance. + * + * Generated from protobuf field string appliance_software_version = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $appliance_software_version = ''; + /** + * Output only. The available versions for updating this appliance. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AvailableUpdates available_versions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $available_versions = null; + /** + * Output only. The status of the current / last upgradeAppliance operation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus upgrade_status = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $upgrade_status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the connector was created (as an API call, not when + * it was actually installed). + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last time the connector was updated with an API call. + * @type string $name + * Output only. The connector's name. + * @type string $registration_id + * Immutable. A unique key for this connector. This key is internal to the OVA + * connector and is supplied with its creation during the registration process + * and can not be modified. + * @type string $service_account + * The service account to use in the connector when communicating with the + * cloud. + * @type string $version + * The version running in the DatacenterConnector. This is supplied by the OVA + * connector during the registration process and can not be modified. + * @type string $bucket + * Output only. The communication channel between the datacenter connector and + * Google Cloud. + * @type int $state + * Output only. State of the DatacenterConnector, as determined by the health + * checks. + * @type \Google\Protobuf\Timestamp $state_time + * Output only. The time the state was last set. + * @type \Google\Rpc\Status $error + * Output only. Provides details on the state of the Datacenter Connector in + * case of an error. + * @type string $appliance_infrastructure_version + * Output only. Appliance OVA version. + * This is the OVA which is manually installed by the user and contains the + * infrastructure for the automatically updatable components on the appliance. + * @type string $appliance_software_version + * Output only. Appliance last installed update bundle version. + * This is the version of the automatically updatable components on the + * appliance. + * @type \Google\Cloud\VMMigration\V1\AvailableUpdates $available_versions + * Output only. The available versions for updating this appliance. + * @type \Google\Cloud\VMMigration\V1\UpgradeStatus $upgrade_status + * Output only. The status of the current / last upgradeAppliance operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the connector was created (as an API call, not when + * it was actually installed). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the connector was created (as an API call, not when + * it was actually installed). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The last time the connector was updated with an API call. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last time the connector was updated with an API call. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The connector's name. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The connector's name. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Immutable. A unique key for this connector. This key is internal to the OVA + * connector and is supplied with its creation during the registration process + * and can not be modified. + * + * Generated from protobuf field string registration_id = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getRegistrationId() + { + return $this->registration_id; + } + + /** + * Immutable. A unique key for this connector. This key is internal to the OVA + * connector and is supplied with its creation during the registration process + * and can not be modified. + * + * Generated from protobuf field string registration_id = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setRegistrationId($var) + { + GPBUtil::checkString($var, True); + $this->registration_id = $var; + + return $this; + } + + /** + * The service account to use in the connector when communicating with the + * cloud. + * + * Generated from protobuf field string service_account = 5; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * The service account to use in the connector when communicating with the + * cloud. + * + * Generated from protobuf field string service_account = 5; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * The version running in the DatacenterConnector. This is supplied by the OVA + * connector during the registration process and can not be modified. + * + * Generated from protobuf field string version = 6; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * The version running in the DatacenterConnector. This is supplied by the OVA + * connector during the registration process and can not be modified. + * + * Generated from protobuf field string version = 6; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Output only. The communication channel between the datacenter connector and + * Google Cloud. + * + * Generated from protobuf field string bucket = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getBucket() + { + return $this->bucket; + } + + /** + * Output only. The communication channel between the datacenter connector and + * Google Cloud. + * + * Generated from protobuf field string bucket = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setBucket($var) + { + GPBUtil::checkString($var, True); + $this->bucket = $var; + + return $this; + } + + /** + * Output only. State of the DatacenterConnector, as determined by the health + * checks. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the DatacenterConnector, as determined by the health + * checks. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\DatacenterConnector\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time the state was last set. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStateTime() + { + return $this->state_time; + } + + public function hasStateTime() + { + return isset($this->state_time); + } + + public function clearStateTime() + { + unset($this->state_time); + } + + /** + * Output only. The time the state was last set. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->state_time = $var; + + return $this; + } + + /** + * Output only. Provides details on the state of the Datacenter Connector in + * case of an error. + * + * Generated from protobuf field .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. Provides details on the state of the Datacenter Connector in + * case of an error. + * + * Generated from protobuf field .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * Output only. Appliance OVA version. + * This is the OVA which is manually installed by the user and contains the + * infrastructure for the automatically updatable components on the appliance. + * + * Generated from protobuf field string appliance_infrastructure_version = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApplianceInfrastructureVersion() + { + return $this->appliance_infrastructure_version; + } + + /** + * Output only. Appliance OVA version. + * This is the OVA which is manually installed by the user and contains the + * infrastructure for the automatically updatable components on the appliance. + * + * Generated from protobuf field string appliance_infrastructure_version = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApplianceInfrastructureVersion($var) + { + GPBUtil::checkString($var, True); + $this->appliance_infrastructure_version = $var; + + return $this; + } + + /** + * Output only. Appliance last installed update bundle version. + * This is the version of the automatically updatable components on the + * appliance. + * + * Generated from protobuf field string appliance_software_version = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApplianceSoftwareVersion() + { + return $this->appliance_software_version; + } + + /** + * Output only. Appliance last installed update bundle version. + * This is the version of the automatically updatable components on the + * appliance. + * + * Generated from protobuf field string appliance_software_version = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApplianceSoftwareVersion($var) + { + GPBUtil::checkString($var, True); + $this->appliance_software_version = $var; + + return $this; + } + + /** + * Output only. The available versions for updating this appliance. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AvailableUpdates available_versions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\AvailableUpdates|null + */ + public function getAvailableVersions() + { + return $this->available_versions; + } + + public function hasAvailableVersions() + { + return isset($this->available_versions); + } + + public function clearAvailableVersions() + { + unset($this->available_versions); + } + + /** + * Output only. The available versions for updating this appliance. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AvailableUpdates available_versions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\AvailableUpdates $var + * @return $this + */ + public function setAvailableVersions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AvailableUpdates::class); + $this->available_versions = $var; + + return $this; + } + + /** + * Output only. The status of the current / last upgradeAppliance operation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus upgrade_status = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\UpgradeStatus|null + */ + public function getUpgradeStatus() + { + return $this->upgrade_status; + } + + public function hasUpgradeStatus() + { + return isset($this->upgrade_status); + } + + public function clearUpgradeStatus() + { + unset($this->upgrade_status); + } + + /** + * Output only. The status of the current / last upgradeAppliance operation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus upgrade_status = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\UpgradeStatus $var + * @return $this + */ + public function setUpgradeStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\UpgradeStatus::class); + $this->upgrade_status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector/State.php new file mode 100644 index 000000000000..836a87465021 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector/State.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.DatacenterConnector.State + */ +class State +{ + /** + * The state is unknown. This is used for API compatibility only and is not + * used by the system. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The state was not sampled by the health checks yet. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The source was sampled by health checks and is not available. + * + * Generated from protobuf enum OFFLINE = 2; + */ + const OFFLINE = 2; + /** + * The source is available but might not be usable yet due to unvalidated + * credentials or another reason. The credentials referred to are the ones + * to the Source. The error message will contain further details. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + /** + * The source exists and its credentials were verified. + * + * Generated from protobuf enum ACTIVE = 4; + */ + const ACTIVE = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::OFFLINE => 'OFFLINE', + self::FAILED => 'FAILED', + self::ACTIVE => 'ACTIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VMMigration\V1\DatacenterConnector_State::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteDatacenterConnectorRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteDatacenterConnectorRequest.php new file mode 100644 index 000000000000..3a18f26d864c --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteDatacenterConnectorRequest.php @@ -0,0 +1,155 @@ +google.cloud.vmmigration.v1.DeleteDatacenterConnectorRequest + */ +class DeleteDatacenterConnectorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The DatacenterConnector name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The DatacenterConnector name. Please see + * {@see VmMigrationClient::datacenterConnectorName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\DeleteDatacenterConnectorRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The DatacenterConnector name. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The DatacenterConnector name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The DatacenterConnector name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteGroupRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteGroupRequest.php new file mode 100644 index 000000000000..58ed1909db6e --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteGroupRequest.php @@ -0,0 +1,155 @@ +google.cloud.vmmigration.v1.DeleteGroupRequest + */ +class DeleteGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Group name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The Group name. Please see + * {@see VmMigrationClient::groupName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\DeleteGroupRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The Group name. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Group name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The Group name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteMigratingVmRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteMigratingVmRequest.php new file mode 100644 index 000000000000..d92845c4cd69 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteMigratingVmRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.DeleteMigratingVmRequest + */ +class DeleteMigratingVmRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the MigratingVm. Please see + * {@see VmMigrationClient::migratingVmName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\DeleteMigratingVmRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the MigratingVm. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteSourceRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteSourceRequest.php new file mode 100644 index 000000000000..73363cfd5bc7 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteSourceRequest.php @@ -0,0 +1,155 @@ +google.cloud.vmmigration.v1.DeleteSourceRequest + */ +class DeleteSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Source name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The Source name. Please see + * {@see VmMigrationClient::sourceName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\DeleteSourceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The Source name. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Source name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The Source name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteTargetProjectRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteTargetProjectRequest.php new file mode 100644 index 000000000000..d1c390849152 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteTargetProjectRequest.php @@ -0,0 +1,155 @@ +google.cloud.vmmigration.v1.DeleteTargetProjectRequest + */ +class DeleteTargetProjectRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The TargetProject name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The TargetProject name. Please see + * {@see VmMigrationClient::targetProjectName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\DeleteTargetProjectRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The TargetProject name. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The TargetProject name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The TargetProject name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteUtilizationReportRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteUtilizationReportRequest.php new file mode 100644 index 000000000000..8341c1a7702f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteUtilizationReportRequest.php @@ -0,0 +1,155 @@ +google.cloud.vmmigration.v1.DeleteUtilizationReportRequest + */ +class DeleteUtilizationReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Utilization Report name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The Utilization Report name. Please see + * {@see VmMigrationClient::utilizationReportName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\DeleteUtilizationReportRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The Utilization Report name. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Utilization Report name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The Utilization Report name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryRequest.php new file mode 100644 index 000000000000..3ccec18360e1 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryRequest.php @@ -0,0 +1,120 @@ +google.cloud.vmmigration.v1.FetchInventoryRequest + */ +class FetchInventoryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Source. + * + * Generated from protobuf field string source = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $source = ''; + /** + * If this flag is set to true, the source will be queried instead of using + * cached results. Using this flag will make the call slower. + * + * Generated from protobuf field bool force_refresh = 2; + */ + protected $force_refresh = false; + + /** + * @param string $source Required. The name of the Source. Please see + * {@see VmMigrationClient::sourceName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\FetchInventoryRequest + * + * @experimental + */ + public static function build(string $source): self + { + return (new self()) + ->setSource($source); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source + * Required. The name of the Source. + * @type bool $force_refresh + * If this flag is set to true, the source will be queried instead of using + * cached results. Using this flag will make the call slower. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Source. + * + * Generated from protobuf field string source = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getSource() + { + return $this->source; + } + + /** + * Required. The name of the Source. + * + * Generated from protobuf field string source = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkString($var, True); + $this->source = $var; + + return $this; + } + + /** + * If this flag is set to true, the source will be queried instead of using + * cached results. Using this flag will make the call slower. + * + * Generated from protobuf field bool force_refresh = 2; + * @return bool + */ + public function getForceRefresh() + { + return $this->force_refresh; + } + + /** + * If this flag is set to true, the source will be queried instead of using + * cached results. Using this flag will make the call slower. + * + * Generated from protobuf field bool force_refresh = 2; + * @param bool $var + * @return $this + */ + public function setForceRefresh($var) + { + GPBUtil::checkBool($var); + $this->force_refresh = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryResponse.php new file mode 100644 index 000000000000..ce1bdac4c8c1 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryResponse.php @@ -0,0 +1,157 @@ +google.cloud.vmmigration.v1.FetchInventoryResponse + */ +class FetchInventoryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The timestamp when the source was last queried (if the result + * is from the cache). + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + protected $SourceVms; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\VmwareVmsDetails $vmware_vms + * The description of the VMs in a Source of type Vmware. + * @type \Google\Cloud\VMMigration\V1\AwsVmsDetails $aws_vms + * The description of the VMs in a Source of type AWS. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the source was last queried (if the result + * is from the cache). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The description of the VMs in a Source of type Vmware. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmsDetails vmware_vms = 1; + * @return \Google\Cloud\VMMigration\V1\VmwareVmsDetails|null + */ + public function getVmwareVms() + { + return $this->readOneof(1); + } + + public function hasVmwareVms() + { + return $this->hasOneof(1); + } + + /** + * The description of the VMs in a Source of type Vmware. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmsDetails vmware_vms = 1; + * @param \Google\Cloud\VMMigration\V1\VmwareVmsDetails $var + * @return $this + */ + public function setVmwareVms($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmwareVmsDetails::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The description of the VMs in a Source of type AWS. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmsDetails aws_vms = 3; + * @return \Google\Cloud\VMMigration\V1\AwsVmsDetails|null + */ + public function getAwsVms() + { + return $this->readOneof(3); + } + + public function hasAwsVms() + { + return $this->hasOneof(3); + } + + /** + * The description of the VMs in a Source of type AWS. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmsDetails aws_vms = 3; + * @param \Google\Cloud\VMMigration\V1\AwsVmsDetails $var + * @return $this + */ + public function setAwsVms($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AwsVmsDetails::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Output only. The timestamp when the source was last queried (if the result + * is from the cache). + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp when the source was last queried (if the result + * is from the cache). + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getSourceVms() + { + return $this->whichOneof("SourceVms"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationRequest.php new file mode 100644 index 000000000000..d71b82ccb9b5 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.FinalizeMigrationRequest + */ +class FinalizeMigrationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $migrating_vm = ''; + + /** + * @param string $migratingVm Required. The name of the MigratingVm. Please see + * {@see VmMigrationClient::migratingVmName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\FinalizeMigrationRequest + * + * @experimental + */ + public static function build(string $migratingVm): self + { + return (new self()) + ->setMigratingVm($migratingVm); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $migrating_vm + * Required. The name of the MigratingVm. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getMigratingVm() + { + return $this->migrating_vm; + } + + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMigratingVm($var) + { + GPBUtil::checkString($var, True); + $this->migrating_vm = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationResponse.php new file mode 100644 index 000000000000..bdfdb9430da7 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationResponse.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.FinalizeMigrationResponse + */ +class FinalizeMigrationResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCloneJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCloneJobRequest.php new file mode 100644 index 000000000000..48dce1bf1c80 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCloneJobRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.GetCloneJobRequest + */ +class GetCloneJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the CloneJob. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the CloneJob. Please see + * {@see VmMigrationClient::cloneJobName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\GetCloneJobRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the CloneJob. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the CloneJob. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the CloneJob. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCutoverJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCutoverJobRequest.php new file mode 100644 index 000000000000..9d30019287a5 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCutoverJobRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.GetCutoverJobRequest + */ +class GetCutoverJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the CutoverJob. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the CutoverJob. Please see + * {@see VmMigrationClient::cutoverJobName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\GetCutoverJobRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the CutoverJob. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the CutoverJob. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the CutoverJob. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetDatacenterConnectorRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetDatacenterConnectorRequest.php new file mode 100644 index 000000000000..7aa5823e702a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetDatacenterConnectorRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.GetDatacenterConnectorRequest + */ +class GetDatacenterConnectorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the DatacenterConnector. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the DatacenterConnector. Please see + * {@see VmMigrationClient::datacenterConnectorName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\GetDatacenterConnectorRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the DatacenterConnector. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the DatacenterConnector. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the DatacenterConnector. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetGroupRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetGroupRequest.php new file mode 100644 index 000000000000..fbf5c771c2d6 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetGroupRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.GetGroupRequest + */ +class GetGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The group name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The group name. Please see + * {@see VmMigrationClient::groupName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\GetGroupRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The group name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The group name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The group name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetMigratingVmRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetMigratingVmRequest.php new file mode 100644 index 000000000000..3e59f540c798 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetMigratingVmRequest.php @@ -0,0 +1,115 @@ +google.cloud.vmmigration.v1.GetMigratingVmRequest + */ +class GetMigratingVmRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The level of details of the migrating VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $name Required. The name of the MigratingVm. Please see + * {@see VmMigrationClient::migratingVmName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\GetMigratingVmRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the MigratingVm. + * @type int $view + * Optional. The level of details of the migrating VM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The level of details of the migrating VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. The level of details of the migrating VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\MigratingVmView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetReplicationCycleRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetReplicationCycleRequest.php new file mode 100644 index 000000000000..c86a34b32a7b --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetReplicationCycleRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.GetReplicationCycleRequest + */ +class GetReplicationCycleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the ReplicationCycle. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the ReplicationCycle. Please see + * {@see VmMigrationClient::replicationCycleName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\GetReplicationCycleRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the ReplicationCycle. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the ReplicationCycle. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the ReplicationCycle. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetSourceRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetSourceRequest.php new file mode 100644 index 000000000000..28346a94ac29 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetSourceRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.GetSourceRequest + */ +class GetSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Source name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The Source name. Please see + * {@see VmMigrationClient::sourceName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\GetSourceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The Source name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Source name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The Source name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetTargetProjectRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetTargetProjectRequest.php new file mode 100644 index 000000000000..244edd28be21 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetTargetProjectRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.GetTargetProjectRequest + */ +class GetTargetProjectRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The TargetProject name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The TargetProject name. Please see + * {@see VmMigrationClient::targetProjectName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\GetTargetProjectRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The TargetProject name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The TargetProject name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The TargetProject name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetUtilizationReportRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetUtilizationReportRequest.php new file mode 100644 index 000000000000..eb7bac23ec7d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetUtilizationReportRequest.php @@ -0,0 +1,119 @@ +google.cloud.vmmigration.v1.GetUtilizationReportRequest + */ +class GetUtilizationReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Utilization Report name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The level of details of the report. + * Defaults to FULL + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $name Required. The Utilization Report name. Please see + * {@see VmMigrationClient::utilizationReportName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\GetUtilizationReportRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The Utilization Report name. + * @type int $view + * Optional. The level of details of the report. + * Defaults to FULL + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Utilization Report name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The Utilization Report name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The level of details of the report. + * Defaults to FULL + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. The level of details of the report. + * Defaults to FULL + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\UtilizationReportView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group.php new file mode 100644 index 000000000000..ea661a9c1fef --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group.php @@ -0,0 +1,224 @@ +google.cloud.vmmigration.v1.Group + */ +class Group extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The Group name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The create time timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update time timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * User-provided description of the group. + * + * Generated from protobuf field string description = 4; + */ + protected $description = ''; + /** + * Display name is a user defined name for this group which can be updated. + * + * Generated from protobuf field string display_name = 5; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The Group name. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The create time timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update time timestamp. + * @type string $description + * User-provided description of the group. + * @type string $display_name + * Display name is a user defined name for this group which can be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The Group name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The Group name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The create time timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The create time timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The update time timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The update time timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * User-provided description of the group. + * + * Generated from protobuf field string description = 4; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User-provided description of the group. + * + * Generated from protobuf field string description = 4; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Display name is a user defined name for this group which can be updated. + * + * Generated from protobuf field string display_name = 5; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Display name is a user defined name for this group which can be updated. + * + * Generated from protobuf field string display_name = 5; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InitializingReplicationStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InitializingReplicationStep.php new file mode 100644 index 000000000000..d25d4156a11d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InitializingReplicationStep.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.InitializingReplicationStep + */ +class InitializingReplicationStep extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InstantiatingMigratedVMStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InstantiatingMigratedVMStep.php new file mode 100644 index 000000000000..d4b0ac54435f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InstantiatingMigratedVMStep.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.InstantiatingMigratedVMStep + */ +class InstantiatingMigratedVMStep extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsRequest.php new file mode 100644 index 000000000000..3d8d4efa2f3e --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsRequest.php @@ -0,0 +1,241 @@ +google.cloud.vmmigration.v1.ListCloneJobsRequest + */ +class ListCloneJobsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of source VMs. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of clone jobs to return. The service may + * return fewer than this value. If unspecified, at most 500 clone jobs will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Required. A page token, received from a previous `ListCloneJobs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCloneJobs` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page_token = ''; + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of source VMs. Please see + * {@see VmMigrationClient::migratingVmName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\ListCloneJobsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of source VMs. + * @type int $page_size + * Optional. The maximum number of clone jobs to return. The service may + * return fewer than this value. If unspecified, at most 500 clone jobs will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * @type string $page_token + * Required. A page token, received from a previous `ListCloneJobs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCloneJobs` must + * match the call that provided the page token. + * @type string $filter + * Optional. The filter request. + * @type string $order_by + * Optional. the order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of source VMs. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of source VMs. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of clone jobs to return. The service may + * return fewer than this value. If unspecified, at most 500 clone jobs will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of clone jobs to return. The service may + * return fewer than this value. If unspecified, at most 500 clone jobs will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Required. A page token, received from a previous `ListCloneJobs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCloneJobs` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Required. A page token, received from a previous `ListCloneJobs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCloneJobs` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsResponse.php new file mode 100644 index 000000000000..5c89b1f50d7c --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsResponse.php @@ -0,0 +1,139 @@ +google.cloud.vmmigration.v1.ListCloneJobsResponse + */ +class ListCloneJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of clone jobs response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob clone_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $clone_jobs; + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\CloneJob>|\Google\Protobuf\Internal\RepeatedField $clone_jobs + * Output only. The list of clone jobs response. + * @type string $next_page_token + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The list of clone jobs response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob clone_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCloneJobs() + { + return $this->clone_jobs; + } + + /** + * Output only. The list of clone jobs response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob clone_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\CloneJob>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCloneJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CloneJob::class); + $this->clone_jobs = $arr; + + return $this; + } + + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsRequest.php new file mode 100644 index 000000000000..07b28f2c7d31 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsRequest.php @@ -0,0 +1,241 @@ +google.cloud.vmmigration.v1.ListCutoverJobsRequest + */ +class ListCutoverJobsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of migrating VMs. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of cutover jobs to return. The service may + * return fewer than this value. If unspecified, at most 500 cutover jobs will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Required. A page token, received from a previous `ListCutoverJobs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCutoverJobs` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page_token = ''; + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of migrating VMs. Please see + * {@see VmMigrationClient::migratingVmName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\ListCutoverJobsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of migrating VMs. + * @type int $page_size + * Optional. The maximum number of cutover jobs to return. The service may + * return fewer than this value. If unspecified, at most 500 cutover jobs will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * @type string $page_token + * Required. A page token, received from a previous `ListCutoverJobs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCutoverJobs` must + * match the call that provided the page token. + * @type string $filter + * Optional. The filter request. + * @type string $order_by + * Optional. the order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of migrating VMs. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of migrating VMs. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of cutover jobs to return. The service may + * return fewer than this value. If unspecified, at most 500 cutover jobs will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of cutover jobs to return. The service may + * return fewer than this value. If unspecified, at most 500 cutover jobs will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Required. A page token, received from a previous `ListCutoverJobs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCutoverJobs` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Required. A page token, received from a previous `ListCutoverJobs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCutoverJobs` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsResponse.php new file mode 100644 index 000000000000..0eb0adebbb36 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsResponse.php @@ -0,0 +1,139 @@ +google.cloud.vmmigration.v1.ListCutoverJobsResponse + */ +class ListCutoverJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of cutover jobs response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob cutover_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $cutover_jobs; + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\CutoverJob>|\Google\Protobuf\Internal\RepeatedField $cutover_jobs + * Output only. The list of cutover jobs response. + * @type string $next_page_token + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The list of cutover jobs response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob cutover_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCutoverJobs() + { + return $this->cutover_jobs; + } + + /** + * Output only. The list of cutover jobs response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob cutover_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\CutoverJob>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCutoverJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CutoverJob::class); + $this->cutover_jobs = $arr; + + return $this; + } + + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsRequest.php new file mode 100644 index 000000000000..ec0686fe621f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsRequest.php @@ -0,0 +1,245 @@ +google.cloud.vmmigration.v1.ListDatacenterConnectorsRequest + */ +class ListDatacenterConnectorsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of connectors. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of connectors to return. The service may + * return fewer than this value. If unspecified, at most 500 sources will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Required. A page token, received from a previous `ListDatacenterConnectors` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListDatacenterConnectors` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page_token = ''; + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of connectors. Please see + * {@see VmMigrationClient::sourceName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\ListDatacenterConnectorsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of connectors. + * @type int $page_size + * Optional. The maximum number of connectors to return. The service may + * return fewer than this value. If unspecified, at most 500 sources will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @type string $page_token + * Required. A page token, received from a previous `ListDatacenterConnectors` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListDatacenterConnectors` must match the call that provided the page + * token. + * @type string $filter + * Optional. The filter request. + * @type string $order_by + * Optional. the order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of connectors. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of connectors. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of connectors to return. The service may + * return fewer than this value. If unspecified, at most 500 sources will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of connectors to return. The service may + * return fewer than this value. If unspecified, at most 500 sources will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Required. A page token, received from a previous `ListDatacenterConnectors` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListDatacenterConnectors` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Required. A page token, received from a previous `ListDatacenterConnectors` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListDatacenterConnectors` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsResponse.php new file mode 100644 index 000000000000..8aa1c27e3113 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsResponse.php @@ -0,0 +1,139 @@ +google.cloud.vmmigration.v1.ListDatacenterConnectorsResponse + */ +class ListDatacenterConnectorsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of sources response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connectors = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $datacenter_connectors; + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\DatacenterConnector>|\Google\Protobuf\Internal\RepeatedField $datacenter_connectors + * Output only. The list of sources response. + * @type string $next_page_token + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The list of sources response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connectors = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDatacenterConnectors() + { + return $this->datacenter_connectors; + } + + /** + * Output only. The list of sources response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connectors = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\DatacenterConnector>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDatacenterConnectors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\DatacenterConnector::class); + $this->datacenter_connectors = $arr; + + return $this; + } + + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsRequest.php new file mode 100644 index 000000000000..11b8be3b9a9b --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsRequest.php @@ -0,0 +1,241 @@ +google.cloud.vmmigration.v1.ListGroupsRequest + */ +class ListGroupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of groups. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of groups to return. The service may return + * fewer than this value. If unspecified, at most 500 groups will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Required. A page token, received from a previous `ListGroups` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListGroups` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page_token = ''; + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of groups. Please see + * {@see VmMigrationClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\ListGroupsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of groups. + * @type int $page_size + * Optional. The maximum number of groups to return. The service may return + * fewer than this value. If unspecified, at most 500 groups will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @type string $page_token + * Required. A page token, received from a previous `ListGroups` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListGroups` must + * match the call that provided the page token. + * @type string $filter + * Optional. The filter request. + * @type string $order_by + * Optional. the order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of groups. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of groups. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of groups to return. The service may return + * fewer than this value. If unspecified, at most 500 groups will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of groups to return. The service may return + * fewer than this value. If unspecified, at most 500 groups will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Required. A page token, received from a previous `ListGroups` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListGroups` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Required. A page token, received from a previous `ListGroups` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListGroups` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsResponse.php new file mode 100644 index 000000000000..3296fe31b740 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsResponse.php @@ -0,0 +1,139 @@ +google.cloud.vmmigration.v1.ListGroupsResponse + */ +class ListGroupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of groups response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Group groups = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $groups; + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\Group>|\Google\Protobuf\Internal\RepeatedField $groups + * Output only. The list of groups response. + * @type string $next_page_token + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The list of groups response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Group groups = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGroups() + { + return $this->groups; + } + + /** + * Output only. The list of groups response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Group groups = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\Group>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\Group::class); + $this->groups = $arr; + + return $this; + } + + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsRequest.php new file mode 100644 index 000000000000..51052e3a9534 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsRequest.php @@ -0,0 +1,275 @@ +google.cloud.vmmigration.v1.ListMigratingVmsRequest + */ +class ListMigratingVmsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of MigratingVms. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of migrating VMs to return. The service may + * return fewer than this value. If unspecified, at most 500 migrating VMs + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Required. A page token, received from a previous `ListMigratingVms` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMigratingVms` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page_token = ''; + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. The level of details of each migrating VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of MigratingVms. Please see + * {@see VmMigrationClient::sourceName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\ListMigratingVmsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of MigratingVms. + * @type int $page_size + * Optional. The maximum number of migrating VMs to return. The service may + * return fewer than this value. If unspecified, at most 500 migrating VMs + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + * @type string $page_token + * Required. A page token, received from a previous `ListMigratingVms` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMigratingVms` + * must match the call that provided the page token. + * @type string $filter + * Optional. The filter request. + * @type string $order_by + * Optional. the order by fields for the result. + * @type int $view + * Optional. The level of details of each migrating VM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of MigratingVms. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of MigratingVms. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of migrating VMs to return. The service may + * return fewer than this value. If unspecified, at most 500 migrating VMs + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of migrating VMs to return. The service may + * return fewer than this value. If unspecified, at most 500 migrating VMs + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Required. A page token, received from a previous `ListMigratingVms` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMigratingVms` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Required. A page token, received from a previous `ListMigratingVms` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMigratingVms` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. The level of details of each migrating VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. The level of details of each migrating VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\MigratingVmView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsResponse.php new file mode 100644 index 000000000000..3f42ab8737dc --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsResponse.php @@ -0,0 +1,139 @@ +google.cloud.vmmigration.v1.ListMigratingVmsResponse + */ +class ListMigratingVmsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of Migrating VMs response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigratingVm migrating_vms = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $migrating_vms; + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\MigratingVm>|\Google\Protobuf\Internal\RepeatedField $migrating_vms + * Output only. The list of Migrating VMs response. + * @type string $next_page_token + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The list of Migrating VMs response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigratingVm migrating_vms = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMigratingVms() + { + return $this->migrating_vms; + } + + /** + * Output only. The list of Migrating VMs response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigratingVm migrating_vms = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\MigratingVm>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMigratingVms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\MigratingVm::class); + $this->migrating_vms = $arr; + + return $this; + } + + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesRequest.php new file mode 100644 index 000000000000..816d448a57c1 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesRequest.php @@ -0,0 +1,241 @@ +google.cloud.vmmigration.v1.ListReplicationCyclesRequest + */ +class ListReplicationCyclesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of ReplicationCycles. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of replication cycles to return. The service + * may return fewer than this value. If unspecified, at most 100 migrating VMs + * will be returned. The maximum value is 100; values above 100 will be + * coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Required. A page token, received from a previous `ListReplicationCycles` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListReplicationCycles` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page_token = ''; + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of ReplicationCycles. Please see + * {@see VmMigrationClient::migratingVmName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\ListReplicationCyclesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of ReplicationCycles. + * @type int $page_size + * Optional. The maximum number of replication cycles to return. The service + * may return fewer than this value. If unspecified, at most 100 migrating VMs + * will be returned. The maximum value is 100; values above 100 will be + * coerced to 100. + * @type string $page_token + * Required. A page token, received from a previous `ListReplicationCycles` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListReplicationCycles` + * must match the call that provided the page token. + * @type string $filter + * Optional. The filter request. + * @type string $order_by + * Optional. the order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of ReplicationCycles. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of ReplicationCycles. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of replication cycles to return. The service + * may return fewer than this value. If unspecified, at most 100 migrating VMs + * will be returned. The maximum value is 100; values above 100 will be + * coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of replication cycles to return. The service + * may return fewer than this value. If unspecified, at most 100 migrating VMs + * will be returned. The maximum value is 100; values above 100 will be + * coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Required. A page token, received from a previous `ListReplicationCycles` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListReplicationCycles` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Required. A page token, received from a previous `ListReplicationCycles` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListReplicationCycles` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesResponse.php new file mode 100644 index 000000000000..2e8b8b96042f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesResponse.php @@ -0,0 +1,139 @@ +google.cloud.vmmigration.v1.ListReplicationCyclesResponse + */ +class ListReplicationCyclesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of replication cycles response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.ReplicationCycle replication_cycles = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $replication_cycles; + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\ReplicationCycle>|\Google\Protobuf\Internal\RepeatedField $replication_cycles + * Output only. The list of replication cycles response. + * @type string $next_page_token + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The list of replication cycles response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.ReplicationCycle replication_cycles = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReplicationCycles() + { + return $this->replication_cycles; + } + + /** + * Output only. The list of replication cycles response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.ReplicationCycle replication_cycles = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\ReplicationCycle>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReplicationCycles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\ReplicationCycle::class); + $this->replication_cycles = $arr; + + return $this; + } + + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesRequest.php new file mode 100644 index 000000000000..8286f34c3e6c --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesRequest.php @@ -0,0 +1,241 @@ +google.cloud.vmmigration.v1.ListSourcesRequest + */ +class ListSourcesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of sources. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of sources to return. The service may return + * fewer than this value. If unspecified, at most 500 sources will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Required. A page token, received from a previous `ListSources` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListSources` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page_token = ''; + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of sources. Please see + * {@see VmMigrationClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\ListSourcesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of sources. + * @type int $page_size + * Optional. The maximum number of sources to return. The service may return + * fewer than this value. If unspecified, at most 500 sources will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @type string $page_token + * Required. A page token, received from a previous `ListSources` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListSources` must + * match the call that provided the page token. + * @type string $filter + * Optional. The filter request. + * @type string $order_by + * Optional. the order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of sources. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of sources. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of sources to return. The service may return + * fewer than this value. If unspecified, at most 500 sources will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of sources to return. The service may return + * fewer than this value. If unspecified, at most 500 sources will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Required. A page token, received from a previous `ListSources` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListSources` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Required. A page token, received from a previous `ListSources` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListSources` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesResponse.php new file mode 100644 index 000000000000..413cd7b0d15d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesResponse.php @@ -0,0 +1,139 @@ +google.cloud.vmmigration.v1.ListSourcesResponse + */ +class ListSourcesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of sources response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Source sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $sources; + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\Source>|\Google\Protobuf\Internal\RepeatedField $sources + * Output only. The list of sources response. + * @type string $next_page_token + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The list of sources response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Source sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSources() + { + return $this->sources; + } + + /** + * Output only. The list of sources response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Source sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\Source>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\Source::class); + $this->sources = $arr; + + return $this; + } + + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsRequest.php new file mode 100644 index 000000000000..82fa22a9be68 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsRequest.php @@ -0,0 +1,241 @@ +google.cloud.vmmigration.v1.ListTargetProjectsRequest + */ +class ListTargetProjectsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of targets. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of targets to return. The service may return + * fewer than this value. If unspecified, at most 500 targets will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Required. A page token, received from a previous `ListTargets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTargets` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page_token = ''; + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of targets. Please see + * {@see VmMigrationClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\ListTargetProjectsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of targets. + * @type int $page_size + * Optional. The maximum number of targets to return. The service may return + * fewer than this value. If unspecified, at most 500 targets will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @type string $page_token + * Required. A page token, received from a previous `ListTargets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTargets` must + * match the call that provided the page token. + * @type string $filter + * Optional. The filter request. + * @type string $order_by + * Optional. the order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of targets. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of targets. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of targets to return. The service may return + * fewer than this value. If unspecified, at most 500 targets will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of targets to return. The service may return + * fewer than this value. If unspecified, at most 500 targets will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Required. A page token, received from a previous `ListTargets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTargets` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Required. A page token, received from a previous `ListTargets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTargets` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsResponse.php new file mode 100644 index 000000000000..a51c7c607f95 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsResponse.php @@ -0,0 +1,139 @@ +google.cloud.vmmigration.v1.ListTargetProjectsResponse + */ +class ListTargetProjectsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of target response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.TargetProject target_projects = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $target_projects; + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\TargetProject>|\Google\Protobuf\Internal\RepeatedField $target_projects + * Output only. The list of target response. + * @type string $next_page_token + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The list of target response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.TargetProject target_projects = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetProjects() + { + return $this->target_projects; + } + + /** + * Output only. The list of target response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.TargetProject target_projects = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\TargetProject>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetProjects($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\TargetProject::class); + $this->target_projects = $arr; + + return $this; + } + + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsRequest.php new file mode 100644 index 000000000000..a1b2d9ef827f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsRequest.php @@ -0,0 +1,279 @@ +google.cloud.vmmigration.v1.ListUtilizationReportsRequest + */ +class ListUtilizationReportsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Utilization Reports parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The level of details of each report. + * Defaults to BASIC. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + /** + * Optional. The maximum number of reports to return. The service may return + * fewer than this value. If unspecified, at most 500 reports will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Required. A page token, received from a previous `ListUtilizationReports` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListUtilizationReports` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page_token = ''; + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The Utilization Reports parent. Please see + * {@see VmMigrationClient::sourceName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\ListUtilizationReportsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The Utilization Reports parent. + * @type int $view + * Optional. The level of details of each report. + * Defaults to BASIC. + * @type int $page_size + * Optional. The maximum number of reports to return. The service may return + * fewer than this value. If unspecified, at most 500 reports will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @type string $page_token + * Required. A page token, received from a previous `ListUtilizationReports` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListUtilizationReports` + * must match the call that provided the page token. + * @type string $filter + * Optional. The filter request. + * @type string $order_by + * Optional. the order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Utilization Reports parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The Utilization Reports parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The level of details of each report. + * Defaults to BASIC. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. The level of details of each report. + * Defaults to BASIC. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\UtilizationReportView::class); + $this->view = $var; + + return $this; + } + + /** + * Optional. The maximum number of reports to return. The service may return + * fewer than this value. If unspecified, at most 500 reports will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of reports to return. The service may return + * fewer than this value. If unspecified, at most 500 reports will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Required. A page token, received from a previous `ListUtilizationReports` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListUtilizationReports` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Required. A page token, received from a previous `ListUtilizationReports` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListUtilizationReports` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsResponse.php new file mode 100644 index 000000000000..a82c22f473b4 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsResponse.php @@ -0,0 +1,139 @@ +google.cloud.vmmigration.v1.ListUtilizationReportsResponse + */ +class ListUtilizationReportsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of reports. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.UtilizationReport utilization_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $utilization_reports; + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\UtilizationReport>|\Google\Protobuf\Internal\RepeatedField $utilization_reports + * Output only. The list of reports. + * @type string $next_page_token + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The list of reports. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.UtilizationReport utilization_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUtilizationReports() + { + return $this->utilization_reports; + } + + /** + * Output only. The list of reports. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.UtilizationReport utilization_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\UtilizationReport>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUtilizationReports($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\UtilizationReport::class); + $this->utilization_reports = $arr; + + return $this; + } + + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm.php new file mode 100644 index 000000000000..a86771ba3c43 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm.php @@ -0,0 +1,796 @@ +google.cloud.vmmigration.v1.MigratingVm + */ +class MigratingVm extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The identifier of the MigratingVm. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * The unique ID of the VM in the source. + * The VM's name in vSphere can be changed, so this is not the VM's name but + * rather its moRef id. This id is of the form vm-. + * + * Generated from protobuf field string source_vm_id = 2; + */ + protected $source_vm_id = ''; + /** + * The display name attached to the MigratingVm by the user. + * + * Generated from protobuf field string display_name = 18; + */ + protected $display_name = ''; + /** + * The description attached to the migrating VM by the user. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * The replication schedule policy. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulePolicy policy = 8; + */ + protected $policy = null; + /** + * Output only. The time the migrating VM was created (this refers to this + * resource and not to the time it was installed in the source). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last time the migrating VM resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The most updated snapshot created time in the source that + * finished replication. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationSync last_sync = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_sync = null; + /** + * Output only. State of the MigratingVm. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm.State state = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The last time the migrating VM state was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_time = null; + /** + * Output only. The percentage progress of the current running replication + * cycle. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle current_sync_info = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $current_sync_info = null; + /** + * Output only. The group this migrating vm is included in, if any. The group + * is represented by the full path of the appropriate + * [Group][google.cloud.vmmigration.v1.Group] resource. + * + * Generated from protobuf field string group = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $group = ''; + /** + * The labels of the migrating VM. + * + * Generated from protobuf field map labels = 16; + */ + private $labels; + /** + * Output only. The recent [clone jobs][google.cloud.vmmigration.v1.CloneJob] + * performed on the migrating VM. This field holds the vm's last completed + * clone job and the vm's running clone job, if one exists. + * Note: To have this field populated you need to explicitly request it via + * the "view" parameter of the Get/List request. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob recent_clone_jobs = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $recent_clone_jobs; + /** + * Output only. Provides details on the state of the Migrating VM in case of + * an error in replication. + * + * Generated from protobuf field .google.rpc.Status error = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * Output only. The recent cutover jobs performed on the migrating VM. + * This field holds the vm's last completed cutover job and the vm's + * running cutover job, if one exists. + * Note: To have this field populated you need to explicitly request it via + * the "view" parameter of the Get/List request. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob recent_cutover_jobs = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $recent_cutover_jobs; + protected $target_vm_defaults; + protected $source_vm_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\ComputeEngineTargetDefaults $compute_engine_target_defaults + * Details of the target VM in Compute Engine. + * @type \Google\Cloud\VMMigration\V1\AwsSourceVmDetails $aws_source_vm_details + * Output only. Details of the VM from an AWS source. + * @type string $name + * Output only. The identifier of the MigratingVm. + * @type string $source_vm_id + * The unique ID of the VM in the source. + * The VM's name in vSphere can be changed, so this is not the VM's name but + * rather its moRef id. This id is of the form vm-. + * @type string $display_name + * The display name attached to the MigratingVm by the user. + * @type string $description + * The description attached to the migrating VM by the user. + * @type \Google\Cloud\VMMigration\V1\SchedulePolicy $policy + * The replication schedule policy. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the migrating VM was created (this refers to this + * resource and not to the time it was installed in the source). + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last time the migrating VM resource was updated. + * @type \Google\Cloud\VMMigration\V1\ReplicationSync $last_sync + * Output only. The most updated snapshot created time in the source that + * finished replication. + * @type int $state + * Output only. State of the MigratingVm. + * @type \Google\Protobuf\Timestamp $state_time + * Output only. The last time the migrating VM state was updated. + * @type \Google\Cloud\VMMigration\V1\ReplicationCycle $current_sync_info + * Output only. The percentage progress of the current running replication + * cycle. + * @type string $group + * Output only. The group this migrating vm is included in, if any. The group + * is represented by the full path of the appropriate + * [Group][google.cloud.vmmigration.v1.Group] resource. + * @type array|\Google\Protobuf\Internal\MapField $labels + * The labels of the migrating VM. + * @type array<\Google\Cloud\VMMigration\V1\CloneJob>|\Google\Protobuf\Internal\RepeatedField $recent_clone_jobs + * Output only. The recent [clone jobs][google.cloud.vmmigration.v1.CloneJob] + * performed on the migrating VM. This field holds the vm's last completed + * clone job and the vm's running clone job, if one exists. + * Note: To have this field populated you need to explicitly request it via + * the "view" parameter of the Get/List request. + * @type \Google\Rpc\Status $error + * Output only. Provides details on the state of the Migrating VM in case of + * an error in replication. + * @type array<\Google\Cloud\VMMigration\V1\CutoverJob>|\Google\Protobuf\Internal\RepeatedField $recent_cutover_jobs + * Output only. The recent cutover jobs performed on the migrating VM. + * This field holds the vm's last completed cutover job and the vm's + * running cutover job, if one exists. + * Note: To have this field populated you need to explicitly request it via + * the "view" parameter of the Get/List request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Details of the target VM in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDefaults compute_engine_target_defaults = 26; + * @return \Google\Cloud\VMMigration\V1\ComputeEngineTargetDefaults|null + */ + public function getComputeEngineTargetDefaults() + { + return $this->readOneof(26); + } + + public function hasComputeEngineTargetDefaults() + { + return $this->hasOneof(26); + } + + /** + * Details of the target VM in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDefaults compute_engine_target_defaults = 26; + * @param \Google\Cloud\VMMigration\V1\ComputeEngineTargetDefaults $var + * @return $this + */ + public function setComputeEngineTargetDefaults($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeEngineTargetDefaults::class); + $this->writeOneof(26, $var); + + return $this; + } + + /** + * Output only. Details of the VM from an AWS source. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails aws_source_vm_details = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\AwsSourceVmDetails|null + */ + public function getAwsSourceVmDetails() + { + return $this->readOneof(29); + } + + public function hasAwsSourceVmDetails() + { + return $this->hasOneof(29); + } + + /** + * Output only. Details of the VM from an AWS source. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails aws_source_vm_details = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\AwsSourceVmDetails $var + * @return $this + */ + public function setAwsSourceVmDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AwsSourceVmDetails::class); + $this->writeOneof(29, $var); + + return $this; + } + + /** + * Output only. The identifier of the MigratingVm. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The identifier of the MigratingVm. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The unique ID of the VM in the source. + * The VM's name in vSphere can be changed, so this is not the VM's name but + * rather its moRef id. This id is of the form vm-. + * + * Generated from protobuf field string source_vm_id = 2; + * @return string + */ + public function getSourceVmId() + { + return $this->source_vm_id; + } + + /** + * The unique ID of the VM in the source. + * The VM's name in vSphere can be changed, so this is not the VM's name but + * rather its moRef id. This id is of the form vm-. + * + * Generated from protobuf field string source_vm_id = 2; + * @param string $var + * @return $this + */ + public function setSourceVmId($var) + { + GPBUtil::checkString($var, True); + $this->source_vm_id = $var; + + return $this; + } + + /** + * The display name attached to the MigratingVm by the user. + * + * Generated from protobuf field string display_name = 18; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name attached to the MigratingVm by the user. + * + * Generated from protobuf field string display_name = 18; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The description attached to the migrating VM by the user. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description attached to the migrating VM by the user. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The replication schedule policy. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulePolicy policy = 8; + * @return \Google\Cloud\VMMigration\V1\SchedulePolicy|null + */ + public function getPolicy() + { + return $this->policy; + } + + public function hasPolicy() + { + return isset($this->policy); + } + + public function clearPolicy() + { + unset($this->policy); + } + + /** + * The replication schedule policy. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulePolicy policy = 8; + * @param \Google\Cloud\VMMigration\V1\SchedulePolicy $var + * @return $this + */ + public function setPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\SchedulePolicy::class); + $this->policy = $var; + + return $this; + } + + /** + * Output only. The time the migrating VM was created (this refers to this + * resource and not to the time it was installed in the source). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the migrating VM was created (this refers to this + * resource and not to the time it was installed in the source). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The last time the migrating VM resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last time the migrating VM resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The most updated snapshot created time in the source that + * finished replication. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationSync last_sync = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\ReplicationSync|null + */ + public function getLastSync() + { + return $this->last_sync; + } + + public function hasLastSync() + { + return isset($this->last_sync); + } + + public function clearLastSync() + { + unset($this->last_sync); + } + + /** + * Output only. The most updated snapshot created time in the source that + * finished replication. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationSync last_sync = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\ReplicationSync $var + * @return $this + */ + public function setLastSync($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicationSync::class); + $this->last_sync = $var; + + return $this; + } + + /** + * Output only. State of the MigratingVm. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm.State state = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the MigratingVm. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm.State state = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\MigratingVm\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The last time the migrating VM state was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStateTime() + { + return $this->state_time; + } + + public function hasStateTime() + { + return isset($this->state_time); + } + + public function clearStateTime() + { + unset($this->state_time); + } + + /** + * Output only. The last time the migrating VM state was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->state_time = $var; + + return $this; + } + + /** + * Output only. The percentage progress of the current running replication + * cycle. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle current_sync_info = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\ReplicationCycle|null + */ + public function getCurrentSyncInfo() + { + return $this->current_sync_info; + } + + public function hasCurrentSyncInfo() + { + return isset($this->current_sync_info); + } + + public function clearCurrentSyncInfo() + { + unset($this->current_sync_info); + } + + /** + * Output only. The percentage progress of the current running replication + * cycle. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle current_sync_info = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\ReplicationCycle $var + * @return $this + */ + public function setCurrentSyncInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicationCycle::class); + $this->current_sync_info = $var; + + return $this; + } + + /** + * Output only. The group this migrating vm is included in, if any. The group + * is represented by the full path of the appropriate + * [Group][google.cloud.vmmigration.v1.Group] resource. + * + * Generated from protobuf field string group = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getGroup() + { + return $this->group; + } + + /** + * Output only. The group this migrating vm is included in, if any. The group + * is represented by the full path of the appropriate + * [Group][google.cloud.vmmigration.v1.Group] resource. + * + * Generated from protobuf field string group = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkString($var, True); + $this->group = $var; + + return $this; + } + + /** + * The labels of the migrating VM. + * + * Generated from protobuf field map labels = 16; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * The labels of the migrating VM. + * + * Generated from protobuf field map labels = 16; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. The recent [clone jobs][google.cloud.vmmigration.v1.CloneJob] + * performed on the migrating VM. This field holds the vm's last completed + * clone job and the vm's running clone job, if one exists. + * Note: To have this field populated you need to explicitly request it via + * the "view" parameter of the Get/List request. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob recent_clone_jobs = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRecentCloneJobs() + { + return $this->recent_clone_jobs; + } + + /** + * Output only. The recent [clone jobs][google.cloud.vmmigration.v1.CloneJob] + * performed on the migrating VM. This field holds the vm's last completed + * clone job and the vm's running clone job, if one exists. + * Note: To have this field populated you need to explicitly request it via + * the "view" parameter of the Get/List request. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob recent_clone_jobs = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\CloneJob>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRecentCloneJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CloneJob::class); + $this->recent_clone_jobs = $arr; + + return $this; + } + + /** + * Output only. Provides details on the state of the Migrating VM in case of + * an error in replication. + * + * Generated from protobuf field .google.rpc.Status error = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. Provides details on the state of the Migrating VM in case of + * an error in replication. + * + * Generated from protobuf field .google.rpc.Status error = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * Output only. The recent cutover jobs performed on the migrating VM. + * This field holds the vm's last completed cutover job and the vm's + * running cutover job, if one exists. + * Note: To have this field populated you need to explicitly request it via + * the "view" parameter of the Get/List request. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob recent_cutover_jobs = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRecentCutoverJobs() + { + return $this->recent_cutover_jobs; + } + + /** + * Output only. The recent cutover jobs performed on the migrating VM. + * This field holds the vm's last completed cutover job and the vm's + * running cutover job, if one exists. + * Note: To have this field populated you need to explicitly request it via + * the "view" parameter of the Get/List request. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob recent_cutover_jobs = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\CutoverJob>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRecentCutoverJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CutoverJob::class); + $this->recent_cutover_jobs = $arr; + + return $this; + } + + /** + * @return string + */ + public function getTargetVmDefaults() + { + return $this->whichOneof("target_vm_defaults"); + } + + /** + * @return string + */ + public function getSourceVmDetails() + { + return $this->whichOneof("source_vm_details"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/State.php new file mode 100644 index 000000000000..1677e69889d1 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/State.php @@ -0,0 +1,133 @@ +google.cloud.vmmigration.v1.MigratingVm.State + */ +class State +{ + /** + * The state was not sampled by the health checks yet. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The VM in the source is being verified. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The source VM was verified, and it's ready to start replication. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * Migration is going through the first sync cycle. + * + * Generated from protobuf enum FIRST_SYNC = 3; + */ + const FIRST_SYNC = 3; + /** + * The replication is active, and it's running or scheduled to run. + * + * Generated from protobuf enum ACTIVE = 4; + */ + const ACTIVE = 4; + /** + * The source VM is being turned off, and a final replication is currently + * running. + * + * Generated from protobuf enum CUTTING_OVER = 7; + */ + const CUTTING_OVER = 7; + /** + * The source VM was stopped and replicated. The replication is currently + * paused. + * + * Generated from protobuf enum CUTOVER = 8; + */ + const CUTOVER = 8; + /** + * A cutover job is active and replication cycle is running the final sync. + * + * Generated from protobuf enum FINAL_SYNC = 9; + */ + const FINAL_SYNC = 9; + /** + * The replication was paused by the user and no cycles are scheduled to + * run. + * + * Generated from protobuf enum PAUSED = 10; + */ + const PAUSED = 10; + /** + * The migrating VM is being finalized and migration resources are being + * removed. + * + * Generated from protobuf enum FINALIZING = 11; + */ + const FINALIZING = 11; + /** + * The replication process is done. The migrating VM is finalized and no + * longer consumes billable resources. + * + * Generated from protobuf enum FINALIZED = 12; + */ + const FINALIZED = 12; + /** + * The replication process encountered an unrecoverable error and was + * aborted. + * + * Generated from protobuf enum ERROR = 13; + */ + const ERROR = 13; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::READY => 'READY', + self::FIRST_SYNC => 'FIRST_SYNC', + self::ACTIVE => 'ACTIVE', + self::CUTTING_OVER => 'CUTTING_OVER', + self::CUTOVER => 'CUTOVER', + self::FINAL_SYNC => 'FINAL_SYNC', + self::PAUSED => 'PAUSED', + self::FINALIZING => 'FINALIZING', + self::FINALIZED => 'FINALIZED', + self::ERROR => 'ERROR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VMMigration\V1\MigratingVm_State::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVmView.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVmView.php new file mode 100644 index 000000000000..b856588e1ba6 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVmView.php @@ -0,0 +1,63 @@ +google.cloud.vmmigration.v1.MigratingVmView + */ +class MigratingVmView +{ + /** + * View is unspecified. The API will fallback to the default value. + * + * Generated from protobuf enum MIGRATING_VM_VIEW_UNSPECIFIED = 0; + */ + const MIGRATING_VM_VIEW_UNSPECIFIED = 0; + /** + * Get the migrating VM basic details. + * The basic details do not include the recent clone jobs and recent cutover + * jobs lists. + * + * Generated from protobuf enum MIGRATING_VM_VIEW_BASIC = 1; + */ + const MIGRATING_VM_VIEW_BASIC = 1; + /** + * Include everything. + * + * Generated from protobuf enum MIGRATING_VM_VIEW_FULL = 2; + */ + const MIGRATING_VM_VIEW_FULL = 2; + + private static $valueToName = [ + self::MIGRATING_VM_VIEW_UNSPECIFIED => 'MIGRATING_VM_VIEW_UNSPECIFIED', + self::MIGRATING_VM_VIEW_BASIC => 'MIGRATING_VM_VIEW_BASIC', + self::MIGRATING_VM_VIEW_FULL => 'MIGRATING_VM_VIEW_FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError.php new file mode 100644 index 000000000000..55181c0327d9 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError.php @@ -0,0 +1,239 @@ +google.cloud.vmmigration.v1.MigrationError + */ +class MigrationError extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The error code. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigrationError.ErrorCode code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $code = 0; + /** + * Output only. The localized error message. + * + * Generated from protobuf field .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error_message = null; + /** + * Output only. Suggested action for solving the error. + * + * Generated from protobuf field .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $action_item = null; + /** + * Output only. URL(s) pointing to additional information on handling the + * current error. + * + * Generated from protobuf field repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $help_links; + /** + * Output only. The time the error occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * Output only. The error code. + * @type \Google\Rpc\LocalizedMessage $error_message + * Output only. The localized error message. + * @type \Google\Rpc\LocalizedMessage $action_item + * Output only. Suggested action for solving the error. + * @type array<\Google\Rpc\Help\Link>|\Google\Protobuf\Internal\RepeatedField $help_links + * Output only. URL(s) pointing to additional information on handling the + * current error. + * @type \Google\Protobuf\Timestamp $error_time + * Output only. The time the error occurred. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The error code. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigrationError.ErrorCode code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Output only. The error code. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigrationError.ErrorCode code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\MigrationError\ErrorCode::class); + $this->code = $var; + + return $this; + } + + /** + * Output only. The localized error message. + * + * Generated from protobuf field .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\LocalizedMessage|null + */ + public function getErrorMessage() + { + return $this->error_message; + } + + public function hasErrorMessage() + { + return isset($this->error_message); + } + + public function clearErrorMessage() + { + unset($this->error_message); + } + + /** + * Output only. The localized error message. + * + * Generated from protobuf field .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\LocalizedMessage $var + * @return $this + */ + public function setErrorMessage($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\LocalizedMessage::class); + $this->error_message = $var; + + return $this; + } + + /** + * Output only. Suggested action for solving the error. + * + * Generated from protobuf field .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\LocalizedMessage|null + */ + public function getActionItem() + { + return $this->action_item; + } + + public function hasActionItem() + { + return isset($this->action_item); + } + + public function clearActionItem() + { + unset($this->action_item); + } + + /** + * Output only. Suggested action for solving the error. + * + * Generated from protobuf field .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\LocalizedMessage $var + * @return $this + */ + public function setActionItem($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\LocalizedMessage::class); + $this->action_item = $var; + + return $this; + } + + /** + * Output only. URL(s) pointing to additional information on handling the + * current error. + * + * Generated from protobuf field repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHelpLinks() + { + return $this->help_links; + } + + /** + * Output only. URL(s) pointing to additional information on handling the + * current error. + * + * Generated from protobuf field repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Rpc\Help\Link>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHelpLinks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Help\Link::class); + $this->help_links = $arr; + + return $this; + } + + /** + * Output only. The time the error occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getErrorTime() + { + return $this->error_time; + } + + public function hasErrorTime() + { + return isset($this->error_time); + } + + public function clearErrorTime() + { + unset($this->error_time); + } + + /** + * Output only. The time the error occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setErrorTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->error_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError/ErrorCode.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError/ErrorCode.php new file mode 100644 index 000000000000..b7f0736328fd --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError/ErrorCode.php @@ -0,0 +1,115 @@ +google.cloud.vmmigration.v1.MigrationError.ErrorCode + */ +class ErrorCode +{ + /** + * Default value. This value is not used. + * + * Generated from protobuf enum ERROR_CODE_UNSPECIFIED = 0; + */ + const ERROR_CODE_UNSPECIFIED = 0; + /** + * Migrate for Compute encountered an unknown error. + * + * Generated from protobuf enum UNKNOWN_ERROR = 1; + */ + const UNKNOWN_ERROR = 1; + /** + * Migrate for Compute encountered an error while validating replication + * source health. + * + * Generated from protobuf enum SOURCE_VALIDATION_ERROR = 2; + */ + const SOURCE_VALIDATION_ERROR = 2; + /** + * Migrate for Compute encountered an error during source data operation. + * + * Generated from protobuf enum SOURCE_REPLICATION_ERROR = 3; + */ + const SOURCE_REPLICATION_ERROR = 3; + /** + * Migrate for Compute encountered an error during target data operation. + * + * Generated from protobuf enum TARGET_REPLICATION_ERROR = 4; + */ + const TARGET_REPLICATION_ERROR = 4; + /** + * Migrate for Compute encountered an error during OS adaptation. + * + * Generated from protobuf enum OS_ADAPTATION_ERROR = 5; + */ + const OS_ADAPTATION_ERROR = 5; + /** + * Migrate for Compute encountered an error in clone operation. + * + * Generated from protobuf enum CLONE_ERROR = 6; + */ + const CLONE_ERROR = 6; + /** + * Migrate for Compute encountered an error in cutover operation. + * + * Generated from protobuf enum CUTOVER_ERROR = 7; + */ + const CUTOVER_ERROR = 7; + /** + * Migrate for Compute encountered an error during utilization report + * creation. + * + * Generated from protobuf enum UTILIZATION_REPORT_ERROR = 8; + */ + const UTILIZATION_REPORT_ERROR = 8; + /** + * Migrate for Compute encountered an error during appliance upgrade. + * + * Generated from protobuf enum APPLIANCE_UPGRADE_ERROR = 9; + */ + const APPLIANCE_UPGRADE_ERROR = 9; + + private static $valueToName = [ + self::ERROR_CODE_UNSPECIFIED => 'ERROR_CODE_UNSPECIFIED', + self::UNKNOWN_ERROR => 'UNKNOWN_ERROR', + self::SOURCE_VALIDATION_ERROR => 'SOURCE_VALIDATION_ERROR', + self::SOURCE_REPLICATION_ERROR => 'SOURCE_REPLICATION_ERROR', + self::TARGET_REPLICATION_ERROR => 'TARGET_REPLICATION_ERROR', + self::OS_ADAPTATION_ERROR => 'OS_ADAPTATION_ERROR', + self::CLONE_ERROR => 'CLONE_ERROR', + self::CUTOVER_ERROR => 'CUTOVER_ERROR', + self::UTILIZATION_REPORT_ERROR => 'UTILIZATION_REPORT_ERROR', + self::APPLIANCE_UPGRADE_ERROR => 'APPLIANCE_UPGRADE_ERROR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ErrorCode::class, \Google\Cloud\VMMigration\V1\MigrationError_ErrorCode::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/NetworkInterface.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/NetworkInterface.php new file mode 100644 index 000000000000..e70ad652db3a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/NetworkInterface.php @@ -0,0 +1,177 @@ +google.cloud.vmmigration.v1.NetworkInterface + */ +class NetworkInterface extends \Google\Protobuf\Internal\Message +{ + /** + * The network to connect the NIC to. + * + * Generated from protobuf field string network = 1; + */ + protected $network = ''; + /** + * The subnetwork to connect the NIC to. + * + * Generated from protobuf field string subnetwork = 2; + */ + protected $subnetwork = ''; + /** + * The internal IP to define in the NIC. + * The formats accepted are: `ephemeral` \ ipv4 address \ a named address + * resource full path. + * + * Generated from protobuf field string internal_ip = 3; + */ + protected $internal_ip = ''; + /** + * The external IP to define in the NIC. + * + * Generated from protobuf field string external_ip = 4; + */ + protected $external_ip = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network + * The network to connect the NIC to. + * @type string $subnetwork + * The subnetwork to connect the NIC to. + * @type string $internal_ip + * The internal IP to define in the NIC. + * The formats accepted are: `ephemeral` \ ipv4 address \ a named address + * resource full path. + * @type string $external_ip + * The external IP to define in the NIC. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The network to connect the NIC to. + * + * Generated from protobuf field string network = 1; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * The network to connect the NIC to. + * + * Generated from protobuf field string network = 1; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * The subnetwork to connect the NIC to. + * + * Generated from protobuf field string subnetwork = 2; + * @return string + */ + public function getSubnetwork() + { + return $this->subnetwork; + } + + /** + * The subnetwork to connect the NIC to. + * + * Generated from protobuf field string subnetwork = 2; + * @param string $var + * @return $this + */ + public function setSubnetwork($var) + { + GPBUtil::checkString($var, True); + $this->subnetwork = $var; + + return $this; + } + + /** + * The internal IP to define in the NIC. + * The formats accepted are: `ephemeral` \ ipv4 address \ a named address + * resource full path. + * + * Generated from protobuf field string internal_ip = 3; + * @return string + */ + public function getInternalIp() + { + return $this->internal_ip; + } + + /** + * The internal IP to define in the NIC. + * The formats accepted are: `ephemeral` \ ipv4 address \ a named address + * resource full path. + * + * Generated from protobuf field string internal_ip = 3; + * @param string $var + * @return $this + */ + public function setInternalIp($var) + { + GPBUtil::checkString($var, True); + $this->internal_ip = $var; + + return $this; + } + + /** + * The external IP to define in the NIC. + * + * Generated from protobuf field string external_ip = 4; + * @return string + */ + public function getExternalIp() + { + return $this->external_ip; + } + + /** + * The external IP to define in the NIC. + * + * Generated from protobuf field string external_ip = 4; + * @param string $var + * @return $this + */ + public function setExternalIp($var) + { + GPBUtil::checkString($var, True); + $this->external_ip = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/OperationMetadata.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/OperationMetadata.php new file mode 100644 index 000000000000..3174fc524175 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.vmmigration.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_message + * Output only. Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationRequest.php new file mode 100644 index 000000000000..bd578e77b383 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationRequest.php @@ -0,0 +1,67 @@ +google.cloud.vmmigration.v1.PauseMigrationRequest + */ +class PauseMigrationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $migrating_vm = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $migrating_vm + * Required. The name of the MigratingVm. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getMigratingVm() + { + return $this->migrating_vm; + } + + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMigratingVm($var) + { + GPBUtil::checkString($var, True); + $this->migrating_vm = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationResponse.php new file mode 100644 index 000000000000..943c6192f115 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationResponse.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.PauseMigrationResponse + */ +class PauseMigrationResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PostProcessingStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PostProcessingStep.php new file mode 100644 index 000000000000..6fea26e74280 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PostProcessingStep.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.PostProcessingStep + */ +class PostProcessingStep extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PreparingVMDisksStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PreparingVMDisksStep.php new file mode 100644 index 000000000000..1fd2f8bc8cae --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PreparingVMDisksStep.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.PreparingVMDisksStep + */ +class PreparingVMDisksStep extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationRequest.php new file mode 100644 index 000000000000..5aa1a199ff07 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationRequest.php @@ -0,0 +1,115 @@ +google.cloud.vmmigration.v1.RemoveGroupMigrationRequest + */ +class RemoveGroupMigrationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Group. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $group = ''; + /** + * The MigratingVm to remove. + * + * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { + */ + protected $migrating_vm = ''; + + /** + * @param string $group Required. The name of the Group. Please see + * {@see VmMigrationClient::groupName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\RemoveGroupMigrationRequest + * + * @experimental + */ + public static function build(string $group): self + { + return (new self()) + ->setGroup($group); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $group + * Required. The name of the Group. + * @type string $migrating_vm + * The MigratingVm to remove. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Group. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getGroup() + { + return $this->group; + } + + /** + * Required. The name of the Group. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkString($var, True); + $this->group = $var; + + return $this; + } + + /** + * The MigratingVm to remove. + * + * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getMigratingVm() + { + return $this->migrating_vm; + } + + /** + * The MigratingVm to remove. + * + * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMigratingVm($var) + { + GPBUtil::checkString($var, True); + $this->migrating_vm = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationResponse.php new file mode 100644 index 000000000000..76fe02aad40a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationResponse.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.RemoveGroupMigrationResponse + */ +class RemoveGroupMigrationResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicatingStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicatingStep.php new file mode 100644 index 000000000000..c0191fc596f3 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicatingStep.php @@ -0,0 +1,177 @@ +google.cloud.vmmigration.v1.ReplicatingStep + */ +class ReplicatingStep extends \Google\Protobuf\Internal\Message +{ + /** + * Total bytes to be handled in the step. + * + * Generated from protobuf field int64 total_bytes = 1; + */ + protected $total_bytes = 0; + /** + * Replicated bytes in the step. + * + * Generated from protobuf field int64 replicated_bytes = 2; + */ + protected $replicated_bytes = 0; + /** + * The source disks replication rate for the last 2 minutes in bytes per + * second. + * + * Generated from protobuf field int64 last_two_minutes_average_bytes_per_second = 3; + */ + protected $last_two_minutes_average_bytes_per_second = 0; + /** + * The source disks replication rate for the last 30 minutes in bytes per + * second. + * + * Generated from protobuf field int64 last_thirty_minutes_average_bytes_per_second = 4; + */ + protected $last_thirty_minutes_average_bytes_per_second = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $total_bytes + * Total bytes to be handled in the step. + * @type int|string $replicated_bytes + * Replicated bytes in the step. + * @type int|string $last_two_minutes_average_bytes_per_second + * The source disks replication rate for the last 2 minutes in bytes per + * second. + * @type int|string $last_thirty_minutes_average_bytes_per_second + * The source disks replication rate for the last 30 minutes in bytes per + * second. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Total bytes to be handled in the step. + * + * Generated from protobuf field int64 total_bytes = 1; + * @return int|string + */ + public function getTotalBytes() + { + return $this->total_bytes; + } + + /** + * Total bytes to be handled in the step. + * + * Generated from protobuf field int64 total_bytes = 1; + * @param int|string $var + * @return $this + */ + public function setTotalBytes($var) + { + GPBUtil::checkInt64($var); + $this->total_bytes = $var; + + return $this; + } + + /** + * Replicated bytes in the step. + * + * Generated from protobuf field int64 replicated_bytes = 2; + * @return int|string + */ + public function getReplicatedBytes() + { + return $this->replicated_bytes; + } + + /** + * Replicated bytes in the step. + * + * Generated from protobuf field int64 replicated_bytes = 2; + * @param int|string $var + * @return $this + */ + public function setReplicatedBytes($var) + { + GPBUtil::checkInt64($var); + $this->replicated_bytes = $var; + + return $this; + } + + /** + * The source disks replication rate for the last 2 minutes in bytes per + * second. + * + * Generated from protobuf field int64 last_two_minutes_average_bytes_per_second = 3; + * @return int|string + */ + public function getLastTwoMinutesAverageBytesPerSecond() + { + return $this->last_two_minutes_average_bytes_per_second; + } + + /** + * The source disks replication rate for the last 2 minutes in bytes per + * second. + * + * Generated from protobuf field int64 last_two_minutes_average_bytes_per_second = 3; + * @param int|string $var + * @return $this + */ + public function setLastTwoMinutesAverageBytesPerSecond($var) + { + GPBUtil::checkInt64($var); + $this->last_two_minutes_average_bytes_per_second = $var; + + return $this; + } + + /** + * The source disks replication rate for the last 30 minutes in bytes per + * second. + * + * Generated from protobuf field int64 last_thirty_minutes_average_bytes_per_second = 4; + * @return int|string + */ + public function getLastThirtyMinutesAverageBytesPerSecond() + { + return $this->last_thirty_minutes_average_bytes_per_second; + } + + /** + * The source disks replication rate for the last 30 minutes in bytes per + * second. + * + * Generated from protobuf field int64 last_thirty_minutes_average_bytes_per_second = 4; + * @param int|string $var + * @return $this + */ + public function setLastThirtyMinutesAverageBytesPerSecond($var) + { + GPBUtil::checkInt64($var); + $this->last_thirty_minutes_average_bytes_per_second = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle.php new file mode 100644 index 000000000000..54c3bf4c6ee3 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle.php @@ -0,0 +1,393 @@ +google.cloud.vmmigration.v1.ReplicationCycle + */ +class ReplicationCycle extends \Google\Protobuf\Internal\Message +{ + /** + * The identifier of the ReplicationCycle. + * + * Generated from protobuf field string name = 13; + */ + protected $name = ''; + /** + * The cycle's ordinal number. + * + * Generated from protobuf field int32 cycle_number = 10; + */ + protected $cycle_number = 0; + /** + * The time the replication cycle has started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time the replication cycle has ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; + */ + protected $end_time = null; + /** + * The accumulated duration the replication cycle was paused. + * + * Generated from protobuf field .google.protobuf.Duration total_pause_duration = 7; + */ + protected $total_pause_duration = null; + /** + * The current progress in percentage of this cycle. + * Was replaced by 'steps' field, which breaks down the cycle progression more + * accurately. + * + * Generated from protobuf field int32 progress_percent = 5 [deprecated = true]; + * @deprecated + */ + protected $progress_percent = 0; + /** + * The cycle's steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CycleStep steps = 9; + */ + private $steps; + /** + * State of the ReplicationCycle. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle.State state = 11; + */ + protected $state = 0; + /** + * Provides details on the state of the cycle in case of an error. + * + * Generated from protobuf field .google.rpc.Status error = 12; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The identifier of the ReplicationCycle. + * @type int $cycle_number + * The cycle's ordinal number. + * @type \Google\Protobuf\Timestamp $start_time + * The time the replication cycle has started. + * @type \Google\Protobuf\Timestamp $end_time + * The time the replication cycle has ended. + * @type \Google\Protobuf\Duration $total_pause_duration + * The accumulated duration the replication cycle was paused. + * @type int $progress_percent + * The current progress in percentage of this cycle. + * Was replaced by 'steps' field, which breaks down the cycle progression more + * accurately. + * @type array<\Google\Cloud\VMMigration\V1\CycleStep>|\Google\Protobuf\Internal\RepeatedField $steps + * The cycle's steps list representing its progress. + * @type int $state + * State of the ReplicationCycle. + * @type \Google\Rpc\Status $error + * Provides details on the state of the cycle in case of an error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The identifier of the ReplicationCycle. + * + * Generated from protobuf field string name = 13; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The identifier of the ReplicationCycle. + * + * Generated from protobuf field string name = 13; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The cycle's ordinal number. + * + * Generated from protobuf field int32 cycle_number = 10; + * @return int + */ + public function getCycleNumber() + { + return $this->cycle_number; + } + + /** + * The cycle's ordinal number. + * + * Generated from protobuf field int32 cycle_number = 10; + * @param int $var + * @return $this + */ + public function setCycleNumber($var) + { + GPBUtil::checkInt32($var); + $this->cycle_number = $var; + + return $this; + } + + /** + * The time the replication cycle has started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The time the replication cycle has started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time the replication cycle has ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time the replication cycle has ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * The accumulated duration the replication cycle was paused. + * + * Generated from protobuf field .google.protobuf.Duration total_pause_duration = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getTotalPauseDuration() + { + return $this->total_pause_duration; + } + + public function hasTotalPauseDuration() + { + return isset($this->total_pause_duration); + } + + public function clearTotalPauseDuration() + { + unset($this->total_pause_duration); + } + + /** + * The accumulated duration the replication cycle was paused. + * + * Generated from protobuf field .google.protobuf.Duration total_pause_duration = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTotalPauseDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->total_pause_duration = $var; + + return $this; + } + + /** + * The current progress in percentage of this cycle. + * Was replaced by 'steps' field, which breaks down the cycle progression more + * accurately. + * + * Generated from protobuf field int32 progress_percent = 5 [deprecated = true]; + * @return int + * @deprecated + */ + public function getProgressPercent() + { + @trigger_error('progress_percent is deprecated.', E_USER_DEPRECATED); + return $this->progress_percent; + } + + /** + * The current progress in percentage of this cycle. + * Was replaced by 'steps' field, which breaks down the cycle progression more + * accurately. + * + * Generated from protobuf field int32 progress_percent = 5 [deprecated = true]; + * @param int $var + * @return $this + * @deprecated + */ + public function setProgressPercent($var) + { + @trigger_error('progress_percent is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkInt32($var); + $this->progress_percent = $var; + + return $this; + } + + /** + * The cycle's steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CycleStep steps = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSteps() + { + return $this->steps; + } + + /** + * The cycle's steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CycleStep steps = 9; + * @param array<\Google\Cloud\VMMigration\V1\CycleStep>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSteps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CycleStep::class); + $this->steps = $arr; + + return $this; + } + + /** + * State of the ReplicationCycle. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle.State state = 11; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * State of the ReplicationCycle. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle.State state = 11; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ReplicationCycle\State::class); + $this->state = $var; + + return $this; + } + + /** + * Provides details on the state of the cycle in case of an error. + * + * Generated from protobuf field .google.rpc.Status error = 12; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Provides details on the state of the cycle in case of an error. + * + * Generated from protobuf field .google.rpc.Status error = 12; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle/State.php new file mode 100644 index 000000000000..b4eb3dbe09e8 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle/State.php @@ -0,0 +1,79 @@ +google.cloud.vmmigration.v1.ReplicationCycle.State + */ +class State +{ + /** + * The state is unknown. This is used for API compatibility only and is not + * used by the system. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The replication cycle is running. + * + * Generated from protobuf enum RUNNING = 1; + */ + const RUNNING = 1; + /** + * The replication cycle is paused. + * + * Generated from protobuf enum PAUSED = 2; + */ + const PAUSED = 2; + /** + * The replication cycle finished with errors. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + /** + * The replication cycle finished successfully. + * + * Generated from protobuf enum SUCCEEDED = 4; + */ + const SUCCEEDED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::RUNNING => 'RUNNING', + self::PAUSED => 'PAUSED', + self::FAILED => 'FAILED', + self::SUCCEEDED => 'SUCCEEDED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VMMigration\V1\ReplicationCycle_State::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationSync.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationSync.php new file mode 100644 index 000000000000..5723d6e67f45 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationSync.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.ReplicationSync + */ +class ReplicationSync extends \Google\Protobuf\Internal\Message +{ + /** + * The most updated snapshot created time in the source that finished + * replication. + * + * Generated from protobuf field .google.protobuf.Timestamp last_sync_time = 1; + */ + protected $last_sync_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $last_sync_time + * The most updated snapshot created time in the source that finished + * replication. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The most updated snapshot created time in the source that finished + * replication. + * + * Generated from protobuf field .google.protobuf.Timestamp last_sync_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastSyncTime() + { + return $this->last_sync_time; + } + + public function hasLastSyncTime() + { + return isset($this->last_sync_time); + } + + public function clearLastSyncTime() + { + unset($this->last_sync_time); + } + + /** + * The most updated snapshot created time in the source that finished + * replication. + * + * Generated from protobuf field .google.protobuf.Timestamp last_sync_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastSyncTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_sync_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationRequest.php new file mode 100644 index 000000000000..b907eb8348b4 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationRequest.php @@ -0,0 +1,67 @@ +google.cloud.vmmigration.v1.ResumeMigrationRequest + */ +class ResumeMigrationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $migrating_vm = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $migrating_vm + * Required. The name of the MigratingVm. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getMigratingVm() + { + return $this->migrating_vm; + } + + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMigratingVm($var) + { + GPBUtil::checkString($var, True); + $this->migrating_vm = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationResponse.php new file mode 100644 index 000000000000..7f8969564462 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationResponse.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.ResumeMigrationResponse + */ +class ResumeMigrationResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulePolicy.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulePolicy.php new file mode 100644 index 000000000000..0ef6fde8d9da --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulePolicy.php @@ -0,0 +1,119 @@ +google.cloud.vmmigration.v1.SchedulePolicy + */ +class SchedulePolicy extends \Google\Protobuf\Internal\Message +{ + /** + * The idle duration between replication stages. + * + * Generated from protobuf field .google.protobuf.Duration idle_duration = 1; + */ + protected $idle_duration = null; + /** + * A flag to indicate whether to skip OS adaptation during the replication + * sync. OS adaptation is a process where the VM's operating system undergoes + * changes and adaptations to fully function on Compute Engine. + * + * Generated from protobuf field bool skip_os_adaptation = 2; + */ + protected $skip_os_adaptation = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $idle_duration + * The idle duration between replication stages. + * @type bool $skip_os_adaptation + * A flag to indicate whether to skip OS adaptation during the replication + * sync. OS adaptation is a process where the VM's operating system undergoes + * changes and adaptations to fully function on Compute Engine. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The idle duration between replication stages. + * + * Generated from protobuf field .google.protobuf.Duration idle_duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getIdleDuration() + { + return $this->idle_duration; + } + + public function hasIdleDuration() + { + return isset($this->idle_duration); + } + + public function clearIdleDuration() + { + unset($this->idle_duration); + } + + /** + * The idle duration between replication stages. + * + * Generated from protobuf field .google.protobuf.Duration idle_duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setIdleDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->idle_duration = $var; + + return $this; + } + + /** + * A flag to indicate whether to skip OS adaptation during the replication + * sync. OS adaptation is a process where the VM's operating system undergoes + * changes and adaptations to fully function on Compute Engine. + * + * Generated from protobuf field bool skip_os_adaptation = 2; + * @return bool + */ + public function getSkipOsAdaptation() + { + return $this->skip_os_adaptation; + } + + /** + * A flag to indicate whether to skip OS adaptation during the replication + * sync. OS adaptation is a process where the VM's operating system undergoes + * changes and adaptations to fully function on Compute Engine. + * + * Generated from protobuf field bool skip_os_adaptation = 2; + * @param bool $var + * @return $this + */ + public function setSkipOsAdaptation($var) + { + GPBUtil::checkBool($var); + $this->skip_os_adaptation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity.php new file mode 100644 index 000000000000..d66ecb3f057e --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity.php @@ -0,0 +1,141 @@ +google.cloud.vmmigration.v1.SchedulingNodeAffinity + */ +class SchedulingNodeAffinity extends \Google\Protobuf\Internal\Message +{ + /** + * The label key of Node resource to reference. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * The operator to use for the node resources specified in the `values` + * parameter. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulingNodeAffinity.Operator operator = 2; + */ + protected $operator = 0; + /** + * Corresponds to the label values of Node resource. + * + * Generated from protobuf field repeated string values = 3; + */ + private $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * The label key of Node resource to reference. + * @type int $operator + * The operator to use for the node resources specified in the `values` + * parameter. + * @type array|\Google\Protobuf\Internal\RepeatedField $values + * Corresponds to the label values of Node resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The label key of Node resource to reference. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * The label key of Node resource to reference. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * The operator to use for the node resources specified in the `values` + * parameter. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulingNodeAffinity.Operator operator = 2; + * @return int + */ + public function getOperator() + { + return $this->operator; + } + + /** + * The operator to use for the node resources specified in the `values` + * parameter. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulingNodeAffinity.Operator operator = 2; + * @param int $var + * @return $this + */ + public function setOperator($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\SchedulingNodeAffinity\Operator::class); + $this->operator = $var; + + return $this; + } + + /** + * Corresponds to the label values of Node resource. + * + * Generated from protobuf field repeated string values = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * Corresponds to the label values of Node resource. + * + * Generated from protobuf field repeated string values = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->values = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity/Operator.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity/Operator.php new file mode 100644 index 000000000000..ac3acae966da --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity/Operator.php @@ -0,0 +1,65 @@ +google.cloud.vmmigration.v1.SchedulingNodeAffinity.Operator + */ +class Operator +{ + /** + * An unknown, unexpected behavior. + * + * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; + */ + const OPERATOR_UNSPECIFIED = 0; + /** + * The node resource group should be in these resources affinity. + * + * Generated from protobuf enum IN = 1; + */ + const IN = 1; + /** + * The node resource group should not be in these resources affinity. + * + * Generated from protobuf enum NOT_IN = 2; + */ + const NOT_IN = 2; + + private static $valueToName = [ + self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', + self::IN => 'IN', + self::NOT_IN => 'NOT_IN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Operator::class, \Google\Cloud\VMMigration\V1\SchedulingNodeAffinity_Operator::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShuttingDownSourceVMStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShuttingDownSourceVMStep.php new file mode 100644 index 000000000000..64c6ddafe8b3 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShuttingDownSourceVMStep.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.ShuttingDownSourceVMStep + */ +class ShuttingDownSourceVMStep extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Source.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Source.php new file mode 100644 index 000000000000..ae1ab78c28ca --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Source.php @@ -0,0 +1,299 @@ +google.cloud.vmmigration.v1.Source + */ +class Source extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The Source name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The create time timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update time timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * The labels of the source. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * User-provided description of the source. + * + * Generated from protobuf field string description = 6; + */ + protected $description = ''; + protected $source_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\VmwareSourceDetails $vmware + * Vmware type source details. + * @type \Google\Cloud\VMMigration\V1\AwsSourceDetails $aws + * AWS type source details. + * @type string $name + * Output only. The Source name. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The create time timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update time timestamp. + * @type array|\Google\Protobuf\Internal\MapField $labels + * The labels of the source. + * @type string $description + * User-provided description of the source. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Vmware type source details. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareSourceDetails vmware = 10; + * @return \Google\Cloud\VMMigration\V1\VmwareSourceDetails|null + */ + public function getVmware() + { + return $this->readOneof(10); + } + + public function hasVmware() + { + return $this->hasOneof(10); + } + + /** + * Vmware type source details. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareSourceDetails vmware = 10; + * @param \Google\Cloud\VMMigration\V1\VmwareSourceDetails $var + * @return $this + */ + public function setVmware($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmwareSourceDetails::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * AWS type source details. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails aws = 12; + * @return \Google\Cloud\VMMigration\V1\AwsSourceDetails|null + */ + public function getAws() + { + return $this->readOneof(12); + } + + public function hasAws() + { + return $this->hasOneof(12); + } + + /** + * AWS type source details. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails aws = 12; + * @param \Google\Cloud\VMMigration\V1\AwsSourceDetails $var + * @return $this + */ + public function setAws($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AwsSourceDetails::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Output only. The Source name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The Source name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The create time timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The create time timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The update time timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The update time timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * The labels of the source. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * The labels of the source. + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * User-provided description of the source. + * + * Generated from protobuf field string description = 6; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User-provided description of the source. + * + * Generated from protobuf field string description = 6; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * @return string + */ + public function getSourceDetails() + { + return $this->whichOneof("source_details"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationRequest.php new file mode 100644 index 000000000000..4e456d7c4f89 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.StartMigrationRequest + */ +class StartMigrationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $migrating_vm = ''; + + /** + * @param string $migratingVm Required. The name of the MigratingVm. Please see + * {@see VmMigrationClient::migratingVmName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\StartMigrationRequest + * + * @experimental + */ + public static function build(string $migratingVm): self + { + return (new self()) + ->setMigratingVm($migratingVm); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $migrating_vm + * Required. The name of the MigratingVm. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getMigratingVm() + { + return $this->migrating_vm; + } + + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMigratingVm($var) + { + GPBUtil::checkString($var, True); + $this->migrating_vm = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationResponse.php new file mode 100644 index 000000000000..80c1997ca0cd --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationResponse.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.StartMigrationResponse + */ +class StartMigrationResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/TargetProject.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/TargetProject.php new file mode 100644 index 000000000000..d19fb184997d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/TargetProject.php @@ -0,0 +1,228 @@ +google.cloud.vmmigration.v1.TargetProject + */ +class TargetProject extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the target project. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * The target project ID (number) or project name. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * The target project's description. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Output only. The time this target project resource was created (not related + * to when the Compute Engine project it points to was created). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last time the target project resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the target project. + * @type string $project + * The target project ID (number) or project name. + * @type string $description + * The target project's description. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time this target project resource was created (not related + * to when the Compute Engine project it points to was created). + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last time the target project resource was updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the target project. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the target project. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The target project ID (number) or project name. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * The target project ID (number) or project name. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * The target project's description. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The target project's description. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The time this target project resource was created (not related + * to when the Compute Engine project it points to was created). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time this target project resource was created (not related + * to when the Compute Engine project it points to was created). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The last time the target project resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last time the target project resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateGroupRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateGroupRequest.php new file mode 100644 index 000000000000..c3566d1bd515 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateGroupRequest.php @@ -0,0 +1,230 @@ +google.cloud.vmmigration.v1.UpdateGroupRequest + */ +class UpdateGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Field mask is used to specify the fields to be overwritten in the + * Group resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + */ + protected $update_mask = null; + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VMMigration\V1\Group $group Required. The update request body. + * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the + * Group resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\VMMigration\V1\UpdateGroupRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VMMigration\V1\Group $group, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setGroup($group) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Field mask is used to specify the fields to be overwritten in the + * Group resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\VMMigration\V1\Group $group + * Required. The update request body. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * Group resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * Group resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\Group|null + */ + public function getGroup() + { + return $this->group; + } + + public function hasGroup() + { + return isset($this->group); + } + + public function clearGroup() + { + unset($this->group); + } + + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\Group $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Group::class); + $this->group = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateMigratingVmRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateMigratingVmRequest.php new file mode 100644 index 000000000000..4dc83e8dfef2 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateMigratingVmRequest.php @@ -0,0 +1,230 @@ +google.cloud.vmmigration.v1.UpdateMigratingVmRequest + */ +class UpdateMigratingVmRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Field mask is used to specify the fields to be overwritten in the + * MigratingVm resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + */ + protected $update_mask = null; + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $migrating_vm = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VMMigration\V1\MigratingVm $migratingVm Required. The update request body. + * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the + * MigratingVm resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\VMMigration\V1\UpdateMigratingVmRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VMMigration\V1\MigratingVm $migratingVm, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setMigratingVm($migratingVm) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Field mask is used to specify the fields to be overwritten in the + * MigratingVm resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\VMMigration\V1\MigratingVm $migrating_vm + * Required. The update request body. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * MigratingVm resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * MigratingVm resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\MigratingVm|null + */ + public function getMigratingVm() + { + return $this->migrating_vm; + } + + public function hasMigratingVm() + { + return isset($this->migrating_vm); + } + + public function clearMigratingVm() + { + unset($this->migrating_vm); + } + + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\MigratingVm $var + * @return $this + */ + public function setMigratingVm($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\MigratingVm::class); + $this->migrating_vm = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateSourceRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateSourceRequest.php new file mode 100644 index 000000000000..6fedf6b84370 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateSourceRequest.php @@ -0,0 +1,230 @@ +google.cloud.vmmigration.v1.UpdateSourceRequest + */ +class UpdateSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Field mask is used to specify the fields to be overwritten in the + * Source resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + */ + protected $update_mask = null; + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VMMigration\V1\Source $source Required. The update request body. + * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the + * Source resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\VMMigration\V1\UpdateSourceRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VMMigration\V1\Source $source, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSource($source) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Field mask is used to specify the fields to be overwritten in the + * Source resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\VMMigration\V1\Source $source + * Required. The update request body. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * Source resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * Source resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\Source|null + */ + public function getSource() + { + return $this->source; + } + + public function hasSource() + { + return isset($this->source); + } + + public function clearSource() + { + unset($this->source); + } + + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\Source $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Source::class); + $this->source = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateTargetProjectRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateTargetProjectRequest.php new file mode 100644 index 000000000000..64f7eaec9709 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateTargetProjectRequest.php @@ -0,0 +1,230 @@ +google.cloud.vmmigration.v1.UpdateTargetProjectRequest + */ +class UpdateTargetProjectRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Field mask is used to specify the fields to be overwritten in the + * TargetProject resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + */ + protected $update_mask = null; + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $target_project = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VMMigration\V1\TargetProject $targetProject Required. The update request body. + * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the + * TargetProject resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\VMMigration\V1\UpdateTargetProjectRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VMMigration\V1\TargetProject $targetProject, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setTargetProject($targetProject) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Field mask is used to specify the fields to be overwritten in the + * TargetProject resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\VMMigration\V1\TargetProject $target_project + * Required. The update request body. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * TargetProject resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * TargetProject resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\TargetProject|null + */ + public function getTargetProject() + { + return $this->target_project; + } + + public function hasTargetProject() + { + return isset($this->target_project); + } + + public function clearTargetProject() + { + unset($this->target_project); + } + + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\TargetProject $var + * @return $this + */ + public function setTargetProject($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\TargetProject::class); + $this->target_project = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceRequest.php new file mode 100644 index 000000000000..ceb9df3af2cf --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceRequest.php @@ -0,0 +1,141 @@ +google.cloud.vmmigration.v1.UpgradeApplianceRequest + */ +class UpgradeApplianceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The DatacenterConnector name. + * + * Generated from protobuf field string datacenter_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $datacenter_connector = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2; + */ + protected $request_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $datacenter_connector + * Required. The DatacenterConnector name. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The DatacenterConnector name. + * + * Generated from protobuf field string datacenter_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getDatacenterConnector() + { + return $this->datacenter_connector; + } + + /** + * Required. The DatacenterConnector name. + * + * Generated from protobuf field string datacenter_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDatacenterConnector($var) + { + GPBUtil::checkString($var, True); + $this->datacenter_connector = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceResponse.php new file mode 100644 index 000000000000..caff9fe4988f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceResponse.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.UpgradeApplianceResponse + */ +class UpgradeApplianceResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus.php new file mode 100644 index 000000000000..ed6bf097167b --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus.php @@ -0,0 +1,223 @@ +google.cloud.vmmigration.v1.UpgradeStatus + */ +class UpgradeStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The version to upgrade to. + * + * Generated from protobuf field string version = 1; + */ + protected $version = ''; + /** + * The state of the upgradeAppliance operation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus.State state = 2; + */ + protected $state = 0; + /** + * Provides details on the state of the upgrade operation in case of an error. + * + * Generated from protobuf field .google.rpc.Status error = 3; + */ + protected $error = null; + /** + * The time the operation was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + */ + protected $start_time = null; + /** + * The version from which we upgraded. + * + * Generated from protobuf field string previous_version = 5; + */ + protected $previous_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $version + * The version to upgrade to. + * @type int $state + * The state of the upgradeAppliance operation. + * @type \Google\Rpc\Status $error + * Provides details on the state of the upgrade operation in case of an error. + * @type \Google\Protobuf\Timestamp $start_time + * The time the operation was started. + * @type string $previous_version + * The version from which we upgraded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The version to upgrade to. + * + * Generated from protobuf field string version = 1; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * The version to upgrade to. + * + * Generated from protobuf field string version = 1; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * The state of the upgradeAppliance operation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus.State state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the upgradeAppliance operation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus.State state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\UpgradeStatus\State::class); + $this->state = $var; + + return $this; + } + + /** + * Provides details on the state of the upgrade operation in case of an error. + * + * Generated from protobuf field .google.rpc.Status error = 3; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Provides details on the state of the upgrade operation in case of an error. + * + * Generated from protobuf field .google.rpc.Status error = 3; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * The time the operation was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The time the operation was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The version from which we upgraded. + * + * Generated from protobuf field string previous_version = 5; + * @return string + */ + public function getPreviousVersion() + { + return $this->previous_version; + } + + /** + * The version from which we upgraded. + * + * Generated from protobuf field string previous_version = 5; + * @param string $var + * @return $this + */ + public function setPreviousVersion($var) + { + GPBUtil::checkString($var, True); + $this->previous_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus/State.php new file mode 100644 index 000000000000..d35e49d9ae63 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus/State.php @@ -0,0 +1,71 @@ +google.cloud.vmmigration.v1.UpgradeStatus.State + */ +class State +{ + /** + * The state was not sampled by the health checks yet. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The upgrade has started. + * + * Generated from protobuf enum RUNNING = 1; + */ + const RUNNING = 1; + /** + * The upgrade failed. + * + * Generated from protobuf enum FAILED = 2; + */ + const FAILED = 2; + /** + * The upgrade finished successfully. + * + * Generated from protobuf enum SUCCEEDED = 3; + */ + const SUCCEEDED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::RUNNING => 'RUNNING', + self::FAILED => 'FAILED', + self::SUCCEEDED => 'SUCCEEDED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VMMigration\V1\UpgradeStatus_State::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport.php new file mode 100644 index 000000000000..322d7e9820a8 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport.php @@ -0,0 +1,446 @@ +google.cloud.vmmigration.v1.UtilizationReport + */ +class UtilizationReport extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The report unique name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * The report display name, as assigned by the user. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Output only. Current state of the report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The time the state was last set. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_time = null; + /** + * Output only. Provides details on the state of the report in case of an + * error. + * + * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * Output only. The time the report was created (this refers to the time of + * the request, not the time the report creation completed). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Time frame of the report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.TimeFrame time_frame = 7; + */ + protected $time_frame = 0; + /** + * Output only. The point in time when the time frame ends. Notice that the + * time frame is counted backwards. For instance if the "frame_end_time" value + * is 2021/01/20 and the time frame is WEEK then the report covers the week + * between 2021/01/20 and 2021/01/14. + * + * Generated from protobuf field .google.protobuf.Timestamp frame_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $frame_end_time = null; + /** + * Output only. Total number of VMs included in the report. + * + * Generated from protobuf field int32 vm_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $vm_count = 0; + /** + * List of utilization information per VM. + * When sent as part of the request, the "vm_id" field is used in order to + * specify which VMs to include in the report. In that case all other fields + * are ignored. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmUtilizationInfo vms = 10; + */ + private $vms; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The report unique name. + * @type string $display_name + * The report display name, as assigned by the user. + * @type int $state + * Output only. Current state of the report. + * @type \Google\Protobuf\Timestamp $state_time + * Output only. The time the state was last set. + * @type \Google\Rpc\Status $error + * Output only. Provides details on the state of the report in case of an + * error. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the report was created (this refers to the time of + * the request, not the time the report creation completed). + * @type int $time_frame + * Time frame of the report. + * @type \Google\Protobuf\Timestamp $frame_end_time + * Output only. The point in time when the time frame ends. Notice that the + * time frame is counted backwards. For instance if the "frame_end_time" value + * is 2021/01/20 and the time frame is WEEK then the report covers the week + * between 2021/01/20 and 2021/01/14. + * @type int $vm_count + * Output only. Total number of VMs included in the report. + * @type array<\Google\Cloud\VMMigration\V1\VmUtilizationInfo>|\Google\Protobuf\Internal\RepeatedField $vms + * List of utilization information per VM. + * When sent as part of the request, the "vm_id" field is used in order to + * specify which VMs to include in the report. In that case all other fields + * are ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The report unique name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The report unique name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The report display name, as assigned by the user. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The report display name, as assigned by the user. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. Current state of the report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\UtilizationReport\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time the state was last set. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStateTime() + { + return $this->state_time; + } + + public function hasStateTime() + { + return isset($this->state_time); + } + + public function clearStateTime() + { + unset($this->state_time); + } + + /** + * Output only. The time the state was last set. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->state_time = $var; + + return $this; + } + + /** + * Output only. Provides details on the state of the report in case of an + * error. + * + * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. Provides details on the state of the report in case of an + * error. + * + * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * Output only. The time the report was created (this refers to the time of + * the request, not the time the report creation completed). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the report was created (this refers to the time of + * the request, not the time the report creation completed). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Time frame of the report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.TimeFrame time_frame = 7; + * @return int + */ + public function getTimeFrame() + { + return $this->time_frame; + } + + /** + * Time frame of the report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.TimeFrame time_frame = 7; + * @param int $var + * @return $this + */ + public function setTimeFrame($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\UtilizationReport\TimeFrame::class); + $this->time_frame = $var; + + return $this; + } + + /** + * Output only. The point in time when the time frame ends. Notice that the + * time frame is counted backwards. For instance if the "frame_end_time" value + * is 2021/01/20 and the time frame is WEEK then the report covers the week + * between 2021/01/20 and 2021/01/14. + * + * Generated from protobuf field .google.protobuf.Timestamp frame_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getFrameEndTime() + { + return $this->frame_end_time; + } + + public function hasFrameEndTime() + { + return isset($this->frame_end_time); + } + + public function clearFrameEndTime() + { + unset($this->frame_end_time); + } + + /** + * Output only. The point in time when the time frame ends. Notice that the + * time frame is counted backwards. For instance if the "frame_end_time" value + * is 2021/01/20 and the time frame is WEEK then the report covers the week + * between 2021/01/20 and 2021/01/14. + * + * Generated from protobuf field .google.protobuf.Timestamp frame_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setFrameEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->frame_end_time = $var; + + return $this; + } + + /** + * Output only. Total number of VMs included in the report. + * + * Generated from protobuf field int32 vm_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getVmCount() + { + return $this->vm_count; + } + + /** + * Output only. Total number of VMs included in the report. + * + * Generated from protobuf field int32 vm_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setVmCount($var) + { + GPBUtil::checkInt32($var); + $this->vm_count = $var; + + return $this; + } + + /** + * List of utilization information per VM. + * When sent as part of the request, the "vm_id" field is used in order to + * specify which VMs to include in the report. In that case all other fields + * are ignored. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmUtilizationInfo vms = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVms() + { + return $this->vms; + } + + /** + * List of utilization information per VM. + * When sent as part of the request, the "vm_id" field is used in order to + * specify which VMs to include in the report. In that case all other fields + * are ignored. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmUtilizationInfo vms = 10; + * @param array<\Google\Cloud\VMMigration\V1\VmUtilizationInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\VmUtilizationInfo::class); + $this->vms = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/State.php new file mode 100644 index 000000000000..2e6f82fb524c --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/State.php @@ -0,0 +1,71 @@ +google.cloud.vmmigration.v1.UtilizationReport.State + */ +class State +{ + /** + * The state is unknown. This value is not in use. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The report is in the making. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Report creation completed successfully. + * + * Generated from protobuf enum SUCCEEDED = 2; + */ + const SUCCEEDED = 2; + /** + * Report creation failed. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VMMigration\V1\UtilizationReport_State::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/TimeFrame.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/TimeFrame.php new file mode 100644 index 000000000000..6f7489bf7c3c --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/TimeFrame.php @@ -0,0 +1,71 @@ +google.cloud.vmmigration.v1.UtilizationReport.TimeFrame + */ +class TimeFrame +{ + /** + * The time frame was not specified and will default to WEEK. + * + * Generated from protobuf enum TIME_FRAME_UNSPECIFIED = 0; + */ + const TIME_FRAME_UNSPECIFIED = 0; + /** + * One week. + * + * Generated from protobuf enum WEEK = 1; + */ + const WEEK = 1; + /** + * One month. + * + * Generated from protobuf enum MONTH = 2; + */ + const MONTH = 2; + /** + * One year. + * + * Generated from protobuf enum YEAR = 3; + */ + const YEAR = 3; + + private static $valueToName = [ + self::TIME_FRAME_UNSPECIFIED => 'TIME_FRAME_UNSPECIFIED', + self::WEEK => 'WEEK', + self::MONTH => 'MONTH', + self::YEAR => 'YEAR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TimeFrame::class, \Google\Cloud\VMMigration\V1\UtilizationReport_TimeFrame::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReportView.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReportView.php new file mode 100644 index 000000000000..bb5048154cd8 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReportView.php @@ -0,0 +1,64 @@ +google.cloud.vmmigration.v1.UtilizationReportView + */ +class UtilizationReportView +{ + /** + * The default / unset value. + * The API will default to FULL on single report request and BASIC for + * multiple reports request. + * + * Generated from protobuf enum UTILIZATION_REPORT_VIEW_UNSPECIFIED = 0; + */ + const UTILIZATION_REPORT_VIEW_UNSPECIFIED = 0; + /** + * Get the report metadata, without the list of VMs and their utilization + * info. + * + * Generated from protobuf enum BASIC = 1; + */ + const BASIC = 1; + /** + * Include everything. + * + * Generated from protobuf enum FULL = 2; + */ + const FULL = 2; + + private static $valueToName = [ + self::UTILIZATION_REPORT_VIEW_UNSPECIFIED => 'UTILIZATION_REPORT_VIEW_UNSPECIFIED', + self::BASIC => 'BASIC', + self::FULL => 'FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmMigrationGrpcClient.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmMigrationGrpcClient.php new file mode 100644 index 000000000000..31e838c4c938 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmMigrationGrpcClient.php @@ -0,0 +1,754 @@ +_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/ListSources', + $argument, + ['\Google\Cloud\VMMigration\V1\ListSourcesResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets details of a single Source. + * @param \Google\Cloud\VMMigration\V1\GetSourceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetSource(\Google\Cloud\VMMigration\V1\GetSourceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/GetSource', + $argument, + ['\Google\Cloud\VMMigration\V1\Source', 'decode'], + $metadata, $options); + } + + /** + * Creates a new Source in a given project and location. + * @param \Google\Cloud\VMMigration\V1\CreateSourceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateSource(\Google\Cloud\VMMigration\V1\CreateSourceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/CreateSource', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates the parameters of a single Source. + * @param \Google\Cloud\VMMigration\V1\UpdateSourceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateSource(\Google\Cloud\VMMigration\V1\UpdateSourceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/UpdateSource', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes a single Source. + * @param \Google\Cloud\VMMigration\V1\DeleteSourceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteSource(\Google\Cloud\VMMigration\V1\DeleteSourceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/DeleteSource', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * List remote source's inventory of VMs. + * The remote source is the onprem vCenter (remote in the sense it's not in + * Compute Engine). The inventory describes the list of existing VMs in that + * source. Note that this operation lists the VMs on the remote source, as + * opposed to listing the MigratingVms resources in the vmmigration service. + * @param \Google\Cloud\VMMigration\V1\FetchInventoryRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function FetchInventory(\Google\Cloud\VMMigration\V1\FetchInventoryRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/FetchInventory', + $argument, + ['\Google\Cloud\VMMigration\V1\FetchInventoryResponse', 'decode'], + $metadata, $options); + } + + /** + * Lists Utilization Reports of the given Source. + * @param \Google\Cloud\VMMigration\V1\ListUtilizationReportsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListUtilizationReports(\Google\Cloud\VMMigration\V1\ListUtilizationReportsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/ListUtilizationReports', + $argument, + ['\Google\Cloud\VMMigration\V1\ListUtilizationReportsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets a single Utilization Report. + * @param \Google\Cloud\VMMigration\V1\GetUtilizationReportRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetUtilizationReport(\Google\Cloud\VMMigration\V1\GetUtilizationReportRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/GetUtilizationReport', + $argument, + ['\Google\Cloud\VMMigration\V1\UtilizationReport', 'decode'], + $metadata, $options); + } + + /** + * Creates a new UtilizationReport. + * @param \Google\Cloud\VMMigration\V1\CreateUtilizationReportRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateUtilizationReport(\Google\Cloud\VMMigration\V1\CreateUtilizationReportRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/CreateUtilizationReport', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes a single Utilization Report. + * @param \Google\Cloud\VMMigration\V1\DeleteUtilizationReportRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteUtilizationReport(\Google\Cloud\VMMigration\V1\DeleteUtilizationReportRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/DeleteUtilizationReport', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists DatacenterConnectors in a given Source. + * @param \Google\Cloud\VMMigration\V1\ListDatacenterConnectorsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListDatacenterConnectors(\Google\Cloud\VMMigration\V1\ListDatacenterConnectorsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/ListDatacenterConnectors', + $argument, + ['\Google\Cloud\VMMigration\V1\ListDatacenterConnectorsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets details of a single DatacenterConnector. + * @param \Google\Cloud\VMMigration\V1\GetDatacenterConnectorRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetDatacenterConnector(\Google\Cloud\VMMigration\V1\GetDatacenterConnectorRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/GetDatacenterConnector', + $argument, + ['\Google\Cloud\VMMigration\V1\DatacenterConnector', 'decode'], + $metadata, $options); + } + + /** + * Creates a new DatacenterConnector in a given Source. + * @param \Google\Cloud\VMMigration\V1\CreateDatacenterConnectorRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateDatacenterConnector(\Google\Cloud\VMMigration\V1\CreateDatacenterConnectorRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/CreateDatacenterConnector', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes a single DatacenterConnector. + * @param \Google\Cloud\VMMigration\V1\DeleteDatacenterConnectorRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteDatacenterConnector(\Google\Cloud\VMMigration\V1\DeleteDatacenterConnectorRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/DeleteDatacenterConnector', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Upgrades the appliance relate to this DatacenterConnector to the in-place + * updateable version. + * @param \Google\Cloud\VMMigration\V1\UpgradeApplianceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpgradeAppliance(\Google\Cloud\VMMigration\V1\UpgradeApplianceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/UpgradeAppliance', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Creates a new MigratingVm in a given Source. + * @param \Google\Cloud\VMMigration\V1\CreateMigratingVmRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateMigratingVm(\Google\Cloud\VMMigration\V1\CreateMigratingVmRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/CreateMigratingVm', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists MigratingVms in a given Source. + * @param \Google\Cloud\VMMigration\V1\ListMigratingVmsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListMigratingVms(\Google\Cloud\VMMigration\V1\ListMigratingVmsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/ListMigratingVms', + $argument, + ['\Google\Cloud\VMMigration\V1\ListMigratingVmsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets details of a single MigratingVm. + * @param \Google\Cloud\VMMigration\V1\GetMigratingVmRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetMigratingVm(\Google\Cloud\VMMigration\V1\GetMigratingVmRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/GetMigratingVm', + $argument, + ['\Google\Cloud\VMMigration\V1\MigratingVm', 'decode'], + $metadata, $options); + } + + /** + * Updates the parameters of a single MigratingVm. + * @param \Google\Cloud\VMMigration\V1\UpdateMigratingVmRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateMigratingVm(\Google\Cloud\VMMigration\V1\UpdateMigratingVmRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/UpdateMigratingVm', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes a single MigratingVm. + * @param \Google\Cloud\VMMigration\V1\DeleteMigratingVmRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteMigratingVm(\Google\Cloud\VMMigration\V1\DeleteMigratingVmRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/DeleteMigratingVm', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Starts migration for a VM. Starts the process of uploading + * data and creating snapshots, in replication cycles scheduled by the policy. + * @param \Google\Cloud\VMMigration\V1\StartMigrationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function StartMigration(\Google\Cloud\VMMigration\V1\StartMigrationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/StartMigration', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Resumes a migration for a VM. When called on a paused migration, will start + * the process of uploading data and creating snapshots; when called on a + * completed cut-over migration, will update the migration to active state and + * start the process of uploading data and creating snapshots. + * @param \Google\Cloud\VMMigration\V1\ResumeMigrationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ResumeMigration(\Google\Cloud\VMMigration\V1\ResumeMigrationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/ResumeMigration', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Pauses a migration for a VM. If cycle tasks are running they will be + * cancelled, preserving source task data. Further replication cycles will not + * be triggered while the VM is paused. + * @param \Google\Cloud\VMMigration\V1\PauseMigrationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function PauseMigration(\Google\Cloud\VMMigration\V1\PauseMigrationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/PauseMigration', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Marks a migration as completed, deleting migration resources that are no + * longer being used. Only applicable after cutover is done. + * @param \Google\Cloud\VMMigration\V1\FinalizeMigrationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function FinalizeMigration(\Google\Cloud\VMMigration\V1\FinalizeMigrationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/FinalizeMigration', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Initiates a Clone of a specific migrating VM. + * @param \Google\Cloud\VMMigration\V1\CreateCloneJobRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateCloneJob(\Google\Cloud\VMMigration\V1\CreateCloneJobRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/CreateCloneJob', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Initiates the cancellation of a running clone job. + * @param \Google\Cloud\VMMigration\V1\CancelCloneJobRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CancelCloneJob(\Google\Cloud\VMMigration\V1\CancelCloneJobRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/CancelCloneJob', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists CloneJobs of a given migrating VM. + * @param \Google\Cloud\VMMigration\V1\ListCloneJobsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListCloneJobs(\Google\Cloud\VMMigration\V1\ListCloneJobsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/ListCloneJobs', + $argument, + ['\Google\Cloud\VMMigration\V1\ListCloneJobsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets details of a single CloneJob. + * @param \Google\Cloud\VMMigration\V1\GetCloneJobRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetCloneJob(\Google\Cloud\VMMigration\V1\GetCloneJobRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/GetCloneJob', + $argument, + ['\Google\Cloud\VMMigration\V1\CloneJob', 'decode'], + $metadata, $options); + } + + /** + * Initiates a Cutover of a specific migrating VM. + * The returned LRO is completed when the cutover job resource is created + * and the job is initiated. + * @param \Google\Cloud\VMMigration\V1\CreateCutoverJobRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateCutoverJob(\Google\Cloud\VMMigration\V1\CreateCutoverJobRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/CreateCutoverJob', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Initiates the cancellation of a running cutover job. + * @param \Google\Cloud\VMMigration\V1\CancelCutoverJobRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CancelCutoverJob(\Google\Cloud\VMMigration\V1\CancelCutoverJobRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/CancelCutoverJob', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists CutoverJobs of a given migrating VM. + * @param \Google\Cloud\VMMigration\V1\ListCutoverJobsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListCutoverJobs(\Google\Cloud\VMMigration\V1\ListCutoverJobsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/ListCutoverJobs', + $argument, + ['\Google\Cloud\VMMigration\V1\ListCutoverJobsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets details of a single CutoverJob. + * @param \Google\Cloud\VMMigration\V1\GetCutoverJobRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetCutoverJob(\Google\Cloud\VMMigration\V1\GetCutoverJobRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/GetCutoverJob', + $argument, + ['\Google\Cloud\VMMigration\V1\CutoverJob', 'decode'], + $metadata, $options); + } + + /** + * Lists Groups in a given project and location. + * @param \Google\Cloud\VMMigration\V1\ListGroupsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListGroups(\Google\Cloud\VMMigration\V1\ListGroupsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/ListGroups', + $argument, + ['\Google\Cloud\VMMigration\V1\ListGroupsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets details of a single Group. + * @param \Google\Cloud\VMMigration\V1\GetGroupRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetGroup(\Google\Cloud\VMMigration\V1\GetGroupRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/GetGroup', + $argument, + ['\Google\Cloud\VMMigration\V1\Group', 'decode'], + $metadata, $options); + } + + /** + * Creates a new Group in a given project and location. + * @param \Google\Cloud\VMMigration\V1\CreateGroupRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateGroup(\Google\Cloud\VMMigration\V1\CreateGroupRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/CreateGroup', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates the parameters of a single Group. + * @param \Google\Cloud\VMMigration\V1\UpdateGroupRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateGroup(\Google\Cloud\VMMigration\V1\UpdateGroupRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/UpdateGroup', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes a single Group. + * @param \Google\Cloud\VMMigration\V1\DeleteGroupRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteGroup(\Google\Cloud\VMMigration\V1\DeleteGroupRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/DeleteGroup', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Adds a MigratingVm to a Group. + * @param \Google\Cloud\VMMigration\V1\AddGroupMigrationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function AddGroupMigration(\Google\Cloud\VMMigration\V1\AddGroupMigrationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/AddGroupMigration', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Removes a MigratingVm from a Group. + * @param \Google\Cloud\VMMigration\V1\RemoveGroupMigrationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RemoveGroupMigration(\Google\Cloud\VMMigration\V1\RemoveGroupMigrationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/RemoveGroupMigration', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists TargetProjects in a given project. + * + * NOTE: TargetProject is a global resource; hence the only supported value + * for location is `global`. + * @param \Google\Cloud\VMMigration\V1\ListTargetProjectsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListTargetProjects(\Google\Cloud\VMMigration\V1\ListTargetProjectsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/ListTargetProjects', + $argument, + ['\Google\Cloud\VMMigration\V1\ListTargetProjectsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets details of a single TargetProject. + * + * NOTE: TargetProject is a global resource; hence the only supported value + * for location is `global`. + * @param \Google\Cloud\VMMigration\V1\GetTargetProjectRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetTargetProject(\Google\Cloud\VMMigration\V1\GetTargetProjectRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/GetTargetProject', + $argument, + ['\Google\Cloud\VMMigration\V1\TargetProject', 'decode'], + $metadata, $options); + } + + /** + * Creates a new TargetProject in a given project. + * + * NOTE: TargetProject is a global resource; hence the only supported value + * for location is `global`. + * @param \Google\Cloud\VMMigration\V1\CreateTargetProjectRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateTargetProject(\Google\Cloud\VMMigration\V1\CreateTargetProjectRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/CreateTargetProject', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates the parameters of a single TargetProject. + * + * NOTE: TargetProject is a global resource; hence the only supported value + * for location is `global`. + * @param \Google\Cloud\VMMigration\V1\UpdateTargetProjectRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateTargetProject(\Google\Cloud\VMMigration\V1\UpdateTargetProjectRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/UpdateTargetProject', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes a single TargetProject. + * + * NOTE: TargetProject is a global resource; hence the only supported value + * for location is `global`. + * @param \Google\Cloud\VMMigration\V1\DeleteTargetProjectRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteTargetProject(\Google\Cloud\VMMigration\V1\DeleteTargetProjectRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/DeleteTargetProject', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists ReplicationCycles in a given MigratingVM. + * @param \Google\Cloud\VMMigration\V1\ListReplicationCyclesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListReplicationCycles(\Google\Cloud\VMMigration\V1\ListReplicationCyclesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/ListReplicationCycles', + $argument, + ['\Google\Cloud\VMMigration\V1\ListReplicationCyclesResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets details of a single ReplicationCycle. + * @param \Google\Cloud\VMMigration\V1\GetReplicationCycleRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetReplicationCycle(\Google\Cloud\VMMigration\V1\GetReplicationCycleRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/GetReplicationCycle', + $argument, + ['\Google\Cloud\VMMigration\V1\ReplicationCycle', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationInfo.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationInfo.php new file mode 100644 index 000000000000..8ba1b02d4c1d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationInfo.php @@ -0,0 +1,153 @@ +google.cloud.vmmigration.v1.VmUtilizationInfo + */ +class VmUtilizationInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The VM's ID in the source. + * + * Generated from protobuf field string vm_id = 3; + */ + protected $vm_id = ''; + /** + * Utilization metrics for this VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmUtilizationMetrics utilization = 2; + */ + protected $utilization = null; + protected $VmDetails; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\VmwareVmDetails $vmware_vm_details + * The description of the VM in a Source of type Vmware. + * @type string $vm_id + * The VM's ID in the source. + * @type \Google\Cloud\VMMigration\V1\VmUtilizationMetrics $utilization + * Utilization metrics for this VM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The description of the VM in a Source of type Vmware. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails vmware_vm_details = 1; + * @return \Google\Cloud\VMMigration\V1\VmwareVmDetails|null + */ + public function getVmwareVmDetails() + { + return $this->readOneof(1); + } + + public function hasVmwareVmDetails() + { + return $this->hasOneof(1); + } + + /** + * The description of the VM in a Source of type Vmware. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails vmware_vm_details = 1; + * @param \Google\Cloud\VMMigration\V1\VmwareVmDetails $var + * @return $this + */ + public function setVmwareVmDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmwareVmDetails::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The VM's ID in the source. + * + * Generated from protobuf field string vm_id = 3; + * @return string + */ + public function getVmId() + { + return $this->vm_id; + } + + /** + * The VM's ID in the source. + * + * Generated from protobuf field string vm_id = 3; + * @param string $var + * @return $this + */ + public function setVmId($var) + { + GPBUtil::checkString($var, True); + $this->vm_id = $var; + + return $this; + } + + /** + * Utilization metrics for this VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmUtilizationMetrics utilization = 2; + * @return \Google\Cloud\VMMigration\V1\VmUtilizationMetrics|null + */ + public function getUtilization() + { + return $this->utilization; + } + + public function hasUtilization() + { + return isset($this->utilization); + } + + public function clearUtilization() + { + unset($this->utilization); + } + + /** + * Utilization metrics for this VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmUtilizationMetrics utilization = 2; + * @param \Google\Cloud\VMMigration\V1\VmUtilizationMetrics $var + * @return $this + */ + public function setUtilization($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmUtilizationMetrics::class); + $this->utilization = $var; + + return $this; + } + + /** + * @return string + */ + public function getVmDetails() + { + return $this->whichOneof("VmDetails"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationMetrics.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationMetrics.php new file mode 100644 index 000000000000..e81a156532d9 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationMetrics.php @@ -0,0 +1,313 @@ +google.cloud.vmmigration.v1.VmUtilizationMetrics + */ +class VmUtilizationMetrics extends \Google\Protobuf\Internal\Message +{ + /** + * Max CPU usage, percent. + * + * Generated from protobuf field int32 cpu_max_percent = 9; + */ + protected $cpu_max_percent = 0; + /** + * Average CPU usage, percent. + * + * Generated from protobuf field int32 cpu_average_percent = 10; + */ + protected $cpu_average_percent = 0; + /** + * Max memory usage, percent. + * + * Generated from protobuf field int32 memory_max_percent = 11; + */ + protected $memory_max_percent = 0; + /** + * Average memory usage, percent. + * + * Generated from protobuf field int32 memory_average_percent = 12; + */ + protected $memory_average_percent = 0; + /** + * Max disk IO rate, in kilobytes per second. + * + * Generated from protobuf field int64 disk_io_rate_max_kbps = 13; + */ + protected $disk_io_rate_max_kbps = 0; + /** + * Average disk IO rate, in kilobytes per second. + * + * Generated from protobuf field int64 disk_io_rate_average_kbps = 14; + */ + protected $disk_io_rate_average_kbps = 0; + /** + * Max network throughput (combined transmit-rates and receive-rates), in + * kilobytes per second. + * + * Generated from protobuf field int64 network_throughput_max_kbps = 15; + */ + protected $network_throughput_max_kbps = 0; + /** + * Average network throughput (combined transmit-rates and receive-rates), in + * kilobytes per second. + * + * Generated from protobuf field int64 network_throughput_average_kbps = 16; + */ + protected $network_throughput_average_kbps = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $cpu_max_percent + * Max CPU usage, percent. + * @type int $cpu_average_percent + * Average CPU usage, percent. + * @type int $memory_max_percent + * Max memory usage, percent. + * @type int $memory_average_percent + * Average memory usage, percent. + * @type int|string $disk_io_rate_max_kbps + * Max disk IO rate, in kilobytes per second. + * @type int|string $disk_io_rate_average_kbps + * Average disk IO rate, in kilobytes per second. + * @type int|string $network_throughput_max_kbps + * Max network throughput (combined transmit-rates and receive-rates), in + * kilobytes per second. + * @type int|string $network_throughput_average_kbps + * Average network throughput (combined transmit-rates and receive-rates), in + * kilobytes per second. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Max CPU usage, percent. + * + * Generated from protobuf field int32 cpu_max_percent = 9; + * @return int + */ + public function getCpuMaxPercent() + { + return $this->cpu_max_percent; + } + + /** + * Max CPU usage, percent. + * + * Generated from protobuf field int32 cpu_max_percent = 9; + * @param int $var + * @return $this + */ + public function setCpuMaxPercent($var) + { + GPBUtil::checkInt32($var); + $this->cpu_max_percent = $var; + + return $this; + } + + /** + * Average CPU usage, percent. + * + * Generated from protobuf field int32 cpu_average_percent = 10; + * @return int + */ + public function getCpuAveragePercent() + { + return $this->cpu_average_percent; + } + + /** + * Average CPU usage, percent. + * + * Generated from protobuf field int32 cpu_average_percent = 10; + * @param int $var + * @return $this + */ + public function setCpuAveragePercent($var) + { + GPBUtil::checkInt32($var); + $this->cpu_average_percent = $var; + + return $this; + } + + /** + * Max memory usage, percent. + * + * Generated from protobuf field int32 memory_max_percent = 11; + * @return int + */ + public function getMemoryMaxPercent() + { + return $this->memory_max_percent; + } + + /** + * Max memory usage, percent. + * + * Generated from protobuf field int32 memory_max_percent = 11; + * @param int $var + * @return $this + */ + public function setMemoryMaxPercent($var) + { + GPBUtil::checkInt32($var); + $this->memory_max_percent = $var; + + return $this; + } + + /** + * Average memory usage, percent. + * + * Generated from protobuf field int32 memory_average_percent = 12; + * @return int + */ + public function getMemoryAveragePercent() + { + return $this->memory_average_percent; + } + + /** + * Average memory usage, percent. + * + * Generated from protobuf field int32 memory_average_percent = 12; + * @param int $var + * @return $this + */ + public function setMemoryAveragePercent($var) + { + GPBUtil::checkInt32($var); + $this->memory_average_percent = $var; + + return $this; + } + + /** + * Max disk IO rate, in kilobytes per second. + * + * Generated from protobuf field int64 disk_io_rate_max_kbps = 13; + * @return int|string + */ + public function getDiskIoRateMaxKbps() + { + return $this->disk_io_rate_max_kbps; + } + + /** + * Max disk IO rate, in kilobytes per second. + * + * Generated from protobuf field int64 disk_io_rate_max_kbps = 13; + * @param int|string $var + * @return $this + */ + public function setDiskIoRateMaxKbps($var) + { + GPBUtil::checkInt64($var); + $this->disk_io_rate_max_kbps = $var; + + return $this; + } + + /** + * Average disk IO rate, in kilobytes per second. + * + * Generated from protobuf field int64 disk_io_rate_average_kbps = 14; + * @return int|string + */ + public function getDiskIoRateAverageKbps() + { + return $this->disk_io_rate_average_kbps; + } + + /** + * Average disk IO rate, in kilobytes per second. + * + * Generated from protobuf field int64 disk_io_rate_average_kbps = 14; + * @param int|string $var + * @return $this + */ + public function setDiskIoRateAverageKbps($var) + { + GPBUtil::checkInt64($var); + $this->disk_io_rate_average_kbps = $var; + + return $this; + } + + /** + * Max network throughput (combined transmit-rates and receive-rates), in + * kilobytes per second. + * + * Generated from protobuf field int64 network_throughput_max_kbps = 15; + * @return int|string + */ + public function getNetworkThroughputMaxKbps() + { + return $this->network_throughput_max_kbps; + } + + /** + * Max network throughput (combined transmit-rates and receive-rates), in + * kilobytes per second. + * + * Generated from protobuf field int64 network_throughput_max_kbps = 15; + * @param int|string $var + * @return $this + */ + public function setNetworkThroughputMaxKbps($var) + { + GPBUtil::checkInt64($var); + $this->network_throughput_max_kbps = $var; + + return $this; + } + + /** + * Average network throughput (combined transmit-rates and receive-rates), in + * kilobytes per second. + * + * Generated from protobuf field int64 network_throughput_average_kbps = 16; + * @return int|string + */ + public function getNetworkThroughputAverageKbps() + { + return $this->network_throughput_average_kbps; + } + + /** + * Average network throughput (combined transmit-rates and receive-rates), in + * kilobytes per second. + * + * Generated from protobuf field int64 network_throughput_average_kbps = 16; + * @param int|string $var + * @return $this + */ + public function setNetworkThroughputAverageKbps($var) + { + GPBUtil::checkInt64($var); + $this->network_throughput_average_kbps = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceDetails.php new file mode 100644 index 000000000000..751c4aebdc1a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceDetails.php @@ -0,0 +1,174 @@ +google.cloud.vmmigration.v1.VmwareSourceDetails + */ +class VmwareSourceDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The credentials username. + * + * Generated from protobuf field string username = 1; + */ + protected $username = ''; + /** + * Input only. The credentials password. This is write only and can not be + * read in a GET operation. + * + * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $password = ''; + /** + * The ip address of the vcenter this Source represents. + * + * Generated from protobuf field string vcenter_ip = 3; + */ + protected $vcenter_ip = ''; + /** + * The thumbprint representing the certificate for the vcenter. + * + * Generated from protobuf field string thumbprint = 4; + */ + protected $thumbprint = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $username + * The credentials username. + * @type string $password + * Input only. The credentials password. This is write only and can not be + * read in a GET operation. + * @type string $vcenter_ip + * The ip address of the vcenter this Source represents. + * @type string $thumbprint + * The thumbprint representing the certificate for the vcenter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The credentials username. + * + * Generated from protobuf field string username = 1; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * The credentials username. + * + * Generated from protobuf field string username = 1; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * Input only. The credentials password. This is write only and can not be + * read in a GET operation. + * + * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Input only. The credentials password. This is write only and can not be + * read in a GET operation. + * + * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * The ip address of the vcenter this Source represents. + * + * Generated from protobuf field string vcenter_ip = 3; + * @return string + */ + public function getVcenterIp() + { + return $this->vcenter_ip; + } + + /** + * The ip address of the vcenter this Source represents. + * + * Generated from protobuf field string vcenter_ip = 3; + * @param string $var + * @return $this + */ + public function setVcenterIp($var) + { + GPBUtil::checkString($var, True); + $this->vcenter_ip = $var; + + return $this; + } + + /** + * The thumbprint representing the certificate for the vcenter. + * + * Generated from protobuf field string thumbprint = 4; + * @return string + */ + public function getThumbprint() + { + return $this->thumbprint; + } + + /** + * The thumbprint representing the certificate for the vcenter. + * + * Generated from protobuf field string thumbprint = 4; + * @param string $var + * @return $this + */ + public function setThumbprint($var) + { + GPBUtil::checkString($var, True); + $this->thumbprint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails.php new file mode 100644 index 000000000000..d35cf1bfd3eb --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails.php @@ -0,0 +1,453 @@ +google.cloud.vmmigration.v1.VmwareVmDetails + */ +class VmwareVmDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The VM's id in the source (note that this is not the MigratingVm's id). + * This is the moref id of the VM. + * + * Generated from protobuf field string vm_id = 1; + */ + protected $vm_id = ''; + /** + * The id of the vCenter's datacenter this VM is contained in. + * + * Generated from protobuf field string datacenter_id = 2; + */ + protected $datacenter_id = ''; + /** + * The descriptive name of the vCenter's datacenter this VM is contained in. + * + * Generated from protobuf field string datacenter_description = 3; + */ + protected $datacenter_description = ''; + /** + * The unique identifier of the VM in vCenter. + * + * Generated from protobuf field string uuid = 4; + */ + protected $uuid = ''; + /** + * The display name of the VM. Note that this is not necessarily unique. + * + * Generated from protobuf field string display_name = 5; + */ + protected $display_name = ''; + /** + * The power state of the VM at the moment list was taken. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.PowerState power_state = 6; + */ + protected $power_state = 0; + /** + * The number of cpus in the VM. + * + * Generated from protobuf field int32 cpu_count = 7; + */ + protected $cpu_count = 0; + /** + * The size of the memory of the VM in MB. + * + * Generated from protobuf field int32 memory_mb = 8; + */ + protected $memory_mb = 0; + /** + * The number of disks the VM has. + * + * Generated from protobuf field int32 disk_count = 9; + */ + protected $disk_count = 0; + /** + * The total size of the storage allocated to the VM in MB. + * + * Generated from protobuf field int64 committed_storage_mb = 12; + */ + protected $committed_storage_mb = 0; + /** + * The VM's OS. See for example + * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html + * for types of strings this might hold. + * + * Generated from protobuf field string guest_description = 11; + */ + protected $guest_description = ''; + /** + * Output only. The VM Boot Option. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.BootOption boot_option = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $boot_option = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $vm_id + * The VM's id in the source (note that this is not the MigratingVm's id). + * This is the moref id of the VM. + * @type string $datacenter_id + * The id of the vCenter's datacenter this VM is contained in. + * @type string $datacenter_description + * The descriptive name of the vCenter's datacenter this VM is contained in. + * @type string $uuid + * The unique identifier of the VM in vCenter. + * @type string $display_name + * The display name of the VM. Note that this is not necessarily unique. + * @type int $power_state + * The power state of the VM at the moment list was taken. + * @type int $cpu_count + * The number of cpus in the VM. + * @type int $memory_mb + * The size of the memory of the VM in MB. + * @type int $disk_count + * The number of disks the VM has. + * @type int|string $committed_storage_mb + * The total size of the storage allocated to the VM in MB. + * @type string $guest_description + * The VM's OS. See for example + * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html + * for types of strings this might hold. + * @type int $boot_option + * Output only. The VM Boot Option. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The VM's id in the source (note that this is not the MigratingVm's id). + * This is the moref id of the VM. + * + * Generated from protobuf field string vm_id = 1; + * @return string + */ + public function getVmId() + { + return $this->vm_id; + } + + /** + * The VM's id in the source (note that this is not the MigratingVm's id). + * This is the moref id of the VM. + * + * Generated from protobuf field string vm_id = 1; + * @param string $var + * @return $this + */ + public function setVmId($var) + { + GPBUtil::checkString($var, True); + $this->vm_id = $var; + + return $this; + } + + /** + * The id of the vCenter's datacenter this VM is contained in. + * + * Generated from protobuf field string datacenter_id = 2; + * @return string + */ + public function getDatacenterId() + { + return $this->datacenter_id; + } + + /** + * The id of the vCenter's datacenter this VM is contained in. + * + * Generated from protobuf field string datacenter_id = 2; + * @param string $var + * @return $this + */ + public function setDatacenterId($var) + { + GPBUtil::checkString($var, True); + $this->datacenter_id = $var; + + return $this; + } + + /** + * The descriptive name of the vCenter's datacenter this VM is contained in. + * + * Generated from protobuf field string datacenter_description = 3; + * @return string + */ + public function getDatacenterDescription() + { + return $this->datacenter_description; + } + + /** + * The descriptive name of the vCenter's datacenter this VM is contained in. + * + * Generated from protobuf field string datacenter_description = 3; + * @param string $var + * @return $this + */ + public function setDatacenterDescription($var) + { + GPBUtil::checkString($var, True); + $this->datacenter_description = $var; + + return $this; + } + + /** + * The unique identifier of the VM in vCenter. + * + * Generated from protobuf field string uuid = 4; + * @return string + */ + public function getUuid() + { + return $this->uuid; + } + + /** + * The unique identifier of the VM in vCenter. + * + * Generated from protobuf field string uuid = 4; + * @param string $var + * @return $this + */ + public function setUuid($var) + { + GPBUtil::checkString($var, True); + $this->uuid = $var; + + return $this; + } + + /** + * The display name of the VM. Note that this is not necessarily unique. + * + * Generated from protobuf field string display_name = 5; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the VM. Note that this is not necessarily unique. + * + * Generated from protobuf field string display_name = 5; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The power state of the VM at the moment list was taken. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.PowerState power_state = 6; + * @return int + */ + public function getPowerState() + { + return $this->power_state; + } + + /** + * The power state of the VM at the moment list was taken. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.PowerState power_state = 6; + * @param int $var + * @return $this + */ + public function setPowerState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\VmwareVmDetails\PowerState::class); + $this->power_state = $var; + + return $this; + } + + /** + * The number of cpus in the VM. + * + * Generated from protobuf field int32 cpu_count = 7; + * @return int + */ + public function getCpuCount() + { + return $this->cpu_count; + } + + /** + * The number of cpus in the VM. + * + * Generated from protobuf field int32 cpu_count = 7; + * @param int $var + * @return $this + */ + public function setCpuCount($var) + { + GPBUtil::checkInt32($var); + $this->cpu_count = $var; + + return $this; + } + + /** + * The size of the memory of the VM in MB. + * + * Generated from protobuf field int32 memory_mb = 8; + * @return int + */ + public function getMemoryMb() + { + return $this->memory_mb; + } + + /** + * The size of the memory of the VM in MB. + * + * Generated from protobuf field int32 memory_mb = 8; + * @param int $var + * @return $this + */ + public function setMemoryMb($var) + { + GPBUtil::checkInt32($var); + $this->memory_mb = $var; + + return $this; + } + + /** + * The number of disks the VM has. + * + * Generated from protobuf field int32 disk_count = 9; + * @return int + */ + public function getDiskCount() + { + return $this->disk_count; + } + + /** + * The number of disks the VM has. + * + * Generated from protobuf field int32 disk_count = 9; + * @param int $var + * @return $this + */ + public function setDiskCount($var) + { + GPBUtil::checkInt32($var); + $this->disk_count = $var; + + return $this; + } + + /** + * The total size of the storage allocated to the VM in MB. + * + * Generated from protobuf field int64 committed_storage_mb = 12; + * @return int|string + */ + public function getCommittedStorageMb() + { + return $this->committed_storage_mb; + } + + /** + * The total size of the storage allocated to the VM in MB. + * + * Generated from protobuf field int64 committed_storage_mb = 12; + * @param int|string $var + * @return $this + */ + public function setCommittedStorageMb($var) + { + GPBUtil::checkInt64($var); + $this->committed_storage_mb = $var; + + return $this; + } + + /** + * The VM's OS. See for example + * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html + * for types of strings this might hold. + * + * Generated from protobuf field string guest_description = 11; + * @return string + */ + public function getGuestDescription() + { + return $this->guest_description; + } + + /** + * The VM's OS. See for example + * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html + * for types of strings this might hold. + * + * Generated from protobuf field string guest_description = 11; + * @param string $var + * @return $this + */ + public function setGuestDescription($var) + { + GPBUtil::checkString($var, True); + $this->guest_description = $var; + + return $this; + } + + /** + * Output only. The VM Boot Option. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.BootOption boot_option = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getBootOption() + { + return $this->boot_option; + } + + /** + * Output only. The VM Boot Option. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.BootOption boot_option = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setBootOption($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\VmwareVmDetails\BootOption::class); + $this->boot_option = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/BootOption.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/BootOption.php new file mode 100644 index 000000000000..a83392180524 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/BootOption.php @@ -0,0 +1,64 @@ +google.cloud.vmmigration.v1.VmwareVmDetails.BootOption + */ +class BootOption +{ + /** + * The boot option is unknown. + * + * Generated from protobuf enum BOOT_OPTION_UNSPECIFIED = 0; + */ + const BOOT_OPTION_UNSPECIFIED = 0; + /** + * The boot option is EFI. + * + * Generated from protobuf enum EFI = 1; + */ + const EFI = 1; + /** + * The boot option is BIOS. + * + * Generated from protobuf enum BIOS = 2; + */ + const BIOS = 2; + + private static $valueToName = [ + self::BOOT_OPTION_UNSPECIFIED => 'BOOT_OPTION_UNSPECIFIED', + self::EFI => 'EFI', + self::BIOS => 'BIOS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BootOption::class, \Google\Cloud\VMMigration\V1\VmwareVmDetails_BootOption::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/PowerState.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/PowerState.php new file mode 100644 index 000000000000..925c1f5a6f43 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/PowerState.php @@ -0,0 +1,71 @@ +google.cloud.vmmigration.v1.VmwareVmDetails.PowerState + */ +class PowerState +{ + /** + * Power state is not specified. + * + * Generated from protobuf enum POWER_STATE_UNSPECIFIED = 0; + */ + const POWER_STATE_UNSPECIFIED = 0; + /** + * The VM is turned ON. + * + * Generated from protobuf enum ON = 1; + */ + const ON = 1; + /** + * The VM is turned OFF. + * + * Generated from protobuf enum OFF = 2; + */ + const OFF = 2; + /** + * The VM is suspended. This is similar to hibernation or sleep mode. + * + * Generated from protobuf enum SUSPENDED = 3; + */ + const SUSPENDED = 3; + + private static $valueToName = [ + self::POWER_STATE_UNSPECIFIED => 'POWER_STATE_UNSPECIFIED', + self::ON => 'ON', + self::OFF => 'OFF', + self::SUSPENDED => 'SUSPENDED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PowerState::class, \Google\Cloud\VMMigration\V1\VmwareVmDetails_PowerState::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmsDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmsDetails.php new file mode 100644 index 000000000000..96796ec1c12c --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmsDetails.php @@ -0,0 +1,67 @@ +google.cloud.vmmigration.v1.VmwareVmsDetails + */ +class VmwareVmsDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The details of the vmware VMs. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmwareVmDetails details = 1; + */ + private $details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\VmwareVmDetails>|\Google\Protobuf\Internal\RepeatedField $details + * The details of the vmware VMs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The details of the vmware VMs. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmwareVmDetails details = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDetails() + { + return $this->details; + } + + /** + * The details of the vmware VMs. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmwareVmDetails details = 1; + * @param array<\Google\Cloud\VMMigration\V1\VmwareVmDetails>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\VmwareVmDetails::class); + $this->details = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/add_group_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/add_group_migration.php new file mode 100644 index 000000000000..a1a8741258c7 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/add_group_migration.php @@ -0,0 +1,83 @@ +setGroup($formattedGroup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->addGroupMigration($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AddGroupMigrationResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedGroup = VmMigrationClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + + add_group_migration_sample($formattedGroup); +} +// [END vmmigration_v1_generated_VmMigration_AddGroupMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_clone_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_clone_job.php new file mode 100644 index 000000000000..9e6643ad4b42 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_clone_job.php @@ -0,0 +1,89 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->cancelCloneJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CancelCloneJobResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmMigrationClient::cloneJobName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]', + '[CLONE_JOB]' + ); + + cancel_clone_job_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_CancelCloneJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_cutover_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_cutover_job.php new file mode 100644 index 000000000000..3ff9deaaece3 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_cutover_job.php @@ -0,0 +1,89 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->cancelCutoverJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CancelCutoverJobResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmMigrationClient::cutoverJobName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]', + '[CUTOVER_JOB]' + ); + + cancel_cutover_job_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_CancelCutoverJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_clone_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_clone_job.php new file mode 100644 index 000000000000..29d881791d3d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_clone_job.php @@ -0,0 +1,93 @@ +setParent($formattedParent) + ->setCloneJobId($cloneJobId) + ->setCloneJob($cloneJob); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->createCloneJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CloneJob $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmMigrationClient::migratingVmName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]' + ); + $cloneJobId = '[CLONE_JOB_ID]'; + + create_clone_job_sample($formattedParent, $cloneJobId); +} +// [END vmmigration_v1_generated_VmMigration_CreateCloneJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_cutover_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_cutover_job.php new file mode 100644 index 000000000000..cc008172cc72 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_cutover_job.php @@ -0,0 +1,95 @@ +setParent($formattedParent) + ->setCutoverJobId($cutoverJobId) + ->setCutoverJob($cutoverJob); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->createCutoverJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CutoverJob $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmMigrationClient::migratingVmName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]' + ); + $cutoverJobId = '[CUTOVER_JOB_ID]'; + + create_cutover_job_sample($formattedParent, $cutoverJobId); +} +// [END vmmigration_v1_generated_VmMigration_CreateCutoverJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_datacenter_connector.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_datacenter_connector.php new file mode 100644 index 000000000000..d444bfc0631d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_datacenter_connector.php @@ -0,0 +1,93 @@ +setParent($formattedParent) + ->setDatacenterConnectorId($datacenterConnectorId) + ->setDatacenterConnector($datacenterConnector); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->createDatacenterConnector($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DatacenterConnector $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $datacenterConnectorId = '[DATACENTER_CONNECTOR_ID]'; + + create_datacenter_connector_sample($formattedParent, $datacenterConnectorId); +} +// [END vmmigration_v1_generated_VmMigration_CreateDatacenterConnector_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_group.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_group.php new file mode 100644 index 000000000000..20d445748f18 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_group.php @@ -0,0 +1,88 @@ +setParent($formattedParent) + ->setGroupId($groupId) + ->setGroup($group); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->createGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Group $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); + $groupId = '[GROUP_ID]'; + + create_group_sample($formattedParent, $groupId); +} +// [END vmmigration_v1_generated_VmMigration_CreateGroup_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_migrating_vm.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_migrating_vm.php new file mode 100644 index 000000000000..2d2c27a95522 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_migrating_vm.php @@ -0,0 +1,88 @@ +setParent($formattedParent) + ->setMigratingVmId($migratingVmId) + ->setMigratingVm($migratingVm); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->createMigratingVm($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var MigratingVm $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $migratingVmId = '[MIGRATING_VM_ID]'; + + create_migrating_vm_sample($formattedParent, $migratingVmId); +} +// [END vmmigration_v1_generated_VmMigration_CreateMigratingVm_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_source.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_source.php new file mode 100644 index 000000000000..3c3d97485585 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_source.php @@ -0,0 +1,88 @@ +setParent($formattedParent) + ->setSourceId($sourceId) + ->setSource($source); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->createSource($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Source $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); + $sourceId = '[SOURCE_ID]'; + + create_source_sample($formattedParent, $sourceId); +} +// [END vmmigration_v1_generated_VmMigration_CreateSource_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_target_project.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_target_project.php new file mode 100644 index 000000000000..f6ad069ca106 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_target_project.php @@ -0,0 +1,91 @@ +setParent($formattedParent) + ->setTargetProjectId($targetProjectId) + ->setTargetProject($targetProject); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->createTargetProject($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var TargetProject $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); + $targetProjectId = '[TARGET_PROJECT_ID]'; + + create_target_project_sample($formattedParent, $targetProjectId); +} +// [END vmmigration_v1_generated_VmMigration_CreateTargetProject_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_utilization_report.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_utilization_report.php new file mode 100644 index 000000000000..af010a34c25a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_utilization_report.php @@ -0,0 +1,95 @@ +setParent($formattedParent) + ->setUtilizationReport($utilizationReport) + ->setUtilizationReportId($utilizationReportId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->createUtilizationReport($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var UtilizationReport $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $utilizationReportId = '[UTILIZATION_REPORT_ID]'; + + create_utilization_report_sample($formattedParent, $utilizationReportId); +} +// [END vmmigration_v1_generated_VmMigration_CreateUtilizationReport_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_datacenter_connector.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_datacenter_connector.php new file mode 100644 index 000000000000..f3dd02835d3f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_datacenter_connector.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->deleteDatacenterConnector($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmMigrationClient::datacenterConnectorName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[DATACENTER_CONNECTOR]' + ); + + delete_datacenter_connector_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_DeleteDatacenterConnector_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_group.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_group.php new file mode 100644 index 000000000000..d5fb9f1d6afe --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_group.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->deleteGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmMigrationClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + + delete_group_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_DeleteGroup_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_migrating_vm.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_migrating_vm.php new file mode 100644 index 000000000000..031232f1c65b --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_migrating_vm.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->deleteMigratingVm($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmMigrationClient::migratingVmName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]' + ); + + delete_migrating_vm_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_DeleteMigratingVm_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_source.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_source.php new file mode 100644 index 000000000000..8247e923197b --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_source.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->deleteSource($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + + delete_source_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_DeleteSource_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_target_project.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_target_project.php new file mode 100644 index 000000000000..884ad6b93dd1 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_target_project.php @@ -0,0 +1,87 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->deleteTargetProject($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmMigrationClient::targetProjectName( + '[PROJECT]', + '[LOCATION]', + '[TARGET_PROJECT]' + ); + + delete_target_project_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_DeleteTargetProject_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_utilization_report.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_utilization_report.php new file mode 100644 index 000000000000..dccbcdb27538 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_utilization_report.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->deleteUtilizationReport($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmMigrationClient::utilizationReportName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[UTILIZATION_REPORT]' + ); + + delete_utilization_report_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_DeleteUtilizationReport_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/fetch_inventory.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/fetch_inventory.php new file mode 100644 index 000000000000..4fff8f8c4a7f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/fetch_inventory.php @@ -0,0 +1,75 @@ +setSource($formattedSource); + + // Call the API and handle any network failures. + try { + /** @var FetchInventoryResponse $response */ + $response = $vmMigrationClient->fetchInventory($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedSource = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + + fetch_inventory_sample($formattedSource); +} +// [END vmmigration_v1_generated_VmMigration_FetchInventory_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/finalize_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/finalize_migration.php new file mode 100644 index 000000000000..a732c41f7895 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/finalize_migration.php @@ -0,0 +1,89 @@ +setMigratingVm($formattedMigratingVm); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->finalizeMigration($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var FinalizeMigrationResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedMigratingVm = VmMigrationClient::migratingVmName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]' + ); + + finalize_migration_sample($formattedMigratingVm); +} +// [END vmmigration_v1_generated_VmMigration_FinalizeMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_clone_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_clone_job.php new file mode 100644 index 000000000000..bc0cb0cbf3bd --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_clone_job.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CloneJob $response */ + $response = $vmMigrationClient->getCloneJob($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmMigrationClient::cloneJobName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]', + '[CLONE_JOB]' + ); + + get_clone_job_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_GetCloneJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_cutover_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_cutover_job.php new file mode 100644 index 000000000000..a39488ab204a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_cutover_job.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CutoverJob $response */ + $response = $vmMigrationClient->getCutoverJob($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmMigrationClient::cutoverJobName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]', + '[CUTOVER_JOB]' + ); + + get_cutover_job_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_GetCutoverJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_datacenter_connector.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_datacenter_connector.php new file mode 100644 index 000000000000..172a781030a3 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_datacenter_connector.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DatacenterConnector $response */ + $response = $vmMigrationClient->getDatacenterConnector($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmMigrationClient::datacenterConnectorName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[DATACENTER_CONNECTOR]' + ); + + get_datacenter_connector_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_GetDatacenterConnector_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_group.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_group.php new file mode 100644 index 000000000000..db065ea1d051 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_group.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Group $response */ + $response = $vmMigrationClient->getGroup($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmMigrationClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + + get_group_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_GetGroup_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_location.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_location.php new file mode 100644 index 000000000000..95a44e7266d7 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END vmmigration_v1_generated_VmMigration_GetLocation_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_migrating_vm.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_migrating_vm.php new file mode 100644 index 000000000000..068dc323f120 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_migrating_vm.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var MigratingVm $response */ + $response = $vmMigrationClient->getMigratingVm($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmMigrationClient::migratingVmName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]' + ); + + get_migrating_vm_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_GetMigratingVm_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_replication_cycle.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_replication_cycle.php new file mode 100644 index 000000000000..819a1a61da08 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_replication_cycle.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ReplicationCycle $response */ + $response = $vmMigrationClient->getReplicationCycle($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmMigrationClient::replicationCycleName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]', + '[REPLICATION_CYCLE]' + ); + + get_replication_cycle_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_GetReplicationCycle_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_source.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_source.php new file mode 100644 index 000000000000..53b51dee1834 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_source.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Source $response */ + $response = $vmMigrationClient->getSource($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + + get_source_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_GetSource_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_target_project.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_target_project.php new file mode 100644 index 000000000000..8cd6ce806eac --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_target_project.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var TargetProject $response */ + $response = $vmMigrationClient->getTargetProject($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmMigrationClient::targetProjectName( + '[PROJECT]', + '[LOCATION]', + '[TARGET_PROJECT]' + ); + + get_target_project_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_GetTargetProject_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_utilization_report.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_utilization_report.php new file mode 100644 index 000000000000..d7c9f5061301 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_utilization_report.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var UtilizationReport $response */ + $response = $vmMigrationClient->getUtilizationReport($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmMigrationClient::utilizationReportName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[UTILIZATION_REPORT]' + ); + + get_utilization_report_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_GetUtilizationReport_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_clone_jobs.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_clone_jobs.php new file mode 100644 index 000000000000..151bee5ea743 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_clone_jobs.php @@ -0,0 +1,87 @@ +setParent($formattedParent) + ->setPageToken($pageToken); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmMigrationClient->listCloneJobs($request); + + /** @var CloneJob $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmMigrationClient::migratingVmName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]' + ); + $pageToken = '[PAGE_TOKEN]'; + + list_clone_jobs_sample($formattedParent, $pageToken); +} +// [END vmmigration_v1_generated_VmMigration_ListCloneJobs_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_cutover_jobs.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_cutover_jobs.php new file mode 100644 index 000000000000..26d656154916 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_cutover_jobs.php @@ -0,0 +1,87 @@ +setParent($formattedParent) + ->setPageToken($pageToken); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmMigrationClient->listCutoverJobs($request); + + /** @var CutoverJob $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmMigrationClient::migratingVmName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]' + ); + $pageToken = '[PAGE_TOKEN]'; + + list_cutover_jobs_sample($formattedParent, $pageToken); +} +// [END vmmigration_v1_generated_VmMigration_ListCutoverJobs_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_datacenter_connectors.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_datacenter_connectors.php new file mode 100644 index 000000000000..f235ae694aff --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_datacenter_connectors.php @@ -0,0 +1,82 @@ +setParent($formattedParent) + ->setPageToken($pageToken); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmMigrationClient->listDatacenterConnectors($request); + + /** @var DatacenterConnector $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = '[PAGE_TOKEN]'; + + list_datacenter_connectors_sample($formattedParent, $pageToken); +} +// [END vmmigration_v1_generated_VmMigration_ListDatacenterConnectors_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_groups.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_groups.php new file mode 100644 index 000000000000..1a7f38ac641e --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_groups.php @@ -0,0 +1,82 @@ +setParent($formattedParent) + ->setPageToken($pageToken); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmMigrationClient->listGroups($request); + + /** @var Group $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); + $pageToken = '[PAGE_TOKEN]'; + + list_groups_sample($formattedParent, $pageToken); +} +// [END vmmigration_v1_generated_VmMigration_ListGroups_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_locations.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_locations.php new file mode 100644 index 000000000000..5c4c202109a8 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END vmmigration_v1_generated_VmMigration_ListLocations_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_migrating_vms.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_migrating_vms.php new file mode 100644 index 000000000000..d7af7c5e3bd9 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_migrating_vms.php @@ -0,0 +1,82 @@ +setParent($formattedParent) + ->setPageToken($pageToken); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmMigrationClient->listMigratingVms($request); + + /** @var MigratingVm $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = '[PAGE_TOKEN]'; + + list_migrating_vms_sample($formattedParent, $pageToken); +} +// [END vmmigration_v1_generated_VmMigration_ListMigratingVms_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_replication_cycles.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_replication_cycles.php new file mode 100644 index 000000000000..19f44cce5f68 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_replication_cycles.php @@ -0,0 +1,87 @@ +setParent($formattedParent) + ->setPageToken($pageToken); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmMigrationClient->listReplicationCycles($request); + + /** @var ReplicationCycle $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmMigrationClient::migratingVmName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]' + ); + $pageToken = '[PAGE_TOKEN]'; + + list_replication_cycles_sample($formattedParent, $pageToken); +} +// [END vmmigration_v1_generated_VmMigration_ListReplicationCycles_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_sources.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_sources.php new file mode 100644 index 000000000000..50a8ab3d957f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_sources.php @@ -0,0 +1,82 @@ +setParent($formattedParent) + ->setPageToken($pageToken); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmMigrationClient->listSources($request); + + /** @var Source $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); + $pageToken = '[PAGE_TOKEN]'; + + list_sources_sample($formattedParent, $pageToken); +} +// [END vmmigration_v1_generated_VmMigration_ListSources_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_target_projects.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_target_projects.php new file mode 100644 index 000000000000..84bdd61b878a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_target_projects.php @@ -0,0 +1,85 @@ +setParent($formattedParent) + ->setPageToken($pageToken); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmMigrationClient->listTargetProjects($request); + + /** @var TargetProject $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); + $pageToken = '[PAGE_TOKEN]'; + + list_target_projects_sample($formattedParent, $pageToken); +} +// [END vmmigration_v1_generated_VmMigration_ListTargetProjects_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_utilization_reports.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_utilization_reports.php new file mode 100644 index 000000000000..a720652d7591 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_utilization_reports.php @@ -0,0 +1,82 @@ +setParent($formattedParent) + ->setPageToken($pageToken); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmMigrationClient->listUtilizationReports($request); + + /** @var UtilizationReport $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = '[PAGE_TOKEN]'; + + list_utilization_reports_sample($formattedParent, $pageToken); +} +// [END vmmigration_v1_generated_VmMigration_ListUtilizationReports_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/pause_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/pause_migration.php new file mode 100644 index 000000000000..fe967d8da6cf --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/pause_migration.php @@ -0,0 +1,90 @@ +setMigratingVm($formattedMigratingVm); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->pauseMigration($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PauseMigrationResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedMigratingVm = VmMigrationClient::migratingVmName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]' + ); + + pause_migration_sample($formattedMigratingVm); +} +// [END vmmigration_v1_generated_VmMigration_PauseMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/remove_group_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/remove_group_migration.php new file mode 100644 index 000000000000..9ca4cdc0e7a9 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/remove_group_migration.php @@ -0,0 +1,83 @@ +setGroup($formattedGroup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->removeGroupMigration($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var RemoveGroupMigrationResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedGroup = VmMigrationClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + + remove_group_migration_sample($formattedGroup); +} +// [END vmmigration_v1_generated_VmMigration_RemoveGroupMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/resume_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/resume_migration.php new file mode 100644 index 000000000000..7c034d25b26e --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/resume_migration.php @@ -0,0 +1,91 @@ +setMigratingVm($formattedMigratingVm); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->resumeMigration($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ResumeMigrationResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedMigratingVm = VmMigrationClient::migratingVmName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]' + ); + + resume_migration_sample($formattedMigratingVm); +} +// [END vmmigration_v1_generated_VmMigration_ResumeMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/start_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/start_migration.php new file mode 100644 index 000000000000..5eb05242666e --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/start_migration.php @@ -0,0 +1,89 @@ +setMigratingVm($formattedMigratingVm); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->startMigration($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var StartMigrationResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedMigratingVm = VmMigrationClient::migratingVmName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]' + ); + + start_migration_sample($formattedMigratingVm); +} +// [END vmmigration_v1_generated_VmMigration_StartMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_group.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_group.php new file mode 100644 index 000000000000..057c33af15de --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_group.php @@ -0,0 +1,71 @@ +setGroup($group); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->updateGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Group $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END vmmigration_v1_generated_VmMigration_UpdateGroup_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_migrating_vm.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_migrating_vm.php new file mode 100644 index 000000000000..47358140d96a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_migrating_vm.php @@ -0,0 +1,71 @@ +setMigratingVm($migratingVm); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->updateMigratingVm($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var MigratingVm $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END vmmigration_v1_generated_VmMigration_UpdateMigratingVm_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_source.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_source.php new file mode 100644 index 000000000000..15f2cd1a6447 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_source.php @@ -0,0 +1,71 @@ +setSource($source); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->updateSource($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Source $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END vmmigration_v1_generated_VmMigration_UpdateSource_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_target_project.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_target_project.php new file mode 100644 index 000000000000..860d5327351f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_target_project.php @@ -0,0 +1,74 @@ +setTargetProject($targetProject); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->updateTargetProject($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var TargetProject $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END vmmigration_v1_generated_VmMigration_UpdateTargetProject_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/upgrade_appliance.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/upgrade_appliance.php new file mode 100644 index 000000000000..29ad7a881e0a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/upgrade_appliance.php @@ -0,0 +1,89 @@ +setDatacenterConnector($formattedDatacenterConnector); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->upgradeAppliance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var UpgradeApplianceResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedDatacenterConnector = VmMigrationClient::datacenterConnectorName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[DATACENTER_CONNECTOR]' + ); + + upgrade_appliance_sample($formattedDatacenterConnector); +} +// [END vmmigration_v1_generated_VmMigration_UpgradeAppliance_sync] diff --git a/owl-bot-staging/VmMigration/v1/src/V1/Client/BaseClient/VmMigrationBaseClient.php b/owl-bot-staging/VmMigration/v1/src/V1/Client/BaseClient/VmMigrationBaseClient.php new file mode 100644 index 000000000000..a9d8ce66cc8c --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/src/V1/Client/BaseClient/VmMigrationBaseClient.php @@ -0,0 +1,1729 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/vm_migration_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/vm_migration_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/vm_migration_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/vm_migration_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a clone_job + * resource. + * + * @param string $project + * @param string $location + * @param string $source + * @param string $migratingVm + * @param string $cloneJob + * + * @return string The formatted clone_job resource. + */ + public static function cloneJobName(string $project, string $location, string $source, string $migratingVm, string $cloneJob): string + { + return self::getPathTemplate('cloneJob')->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + 'migrating_vm' => $migratingVm, + 'clone_job' => $cloneJob, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a cutover_job + * resource. + * + * @param string $project + * @param string $location + * @param string $source + * @param string $migratingVm + * @param string $cutoverJob + * + * @return string The formatted cutover_job resource. + */ + public static function cutoverJobName(string $project, string $location, string $source, string $migratingVm, string $cutoverJob): string + { + return self::getPathTemplate('cutoverJob')->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + 'migrating_vm' => $migratingVm, + 'cutover_job' => $cutoverJob, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * datacenter_connector resource. + * + * @param string $project + * @param string $location + * @param string $source + * @param string $datacenterConnector + * + * @return string The formatted datacenter_connector resource. + */ + public static function datacenterConnectorName(string $project, string $location, string $source, string $datacenterConnector): string + { + return self::getPathTemplate('datacenterConnector')->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + 'datacenter_connector' => $datacenterConnector, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a group + * resource. + * + * @param string $project + * @param string $location + * @param string $group + * + * @return string The formatted group resource. + */ + public static function groupName(string $project, string $location, string $group): string + { + return self::getPathTemplate('group')->render([ + 'project' => $project, + 'location' => $location, + 'group' => $group, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a migrating_vm + * resource. + * + * @param string $project + * @param string $location + * @param string $source + * @param string $migratingVm + * + * @return string The formatted migrating_vm resource. + */ + public static function migratingVmName(string $project, string $location, string $source, string $migratingVm): string + { + return self::getPathTemplate('migratingVm')->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + 'migrating_vm' => $migratingVm, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * replication_cycle resource. + * + * @param string $project + * @param string $location + * @param string $source + * @param string $migratingVm + * @param string $replicationCycle + * + * @return string The formatted replication_cycle resource. + */ + public static function replicationCycleName(string $project, string $location, string $source, string $migratingVm, string $replicationCycle): string + { + return self::getPathTemplate('replicationCycle')->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + 'migrating_vm' => $migratingVm, + 'replication_cycle' => $replicationCycle, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a source + * resource. + * + * @param string $project + * @param string $location + * @param string $source + * + * @return string The formatted source resource. + */ + public static function sourceName(string $project, string $location, string $source): string + { + return self::getPathTemplate('source')->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * target_project resource. + * + * @param string $project + * @param string $location + * @param string $targetProject + * + * @return string The formatted target_project resource. + */ + public static function targetProjectName(string $project, string $location, string $targetProject): string + { + return self::getPathTemplate('targetProject')->render([ + 'project' => $project, + 'location' => $location, + 'target_project' => $targetProject, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * utilization_report resource. + * + * @param string $project + * @param string $location + * @param string $source + * @param string $utilizationReport + * + * @return string The formatted utilization_report resource. + */ + public static function utilizationReportName(string $project, string $location, string $source, string $utilizationReport): string + { + return self::getPathTemplate('utilizationReport')->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + 'utilization_report' => $utilizationReport, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - cloneJob: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cloneJobs/{clone_job} + * - cutoverJob: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cutoverJobs/{cutover_job} + * - datacenterConnector: projects/{project}/locations/{location}/sources/{source}/datacenterConnectors/{datacenter_connector} + * - group: projects/{project}/locations/{location}/groups/{group} + * - location: projects/{project}/locations/{location} + * - migratingVm: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm} + * - replicationCycle: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/replicationCycles/{replication_cycle} + * - source: projects/{project}/locations/{location}/sources/{source} + * - targetProject: projects/{project}/locations/{location}/targetProjects/{target_project} + * - utilizationReport: projects/{project}/locations/{location}/sources/{source}/utilizationReports/{utilization_report} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'vmmigration.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Adds a MigratingVm to a Group. + * + * The async variant is {@see self::addGroupMigrationAsync()} . + * + * @param AddGroupMigrationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function addGroupMigration(AddGroupMigrationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('AddGroupMigration', $request, $callOptions)->wait(); + } + + /** + * Initiates the cancellation of a running clone job. + * + * The async variant is {@see self::cancelCloneJobAsync()} . + * + * @param CancelCloneJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function cancelCloneJob(CancelCloneJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CancelCloneJob', $request, $callOptions)->wait(); + } + + /** + * Initiates the cancellation of a running cutover job. + * + * The async variant is {@see self::cancelCutoverJobAsync()} . + * + * @param CancelCutoverJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function cancelCutoverJob(CancelCutoverJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CancelCutoverJob', $request, $callOptions)->wait(); + } + + /** + * Initiates a Clone of a specific migrating VM. + * + * The async variant is {@see self::createCloneJobAsync()} . + * + * @param CreateCloneJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createCloneJob(CreateCloneJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateCloneJob', $request, $callOptions)->wait(); + } + + /** + * Initiates a Cutover of a specific migrating VM. + * The returned LRO is completed when the cutover job resource is created + * and the job is initiated. + * + * The async variant is {@see self::createCutoverJobAsync()} . + * + * @param CreateCutoverJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createCutoverJob(CreateCutoverJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateCutoverJob', $request, $callOptions)->wait(); + } + + /** + * Creates a new DatacenterConnector in a given Source. + * + * The async variant is {@see self::createDatacenterConnectorAsync()} . + * + * @param CreateDatacenterConnectorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createDatacenterConnector(CreateDatacenterConnectorRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateDatacenterConnector', $request, $callOptions)->wait(); + } + + /** + * Creates a new Group in a given project and location. + * + * The async variant is {@see self::createGroupAsync()} . + * + * @param CreateGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createGroup(CreateGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateGroup', $request, $callOptions)->wait(); + } + + /** + * Creates a new MigratingVm in a given Source. + * + * The async variant is {@see self::createMigratingVmAsync()} . + * + * @param CreateMigratingVmRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createMigratingVm(CreateMigratingVmRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateMigratingVm', $request, $callOptions)->wait(); + } + + /** + * Creates a new Source in a given project and location. + * + * The async variant is {@see self::createSourceAsync()} . + * + * @param CreateSourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSource(CreateSourceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateSource', $request, $callOptions)->wait(); + } + + /** + * Creates a new TargetProject in a given project. + * + * NOTE: TargetProject is a global resource; hence the only supported value + * for location is `global`. + * + * The async variant is {@see self::createTargetProjectAsync()} . + * + * @param CreateTargetProjectRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createTargetProject(CreateTargetProjectRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateTargetProject', $request, $callOptions)->wait(); + } + + /** + * Creates a new UtilizationReport. + * + * The async variant is {@see self::createUtilizationReportAsync()} . + * + * @param CreateUtilizationReportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createUtilizationReport(CreateUtilizationReportRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateUtilizationReport', $request, $callOptions)->wait(); + } + + /** + * Deletes a single DatacenterConnector. + * + * The async variant is {@see self::deleteDatacenterConnectorAsync()} . + * + * @param DeleteDatacenterConnectorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteDatacenterConnector(DeleteDatacenterConnectorRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteDatacenterConnector', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Group. + * + * The async variant is {@see self::deleteGroupAsync()} . + * + * @param DeleteGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteGroup(DeleteGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteGroup', $request, $callOptions)->wait(); + } + + /** + * Deletes a single MigratingVm. + * + * The async variant is {@see self::deleteMigratingVmAsync()} . + * + * @param DeleteMigratingVmRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteMigratingVm(DeleteMigratingVmRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteMigratingVm', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Source. + * + * The async variant is {@see self::deleteSourceAsync()} . + * + * @param DeleteSourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteSource(DeleteSourceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteSource', $request, $callOptions)->wait(); + } + + /** + * Deletes a single TargetProject. + * + * NOTE: TargetProject is a global resource; hence the only supported value + * for location is `global`. + * + * The async variant is {@see self::deleteTargetProjectAsync()} . + * + * @param DeleteTargetProjectRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteTargetProject(DeleteTargetProjectRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteTargetProject', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Utilization Report. + * + * The async variant is {@see self::deleteUtilizationReportAsync()} . + * + * @param DeleteUtilizationReportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteUtilizationReport(DeleteUtilizationReportRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteUtilizationReport', $request, $callOptions)->wait(); + } + + /** + * List remote source's inventory of VMs. + * The remote source is the onprem vCenter (remote in the sense it's not in + * Compute Engine). The inventory describes the list of existing VMs in that + * source. Note that this operation lists the VMs on the remote source, as + * opposed to listing the MigratingVms resources in the vmmigration service. + * + * The async variant is {@see self::fetchInventoryAsync()} . + * + * @param FetchInventoryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return FetchInventoryResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function fetchInventory(FetchInventoryRequest $request, array $callOptions = []): FetchInventoryResponse + { + return $this->startApiCall('FetchInventory', $request, $callOptions)->wait(); + } + + /** + * Marks a migration as completed, deleting migration resources that are no + * longer being used. Only applicable after cutover is done. + * + * The async variant is {@see self::finalizeMigrationAsync()} . + * + * @param FinalizeMigrationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function finalizeMigration(FinalizeMigrationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('FinalizeMigration', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single CloneJob. + * + * The async variant is {@see self::getCloneJobAsync()} . + * + * @param GetCloneJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CloneJob + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCloneJob(GetCloneJobRequest $request, array $callOptions = []): CloneJob + { + return $this->startApiCall('GetCloneJob', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single CutoverJob. + * + * The async variant is {@see self::getCutoverJobAsync()} . + * + * @param GetCutoverJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CutoverJob + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCutoverJob(GetCutoverJobRequest $request, array $callOptions = []): CutoverJob + { + return $this->startApiCall('GetCutoverJob', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single DatacenterConnector. + * + * The async variant is {@see self::getDatacenterConnectorAsync()} . + * + * @param GetDatacenterConnectorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DatacenterConnector + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDatacenterConnector(GetDatacenterConnectorRequest $request, array $callOptions = []): DatacenterConnector + { + return $this->startApiCall('GetDatacenterConnector', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Group. + * + * The async variant is {@see self::getGroupAsync()} . + * + * @param GetGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Group + * + * @throws ApiException Thrown if the API call fails. + */ + public function getGroup(GetGroupRequest $request, array $callOptions = []): Group + { + return $this->startApiCall('GetGroup', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single MigratingVm. + * + * The async variant is {@see self::getMigratingVmAsync()} . + * + * @param GetMigratingVmRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return MigratingVm + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMigratingVm(GetMigratingVmRequest $request, array $callOptions = []): MigratingVm + { + return $this->startApiCall('GetMigratingVm', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single ReplicationCycle. + * + * The async variant is {@see self::getReplicationCycleAsync()} . + * + * @param GetReplicationCycleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ReplicationCycle + * + * @throws ApiException Thrown if the API call fails. + */ + public function getReplicationCycle(GetReplicationCycleRequest $request, array $callOptions = []): ReplicationCycle + { + return $this->startApiCall('GetReplicationCycle', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Source. + * + * The async variant is {@see self::getSourceAsync()} . + * + * @param GetSourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Source + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSource(GetSourceRequest $request, array $callOptions = []): Source + { + return $this->startApiCall('GetSource', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single TargetProject. + * + * NOTE: TargetProject is a global resource; hence the only supported value + * for location is `global`. + * + * The async variant is {@see self::getTargetProjectAsync()} . + * + * @param GetTargetProjectRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TargetProject + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTargetProject(GetTargetProjectRequest $request, array $callOptions = []): TargetProject + { + return $this->startApiCall('GetTargetProject', $request, $callOptions)->wait(); + } + + /** + * Gets a single Utilization Report. + * + * The async variant is {@see self::getUtilizationReportAsync()} . + * + * @param GetUtilizationReportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UtilizationReport + * + * @throws ApiException Thrown if the API call fails. + */ + public function getUtilizationReport(GetUtilizationReportRequest $request, array $callOptions = []): UtilizationReport + { + return $this->startApiCall('GetUtilizationReport', $request, $callOptions)->wait(); + } + + /** + * Lists CloneJobs of a given migrating VM. + * + * The async variant is {@see self::listCloneJobsAsync()} . + * + * @param ListCloneJobsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listCloneJobs(ListCloneJobsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCloneJobs', $request, $callOptions); + } + + /** + * Lists CutoverJobs of a given migrating VM. + * + * The async variant is {@see self::listCutoverJobsAsync()} . + * + * @param ListCutoverJobsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listCutoverJobs(ListCutoverJobsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCutoverJobs', $request, $callOptions); + } + + /** + * Lists DatacenterConnectors in a given Source. + * + * The async variant is {@see self::listDatacenterConnectorsAsync()} . + * + * @param ListDatacenterConnectorsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listDatacenterConnectors(ListDatacenterConnectorsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDatacenterConnectors', $request, $callOptions); + } + + /** + * Lists Groups in a given project and location. + * + * The async variant is {@see self::listGroupsAsync()} . + * + * @param ListGroupsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listGroups(ListGroupsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListGroups', $request, $callOptions); + } + + /** + * Lists MigratingVms in a given Source. + * + * The async variant is {@see self::listMigratingVmsAsync()} . + * + * @param ListMigratingVmsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listMigratingVms(ListMigratingVmsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListMigratingVms', $request, $callOptions); + } + + /** + * Lists ReplicationCycles in a given MigratingVM. + * + * The async variant is {@see self::listReplicationCyclesAsync()} . + * + * @param ListReplicationCyclesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listReplicationCycles(ListReplicationCyclesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListReplicationCycles', $request, $callOptions); + } + + /** + * Lists Sources in a given project and location. + * + * The async variant is {@see self::listSourcesAsync()} . + * + * @param ListSourcesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listSources(ListSourcesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSources', $request, $callOptions); + } + + /** + * Lists TargetProjects in a given project. + * + * NOTE: TargetProject is a global resource; hence the only supported value + * for location is `global`. + * + * The async variant is {@see self::listTargetProjectsAsync()} . + * + * @param ListTargetProjectsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listTargetProjects(ListTargetProjectsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTargetProjects', $request, $callOptions); + } + + /** + * Lists Utilization Reports of the given Source. + * + * The async variant is {@see self::listUtilizationReportsAsync()} . + * + * @param ListUtilizationReportsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listUtilizationReports(ListUtilizationReportsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListUtilizationReports', $request, $callOptions); + } + + /** + * Pauses a migration for a VM. If cycle tasks are running they will be + * cancelled, preserving source task data. Further replication cycles will not + * be triggered while the VM is paused. + * + * The async variant is {@see self::pauseMigrationAsync()} . + * + * @param PauseMigrationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function pauseMigration(PauseMigrationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('PauseMigration', $request, $callOptions)->wait(); + } + + /** + * Removes a MigratingVm from a Group. + * + * The async variant is {@see self::removeGroupMigrationAsync()} . + * + * @param RemoveGroupMigrationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function removeGroupMigration(RemoveGroupMigrationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RemoveGroupMigration', $request, $callOptions)->wait(); + } + + /** + * Resumes a migration for a VM. When called on a paused migration, will start + * the process of uploading data and creating snapshots; when called on a + * completed cut-over migration, will update the migration to active state and + * start the process of uploading data and creating snapshots. + * + * The async variant is {@see self::resumeMigrationAsync()} . + * + * @param ResumeMigrationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function resumeMigration(ResumeMigrationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ResumeMigration', $request, $callOptions)->wait(); + } + + /** + * Starts migration for a VM. Starts the process of uploading + * data and creating snapshots, in replication cycles scheduled by the policy. + * + * The async variant is {@see self::startMigrationAsync()} . + * + * @param StartMigrationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function startMigration(StartMigrationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('StartMigration', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single Group. + * + * The async variant is {@see self::updateGroupAsync()} . + * + * @param UpdateGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateGroup(UpdateGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateGroup', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single MigratingVm. + * + * The async variant is {@see self::updateMigratingVmAsync()} . + * + * @param UpdateMigratingVmRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateMigratingVm(UpdateMigratingVmRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateMigratingVm', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single Source. + * + * The async variant is {@see self::updateSourceAsync()} . + * + * @param UpdateSourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSource(UpdateSourceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateSource', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single TargetProject. + * + * NOTE: TargetProject is a global resource; hence the only supported value + * for location is `global`. + * + * The async variant is {@see self::updateTargetProjectAsync()} . + * + * @param UpdateTargetProjectRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateTargetProject(UpdateTargetProjectRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateTargetProject', $request, $callOptions)->wait(); + } + + /** + * Upgrades the appliance relate to this DatacenterConnector to the in-place + * updateable version. + * + * The async variant is {@see self::upgradeApplianceAsync()} . + * + * @param UpgradeApplianceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function upgradeAppliance(UpgradeApplianceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpgradeAppliance', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see self::getLocationAsync()} . + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see self::listLocationsAsync()} . + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/VmMigration/v1/src/V1/Client/VmMigrationClient.php b/owl-bot-staging/VmMigration/v1/src/V1/Client/VmMigrationClient.php new file mode 100644 index 000000000000..bb4815e7acdb --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/src/V1/Client/VmMigrationClient.php @@ -0,0 +1,40 @@ +groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + * $operationResponse = $vmMigrationClient->addGroupMigration($formattedGroup); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->addGroupMigration($formattedGroup); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'addGroupMigration'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + */ +class VmMigrationGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.vmmigration.v1.VmMigration'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'vmmigration.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $cloneJobNameTemplate; + + private static $cutoverJobNameTemplate; + + private static $datacenterConnectorNameTemplate; + + private static $groupNameTemplate; + + private static $locationNameTemplate; + + private static $migratingVmNameTemplate; + + private static $replicationCycleNameTemplate; + + private static $sourceNameTemplate; + + private static $targetProjectNameTemplate; + + private static $utilizationReportNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/vm_migration_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/vm_migration_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/vm_migration_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/vm_migration_rest_client_config.php', + ], + ], + ]; + } + + private static function getCloneJobNameTemplate() + { + if (self::$cloneJobNameTemplate == null) { + self::$cloneJobNameTemplate = new PathTemplate('projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cloneJobs/{clone_job}'); + } + + return self::$cloneJobNameTemplate; + } + + private static function getCutoverJobNameTemplate() + { + if (self::$cutoverJobNameTemplate == null) { + self::$cutoverJobNameTemplate = new PathTemplate('projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cutoverJobs/{cutover_job}'); + } + + return self::$cutoverJobNameTemplate; + } + + private static function getDatacenterConnectorNameTemplate() + { + if (self::$datacenterConnectorNameTemplate == null) { + self::$datacenterConnectorNameTemplate = new PathTemplate('projects/{project}/locations/{location}/sources/{source}/datacenterConnectors/{datacenter_connector}'); + } + + return self::$datacenterConnectorNameTemplate; + } + + private static function getGroupNameTemplate() + { + if (self::$groupNameTemplate == null) { + self::$groupNameTemplate = new PathTemplate('projects/{project}/locations/{location}/groups/{group}'); + } + + return self::$groupNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getMigratingVmNameTemplate() + { + if (self::$migratingVmNameTemplate == null) { + self::$migratingVmNameTemplate = new PathTemplate('projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}'); + } + + return self::$migratingVmNameTemplate; + } + + private static function getReplicationCycleNameTemplate() + { + if (self::$replicationCycleNameTemplate == null) { + self::$replicationCycleNameTemplate = new PathTemplate('projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/replicationCycles/{replication_cycle}'); + } + + return self::$replicationCycleNameTemplate; + } + + private static function getSourceNameTemplate() + { + if (self::$sourceNameTemplate == null) { + self::$sourceNameTemplate = new PathTemplate('projects/{project}/locations/{location}/sources/{source}'); + } + + return self::$sourceNameTemplate; + } + + private static function getTargetProjectNameTemplate() + { + if (self::$targetProjectNameTemplate == null) { + self::$targetProjectNameTemplate = new PathTemplate('projects/{project}/locations/{location}/targetProjects/{target_project}'); + } + + return self::$targetProjectNameTemplate; + } + + private static function getUtilizationReportNameTemplate() + { + if (self::$utilizationReportNameTemplate == null) { + self::$utilizationReportNameTemplate = new PathTemplate('projects/{project}/locations/{location}/sources/{source}/utilizationReports/{utilization_report}'); + } + + return self::$utilizationReportNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'cloneJob' => self::getCloneJobNameTemplate(), + 'cutoverJob' => self::getCutoverJobNameTemplate(), + 'datacenterConnector' => self::getDatacenterConnectorNameTemplate(), + 'group' => self::getGroupNameTemplate(), + 'location' => self::getLocationNameTemplate(), + 'migratingVm' => self::getMigratingVmNameTemplate(), + 'replicationCycle' => self::getReplicationCycleNameTemplate(), + 'source' => self::getSourceNameTemplate(), + 'targetProject' => self::getTargetProjectNameTemplate(), + 'utilizationReport' => self::getUtilizationReportNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a clone_job + * resource. + * + * @param string $project + * @param string $location + * @param string $source + * @param string $migratingVm + * @param string $cloneJob + * + * @return string The formatted clone_job resource. + */ + public static function cloneJobName($project, $location, $source, $migratingVm, $cloneJob) + { + return self::getCloneJobNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + 'migrating_vm' => $migratingVm, + 'clone_job' => $cloneJob, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a cutover_job + * resource. + * + * @param string $project + * @param string $location + * @param string $source + * @param string $migratingVm + * @param string $cutoverJob + * + * @return string The formatted cutover_job resource. + */ + public static function cutoverJobName($project, $location, $source, $migratingVm, $cutoverJob) + { + return self::getCutoverJobNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + 'migrating_vm' => $migratingVm, + 'cutover_job' => $cutoverJob, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * datacenter_connector resource. + * + * @param string $project + * @param string $location + * @param string $source + * @param string $datacenterConnector + * + * @return string The formatted datacenter_connector resource. + */ + public static function datacenterConnectorName($project, $location, $source, $datacenterConnector) + { + return self::getDatacenterConnectorNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + 'datacenter_connector' => $datacenterConnector, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a group + * resource. + * + * @param string $project + * @param string $location + * @param string $group + * + * @return string The formatted group resource. + */ + public static function groupName($project, $location, $group) + { + return self::getGroupNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'group' => $group, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a migrating_vm + * resource. + * + * @param string $project + * @param string $location + * @param string $source + * @param string $migratingVm + * + * @return string The formatted migrating_vm resource. + */ + public static function migratingVmName($project, $location, $source, $migratingVm) + { + return self::getMigratingVmNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + 'migrating_vm' => $migratingVm, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * replication_cycle resource. + * + * @param string $project + * @param string $location + * @param string $source + * @param string $migratingVm + * @param string $replicationCycle + * + * @return string The formatted replication_cycle resource. + */ + public static function replicationCycleName($project, $location, $source, $migratingVm, $replicationCycle) + { + return self::getReplicationCycleNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + 'migrating_vm' => $migratingVm, + 'replication_cycle' => $replicationCycle, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a source + * resource. + * + * @param string $project + * @param string $location + * @param string $source + * + * @return string The formatted source resource. + */ + public static function sourceName($project, $location, $source) + { + return self::getSourceNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * target_project resource. + * + * @param string $project + * @param string $location + * @param string $targetProject + * + * @return string The formatted target_project resource. + */ + public static function targetProjectName($project, $location, $targetProject) + { + return self::getTargetProjectNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'target_project' => $targetProject, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * utilization_report resource. + * + * @param string $project + * @param string $location + * @param string $source + * @param string $utilizationReport + * + * @return string The formatted utilization_report resource. + */ + public static function utilizationReportName($project, $location, $source, $utilizationReport) + { + return self::getUtilizationReportNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + 'utilization_report' => $utilizationReport, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - cloneJob: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cloneJobs/{clone_job} + * - cutoverJob: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cutoverJobs/{cutover_job} + * - datacenterConnector: projects/{project}/locations/{location}/sources/{source}/datacenterConnectors/{datacenter_connector} + * - group: projects/{project}/locations/{location}/groups/{group} + * - location: projects/{project}/locations/{location} + * - migratingVm: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm} + * - replicationCycle: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/replicationCycles/{replication_cycle} + * - source: projects/{project}/locations/{location}/sources/{source} + * - targetProject: projects/{project}/locations/{location}/targetProjects/{target_project} + * - utilizationReport: projects/{project}/locations/{location}/sources/{source}/utilizationReports/{utilization_report} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'vmmigration.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Adds a MigratingVm to a Group. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedGroup = $vmMigrationClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + * $operationResponse = $vmMigrationClient->addGroupMigration($formattedGroup); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->addGroupMigration($formattedGroup); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'addGroupMigration'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $group Required. The full path name of the Group to add to. + * @param array $optionalArgs { + * Optional. + * + * @type string $migratingVm + * The full path name of the MigratingVm to add. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function addGroupMigration($group, array $optionalArgs = []) + { + $request = new AddGroupMigrationRequest(); + $requestParamHeaders = []; + $request->setGroup($group); + $requestParamHeaders['group'] = $group; + if (isset($optionalArgs['migratingVm'])) { + $request->setMigratingVm($optionalArgs['migratingVm']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('AddGroupMigration', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Initiates the cancellation of a running clone job. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedName = $vmMigrationClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); + * $operationResponse = $vmMigrationClient->cancelCloneJob($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->cancelCloneJob($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'cancelCloneJob'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $name Required. The clone job id + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function cancelCloneJob($name, array $optionalArgs = []) + { + $request = new CancelCloneJobRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CancelCloneJob', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Initiates the cancellation of a running cutover job. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedName = $vmMigrationClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); + * $operationResponse = $vmMigrationClient->cancelCutoverJob($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->cancelCutoverJob($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'cancelCutoverJob'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $name Required. The cutover job id + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function cancelCutoverJob($name, array $optionalArgs = []) + { + $request = new CancelCutoverJobRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CancelCutoverJob', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Initiates a Clone of a specific migrating VM. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedParent = $vmMigrationClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + * $cloneJobId = 'clone_job_id'; + * $cloneJob = new CloneJob(); + * $operationResponse = $vmMigrationClient->createCloneJob($formattedParent, $cloneJobId, $cloneJob); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->createCloneJob($formattedParent, $cloneJobId, $cloneJob); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'createCloneJob'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $parent Required. The Clone's parent. + * @param string $cloneJobId Required. The clone job identifier. + * @param CloneJob $cloneJob Required. The clone request body. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createCloneJob($parent, $cloneJobId, $cloneJob, array $optionalArgs = []) + { + $request = new CreateCloneJobRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setCloneJobId($cloneJobId); + $request->setCloneJob($cloneJob); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateCloneJob', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Initiates a Cutover of a specific migrating VM. + * The returned LRO is completed when the cutover job resource is created + * and the job is initiated. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedParent = $vmMigrationClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + * $cutoverJobId = 'cutover_job_id'; + * $cutoverJob = new CutoverJob(); + * $operationResponse = $vmMigrationClient->createCutoverJob($formattedParent, $cutoverJobId, $cutoverJob); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->createCutoverJob($formattedParent, $cutoverJobId, $cutoverJob); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'createCutoverJob'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $parent Required. The Cutover's parent. + * @param string $cutoverJobId Required. The cutover job identifier. + * @param CutoverJob $cutoverJob Required. The cutover request body. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createCutoverJob($parent, $cutoverJobId, $cutoverJob, array $optionalArgs = []) + { + $request = new CreateCutoverJobRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setCutoverJobId($cutoverJobId); + $request->setCutoverJob($cutoverJob); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateCutoverJob', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a new DatacenterConnector in a given Source. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedParent = $vmMigrationClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + * $datacenterConnectorId = 'datacenter_connector_id'; + * $datacenterConnector = new DatacenterConnector(); + * $operationResponse = $vmMigrationClient->createDatacenterConnector($formattedParent, $datacenterConnectorId, $datacenterConnector); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->createDatacenterConnector($formattedParent, $datacenterConnectorId, $datacenterConnector); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'createDatacenterConnector'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $parent Required. The DatacenterConnector's parent. + * Required. The Source in where the new DatacenterConnector will be created. + * For example: + * `projects/my-project/locations/us-central1/sources/my-source` + * @param string $datacenterConnectorId Required. The datacenterConnector identifier. + * @param DatacenterConnector $datacenterConnector Required. The create request body. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createDatacenterConnector($parent, $datacenterConnectorId, $datacenterConnector, array $optionalArgs = []) + { + $request = new CreateDatacenterConnectorRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setDatacenterConnectorId($datacenterConnectorId); + $request->setDatacenterConnector($datacenterConnector); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateDatacenterConnector', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a new Group in a given project and location. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedParent = $vmMigrationClient->locationName('[PROJECT]', '[LOCATION]'); + * $groupId = 'group_id'; + * $group = new Group(); + * $operationResponse = $vmMigrationClient->createGroup($formattedParent, $groupId, $group); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->createGroup($formattedParent, $groupId, $group); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'createGroup'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $parent Required. The Group's parent. + * @param string $groupId Required. The group identifier. + * @param Group $group Required. The create request body. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createGroup($parent, $groupId, $group, array $optionalArgs = []) + { + $request = new CreateGroupRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setGroupId($groupId); + $request->setGroup($group); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateGroup', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a new MigratingVm in a given Source. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedParent = $vmMigrationClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + * $migratingVmId = 'migrating_vm_id'; + * $migratingVm = new MigratingVm(); + * $operationResponse = $vmMigrationClient->createMigratingVm($formattedParent, $migratingVmId, $migratingVm); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->createMigratingVm($formattedParent, $migratingVmId, $migratingVm); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'createMigratingVm'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $parent Required. The MigratingVm's parent. + * @param string $migratingVmId Required. The migratingVm identifier. + * @param MigratingVm $migratingVm Required. The create request body. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createMigratingVm($parent, $migratingVmId, $migratingVm, array $optionalArgs = []) + { + $request = new CreateMigratingVmRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setMigratingVmId($migratingVmId); + $request->setMigratingVm($migratingVm); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateMigratingVm', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a new Source in a given project and location. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedParent = $vmMigrationClient->locationName('[PROJECT]', '[LOCATION]'); + * $sourceId = 'source_id'; + * $source = new Source(); + * $operationResponse = $vmMigrationClient->createSource($formattedParent, $sourceId, $source); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->createSource($formattedParent, $sourceId, $source); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'createSource'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $parent Required. The Source's parent. + * @param string $sourceId Required. The source identifier. + * @param Source $source Required. The create request body. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createSource($parent, $sourceId, $source, array $optionalArgs = []) + { + $request = new CreateSourceRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setSourceId($sourceId); + $request->setSource($source); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateSource', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a new TargetProject in a given project. + * + * NOTE: TargetProject is a global resource; hence the only supported value + * for location is `global`. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedParent = $vmMigrationClient->locationName('[PROJECT]', '[LOCATION]'); + * $targetProjectId = 'target_project_id'; + * $targetProject = new TargetProject(); + * $operationResponse = $vmMigrationClient->createTargetProject($formattedParent, $targetProjectId, $targetProject); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->createTargetProject($formattedParent, $targetProjectId, $targetProject); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'createTargetProject'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $parent Required. The TargetProject's parent. + * @param string $targetProjectId Required. The target_project identifier. + * @param TargetProject $targetProject Required. The create request body. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createTargetProject($parent, $targetProjectId, $targetProject, array $optionalArgs = []) + { + $request = new CreateTargetProjectRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setTargetProjectId($targetProjectId); + $request->setTargetProject($targetProject); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateTargetProject', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a new UtilizationReport. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedParent = $vmMigrationClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + * $utilizationReport = new UtilizationReport(); + * $utilizationReportId = 'utilization_report_id'; + * $operationResponse = $vmMigrationClient->createUtilizationReport($formattedParent, $utilizationReport, $utilizationReportId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->createUtilizationReport($formattedParent, $utilizationReport, $utilizationReportId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'createUtilizationReport'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $parent Required. The Utilization Report's parent. + * @param UtilizationReport $utilizationReport Required. The report to create. + * @param string $utilizationReportId Required. The ID to use for the report, which will become the final + * component of the reports's resource name. + * + * This value maximum length is 63 characters, and valid characters + * are /[a-z][0-9]-/. It must start with an english letter and must not + * end with a hyphen. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createUtilizationReport($parent, $utilizationReport, $utilizationReportId, array $optionalArgs = []) + { + $request = new CreateUtilizationReportRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setUtilizationReport($utilizationReport); + $request->setUtilizationReportId($utilizationReportId); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateUtilizationReport', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a single DatacenterConnector. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedName = $vmMigrationClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); + * $operationResponse = $vmMigrationClient->deleteDatacenterConnector($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->deleteDatacenterConnector($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'deleteDatacenterConnector'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $name Required. The DatacenterConnector name. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteDatacenterConnector($name, array $optionalArgs = []) + { + $request = new DeleteDatacenterConnectorRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteDatacenterConnector', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a single Group. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedName = $vmMigrationClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + * $operationResponse = $vmMigrationClient->deleteGroup($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->deleteGroup($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'deleteGroup'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $name Required. The Group name. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteGroup($name, array $optionalArgs = []) + { + $request = new DeleteGroupRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteGroup', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a single MigratingVm. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedName = $vmMigrationClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + * $operationResponse = $vmMigrationClient->deleteMigratingVm($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->deleteMigratingVm($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'deleteMigratingVm'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the MigratingVm. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteMigratingVm($name, array $optionalArgs = []) + { + $request = new DeleteMigratingVmRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteMigratingVm', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a single Source. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedName = $vmMigrationClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + * $operationResponse = $vmMigrationClient->deleteSource($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->deleteSource($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'deleteSource'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $name Required. The Source name. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteSource($name, array $optionalArgs = []) + { + $request = new DeleteSourceRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteSource', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a single TargetProject. + * + * NOTE: TargetProject is a global resource; hence the only supported value + * for location is `global`. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedName = $vmMigrationClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); + * $operationResponse = $vmMigrationClient->deleteTargetProject($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->deleteTargetProject($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'deleteTargetProject'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $name Required. The TargetProject name. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteTargetProject($name, array $optionalArgs = []) + { + $request = new DeleteTargetProjectRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteTargetProject', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a single Utilization Report. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedName = $vmMigrationClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); + * $operationResponse = $vmMigrationClient->deleteUtilizationReport($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->deleteUtilizationReport($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'deleteUtilizationReport'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $name Required. The Utilization Report name. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteUtilizationReport($name, array $optionalArgs = []) + { + $request = new DeleteUtilizationReportRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteUtilizationReport', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * List remote source's inventory of VMs. + * The remote source is the onprem vCenter (remote in the sense it's not in + * Compute Engine). The inventory describes the list of existing VMs in that + * source. Note that this operation lists the VMs on the remote source, as + * opposed to listing the MigratingVms resources in the vmmigration service. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedSource = $vmMigrationClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + * $response = $vmMigrationClient->fetchInventory($formattedSource); + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $source Required. The name of the Source. + * @param array $optionalArgs { + * Optional. + * + * @type bool $forceRefresh + * If this flag is set to true, the source will be queried instead of using + * cached results. Using this flag will make the call slower. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\VMMigration\V1\FetchInventoryResponse + * + * @throws ApiException if the remote call fails + */ + public function fetchInventory($source, array $optionalArgs = []) + { + $request = new FetchInventoryRequest(); + $requestParamHeaders = []; + $request->setSource($source); + $requestParamHeaders['source'] = $source; + if (isset($optionalArgs['forceRefresh'])) { + $request->setForceRefresh($optionalArgs['forceRefresh']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('FetchInventory', FetchInventoryResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Marks a migration as completed, deleting migration resources that are no + * longer being used. Only applicable after cutover is done. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedMigratingVm = $vmMigrationClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + * $operationResponse = $vmMigrationClient->finalizeMigration($formattedMigratingVm); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->finalizeMigration($formattedMigratingVm); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'finalizeMigration'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $migratingVm Required. The name of the MigratingVm. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function finalizeMigration($migratingVm, array $optionalArgs = []) + { + $request = new FinalizeMigrationRequest(); + $requestParamHeaders = []; + $request->setMigratingVm($migratingVm); + $requestParamHeaders['migrating_vm'] = $migratingVm; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('FinalizeMigration', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets details of a single CloneJob. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedName = $vmMigrationClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); + * $response = $vmMigrationClient->getCloneJob($formattedName); + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the CloneJob. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\VMMigration\V1\CloneJob + * + * @throws ApiException if the remote call fails + */ + public function getCloneJob($name, array $optionalArgs = []) + { + $request = new GetCloneJobRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetCloneJob', CloneJob::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets details of a single CutoverJob. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedName = $vmMigrationClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); + * $response = $vmMigrationClient->getCutoverJob($formattedName); + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the CutoverJob. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\VMMigration\V1\CutoverJob + * + * @throws ApiException if the remote call fails + */ + public function getCutoverJob($name, array $optionalArgs = []) + { + $request = new GetCutoverJobRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetCutoverJob', CutoverJob::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets details of a single DatacenterConnector. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedName = $vmMigrationClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); + * $response = $vmMigrationClient->getDatacenterConnector($formattedName); + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the DatacenterConnector. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\VMMigration\V1\DatacenterConnector + * + * @throws ApiException if the remote call fails + */ + public function getDatacenterConnector($name, array $optionalArgs = []) + { + $request = new GetDatacenterConnectorRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetDatacenterConnector', DatacenterConnector::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets details of a single Group. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedName = $vmMigrationClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + * $response = $vmMigrationClient->getGroup($formattedName); + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $name Required. The group name. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\VMMigration\V1\Group + * + * @throws ApiException if the remote call fails + */ + public function getGroup($name, array $optionalArgs = []) + { + $request = new GetGroupRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetGroup', Group::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets details of a single MigratingVm. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedName = $vmMigrationClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + * $response = $vmMigrationClient->getMigratingVm($formattedName); + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the MigratingVm. + * @param array $optionalArgs { + * Optional. + * + * @type int $view + * Optional. The level of details of the migrating VM. + * For allowed values, use constants defined on {@see \Google\Cloud\VMMigration\V1\MigratingVmView} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\VMMigration\V1\MigratingVm + * + * @throws ApiException if the remote call fails + */ + public function getMigratingVm($name, array $optionalArgs = []) + { + $request = new GetMigratingVmRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['view'])) { + $request->setView($optionalArgs['view']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetMigratingVm', MigratingVm::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets details of a single ReplicationCycle. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedName = $vmMigrationClient->replicationCycleName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[REPLICATION_CYCLE]'); + * $response = $vmMigrationClient->getReplicationCycle($formattedName); + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the ReplicationCycle. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\VMMigration\V1\ReplicationCycle + * + * @throws ApiException if the remote call fails + */ + public function getReplicationCycle($name, array $optionalArgs = []) + { + $request = new GetReplicationCycleRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetReplicationCycle', ReplicationCycle::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets details of a single Source. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedName = $vmMigrationClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + * $response = $vmMigrationClient->getSource($formattedName); + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $name Required. The Source name. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\VMMigration\V1\Source + * + * @throws ApiException if the remote call fails + */ + public function getSource($name, array $optionalArgs = []) + { + $request = new GetSourceRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetSource', Source::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets details of a single TargetProject. + * + * NOTE: TargetProject is a global resource; hence the only supported value + * for location is `global`. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedName = $vmMigrationClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); + * $response = $vmMigrationClient->getTargetProject($formattedName); + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $name Required. The TargetProject name. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\VMMigration\V1\TargetProject + * + * @throws ApiException if the remote call fails + */ + public function getTargetProject($name, array $optionalArgs = []) + { + $request = new GetTargetProjectRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetTargetProject', TargetProject::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a single Utilization Report. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedName = $vmMigrationClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); + * $response = $vmMigrationClient->getUtilizationReport($formattedName); + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $name Required. The Utilization Report name. + * @param array $optionalArgs { + * Optional. + * + * @type int $view + * Optional. The level of details of the report. + * Defaults to FULL + * For allowed values, use constants defined on {@see \Google\Cloud\VMMigration\V1\UtilizationReportView} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\VMMigration\V1\UtilizationReport + * + * @throws ApiException if the remote call fails + */ + public function getUtilizationReport($name, array $optionalArgs = []) + { + $request = new GetUtilizationReportRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['view'])) { + $request->setView($optionalArgs['view']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetUtilizationReport', UtilizationReport::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists CloneJobs of a given migrating VM. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedParent = $vmMigrationClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + * $pageToken = 'page_token'; + * // Iterate over pages of elements + * $pagedResponse = $vmMigrationClient->listCloneJobs($formattedParent, $pageToken); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $vmMigrationClient->listCloneJobs($formattedParent, $pageToken); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent, which owns this collection of source VMs. + * @param string $pageToken A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $filter + * Optional. The filter request. + * @type string $orderBy + * Optional. the order by fields for the result. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listCloneJobs($parent, $pageToken, array $optionalArgs = []) + { + $request = new ListCloneJobsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setPageToken($pageToken); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListCloneJobs', $optionalArgs, ListCloneJobsResponse::class, $request); + } + + /** + * Lists CutoverJobs of a given migrating VM. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedParent = $vmMigrationClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + * $pageToken = 'page_token'; + * // Iterate over pages of elements + * $pagedResponse = $vmMigrationClient->listCutoverJobs($formattedParent, $pageToken); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $vmMigrationClient->listCutoverJobs($formattedParent, $pageToken); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent, which owns this collection of migrating VMs. + * @param string $pageToken A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $filter + * Optional. The filter request. + * @type string $orderBy + * Optional. the order by fields for the result. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listCutoverJobs($parent, $pageToken, array $optionalArgs = []) + { + $request = new ListCutoverJobsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setPageToken($pageToken); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListCutoverJobs', $optionalArgs, ListCutoverJobsResponse::class, $request); + } + + /** + * Lists DatacenterConnectors in a given Source. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedParent = $vmMigrationClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + * $pageToken = 'page_token'; + * // Iterate over pages of elements + * $pagedResponse = $vmMigrationClient->listDatacenterConnectors($formattedParent, $pageToken); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $vmMigrationClient->listDatacenterConnectors($formattedParent, $pageToken); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent, which owns this collection of connectors. + * @param string $pageToken A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $filter + * Optional. The filter request. + * @type string $orderBy + * Optional. the order by fields for the result. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listDatacenterConnectors($parent, $pageToken, array $optionalArgs = []) + { + $request = new ListDatacenterConnectorsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setPageToken($pageToken); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListDatacenterConnectors', $optionalArgs, ListDatacenterConnectorsResponse::class, $request); + } + + /** + * Lists Groups in a given project and location. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedParent = $vmMigrationClient->locationName('[PROJECT]', '[LOCATION]'); + * $pageToken = 'page_token'; + * // Iterate over pages of elements + * $pagedResponse = $vmMigrationClient->listGroups($formattedParent, $pageToken); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $vmMigrationClient->listGroups($formattedParent, $pageToken); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent, which owns this collection of groups. + * @param string $pageToken A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $filter + * Optional. The filter request. + * @type string $orderBy + * Optional. the order by fields for the result. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listGroups($parent, $pageToken, array $optionalArgs = []) + { + $request = new ListGroupsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setPageToken($pageToken); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListGroups', $optionalArgs, ListGroupsResponse::class, $request); + } + + /** + * Lists MigratingVms in a given Source. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedParent = $vmMigrationClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + * $pageToken = 'page_token'; + * // Iterate over pages of elements + * $pagedResponse = $vmMigrationClient->listMigratingVms($formattedParent, $pageToken); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $vmMigrationClient->listMigratingVms($formattedParent, $pageToken); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent, which owns this collection of MigratingVms. + * @param string $pageToken A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $filter + * Optional. The filter request. + * @type string $orderBy + * Optional. the order by fields for the result. + * @type int $view + * Optional. The level of details of each migrating VM. + * For allowed values, use constants defined on {@see \Google\Cloud\VMMigration\V1\MigratingVmView} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listMigratingVms($parent, $pageToken, array $optionalArgs = []) + { + $request = new ListMigratingVmsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setPageToken($pageToken); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + if (isset($optionalArgs['view'])) { + $request->setView($optionalArgs['view']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListMigratingVms', $optionalArgs, ListMigratingVmsResponse::class, $request); + } + + /** + * Lists ReplicationCycles in a given MigratingVM. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedParent = $vmMigrationClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + * $pageToken = 'page_token'; + * // Iterate over pages of elements + * $pagedResponse = $vmMigrationClient->listReplicationCycles($formattedParent, $pageToken); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $vmMigrationClient->listReplicationCycles($formattedParent, $pageToken); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent, which owns this collection of ReplicationCycles. + * @param string $pageToken A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $filter + * Optional. The filter request. + * @type string $orderBy + * Optional. the order by fields for the result. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listReplicationCycles($parent, $pageToken, array $optionalArgs = []) + { + $request = new ListReplicationCyclesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setPageToken($pageToken); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListReplicationCycles', $optionalArgs, ListReplicationCyclesResponse::class, $request); + } + + /** + * Lists Sources in a given project and location. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedParent = $vmMigrationClient->locationName('[PROJECT]', '[LOCATION]'); + * $pageToken = 'page_token'; + * // Iterate over pages of elements + * $pagedResponse = $vmMigrationClient->listSources($formattedParent, $pageToken); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $vmMigrationClient->listSources($formattedParent, $pageToken); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent, which owns this collection of sources. + * @param string $pageToken A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $filter + * Optional. The filter request. + * @type string $orderBy + * Optional. the order by fields for the result. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listSources($parent, $pageToken, array $optionalArgs = []) + { + $request = new ListSourcesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setPageToken($pageToken); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListSources', $optionalArgs, ListSourcesResponse::class, $request); + } + + /** + * Lists TargetProjects in a given project. + * + * NOTE: TargetProject is a global resource; hence the only supported value + * for location is `global`. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedParent = $vmMigrationClient->locationName('[PROJECT]', '[LOCATION]'); + * $pageToken = 'page_token'; + * // Iterate over pages of elements + * $pagedResponse = $vmMigrationClient->listTargetProjects($formattedParent, $pageToken); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $vmMigrationClient->listTargetProjects($formattedParent, $pageToken); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent, which owns this collection of targets. + * @param string $pageToken A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $filter + * Optional. The filter request. + * @type string $orderBy + * Optional. the order by fields for the result. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listTargetProjects($parent, $pageToken, array $optionalArgs = []) + { + $request = new ListTargetProjectsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setPageToken($pageToken); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListTargetProjects', $optionalArgs, ListTargetProjectsResponse::class, $request); + } + + /** + * Lists Utilization Reports of the given Source. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedParent = $vmMigrationClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + * $pageToken = 'page_token'; + * // Iterate over pages of elements + * $pagedResponse = $vmMigrationClient->listUtilizationReports($formattedParent, $pageToken); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $vmMigrationClient->listUtilizationReports($formattedParent, $pageToken); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $parent Required. The Utilization Reports parent. + * @param string $pageToken A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @param array $optionalArgs { + * Optional. + * + * @type int $view + * Optional. The level of details of each report. + * Defaults to BASIC. + * For allowed values, use constants defined on {@see \Google\Cloud\VMMigration\V1\UtilizationReportView} + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $filter + * Optional. The filter request. + * @type string $orderBy + * Optional. the order by fields for the result. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listUtilizationReports($parent, $pageToken, array $optionalArgs = []) + { + $request = new ListUtilizationReportsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setPageToken($pageToken); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['view'])) { + $request->setView($optionalArgs['view']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListUtilizationReports', $optionalArgs, ListUtilizationReportsResponse::class, $request); + } + + /** + * Pauses a migration for a VM. If cycle tasks are running they will be + * cancelled, preserving source task data. Further replication cycles will not + * be triggered while the VM is paused. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedMigratingVm = $vmMigrationClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + * $operationResponse = $vmMigrationClient->pauseMigration($formattedMigratingVm); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->pauseMigration($formattedMigratingVm); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'pauseMigration'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $migratingVm Required. The name of the MigratingVm. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function pauseMigration($migratingVm, array $optionalArgs = []) + { + $request = new PauseMigrationRequest(); + $requestParamHeaders = []; + $request->setMigratingVm($migratingVm); + $requestParamHeaders['migrating_vm'] = $migratingVm; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('PauseMigration', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Removes a MigratingVm from a Group. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedGroup = $vmMigrationClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + * $operationResponse = $vmMigrationClient->removeGroupMigration($formattedGroup); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->removeGroupMigration($formattedGroup); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'removeGroupMigration'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $group Required. The name of the Group. + * @param array $optionalArgs { + * Optional. + * + * @type string $migratingVm + * The MigratingVm to remove. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function removeGroupMigration($group, array $optionalArgs = []) + { + $request = new RemoveGroupMigrationRequest(); + $requestParamHeaders = []; + $request->setGroup($group); + $requestParamHeaders['group'] = $group; + if (isset($optionalArgs['migratingVm'])) { + $request->setMigratingVm($optionalArgs['migratingVm']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('RemoveGroupMigration', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Resumes a migration for a VM. When called on a paused migration, will start + * the process of uploading data and creating snapshots; when called on a + * completed cut-over migration, will update the migration to active state and + * start the process of uploading data and creating snapshots. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedMigratingVm = $vmMigrationClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + * $operationResponse = $vmMigrationClient->resumeMigration($formattedMigratingVm); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->resumeMigration($formattedMigratingVm); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'resumeMigration'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $migratingVm Required. The name of the MigratingVm. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function resumeMigration($migratingVm, array $optionalArgs = []) + { + $request = new ResumeMigrationRequest(); + $requestParamHeaders = []; + $request->setMigratingVm($migratingVm); + $requestParamHeaders['migrating_vm'] = $migratingVm; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ResumeMigration', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Starts migration for a VM. Starts the process of uploading + * data and creating snapshots, in replication cycles scheduled by the policy. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedMigratingVm = $vmMigrationClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + * $operationResponse = $vmMigrationClient->startMigration($formattedMigratingVm); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->startMigration($formattedMigratingVm); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'startMigration'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $migratingVm Required. The name of the MigratingVm. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function startMigration($migratingVm, array $optionalArgs = []) + { + $request = new StartMigrationRequest(); + $requestParamHeaders = []; + $request->setMigratingVm($migratingVm); + $requestParamHeaders['migrating_vm'] = $migratingVm; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('StartMigration', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates the parameters of a single Group. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $group = new Group(); + * $operationResponse = $vmMigrationClient->updateGroup($group); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->updateGroup($group); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'updateGroup'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param Group $group Required. The update request body. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Field mask is used to specify the fields to be overwritten in the + * Group resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateGroup($group, array $optionalArgs = []) + { + $request = new UpdateGroupRequest(); + $requestParamHeaders = []; + $request->setGroup($group); + $requestParamHeaders['group.name'] = $group->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateGroup', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates the parameters of a single MigratingVm. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $migratingVm = new MigratingVm(); + * $operationResponse = $vmMigrationClient->updateMigratingVm($migratingVm); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->updateMigratingVm($migratingVm); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'updateMigratingVm'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param MigratingVm $migratingVm Required. The update request body. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Field mask is used to specify the fields to be overwritten in the + * MigratingVm resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateMigratingVm($migratingVm, array $optionalArgs = []) + { + $request = new UpdateMigratingVmRequest(); + $requestParamHeaders = []; + $request->setMigratingVm($migratingVm); + $requestParamHeaders['migrating_vm.name'] = $migratingVm->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateMigratingVm', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates the parameters of a single Source. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $source = new Source(); + * $operationResponse = $vmMigrationClient->updateSource($source); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->updateSource($source); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'updateSource'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param Source $source Required. The update request body. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Field mask is used to specify the fields to be overwritten in the + * Source resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateSource($source, array $optionalArgs = []) + { + $request = new UpdateSourceRequest(); + $requestParamHeaders = []; + $request->setSource($source); + $requestParamHeaders['source.name'] = $source->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateSource', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates the parameters of a single TargetProject. + * + * NOTE: TargetProject is a global resource; hence the only supported value + * for location is `global`. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $targetProject = new TargetProject(); + * $operationResponse = $vmMigrationClient->updateTargetProject($targetProject); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->updateTargetProject($targetProject); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'updateTargetProject'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param TargetProject $targetProject Required. The update request body. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Field mask is used to specify the fields to be overwritten in the + * TargetProject resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateTargetProject($targetProject, array $optionalArgs = []) + { + $request = new UpdateTargetProjectRequest(); + $requestParamHeaders = []; + $request->setTargetProject($targetProject); + $requestParamHeaders['target_project.name'] = $targetProject->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateTargetProject', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Upgrades the appliance relate to this DatacenterConnector to the in-place + * updateable version. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $formattedDatacenterConnector = $vmMigrationClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); + * $operationResponse = $vmMigrationClient->upgradeAppliance($formattedDatacenterConnector); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmMigrationClient->upgradeAppliance($formattedDatacenterConnector); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'upgradeAppliance'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param string $datacenterConnector Required. The DatacenterConnector name. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function upgradeAppliance($datacenterConnector, array $optionalArgs = []) + { + $request = new UpgradeApplianceRequest(); + $requestParamHeaders = []; + $request->setDatacenterConnector($datacenterConnector); + $requestParamHeaders['datacenter_connector'] = $datacenterConnector; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpgradeAppliance', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * $response = $vmMigrationClient->getLocation(); + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $vmMigrationClient = new VmMigrationClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $vmMigrationClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $vmMigrationClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $vmMigrationClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/VmMigration/v1/src/V1/VmMigrationClient.php b/owl-bot-staging/VmMigration/v1/src/V1/VmMigrationClient.php new file mode 100644 index 000000000000..5ab90a3acc18 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/src/V1/VmMigrationClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.vmmigration.v1.VmMigration' => [ + 'AddGroupMigration' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\AddGroupMigrationResponse', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'group', + 'fieldAccessors' => [ + 'getGroup', + ], + ], + ], + ], + 'CancelCloneJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\CancelCloneJobResponse', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CancelCutoverJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\CancelCutoverJobResponse', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateCloneJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\CloneJob', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateCutoverJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\CutoverJob', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDatacenterConnector' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\DatacenterConnector', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\Group', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateMigratingVm' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\MigratingVm', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSource' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\Source', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateTargetProject' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\TargetProject', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateUtilizationReport' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\UtilizationReport', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDatacenterConnector' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMigratingVm' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSource' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTargetProject' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteUtilizationReport' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'FinalizeMigration' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\FinalizeMigrationResponse', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'migrating_vm', + 'fieldAccessors' => [ + 'getMigratingVm', + ], + ], + ], + ], + 'PauseMigration' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\PauseMigrationResponse', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'migrating_vm', + 'fieldAccessors' => [ + 'getMigratingVm', + ], + ], + ], + ], + 'RemoveGroupMigration' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\RemoveGroupMigrationResponse', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'group', + 'fieldAccessors' => [ + 'getGroup', + ], + ], + ], + ], + 'ResumeMigration' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\ResumeMigrationResponse', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'migrating_vm', + 'fieldAccessors' => [ + 'getMigratingVm', + ], + ], + ], + ], + 'StartMigration' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\StartMigrationResponse', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'migrating_vm', + 'fieldAccessors' => [ + 'getMigratingVm', + ], + ], + ], + ], + 'UpdateGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\Group', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'group.name', + 'fieldAccessors' => [ + 'getGroup', + 'getName', + ], + ], + ], + ], + 'UpdateMigratingVm' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\MigratingVm', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'migrating_vm.name', + 'fieldAccessors' => [ + 'getMigratingVm', + 'getName', + ], + ], + ], + ], + 'UpdateSource' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\Source', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'source.name', + 'fieldAccessors' => [ + 'getSource', + 'getName', + ], + ], + ], + ], + 'UpdateTargetProject' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\TargetProject', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'target_project.name', + 'fieldAccessors' => [ + 'getTargetProject', + 'getName', + ], + ], + ], + ], + 'UpgradeAppliance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\UpgradeApplianceResponse', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'datacenter_connector', + 'fieldAccessors' => [ + 'getDatacenterConnector', + ], + ], + ], + ], + 'FetchInventory' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\FetchInventoryResponse', + 'headerParams' => [ + [ + 'keyName' => 'source', + 'fieldAccessors' => [ + 'getSource', + ], + ], + ], + ], + 'GetCloneJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\CloneJob', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCutoverJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\CutoverJob', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDatacenterConnector' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\DatacenterConnector', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\Group', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetMigratingVm' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\MigratingVm', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetReplicationCycle' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ReplicationCycle', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSource' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\Source', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetTargetProject' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\TargetProject', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetUtilizationReport' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\UtilizationReport', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCloneJobs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCloneJobs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListCloneJobsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListCutoverJobs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCutoverJobs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListCutoverJobsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListDatacenterConnectors' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDatacenterConnectors', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListDatacenterConnectorsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListGroups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getGroups', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListGroupsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListMigratingVms' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMigratingVms', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListMigratingVmsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListReplicationCycles' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getReplicationCycles', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListReplicationCyclesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSources' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSources', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListSourcesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListTargetProjects' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTargetProjects', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListTargetProjectsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListUtilizationReports' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getUtilizationReports', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListUtilizationReportsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'cloneJob' => 'projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cloneJobs/{clone_job}', + 'cutoverJob' => 'projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cutoverJobs/{cutover_job}', + 'datacenterConnector' => 'projects/{project}/locations/{location}/sources/{source}/datacenterConnectors/{datacenter_connector}', + 'group' => 'projects/{project}/locations/{location}/groups/{group}', + 'location' => 'projects/{project}/locations/{location}', + 'migratingVm' => 'projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}', + 'replicationCycle' => 'projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/replicationCycles/{replication_cycle}', + 'source' => 'projects/{project}/locations/{location}/sources/{source}', + 'targetProject' => 'projects/{project}/locations/{location}/targetProjects/{target_project}', + 'utilizationReport' => 'projects/{project}/locations/{location}/sources/{source}/utilizationReports/{utilization_report}', + ], + ], + ], +]; diff --git a/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_rest_client_config.php b/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_rest_client_config.php new file mode 100644 index 000000000000..04df0194c57a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_rest_client_config.php @@ -0,0 +1,662 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.vmmigration.v1.VmMigration' => [ + 'AddGroupMigration' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{group=projects/*/locations/*/groups/*}:addGroupMigration', + 'body' => '*', + 'placeholders' => [ + 'group' => [ + 'getters' => [ + 'getGroup', + ], + ], + ], + ], + 'CancelCloneJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*/cloneJobs/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CancelCutoverJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*/cutoverJobs/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateCloneJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*/migratingVms/*}/cloneJobs', + 'body' => 'clone_job', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'clone_job_id', + ], + ], + 'CreateCutoverJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*/migratingVms/*}/cutoverJobs', + 'body' => 'cutover_job', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'cutover_job_id', + ], + ], + 'CreateDatacenterConnector' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/datacenterConnectors', + 'body' => 'datacenter_connector', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'datacenter_connector_id', + ], + ], + 'CreateGroup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/groups', + 'body' => 'group', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'group_id', + ], + ], + 'CreateMigratingVm' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/migratingVms', + 'body' => 'migrating_vm', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'migrating_vm_id', + ], + ], + 'CreateSource' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/sources', + 'body' => 'source', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'source_id', + ], + ], + 'CreateTargetProject' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/targetProjects', + 'body' => 'target_project', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'target_project_id', + ], + ], + 'CreateUtilizationReport' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/utilizationReports', + 'body' => 'utilization_report', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'utilization_report_id', + ], + ], + 'DeleteDatacenterConnector' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/datacenterConnectors/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteGroup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/groups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMigratingVm' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSource' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTargetProject' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/targetProjects/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteUtilizationReport' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/utilizationReports/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'FetchInventory' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{source=projects/*/locations/*/sources/*}:fetchInventory', + 'placeholders' => [ + 'source' => [ + 'getters' => [ + 'getSource', + ], + ], + ], + ], + 'FinalizeMigration' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:finalizeMigration', + 'body' => '*', + 'placeholders' => [ + 'migrating_vm' => [ + 'getters' => [ + 'getMigratingVm', + ], + ], + ], + ], + 'GetCloneJob' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*/cloneJobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCutoverJob' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*/cutoverJobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDatacenterConnector' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/datacenterConnectors/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/groups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetMigratingVm' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetReplicationCycle' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*/replicationCycles/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSource' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTargetProject' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/targetProjects/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetUtilizationReport' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/utilizationReports/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCloneJobs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*/migratingVms/*}/cloneJobs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'page_token', + ], + ], + 'ListCutoverJobs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*/migratingVms/*}/cutoverJobs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'page_token', + ], + ], + 'ListDatacenterConnectors' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/datacenterConnectors', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'page_token', + ], + ], + 'ListGroups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/groups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'page_token', + ], + ], + 'ListMigratingVms' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/migratingVms', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'page_token', + ], + ], + 'ListReplicationCycles' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*/migratingVms/*}/replicationCycles', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'page_token', + ], + ], + 'ListSources' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/sources', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'page_token', + ], + ], + 'ListTargetProjects' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/targetProjects', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'page_token', + ], + ], + 'ListUtilizationReports' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/utilizationReports', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'page_token', + ], + ], + 'PauseMigration' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:pauseMigration', + 'body' => '*', + 'placeholders' => [ + 'migrating_vm' => [ + 'getters' => [ + 'getMigratingVm', + ], + ], + ], + ], + 'RemoveGroupMigration' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{group=projects/*/locations/*/groups/*}:removeGroupMigration', + 'body' => '*', + 'placeholders' => [ + 'group' => [ + 'getters' => [ + 'getGroup', + ], + ], + ], + ], + 'ResumeMigration' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:resumeMigration', + 'body' => '*', + 'placeholders' => [ + 'migrating_vm' => [ + 'getters' => [ + 'getMigratingVm', + ], + ], + ], + ], + 'StartMigration' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:startMigration', + 'body' => '*', + 'placeholders' => [ + 'migrating_vm' => [ + 'getters' => [ + 'getMigratingVm', + ], + ], + ], + ], + 'UpdateGroup' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{group.name=projects/*/locations/*/groups/*}', + 'body' => 'group', + 'placeholders' => [ + 'group.name' => [ + 'getters' => [ + 'getGroup', + 'getName', + ], + ], + ], + ], + 'UpdateMigratingVm' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{migrating_vm.name=projects/*/locations/*/sources/*/migratingVms/*}', + 'body' => 'migrating_vm', + 'placeholders' => [ + 'migrating_vm.name' => [ + 'getters' => [ + 'getMigratingVm', + 'getName', + ], + ], + ], + ], + 'UpdateSource' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{source.name=projects/*/locations/*/sources/*}', + 'body' => 'source', + 'placeholders' => [ + 'source.name' => [ + 'getters' => [ + 'getSource', + 'getName', + ], + ], + ], + ], + 'UpdateTargetProject' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{target_project.name=projects/*/locations/*/targetProjects/*}', + 'body' => 'target_project', + 'placeholders' => [ + 'target_project.name' => [ + 'getters' => [ + 'getTargetProject', + 'getName', + ], + ], + ], + ], + 'UpgradeAppliance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{datacenter_connector=projects/*/locations/*/sources/*/datacenterConnectors/*}:upgradeAppliance', + 'body' => '*', + 'placeholders' => [ + 'datacenter_connector' => [ + 'getters' => [ + 'getDatacenterConnector', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/VmMigration/v1/tests/Unit/V1/Client/VmMigrationClientTest.php b/owl-bot-staging/VmMigration/v1/tests/Unit/V1/Client/VmMigrationClientTest.php new file mode 100644 index 000000000000..ec429bc784e9 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/tests/Unit/V1/Client/VmMigrationClientTest.php @@ -0,0 +1,5156 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return VmMigrationClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new VmMigrationClient($options); + } + + /** @test */ + public function addGroupMigrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/addGroupMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AddGroupMigrationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/addGroupMigrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $request = (new AddGroupMigrationRequest()) + ->setGroup($formattedGroup); + $response = $gapicClient->addGroupMigration($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/AddGroupMigration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGroup(); + $this->assertProtobufEquals($formattedGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/addGroupMigrationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function addGroupMigrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/addGroupMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $request = (new AddGroupMigrationRequest()) + ->setGroup($formattedGroup); + $response = $gapicClient->addGroupMigration($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/addGroupMigrationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cancelCloneJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelCloneJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new CancelCloneJobResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/cancelCloneJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); + $request = (new CancelCloneJobRequest()) + ->setName($formattedName); + $response = $gapicClient->cancelCloneJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CancelCloneJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelCloneJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cancelCloneJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelCloneJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); + $request = (new CancelCloneJobRequest()) + ->setName($formattedName); + $response = $gapicClient->cancelCloneJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelCloneJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cancelCutoverJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelCutoverJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new CancelCutoverJobResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/cancelCutoverJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); + $request = (new CancelCutoverJobRequest()) + ->setName($formattedName); + $response = $gapicClient->cancelCutoverJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CancelCutoverJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelCutoverJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cancelCutoverJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelCutoverJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); + $request = (new CancelCutoverJobRequest()) + ->setName($formattedName); + $response = $gapicClient->cancelCutoverJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelCutoverJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createCloneJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCloneJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new CloneJob(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createCloneJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $cloneJobId = 'cloneJobId-1008685569'; + $cloneJob = new CloneJob(); + $request = (new CreateCloneJobRequest()) + ->setParent($formattedParent) + ->setCloneJobId($cloneJobId) + ->setCloneJob($cloneJob); + $response = $gapicClient->createCloneJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateCloneJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getCloneJobId(); + $this->assertProtobufEquals($cloneJobId, $actualValue); + $actualValue = $actualApiRequestObject->getCloneJob(); + $this->assertProtobufEquals($cloneJob, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCloneJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createCloneJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCloneJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $cloneJobId = 'cloneJobId-1008685569'; + $cloneJob = new CloneJob(); + $request = (new CreateCloneJobRequest()) + ->setParent($formattedParent) + ->setCloneJobId($cloneJobId) + ->setCloneJob($cloneJob); + $response = $gapicClient->createCloneJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCloneJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createCutoverJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCutoverJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $progressPercent = 2137894861; + $stateMessage = 'stateMessage29641305'; + $expectedResponse = new CutoverJob(); + $expectedResponse->setName($name); + $expectedResponse->setProgressPercent($progressPercent); + $expectedResponse->setStateMessage($stateMessage); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createCutoverJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $cutoverJobId = 'cutoverJobId504048422'; + $cutoverJob = new CutoverJob(); + $request = (new CreateCutoverJobRequest()) + ->setParent($formattedParent) + ->setCutoverJobId($cutoverJobId) + ->setCutoverJob($cutoverJob); + $response = $gapicClient->createCutoverJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateCutoverJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getCutoverJobId(); + $this->assertProtobufEquals($cutoverJobId, $actualValue); + $actualValue = $actualApiRequestObject->getCutoverJob(); + $this->assertProtobufEquals($cutoverJob, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCutoverJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createCutoverJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCutoverJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $cutoverJobId = 'cutoverJobId504048422'; + $cutoverJob = new CutoverJob(); + $request = (new CreateCutoverJobRequest()) + ->setParent($formattedParent) + ->setCutoverJobId($cutoverJobId) + ->setCutoverJob($cutoverJob); + $response = $gapicClient->createCutoverJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCutoverJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createDatacenterConnectorTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createDatacenterConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $registrationId = 'registrationId-412573087'; + $serviceAccount = 'serviceAccount-1948028253'; + $version = 'version351608024'; + $bucket = 'bucket-1378203158'; + $applianceInfrastructureVersion = 'applianceInfrastructureVersion662625550'; + $applianceSoftwareVersion = 'applianceSoftwareVersion-641402222'; + $expectedResponse = new DatacenterConnector(); + $expectedResponse->setName($name); + $expectedResponse->setRegistrationId($registrationId); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setVersion($version); + $expectedResponse->setBucket($bucket); + $expectedResponse->setApplianceInfrastructureVersion($applianceInfrastructureVersion); + $expectedResponse->setApplianceSoftwareVersion($applianceSoftwareVersion); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createDatacenterConnectorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $datacenterConnectorId = 'datacenterConnectorId1629428237'; + $datacenterConnector = new DatacenterConnector(); + $request = (new CreateDatacenterConnectorRequest()) + ->setParent($formattedParent) + ->setDatacenterConnectorId($datacenterConnectorId) + ->setDatacenterConnector($datacenterConnector); + $response = $gapicClient->createDatacenterConnector($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateDatacenterConnector', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDatacenterConnectorId(); + $this->assertProtobufEquals($datacenterConnectorId, $actualValue); + $actualValue = $actualApiRequestObject->getDatacenterConnector(); + $this->assertProtobufEquals($datacenterConnector, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDatacenterConnectorTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createDatacenterConnectorExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createDatacenterConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $datacenterConnectorId = 'datacenterConnectorId1629428237'; + $datacenterConnector = new DatacenterConnector(); + $request = (new CreateDatacenterConnectorRequest()) + ->setParent($formattedParent) + ->setDatacenterConnectorId($datacenterConnectorId) + ->setDatacenterConnector($datacenterConnector); + $response = $gapicClient->createDatacenterConnector($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDatacenterConnectorTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Group(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $groupId = 'groupId506361563'; + $group = new Group(); + $request = (new CreateGroupRequest()) + ->setParent($formattedParent) + ->setGroupId($groupId) + ->setGroup($group); + $response = $gapicClient->createGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getGroupId(); + $this->assertProtobufEquals($groupId, $actualValue); + $actualValue = $actualApiRequestObject->getGroup(); + $this->assertProtobufEquals($group, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $groupId = 'groupId506361563'; + $group = new Group(); + $request = (new CreateGroupRequest()) + ->setParent($formattedParent) + ->setGroupId($groupId) + ->setGroup($group); + $response = $gapicClient->createGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createMigratingVmTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMigratingVmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $sourceVmId = 'sourceVmId1673059967'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $group = 'group98629247'; + $expectedResponse = new MigratingVm(); + $expectedResponse->setName($name); + $expectedResponse->setSourceVmId($sourceVmId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setGroup($group); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createMigratingVmTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $migratingVmId = 'migratingVmId-899085236'; + $migratingVm = new MigratingVm(); + $request = (new CreateMigratingVmRequest()) + ->setParent($formattedParent) + ->setMigratingVmId($migratingVmId) + ->setMigratingVm($migratingVm); + $response = $gapicClient->createMigratingVm($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateMigratingVm', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getMigratingVmId(); + $this->assertProtobufEquals($migratingVmId, $actualValue); + $actualValue = $actualApiRequestObject->getMigratingVm(); + $this->assertProtobufEquals($migratingVm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMigratingVmTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createMigratingVmExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMigratingVmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $migratingVmId = 'migratingVmId-899085236'; + $migratingVm = new MigratingVm(); + $request = (new CreateMigratingVmRequest()) + ->setParent($formattedParent) + ->setMigratingVmId($migratingVmId) + ->setMigratingVm($migratingVm); + $response = $gapicClient->createMigratingVm($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMigratingVmTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSourceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new Source(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createSourceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $sourceId = 'sourceId-1698410561'; + $source = new Source(); + $request = (new CreateSourceRequest()) + ->setParent($formattedParent) + ->setSourceId($sourceId) + ->setSource($source); + $response = $gapicClient->createSource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateSource', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSourceId(); + $this->assertProtobufEquals($sourceId, $actualValue); + $actualValue = $actualApiRequestObject->getSource(); + $this->assertProtobufEquals($source, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSourceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSourceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $sourceId = 'sourceId-1698410561'; + $source = new Source(); + $request = (new CreateSourceRequest()) + ->setParent($formattedParent) + ->setSourceId($sourceId) + ->setSource($source); + $response = $gapicClient->createSource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSourceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createTargetProjectTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createTargetProjectTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $project = 'project-309310695'; + $description = 'description-1724546052'; + $expectedResponse = new TargetProject(); + $expectedResponse->setName($name); + $expectedResponse->setProject($project); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createTargetProjectTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $targetProjectId = 'targetProjectId1255314287'; + $targetProject = new TargetProject(); + $request = (new CreateTargetProjectRequest()) + ->setParent($formattedParent) + ->setTargetProjectId($targetProjectId) + ->setTargetProject($targetProject); + $response = $gapicClient->createTargetProject($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateTargetProject', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getTargetProjectId(); + $this->assertProtobufEquals($targetProjectId, $actualValue); + $actualValue = $actualApiRequestObject->getTargetProject(); + $this->assertProtobufEquals($targetProject, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTargetProjectTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createTargetProjectExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createTargetProjectTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $targetProjectId = 'targetProjectId1255314287'; + $targetProject = new TargetProject(); + $request = (new CreateTargetProjectRequest()) + ->setParent($formattedParent) + ->setTargetProjectId($targetProjectId) + ->setTargetProject($targetProject); + $response = $gapicClient->createTargetProject($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTargetProjectTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createUtilizationReportTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createUtilizationReportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $vmCount = 261463431; + $expectedResponse = new UtilizationReport(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setVmCount($vmCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createUtilizationReportTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $utilizationReport = new UtilizationReport(); + $utilizationReportId = 'utilizationReportId-1346894295'; + $request = (new CreateUtilizationReportRequest()) + ->setParent($formattedParent) + ->setUtilizationReport($utilizationReport) + ->setUtilizationReportId($utilizationReportId); + $response = $gapicClient->createUtilizationReport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateUtilizationReport', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getUtilizationReport(); + $this->assertProtobufEquals($utilizationReport, $actualValue); + $actualValue = $actualApiRequestObject->getUtilizationReportId(); + $this->assertProtobufEquals($utilizationReportId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createUtilizationReportTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createUtilizationReportExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createUtilizationReportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $utilizationReport = new UtilizationReport(); + $utilizationReportId = 'utilizationReportId-1346894295'; + $request = (new CreateUtilizationReportRequest()) + ->setParent($formattedParent) + ->setUtilizationReport($utilizationReport) + ->setUtilizationReportId($utilizationReportId); + $response = $gapicClient->createUtilizationReport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createUtilizationReportTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteDatacenterConnectorTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteDatacenterConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteDatacenterConnectorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); + $request = (new DeleteDatacenterConnectorRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDatacenterConnector($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteDatacenterConnector', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDatacenterConnectorTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteDatacenterConnectorExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteDatacenterConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); + $request = (new DeleteDatacenterConnectorRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDatacenterConnector($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDatacenterConnectorTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $request = (new DeleteGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $request = (new DeleteGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMigratingVmTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMigratingVmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteMigratingVmTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new DeleteMigratingVmRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteMigratingVm($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteMigratingVm', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMigratingVmTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMigratingVmExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMigratingVmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new DeleteMigratingVmRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteMigratingVm($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMigratingVmTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSourceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteSourceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $request = (new DeleteSourceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteSource', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSourceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSourceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $request = (new DeleteSourceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSourceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteTargetProjectTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteTargetProjectTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteTargetProjectTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); + $request = (new DeleteTargetProjectRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteTargetProject($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteTargetProject', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteTargetProjectTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteTargetProjectExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteTargetProjectTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); + $request = (new DeleteTargetProjectRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteTargetProject($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteTargetProjectTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteUtilizationReportTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteUtilizationReportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteUtilizationReportTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); + $request = (new DeleteUtilizationReportRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteUtilizationReport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteUtilizationReport', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteUtilizationReportTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteUtilizationReportExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteUtilizationReportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); + $request = (new DeleteUtilizationReportRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteUtilizationReport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteUtilizationReportTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function fetchInventoryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new FetchInventoryResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $request = (new FetchInventoryRequest()) + ->setSource($formattedSource); + $response = $gapicClient->fetchInventory($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/FetchInventory', $actualFuncCall); + $actualValue = $actualRequestObject->getSource(); + $this->assertProtobufEquals($formattedSource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function fetchInventoryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $request = (new FetchInventoryRequest()) + ->setSource($formattedSource); + try { + $gapicClient->fetchInventory($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function finalizeMigrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/finalizeMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new FinalizeMigrationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/finalizeMigrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new FinalizeMigrationRequest()) + ->setMigratingVm($formattedMigratingVm); + $response = $gapicClient->finalizeMigration($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/FinalizeMigration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMigratingVm(); + $this->assertProtobufEquals($formattedMigratingVm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/finalizeMigrationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function finalizeMigrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/finalizeMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new FinalizeMigrationRequest()) + ->setMigratingVm($formattedMigratingVm); + $response = $gapicClient->finalizeMigration($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/finalizeMigrationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getCloneJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new CloneJob(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); + $request = (new GetCloneJobRequest()) + ->setName($formattedName); + $response = $gapicClient->getCloneJob($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetCloneJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCloneJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); + $request = (new GetCloneJobRequest()) + ->setName($formattedName); + try { + $gapicClient->getCloneJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCutoverJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $progressPercent = 2137894861; + $stateMessage = 'stateMessage29641305'; + $expectedResponse = new CutoverJob(); + $expectedResponse->setName($name2); + $expectedResponse->setProgressPercent($progressPercent); + $expectedResponse->setStateMessage($stateMessage); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); + $request = (new GetCutoverJobRequest()) + ->setName($formattedName); + $response = $gapicClient->getCutoverJob($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetCutoverJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCutoverJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); + $request = (new GetCutoverJobRequest()) + ->setName($formattedName); + try { + $gapicClient->getCutoverJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDatacenterConnectorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $registrationId = 'registrationId-412573087'; + $serviceAccount = 'serviceAccount-1948028253'; + $version = 'version351608024'; + $bucket = 'bucket-1378203158'; + $applianceInfrastructureVersion = 'applianceInfrastructureVersion662625550'; + $applianceSoftwareVersion = 'applianceSoftwareVersion-641402222'; + $expectedResponse = new DatacenterConnector(); + $expectedResponse->setName($name2); + $expectedResponse->setRegistrationId($registrationId); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setVersion($version); + $expectedResponse->setBucket($bucket); + $expectedResponse->setApplianceInfrastructureVersion($applianceInfrastructureVersion); + $expectedResponse->setApplianceSoftwareVersion($applianceSoftwareVersion); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); + $request = (new GetDatacenterConnectorRequest()) + ->setName($formattedName); + $response = $gapicClient->getDatacenterConnector($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetDatacenterConnector', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDatacenterConnectorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); + $request = (new GetDatacenterConnectorRequest()) + ->setName($formattedName); + try { + $gapicClient->getDatacenterConnector($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Group(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $request = (new GetGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->getGroup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $request = (new GetGroupRequest()) + ->setName($formattedName); + try { + $gapicClient->getGroup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMigratingVmTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $sourceVmId = 'sourceVmId1673059967'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $group = 'group98629247'; + $expectedResponse = new MigratingVm(); + $expectedResponse->setName($name2); + $expectedResponse->setSourceVmId($sourceVmId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setGroup($group); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new GetMigratingVmRequest()) + ->setName($formattedName); + $response = $gapicClient->getMigratingVm($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetMigratingVm', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMigratingVmExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new GetMigratingVmRequest()) + ->setName($formattedName); + try { + $gapicClient->getMigratingVm($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReplicationCycleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $cycleNumber = 1095724862; + $progressPercent = 2137894861; + $expectedResponse = new ReplicationCycle(); + $expectedResponse->setName($name2); + $expectedResponse->setCycleNumber($cycleNumber); + $expectedResponse->setProgressPercent($progressPercent); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->replicationCycleName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[REPLICATION_CYCLE]'); + $request = (new GetReplicationCycleRequest()) + ->setName($formattedName); + $response = $gapicClient->getReplicationCycle($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetReplicationCycle', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReplicationCycleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->replicationCycleName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[REPLICATION_CYCLE]'); + $request = (new GetReplicationCycleRequest()) + ->setName($formattedName); + try { + $gapicClient->getReplicationCycle($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSourceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new Source(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $request = (new GetSourceRequest()) + ->setName($formattedName); + $response = $gapicClient->getSource($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetSource', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSourceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $request = (new GetSourceRequest()) + ->setName($formattedName); + try { + $gapicClient->getSource($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTargetProjectTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $project = 'project-309310695'; + $description = 'description-1724546052'; + $expectedResponse = new TargetProject(); + $expectedResponse->setName($name2); + $expectedResponse->setProject($project); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); + $request = (new GetTargetProjectRequest()) + ->setName($formattedName); + $response = $gapicClient->getTargetProject($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetTargetProject', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTargetProjectExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); + $request = (new GetTargetProjectRequest()) + ->setName($formattedName); + try { + $gapicClient->getTargetProject($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUtilizationReportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $vmCount = 261463431; + $expectedResponse = new UtilizationReport(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setVmCount($vmCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); + $request = (new GetUtilizationReportRequest()) + ->setName($formattedName); + $response = $gapicClient->getUtilizationReport($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetUtilizationReport', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUtilizationReportExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); + $request = (new GetUtilizationReportRequest()) + ->setName($formattedName); + try { + $gapicClient->getUtilizationReport($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCloneJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $cloneJobsElement = new CloneJob(); + $cloneJobs = [ + $cloneJobsElement, + ]; + $expectedResponse = new ListCloneJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCloneJobs($cloneJobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListCloneJobsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + $response = $gapicClient->listCloneJobs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCloneJobs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListCloneJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCloneJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListCloneJobsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + try { + $gapicClient->listCloneJobs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCutoverJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $cutoverJobsElement = new CutoverJob(); + $cutoverJobs = [ + $cutoverJobsElement, + ]; + $expectedResponse = new ListCutoverJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCutoverJobs($cutoverJobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListCutoverJobsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + $response = $gapicClient->listCutoverJobs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCutoverJobs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListCutoverJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCutoverJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListCutoverJobsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + try { + $gapicClient->listCutoverJobs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDatacenterConnectorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $datacenterConnectorsElement = new DatacenterConnector(); + $datacenterConnectors = [ + $datacenterConnectorsElement, + ]; + $expectedResponse = new ListDatacenterConnectorsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDatacenterConnectors($datacenterConnectors); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListDatacenterConnectorsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + $response = $gapicClient->listDatacenterConnectors($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDatacenterConnectors()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListDatacenterConnectors', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDatacenterConnectorsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListDatacenterConnectorsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + try { + $gapicClient->listDatacenterConnectors($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGroupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $groupsElement = new Group(); + $groups = [ + $groupsElement, + ]; + $expectedResponse = new ListGroupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setGroups($groups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListGroupsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + $response = $gapicClient->listGroups($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGroups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListGroups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGroupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListGroupsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + try { + $gapicClient->listGroups($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMigratingVmsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $migratingVmsElement = new MigratingVm(); + $migratingVms = [ + $migratingVmsElement, + ]; + $expectedResponse = new ListMigratingVmsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMigratingVms($migratingVms); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListMigratingVmsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + $response = $gapicClient->listMigratingVms($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMigratingVms()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListMigratingVms', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMigratingVmsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListMigratingVmsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + try { + $gapicClient->listMigratingVms($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReplicationCyclesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $replicationCyclesElement = new ReplicationCycle(); + $replicationCycles = [ + $replicationCyclesElement, + ]; + $expectedResponse = new ListReplicationCyclesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setReplicationCycles($replicationCycles); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListReplicationCyclesRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + $response = $gapicClient->listReplicationCycles($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getReplicationCycles()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListReplicationCycles', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReplicationCyclesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListReplicationCyclesRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + try { + $gapicClient->listReplicationCycles($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSourcesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $sourcesElement = new Source(); + $sources = [ + $sourcesElement, + ]; + $expectedResponse = new ListSourcesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSources($sources); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListSourcesRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + $response = $gapicClient->listSources($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSources()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListSources', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSourcesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListSourcesRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + try { + $gapicClient->listSources($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTargetProjectsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $targetProjectsElement = new TargetProject(); + $targetProjects = [ + $targetProjectsElement, + ]; + $expectedResponse = new ListTargetProjectsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTargetProjects($targetProjects); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListTargetProjectsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + $response = $gapicClient->listTargetProjects($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTargetProjects()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListTargetProjects', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTargetProjectsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListTargetProjectsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + try { + $gapicClient->listTargetProjects($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUtilizationReportsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $utilizationReportsElement = new UtilizationReport(); + $utilizationReports = [ + $utilizationReportsElement, + ]; + $expectedResponse = new ListUtilizationReportsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setUtilizationReports($utilizationReports); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListUtilizationReportsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + $response = $gapicClient->listUtilizationReports($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getUtilizationReports()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListUtilizationReports', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUtilizationReportsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListUtilizationReportsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + try { + $gapicClient->listUtilizationReports($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function pauseMigrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/pauseMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new PauseMigrationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/pauseMigrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new PauseMigrationRequest()) + ->setMigratingVm($formattedMigratingVm); + $response = $gapicClient->pauseMigration($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/PauseMigration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMigratingVm(); + $this->assertProtobufEquals($formattedMigratingVm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/pauseMigrationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function pauseMigrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/pauseMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new PauseMigrationRequest()) + ->setMigratingVm($formattedMigratingVm); + $response = $gapicClient->pauseMigration($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/pauseMigrationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function removeGroupMigrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/removeGroupMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new RemoveGroupMigrationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/removeGroupMigrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $request = (new RemoveGroupMigrationRequest()) + ->setGroup($formattedGroup); + $response = $gapicClient->removeGroupMigration($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/RemoveGroupMigration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGroup(); + $this->assertProtobufEquals($formattedGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/removeGroupMigrationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function removeGroupMigrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/removeGroupMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $request = (new RemoveGroupMigrationRequest()) + ->setGroup($formattedGroup); + $response = $gapicClient->removeGroupMigration($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/removeGroupMigrationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resumeMigrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resumeMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ResumeMigrationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/resumeMigrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new ResumeMigrationRequest()) + ->setMigratingVm($formattedMigratingVm); + $response = $gapicClient->resumeMigration($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ResumeMigration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMigratingVm(); + $this->assertProtobufEquals($formattedMigratingVm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resumeMigrationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resumeMigrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resumeMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new ResumeMigrationRequest()) + ->setMigratingVm($formattedMigratingVm); + $response = $gapicClient->resumeMigration($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resumeMigrationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function startMigrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new StartMigrationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/startMigrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new StartMigrationRequest()) + ->setMigratingVm($formattedMigratingVm); + $response = $gapicClient->startMigration($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/StartMigration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMigratingVm(); + $this->assertProtobufEquals($formattedMigratingVm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startMigrationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function startMigrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new StartMigrationRequest()) + ->setMigratingVm($formattedMigratingVm); + $response = $gapicClient->startMigration($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startMigrationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Group(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $group = new Group(); + $request = (new UpdateGroupRequest()) + ->setGroup($group); + $response = $gapicClient->updateGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/UpdateGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGroup(); + $this->assertProtobufEquals($group, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $group = new Group(); + $request = (new UpdateGroupRequest()) + ->setGroup($group); + $response = $gapicClient->updateGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateMigratingVmTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMigratingVmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $sourceVmId = 'sourceVmId1673059967'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $group = 'group98629247'; + $expectedResponse = new MigratingVm(); + $expectedResponse->setName($name); + $expectedResponse->setSourceVmId($sourceVmId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setGroup($group); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateMigratingVmTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $migratingVm = new MigratingVm(); + $request = (new UpdateMigratingVmRequest()) + ->setMigratingVm($migratingVm); + $response = $gapicClient->updateMigratingVm($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/UpdateMigratingVm', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMigratingVm(); + $this->assertProtobufEquals($migratingVm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMigratingVmTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateMigratingVmExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMigratingVmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $migratingVm = new MigratingVm(); + $request = (new UpdateMigratingVmRequest()) + ->setMigratingVm($migratingVm); + $response = $gapicClient->updateMigratingVm($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMigratingVmTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSourceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new Source(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateSourceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $source = new Source(); + $request = (new UpdateSourceRequest()) + ->setSource($source); + $response = $gapicClient->updateSource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/UpdateSource', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getSource(); + $this->assertProtobufEquals($source, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSourceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSourceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $source = new Source(); + $request = (new UpdateSourceRequest()) + ->setSource($source); + $response = $gapicClient->updateSource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSourceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateTargetProjectTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateTargetProjectTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $project = 'project-309310695'; + $description = 'description-1724546052'; + $expectedResponse = new TargetProject(); + $expectedResponse->setName($name); + $expectedResponse->setProject($project); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateTargetProjectTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $targetProject = new TargetProject(); + $request = (new UpdateTargetProjectRequest()) + ->setTargetProject($targetProject); + $response = $gapicClient->updateTargetProject($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/UpdateTargetProject', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getTargetProject(); + $this->assertProtobufEquals($targetProject, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateTargetProjectTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateTargetProjectExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateTargetProjectTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $targetProject = new TargetProject(); + $request = (new UpdateTargetProjectRequest()) + ->setTargetProject($targetProject); + $response = $gapicClient->updateTargetProject($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateTargetProjectTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function upgradeApplianceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/upgradeApplianceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new UpgradeApplianceResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/upgradeApplianceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedDatacenterConnector = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); + $request = (new UpgradeApplianceRequest()) + ->setDatacenterConnector($formattedDatacenterConnector); + $response = $gapicClient->upgradeAppliance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/UpgradeAppliance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getDatacenterConnector(); + $this->assertProtobufEquals($formattedDatacenterConnector, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/upgradeApplianceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function upgradeApplianceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/upgradeApplianceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedDatacenterConnector = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); + $request = (new UpgradeApplianceRequest()) + ->setDatacenterConnector($formattedDatacenterConnector); + $response = $gapicClient->upgradeAppliance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/upgradeApplianceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function addGroupMigrationAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/addGroupMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AddGroupMigrationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/addGroupMigrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $request = (new AddGroupMigrationRequest()) + ->setGroup($formattedGroup); + $response = $gapicClient->addGroupMigrationAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/AddGroupMigration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGroup(); + $this->assertProtobufEquals($formattedGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/addGroupMigrationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/VmMigration/v1/tests/Unit/V1/VmMigrationClientTest.php b/owl-bot-staging/VmMigration/v1/tests/Unit/V1/VmMigrationClientTest.php new file mode 100644 index 000000000000..0a0298c7e3c3 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/tests/Unit/V1/VmMigrationClientTest.php @@ -0,0 +1,4806 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return VmMigrationClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new VmMigrationClient($options); + } + + /** @test */ + public function addGroupMigrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/addGroupMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AddGroupMigrationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/addGroupMigrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $response = $gapicClient->addGroupMigration($formattedGroup); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/AddGroupMigration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGroup(); + $this->assertProtobufEquals($formattedGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/addGroupMigrationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function addGroupMigrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/addGroupMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $response = $gapicClient->addGroupMigration($formattedGroup); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/addGroupMigrationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cancelCloneJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelCloneJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new CancelCloneJobResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/cancelCloneJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); + $response = $gapicClient->cancelCloneJob($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CancelCloneJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelCloneJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cancelCloneJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelCloneJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); + $response = $gapicClient->cancelCloneJob($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelCloneJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cancelCutoverJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelCutoverJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new CancelCutoverJobResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/cancelCutoverJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); + $response = $gapicClient->cancelCutoverJob($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CancelCutoverJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelCutoverJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cancelCutoverJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelCutoverJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); + $response = $gapicClient->cancelCutoverJob($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelCutoverJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createCloneJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCloneJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new CloneJob(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createCloneJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $cloneJobId = 'cloneJobId-1008685569'; + $cloneJob = new CloneJob(); + $response = $gapicClient->createCloneJob($formattedParent, $cloneJobId, $cloneJob); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateCloneJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getCloneJobId(); + $this->assertProtobufEquals($cloneJobId, $actualValue); + $actualValue = $actualApiRequestObject->getCloneJob(); + $this->assertProtobufEquals($cloneJob, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCloneJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createCloneJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCloneJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $cloneJobId = 'cloneJobId-1008685569'; + $cloneJob = new CloneJob(); + $response = $gapicClient->createCloneJob($formattedParent, $cloneJobId, $cloneJob); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCloneJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createCutoverJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCutoverJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $progressPercent = 2137894861; + $stateMessage = 'stateMessage29641305'; + $expectedResponse = new CutoverJob(); + $expectedResponse->setName($name); + $expectedResponse->setProgressPercent($progressPercent); + $expectedResponse->setStateMessage($stateMessage); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createCutoverJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $cutoverJobId = 'cutoverJobId504048422'; + $cutoverJob = new CutoverJob(); + $response = $gapicClient->createCutoverJob($formattedParent, $cutoverJobId, $cutoverJob); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateCutoverJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getCutoverJobId(); + $this->assertProtobufEquals($cutoverJobId, $actualValue); + $actualValue = $actualApiRequestObject->getCutoverJob(); + $this->assertProtobufEquals($cutoverJob, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCutoverJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createCutoverJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCutoverJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $cutoverJobId = 'cutoverJobId504048422'; + $cutoverJob = new CutoverJob(); + $response = $gapicClient->createCutoverJob($formattedParent, $cutoverJobId, $cutoverJob); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCutoverJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createDatacenterConnectorTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createDatacenterConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $registrationId = 'registrationId-412573087'; + $serviceAccount = 'serviceAccount-1948028253'; + $version = 'version351608024'; + $bucket = 'bucket-1378203158'; + $applianceInfrastructureVersion = 'applianceInfrastructureVersion662625550'; + $applianceSoftwareVersion = 'applianceSoftwareVersion-641402222'; + $expectedResponse = new DatacenterConnector(); + $expectedResponse->setName($name); + $expectedResponse->setRegistrationId($registrationId); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setVersion($version); + $expectedResponse->setBucket($bucket); + $expectedResponse->setApplianceInfrastructureVersion($applianceInfrastructureVersion); + $expectedResponse->setApplianceSoftwareVersion($applianceSoftwareVersion); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createDatacenterConnectorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $datacenterConnectorId = 'datacenterConnectorId1629428237'; + $datacenterConnector = new DatacenterConnector(); + $response = $gapicClient->createDatacenterConnector($formattedParent, $datacenterConnectorId, $datacenterConnector); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateDatacenterConnector', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDatacenterConnectorId(); + $this->assertProtobufEquals($datacenterConnectorId, $actualValue); + $actualValue = $actualApiRequestObject->getDatacenterConnector(); + $this->assertProtobufEquals($datacenterConnector, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDatacenterConnectorTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createDatacenterConnectorExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createDatacenterConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $datacenterConnectorId = 'datacenterConnectorId1629428237'; + $datacenterConnector = new DatacenterConnector(); + $response = $gapicClient->createDatacenterConnector($formattedParent, $datacenterConnectorId, $datacenterConnector); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDatacenterConnectorTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Group(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $groupId = 'groupId506361563'; + $group = new Group(); + $response = $gapicClient->createGroup($formattedParent, $groupId, $group); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getGroupId(); + $this->assertProtobufEquals($groupId, $actualValue); + $actualValue = $actualApiRequestObject->getGroup(); + $this->assertProtobufEquals($group, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $groupId = 'groupId506361563'; + $group = new Group(); + $response = $gapicClient->createGroup($formattedParent, $groupId, $group); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createMigratingVmTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMigratingVmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $sourceVmId = 'sourceVmId1673059967'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $group = 'group98629247'; + $expectedResponse = new MigratingVm(); + $expectedResponse->setName($name); + $expectedResponse->setSourceVmId($sourceVmId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setGroup($group); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createMigratingVmTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $migratingVmId = 'migratingVmId-899085236'; + $migratingVm = new MigratingVm(); + $response = $gapicClient->createMigratingVm($formattedParent, $migratingVmId, $migratingVm); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateMigratingVm', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getMigratingVmId(); + $this->assertProtobufEquals($migratingVmId, $actualValue); + $actualValue = $actualApiRequestObject->getMigratingVm(); + $this->assertProtobufEquals($migratingVm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMigratingVmTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createMigratingVmExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMigratingVmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $migratingVmId = 'migratingVmId-899085236'; + $migratingVm = new MigratingVm(); + $response = $gapicClient->createMigratingVm($formattedParent, $migratingVmId, $migratingVm); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMigratingVmTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSourceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new Source(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createSourceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $sourceId = 'sourceId-1698410561'; + $source = new Source(); + $response = $gapicClient->createSource($formattedParent, $sourceId, $source); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateSource', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSourceId(); + $this->assertProtobufEquals($sourceId, $actualValue); + $actualValue = $actualApiRequestObject->getSource(); + $this->assertProtobufEquals($source, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSourceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSourceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $sourceId = 'sourceId-1698410561'; + $source = new Source(); + $response = $gapicClient->createSource($formattedParent, $sourceId, $source); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSourceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createTargetProjectTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createTargetProjectTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $project = 'project-309310695'; + $description = 'description-1724546052'; + $expectedResponse = new TargetProject(); + $expectedResponse->setName($name); + $expectedResponse->setProject($project); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createTargetProjectTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $targetProjectId = 'targetProjectId1255314287'; + $targetProject = new TargetProject(); + $response = $gapicClient->createTargetProject($formattedParent, $targetProjectId, $targetProject); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateTargetProject', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getTargetProjectId(); + $this->assertProtobufEquals($targetProjectId, $actualValue); + $actualValue = $actualApiRequestObject->getTargetProject(); + $this->assertProtobufEquals($targetProject, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTargetProjectTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createTargetProjectExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createTargetProjectTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $targetProjectId = 'targetProjectId1255314287'; + $targetProject = new TargetProject(); + $response = $gapicClient->createTargetProject($formattedParent, $targetProjectId, $targetProject); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTargetProjectTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createUtilizationReportTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createUtilizationReportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $vmCount = 261463431; + $expectedResponse = new UtilizationReport(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setVmCount($vmCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createUtilizationReportTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $utilizationReport = new UtilizationReport(); + $utilizationReportId = 'utilizationReportId-1346894295'; + $response = $gapicClient->createUtilizationReport($formattedParent, $utilizationReport, $utilizationReportId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateUtilizationReport', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getUtilizationReport(); + $this->assertProtobufEquals($utilizationReport, $actualValue); + $actualValue = $actualApiRequestObject->getUtilizationReportId(); + $this->assertProtobufEquals($utilizationReportId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createUtilizationReportTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createUtilizationReportExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createUtilizationReportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $utilizationReport = new UtilizationReport(); + $utilizationReportId = 'utilizationReportId-1346894295'; + $response = $gapicClient->createUtilizationReport($formattedParent, $utilizationReport, $utilizationReportId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createUtilizationReportTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteDatacenterConnectorTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteDatacenterConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteDatacenterConnectorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); + $response = $gapicClient->deleteDatacenterConnector($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteDatacenterConnector', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDatacenterConnectorTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteDatacenterConnectorExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteDatacenterConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); + $response = $gapicClient->deleteDatacenterConnector($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDatacenterConnectorTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $response = $gapicClient->deleteGroup($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $response = $gapicClient->deleteGroup($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMigratingVmTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMigratingVmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteMigratingVmTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $response = $gapicClient->deleteMigratingVm($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteMigratingVm', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMigratingVmTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMigratingVmExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMigratingVmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $response = $gapicClient->deleteMigratingVm($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMigratingVmTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSourceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteSourceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $response = $gapicClient->deleteSource($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteSource', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSourceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSourceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $response = $gapicClient->deleteSource($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSourceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteTargetProjectTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteTargetProjectTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteTargetProjectTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); + $response = $gapicClient->deleteTargetProject($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteTargetProject', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteTargetProjectTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteTargetProjectExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteTargetProjectTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); + $response = $gapicClient->deleteTargetProject($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteTargetProjectTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteUtilizationReportTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteUtilizationReportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteUtilizationReportTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); + $response = $gapicClient->deleteUtilizationReport($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteUtilizationReport', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteUtilizationReportTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteUtilizationReportExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteUtilizationReportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); + $response = $gapicClient->deleteUtilizationReport($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteUtilizationReportTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function fetchInventoryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new FetchInventoryResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $response = $gapicClient->fetchInventory($formattedSource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/FetchInventory', $actualFuncCall); + $actualValue = $actualRequestObject->getSource(); + $this->assertProtobufEquals($formattedSource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function fetchInventoryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + try { + $gapicClient->fetchInventory($formattedSource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function finalizeMigrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/finalizeMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new FinalizeMigrationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/finalizeMigrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $response = $gapicClient->finalizeMigration($formattedMigratingVm); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/FinalizeMigration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMigratingVm(); + $this->assertProtobufEquals($formattedMigratingVm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/finalizeMigrationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function finalizeMigrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/finalizeMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $response = $gapicClient->finalizeMigration($formattedMigratingVm); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/finalizeMigrationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getCloneJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new CloneJob(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); + $response = $gapicClient->getCloneJob($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetCloneJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCloneJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); + try { + $gapicClient->getCloneJob($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCutoverJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $progressPercent = 2137894861; + $stateMessage = 'stateMessage29641305'; + $expectedResponse = new CutoverJob(); + $expectedResponse->setName($name2); + $expectedResponse->setProgressPercent($progressPercent); + $expectedResponse->setStateMessage($stateMessage); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); + $response = $gapicClient->getCutoverJob($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetCutoverJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCutoverJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); + try { + $gapicClient->getCutoverJob($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDatacenterConnectorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $registrationId = 'registrationId-412573087'; + $serviceAccount = 'serviceAccount-1948028253'; + $version = 'version351608024'; + $bucket = 'bucket-1378203158'; + $applianceInfrastructureVersion = 'applianceInfrastructureVersion662625550'; + $applianceSoftwareVersion = 'applianceSoftwareVersion-641402222'; + $expectedResponse = new DatacenterConnector(); + $expectedResponse->setName($name2); + $expectedResponse->setRegistrationId($registrationId); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setVersion($version); + $expectedResponse->setBucket($bucket); + $expectedResponse->setApplianceInfrastructureVersion($applianceInfrastructureVersion); + $expectedResponse->setApplianceSoftwareVersion($applianceSoftwareVersion); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); + $response = $gapicClient->getDatacenterConnector($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetDatacenterConnector', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDatacenterConnectorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); + try { + $gapicClient->getDatacenterConnector($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Group(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $response = $gapicClient->getGroup($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + try { + $gapicClient->getGroup($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMigratingVmTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $sourceVmId = 'sourceVmId1673059967'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $group = 'group98629247'; + $expectedResponse = new MigratingVm(); + $expectedResponse->setName($name2); + $expectedResponse->setSourceVmId($sourceVmId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setGroup($group); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $response = $gapicClient->getMigratingVm($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetMigratingVm', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMigratingVmExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + try { + $gapicClient->getMigratingVm($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReplicationCycleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $cycleNumber = 1095724862; + $progressPercent = 2137894861; + $expectedResponse = new ReplicationCycle(); + $expectedResponse->setName($name2); + $expectedResponse->setCycleNumber($cycleNumber); + $expectedResponse->setProgressPercent($progressPercent); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->replicationCycleName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[REPLICATION_CYCLE]'); + $response = $gapicClient->getReplicationCycle($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetReplicationCycle', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReplicationCycleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->replicationCycleName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[REPLICATION_CYCLE]'); + try { + $gapicClient->getReplicationCycle($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSourceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new Source(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $response = $gapicClient->getSource($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetSource', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSourceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + try { + $gapicClient->getSource($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTargetProjectTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $project = 'project-309310695'; + $description = 'description-1724546052'; + $expectedResponse = new TargetProject(); + $expectedResponse->setName($name2); + $expectedResponse->setProject($project); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); + $response = $gapicClient->getTargetProject($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetTargetProject', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTargetProjectExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); + try { + $gapicClient->getTargetProject($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUtilizationReportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $vmCount = 261463431; + $expectedResponse = new UtilizationReport(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setVmCount($vmCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); + $response = $gapicClient->getUtilizationReport($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetUtilizationReport', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUtilizationReportExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); + try { + $gapicClient->getUtilizationReport($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCloneJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $cloneJobsElement = new CloneJob(); + $cloneJobs = [ + $cloneJobsElement, + ]; + $expectedResponse = new ListCloneJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCloneJobs($cloneJobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $pageToken = 'pageToken1630607433'; + $response = $gapicClient->listCloneJobs($formattedParent, $pageToken); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCloneJobs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListCloneJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCloneJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $pageToken = 'pageToken1630607433'; + try { + $gapicClient->listCloneJobs($formattedParent, $pageToken); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCutoverJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $cutoverJobsElement = new CutoverJob(); + $cutoverJobs = [ + $cutoverJobsElement, + ]; + $expectedResponse = new ListCutoverJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCutoverJobs($cutoverJobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $pageToken = 'pageToken1630607433'; + $response = $gapicClient->listCutoverJobs($formattedParent, $pageToken); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCutoverJobs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListCutoverJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCutoverJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $pageToken = 'pageToken1630607433'; + try { + $gapicClient->listCutoverJobs($formattedParent, $pageToken); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDatacenterConnectorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $datacenterConnectorsElement = new DatacenterConnector(); + $datacenterConnectors = [ + $datacenterConnectorsElement, + ]; + $expectedResponse = new ListDatacenterConnectorsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDatacenterConnectors($datacenterConnectors); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = 'pageToken1630607433'; + $response = $gapicClient->listDatacenterConnectors($formattedParent, $pageToken); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDatacenterConnectors()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListDatacenterConnectors', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDatacenterConnectorsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = 'pageToken1630607433'; + try { + $gapicClient->listDatacenterConnectors($formattedParent, $pageToken); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGroupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $groupsElement = new Group(); + $groups = [ + $groupsElement, + ]; + $expectedResponse = new ListGroupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setGroups($groups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $pageToken = 'pageToken1630607433'; + $response = $gapicClient->listGroups($formattedParent, $pageToken); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGroups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListGroups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGroupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $pageToken = 'pageToken1630607433'; + try { + $gapicClient->listGroups($formattedParent, $pageToken); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMigratingVmsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $migratingVmsElement = new MigratingVm(); + $migratingVms = [ + $migratingVmsElement, + ]; + $expectedResponse = new ListMigratingVmsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMigratingVms($migratingVms); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = 'pageToken1630607433'; + $response = $gapicClient->listMigratingVms($formattedParent, $pageToken); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMigratingVms()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListMigratingVms', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMigratingVmsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = 'pageToken1630607433'; + try { + $gapicClient->listMigratingVms($formattedParent, $pageToken); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReplicationCyclesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $replicationCyclesElement = new ReplicationCycle(); + $replicationCycles = [ + $replicationCyclesElement, + ]; + $expectedResponse = new ListReplicationCyclesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setReplicationCycles($replicationCycles); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $pageToken = 'pageToken1630607433'; + $response = $gapicClient->listReplicationCycles($formattedParent, $pageToken); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getReplicationCycles()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListReplicationCycles', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReplicationCyclesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $pageToken = 'pageToken1630607433'; + try { + $gapicClient->listReplicationCycles($formattedParent, $pageToken); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSourcesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $sourcesElement = new Source(); + $sources = [ + $sourcesElement, + ]; + $expectedResponse = new ListSourcesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSources($sources); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $pageToken = 'pageToken1630607433'; + $response = $gapicClient->listSources($formattedParent, $pageToken); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSources()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListSources', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSourcesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $pageToken = 'pageToken1630607433'; + try { + $gapicClient->listSources($formattedParent, $pageToken); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTargetProjectsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $targetProjectsElement = new TargetProject(); + $targetProjects = [ + $targetProjectsElement, + ]; + $expectedResponse = new ListTargetProjectsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTargetProjects($targetProjects); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $pageToken = 'pageToken1630607433'; + $response = $gapicClient->listTargetProjects($formattedParent, $pageToken); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTargetProjects()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListTargetProjects', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTargetProjectsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $pageToken = 'pageToken1630607433'; + try { + $gapicClient->listTargetProjects($formattedParent, $pageToken); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUtilizationReportsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $utilizationReportsElement = new UtilizationReport(); + $utilizationReports = [ + $utilizationReportsElement, + ]; + $expectedResponse = new ListUtilizationReportsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setUtilizationReports($utilizationReports); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = 'pageToken1630607433'; + $response = $gapicClient->listUtilizationReports($formattedParent, $pageToken); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getUtilizationReports()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListUtilizationReports', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUtilizationReportsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = 'pageToken1630607433'; + try { + $gapicClient->listUtilizationReports($formattedParent, $pageToken); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function pauseMigrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/pauseMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new PauseMigrationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/pauseMigrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $response = $gapicClient->pauseMigration($formattedMigratingVm); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/PauseMigration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMigratingVm(); + $this->assertProtobufEquals($formattedMigratingVm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/pauseMigrationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function pauseMigrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/pauseMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $response = $gapicClient->pauseMigration($formattedMigratingVm); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/pauseMigrationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function removeGroupMigrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/removeGroupMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new RemoveGroupMigrationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/removeGroupMigrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $response = $gapicClient->removeGroupMigration($formattedGroup); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/RemoveGroupMigration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGroup(); + $this->assertProtobufEquals($formattedGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/removeGroupMigrationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function removeGroupMigrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/removeGroupMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $response = $gapicClient->removeGroupMigration($formattedGroup); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/removeGroupMigrationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resumeMigrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resumeMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ResumeMigrationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/resumeMigrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $response = $gapicClient->resumeMigration($formattedMigratingVm); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ResumeMigration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMigratingVm(); + $this->assertProtobufEquals($formattedMigratingVm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resumeMigrationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resumeMigrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resumeMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $response = $gapicClient->resumeMigration($formattedMigratingVm); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resumeMigrationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function startMigrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new StartMigrationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/startMigrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $response = $gapicClient->startMigration($formattedMigratingVm); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/StartMigration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMigratingVm(); + $this->assertProtobufEquals($formattedMigratingVm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startMigrationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function startMigrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $response = $gapicClient->startMigration($formattedMigratingVm); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startMigrationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Group(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $group = new Group(); + $response = $gapicClient->updateGroup($group); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/UpdateGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGroup(); + $this->assertProtobufEquals($group, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $group = new Group(); + $response = $gapicClient->updateGroup($group); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateMigratingVmTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMigratingVmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $sourceVmId = 'sourceVmId1673059967'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $group = 'group98629247'; + $expectedResponse = new MigratingVm(); + $expectedResponse->setName($name); + $expectedResponse->setSourceVmId($sourceVmId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setGroup($group); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateMigratingVmTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $migratingVm = new MigratingVm(); + $response = $gapicClient->updateMigratingVm($migratingVm); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/UpdateMigratingVm', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMigratingVm(); + $this->assertProtobufEquals($migratingVm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMigratingVmTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateMigratingVmExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMigratingVmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $migratingVm = new MigratingVm(); + $response = $gapicClient->updateMigratingVm($migratingVm); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMigratingVmTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSourceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new Source(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateSourceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $source = new Source(); + $response = $gapicClient->updateSource($source); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/UpdateSource', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getSource(); + $this->assertProtobufEquals($source, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSourceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSourceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $source = new Source(); + $response = $gapicClient->updateSource($source); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSourceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateTargetProjectTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateTargetProjectTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $project = 'project-309310695'; + $description = 'description-1724546052'; + $expectedResponse = new TargetProject(); + $expectedResponse->setName($name); + $expectedResponse->setProject($project); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateTargetProjectTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $targetProject = new TargetProject(); + $response = $gapicClient->updateTargetProject($targetProject); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/UpdateTargetProject', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getTargetProject(); + $this->assertProtobufEquals($targetProject, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateTargetProjectTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateTargetProjectExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateTargetProjectTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $targetProject = new TargetProject(); + $response = $gapicClient->updateTargetProject($targetProject); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateTargetProjectTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function upgradeApplianceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/upgradeApplianceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new UpgradeApplianceResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/upgradeApplianceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedDatacenterConnector = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); + $response = $gapicClient->upgradeAppliance($formattedDatacenterConnector); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/UpgradeAppliance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getDatacenterConnector(); + $this->assertProtobufEquals($formattedDatacenterConnector, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/upgradeApplianceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function upgradeApplianceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/upgradeApplianceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedDatacenterConnector = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); + $response = $gapicClient->upgradeAppliance($formattedDatacenterConnector); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/upgradeApplianceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->getLocation(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->listLocations(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/GPBMetadata/Google/Cloud/Vmwareengine/V1/Vmwareengine.php b/owl-bot-staging/VmwareEngine/v1/proto/src/GPBMetadata/Google/Cloud/Vmwareengine/V1/Vmwareengine.php new file mode 100644 index 0000000000000000000000000000000000000000..45d4aafbd1d720cc07b9d79b5ad89f9c3110a75b GIT binary patch literal 14986 zcmcgzTWnlM8Ro2;+c-&+aW0ONv?nJ?>$vW2?KHI6+`5ikw`yX$O&U_BQKt zmOW>kn8*lb5E4Q{JRngC6$(N;@PP6JMZ8!@Am{@WArOx|ApSG|%-M69 zJr{4%yu`a_{+a*#{>%I`|DN-gn#)acT%TqpYgHUp(-+osXPN2EmgQJgtD!Hn7Z+Je zuUae3dV{s{x;{Cp&&*!erzW4jehfrytKF)yqP}EVOAS`2Hmr87u)1=q(qhb9s++8^ zIu`hx=W`QcR#uqZtW=pkJvVWcIh9()smxFFY347x)6C!SO*4OE>>MH0M#Z*u|M%n$ z(cxdSz0jyvb=#>p@ZX8LU9OvTr(S8)KM$xb=!=zx&0vD)*u}P4b?TO>y8^Rjl?|WL zaZY#aiKYcCT+pRrb1pGJ%KY=D!&+vgF+a)dYOCIKtkxV1Ef$xUrPi+ z)Q3^WVlkrR1>I@2nSXU%Z!xFcGS6|n-3ivczvdORm74YWl4)8l3zlgYiycgzDY^+> zZq%9SWRrQe&Kk7|wp>}QTdi!OFEQadsg+bZMZihqoEeZ`vCO4b+cfLu()?`Gje=~< zc@Dv;xLUDqrl-M^yUDs2uiu!u60x$=@5KkTD$T z5fsSt_|5y{H@`YIbWluJY1SdaT{pof9(vgKVA1u3@`7*%G2oDIKucI$JUS~LC8vzC zl(dEDaUt617_VS?#uI~NO5*tjLbiYku7HWe2&ug{!jX2s0mgSUGI*tKJ9Dl2Dx^p5 zfc8u5b8WB|JxjJWA~F={Pyou&U@qc~lcvv-6Na3s=Mgx|i%| zR+d=VhU_$$1L-Z462iZ7teean>~m+NyUEtYdIR#z-~;^g9%ur|2G{l<7p zBZm|U+D(XlMkmPbCTd>hB-@~A-*ErXUVR>V{V#E6yiJw32C9@xC?N5x(_ruM0TyhHU+yMD_dp* zExVmRGu{QzFE`ysD$o(tTtD1|YEObC`66XEHaPhH@geCWGC1;Hf>QzF4vR{^2TD(} z22(5DqaT1j`g!E8h&)oVWzm9Cgc}I?qen@9jWsH3-|7az0g#&pHd#$nLR}BP)?P4~^Rb7Z!7v4Q%ZvCrL$=wdkqEC7@!^H?U8BqRVvg+f z%3OKsqTmlzzPFa$3W)E~svW>9Q(d3zqhn+{GixY<4iR;skjMbp>Qq{AMB*X9x7a>N zQV*=M)CkMn<%4+3m1&(Zu1~0eaH?OY(qgmxDB4*a>g4F6|SXctQxz%)?}Wodnh6{SI`+>(#ZahD#GqXI3R<5Wye)e znEsJ?(@Q*Ejjt}*<_Lw(-2Y8&Yfy3S>Bj zdn8YX>nSXrGjDCiGCAt5a-#|hu-5%t=?i2C4wk^teFfA#GrgvfhqwawA8U6d-qFZW z*HxdZ-Y&s?2^@zYtX^PiU|8X@FOY%d>g{sHds@B;kA?5%<9#n~$nF5%HBnY%L5t24s#d#|8fnj`e*wKQfRuXQ1D|?`>odlxP zxM9#go}HTDX}EJNfTQdXR?bR{z1qI}Ht|}H=t%AjetAE|djLWS>3Y+luziY$?HCRA z2|~9)iuveCGKi60#$H2N(jL6Sd71224io3FvH18?ER25HmHgjmM90Wb$Vw8rDut)9 z%_?<|gXLQQ1sy2{%2Xhg2y2qe)(rCLyV`*R0`!NLI-7-NERv&;*zUVd#`iVyu$$Et zD|sdD$9`_0(Tm{kft|YRDYl>&$$?cKm7#EvMOt>B%T}k2zkQbM^fO5zQuexP`>!`` z`pNi!j0lL38hR?T91>$py!QJKzmYplp;I|lxP!O)7vSRaRaSNE!brip(Jzdw7sPci zHUl@pt*a)-bL@A+JIxD#Ba~&mve+-#tx{S zz-3fIYJXH>_BChn-j###O^s_jVPxmJ7`%z!D4j%0jS7oklOy;EcHX+m>a)@9_R1U_Kdl4vFk3Y%nVR z=Na<|*(RYVlI6buFQz^@C;@L^a7w&yBHr2YN$yxeyDZ7kZz><|0WsBRAUDP%{v#m9 zB$pC#U~o#rx6vm@(7?U<npOBkn4TIWcw z(HDC}8toNC(Ebm8cA#i%(5K^}DnumCge~kXOzGE*nI6EkqOBNSDFscLsxEvpM-Fl{ zQL^ay6eL8&QWEhsB;r%XOT7{iRbjJayqhBjur3Mr6_R{kEtQgrpCc8YF{Y3T{)@V_ zF#=}Z}0>%P45k#on7h=kS$>A2`inHEfgXWX2wpEaXo-6Zub&rV7#J%`nljK3+4L@k znp_*D`A0>v5eTu{w>BF5$dimgb_FpiGR#{*2Ogh-LlZV>g-A*|zKwKTAD=+K^!F^+ zVvk<}q0ddD>x@Bu~W03NO~@u3h&$%lnrJ<>y%W;=|%my^GA_Ft6?wDe+p zX2LK~2&P2)K3e}pcwKaO0zE#vsP46Gl+K8_P_`h%Zy-XA2_7ZGWI%yOb&UNP zFo%w>5=daKt6)mzeu2y_jbm}EL>U`CC=nzRQhirGk13Z3MpSz4{_Xv0dlTGYbSVT= za_8_ED~_Pk#chRMNb)X9v)p?84o-WplPlCts(95>5^Ta%U5 zvFU~Q+~Mx+DmjTOA%MDzi~8XC0LX-Wb~XC*0oyAQhGy@U4&w-H{0m_6O`8u&`DMpx z+QmZQ)~#EihlNVpS%$koc*F4VCj4*|-Wph$_!0bW0bbFGC1_$VvV%*`xo-l_X|GIT z??BwOxv%*wS%KDf0kjIe1KC_S=hwcu@Wb4ZY5wM8p4Y5-TnKYP{>Io{`FLKu87ba+ z!vXW~ZsbR~hjD^pky=B13_AQx5zTy>@t=WN30_WTNdn=s%FQdXL-nY zW->EUY!=m4QAKg!KcG15g$pN&6K5_|@gKk`C#dp?GZ*OhF|wp+$BIcGj-6k#x%!stqgHts+BB~#Fk!N|1deAvMB!Oyq$G+{5Ag`)hRkc#B ztEH`S{SBNNdY!-`n%effwnGY*<8@kv?(tJIAjECkE-7@^hMtXp@Ht_gtpebh$0YPk zi>TYR%||3MTV`Z7x0%3ZkqT@!1_U-6Ya0NTV}_wR_%n1M8 zvO~jm?Z`GA`)9b(`|6?Tgajo$KlZTWT9NI!DxFYuEwXw?exv$0=)~Kz} zPR+6#k-#;b<`xO9!1g0AsNqmeYm=yNVftqEj#!q8vk%o(uA`W z)Ct@TrZ*MP>;Gzwv7heS%?CDdTASp^?Al(SY3I8-7xG0@W1~(!t8b3Fjc$$1V}JZy zX2$QnZwsU8tybSg4-jgr{aw*L-iE)u1>e6k#*`a;YM#L}KM2o!cWvc0A=vcoLX1uh z&Xt?u6N4%`xe&#>;sbKONx@QuL{GioanW-R?Y43Qt{j`L*(S%tjSS0f1=%T8TAkmN zpXn*30oVER1`iLz<&(41Y|Oo9y7X^-4TeG{&y_&+!aPP|fup{}!b_~Jd;&Me$~7$0 z^<3LBo$O4!f_$kJ*5KB_zHHwxTP?I!XgKDn*NKcS2|^5->>MsLO*bp&%8;&jEmA-A zi7?LBFx>HtVR;=l%1ZIjl=3<(Tb(fSj`33ve^15VrQGl4VX+q2UCdG}B`C`gq zjT>YdQlC#SYYV1nh9Jze>Gikb9gRhEe$Yz!Jvxu?^C6@K*3iThso8n9{CASY4S}0u z_!CeDkYG9JHxgulNqa9@+K_UO`e9P!GB#(P=~FaHuEIh~BvA^f1r$B6ybbb^b&_3X z>%5V?&O_^j?;0n$;Yn7RWKty*lQv+sYhm=_uCB6)-%MVu!3XmdGaz^DR`wdznY~&0 zWeS#`+pB`1AWUcAa2g6CMLdCJ79$acjc`?%omFLo%8!!uNVaZ%I2OZ_8wID#qbn`A zHtwUc0PB zGG9>uX7pmc+$d!vWfA6zyCuC|u54#g^l87g#h+w4?txz3!8y~Y;p|pvr&Py>8TwG$ z-`%EjX0_-{e*&vRxqc*%4w_3TVT%7Lv7)f>src0^IG%;%!E^Cl{Igf^2eJ?w%#xD9 zg0YwTd>Up2n!oH6^+B9AXyQ+=Ul8X)>A{SF2tAK;M4+@fHw5u?j9FRvcpPRk46|A? zPU3Zk@$&x%r}dJ+iBM&Lq#&G9mSBFjRMX45^l@7Ig>VveLHq1X|2gE6tS;=)csWK7nRU_T{6{bM_Y};<03T=c z*I?15w1}mAJPjyy5u^q`wd~MGl4UTyL-~pLgq*2s2T{j#49o8bPDPmrr(eo9AQO2J z{d!KRDCH2JzY6om%>i*}QL%`;%Io+K7@#v~1s8z1$is6a&)2^BRl0P|3htC!~c~Ob+QAAFD;= z=)$tOKg*CoilAeehl~<4{D+CtTdnNvKf=S4ow5BBSJpnqO!Zp{?j|{KRCC3d z)RBp2XyItYGw5!7Wei)Qm-~YRGO9qyVq8Vi+{9u>xq=i<6eP@Kl)Z2gP3@IlZ{EJp zD}#<$gsH_V3w!VOQ2-&Yf_5aND ztMi(N-Jq8kJOZPRh!<8VV6>LRml8y%_ zsJQl}Ivy*3k+6Tk+cUALF|81no_@Syn^Tam@U%kHPI~M`O(9@(te-_T;Si z!x$tqG}G(%l0h;~;y@p#ELbudPuwZF!no8p>C+!OHuO}r>NOWouGG>u8nv_TR0w01Cq7L2^NZ};yT?(#dA Wfh!uC;B9Nn^$Z)yFHw5X1NblDo|lvW literal 0 HcmV?d00001 diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster.php new file mode 100644 index 000000000000..6c1d1107f0cd --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster.php @@ -0,0 +1,319 @@ +google.cloud.vmwareengine.v1.Cluster + */ +class Cluster extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of this cluster. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. State of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. True if the cluster is a management cluster; false otherwise. + * There can only be one management cluster in a private cloud + * and it has to be the first one. + * + * Generated from protobuf field bool management = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $management = false; + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Required. The map of cluster node types in this cluster, where the key is + * canonical identifier of the node type (corresponds to the `NodeType`). + * + * Generated from protobuf field map node_type_configs = 16 [(.google.api.field_behavior) = REQUIRED]; + */ + private $node_type_configs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of this cluster. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of this resource. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last update time of this resource. + * @type int $state + * Output only. State of the resource. + * @type bool $management + * Output only. True if the cluster is a management cluster; false otherwise. + * There can only be one management cluster in a private cloud + * and it has to be the first one. + * @type string $uid + * Output only. System-generated unique identifier for the resource. + * @type array|\Google\Protobuf\Internal\MapField $node_type_configs + * Required. The map of cluster node types in this cluster, where the key is + * canonical identifier of the node type (corresponds to the `NodeType`). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of this cluster. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of this cluster. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. State of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\Cluster\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. True if the cluster is a management cluster; false otherwise. + * There can only be one management cluster in a private cloud + * and it has to be the first one. + * + * Generated from protobuf field bool management = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getManagement() + { + return $this->management; + } + + /** + * Output only. True if the cluster is a management cluster; false otherwise. + * There can only be one management cluster in a private cloud + * and it has to be the first one. + * + * Generated from protobuf field bool management = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setManagement($var) + { + GPBUtil::checkBool($var); + $this->management = $var; + + return $this; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Required. The map of cluster node types in this cluster, where the key is + * canonical identifier of the node type (corresponds to the `NodeType`). + * + * Generated from protobuf field map node_type_configs = 16 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getNodeTypeConfigs() + { + return $this->node_type_configs; + } + + /** + * Required. The map of cluster node types in this cluster, where the key is + * canonical identifier of the node type (corresponds to the `NodeType`). + * + * Generated from protobuf field map node_type_configs = 16 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setNodeTypeConfigs($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\NodeTypeConfig::class); + $this->node_type_configs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster/State.php new file mode 100644 index 000000000000..d4cfba915406 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster/State.php @@ -0,0 +1,87 @@ +google.cloud.vmwareengine.v1.Cluster.State + */ +class State +{ + /** + * The default value. This value should never be used. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The Cluster is operational and can be used by the user. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The Cluster is being deployed. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * Adding or removing of a node to the cluster, any other cluster specific + * updates. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * The Cluster is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + /** + * The Cluster is undergoing maintenance, for example: a failed node is + * getting replaced. + * + * Generated from protobuf enum REPAIRING = 5; + */ + const REPAIRING = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + self::REPAIRING => 'REPAIRING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\Cluster_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateClusterRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateClusterRequest.php new file mode 100644 index 000000000000..9194b7c095aa --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateClusterRequest.php @@ -0,0 +1,306 @@ +google.cloud.vmwareengine.v1.CreateClusterRequest + */ +class CreateClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud to create a new cluster + * in. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The user-provided identifier of the new `Cluster`. + * This identifier must be unique among clusters within the parent and becomes + * the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cluster_id = ''; + /** + * Required. The initial description of the new cluster. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cluster = null; + /** + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The resource name of the private cloud to create a new cluster + * in. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * @param \Google\Cloud\VmwareEngine\V1\Cluster $cluster Required. The initial description of the new cluster. + * @param string $clusterId Required. The user-provided identifier of the new `Cluster`. + * This identifier must be unique among clusters within the parent and becomes + * the final token in the name URI. + * The identifier must meet the following requirements: + * + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * @return \Google\Cloud\VmwareEngine\V1\CreateClusterRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\Cluster $cluster, string $clusterId): self + { + return (new self()) + ->setParent($parent) + ->setCluster($cluster) + ->setClusterId($clusterId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the private cloud to create a new cluster + * in. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type string $cluster_id + * Required. The user-provided identifier of the new `Cluster`. + * This identifier must be unique among clusters within the parent and becomes + * the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * @type \Google\Cloud\VmwareEngine\V1\Cluster $cluster + * Required. The initial description of the new cluster. + * @type string $request_id + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud to create a new cluster + * in. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the private cloud to create a new cluster + * in. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The user-provided identifier of the new `Cluster`. + * This identifier must be unique among clusters within the parent and becomes + * the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getClusterId() + { + return $this->cluster_id; + } + + /** + * Required. The user-provided identifier of the new `Cluster`. + * This identifier must be unique among clusters within the parent and becomes + * the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setClusterId($var) + { + GPBUtil::checkString($var, True); + $this->cluster_id = $var; + + return $this; + } + + /** + * Required. The initial description of the new cluster. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\Cluster|null + */ + public function getCluster() + { + return $this->cluster; + } + + public function hasCluster() + { + return isset($this->cluster); + } + + public function clearCluster() + { + unset($this->cluster); + } + + /** + * Required. The initial description of the new cluster. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\Cluster $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Cluster::class); + $this->cluster = $var; + + return $this; + } + + /** + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateHcxActivationKeyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateHcxActivationKeyRequest.php new file mode 100644 index 000000000000..7e2526646b8d --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateHcxActivationKeyRequest.php @@ -0,0 +1,313 @@ +google.cloud.vmwareengine.v1.CreateHcxActivationKeyRequest + */ +class CreateHcxActivationKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud to create the key for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The initial description of a new HCX activation key. When + * creating a new key, this field must be an empty object. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $hcx_activation_key = null; + /** + * Required. The user-provided identifier of the `HcxActivationKey` to be + * created. This identifier must be unique among `HcxActivationKey` resources + * within the parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string hcx_activation_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $hcx_activation_key_id = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The resource name of the private cloud to create the key for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * @param \Google\Cloud\VmwareEngine\V1\HcxActivationKey $hcxActivationKey Required. The initial description of a new HCX activation key. When + * creating a new key, this field must be an empty object. + * @param string $hcxActivationKeyId Required. The user-provided identifier of the `HcxActivationKey` to be + * created. This identifier must be unique among `HcxActivationKey` resources + * within the parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * @return \Google\Cloud\VmwareEngine\V1\CreateHcxActivationKeyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\HcxActivationKey $hcxActivationKey, string $hcxActivationKeyId): self + { + return (new self()) + ->setParent($parent) + ->setHcxActivationKey($hcxActivationKey) + ->setHcxActivationKeyId($hcxActivationKeyId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the private cloud to create the key for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud` + * @type \Google\Cloud\VmwareEngine\V1\HcxActivationKey $hcx_activation_key + * Required. The initial description of a new HCX activation key. When + * creating a new key, this field must be an empty object. + * @type string $hcx_activation_key_id + * Required. The user-provided identifier of the `HcxActivationKey` to be + * created. This identifier must be unique among `HcxActivationKey` resources + * within the parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud to create the key for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the private cloud to create the key for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The initial description of a new HCX activation key. When + * creating a new key, this field must be an empty object. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\HcxActivationKey|null + */ + public function getHcxActivationKey() + { + return $this->hcx_activation_key; + } + + public function hasHcxActivationKey() + { + return isset($this->hcx_activation_key); + } + + public function clearHcxActivationKey() + { + unset($this->hcx_activation_key); + } + + /** + * Required. The initial description of a new HCX activation key. When + * creating a new key, this field must be an empty object. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\HcxActivationKey $var + * @return $this + */ + public function setHcxActivationKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\HcxActivationKey::class); + $this->hcx_activation_key = $var; + + return $this; + } + + /** + * Required. The user-provided identifier of the `HcxActivationKey` to be + * created. This identifier must be unique among `HcxActivationKey` resources + * within the parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string hcx_activation_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getHcxActivationKeyId() + { + return $this->hcx_activation_key_id; + } + + /** + * Required. The user-provided identifier of the `HcxActivationKey` to be + * created. This identifier must be unique among `HcxActivationKey` resources + * within the parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string hcx_activation_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setHcxActivationKeyId($var) + { + GPBUtil::checkString($var, True); + $this->hcx_activation_key_id = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPolicyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPolicyRequest.php new file mode 100644 index 000000000000..de757cee24d1 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPolicyRequest.php @@ -0,0 +1,318 @@ +google.cloud.vmwareengine.v1.CreateNetworkPolicyRequest + */ +class CreateNetworkPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location (region) + * to create the new network policy in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The user-provided identifier of the network policy to be created. + * This identifier must be unique within parent + * `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes + * the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string network_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network_policy_id = ''; + /** + * Required. The network policy configuration to use in the request. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network_policy = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The resource name of the location (region) + * to create the new network policy in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1` + * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. + * @param \Google\Cloud\VmwareEngine\V1\NetworkPolicy $networkPolicy Required. The network policy configuration to use in the request. + * @param string $networkPolicyId Required. The user-provided identifier of the network policy to be created. + * This identifier must be unique within parent + * `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes + * the final token in the name URI. + * The identifier must meet the following requirements: + * + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * @return \Google\Cloud\VmwareEngine\V1\CreateNetworkPolicyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\NetworkPolicy $networkPolicy, string $networkPolicyId): self + { + return (new self()) + ->setParent($parent) + ->setNetworkPolicy($networkPolicy) + ->setNetworkPolicyId($networkPolicyId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the location (region) + * to create the new network policy in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1` + * @type string $network_policy_id + * Required. The user-provided identifier of the network policy to be created. + * This identifier must be unique within parent + * `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes + * the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * @type \Google\Cloud\VmwareEngine\V1\NetworkPolicy $network_policy + * Required. The network policy configuration to use in the request. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location (region) + * to create the new network policy in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the location (region) + * to create the new network policy in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The user-provided identifier of the network policy to be created. + * This identifier must be unique within parent + * `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes + * the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string network_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNetworkPolicyId() + { + return $this->network_policy_id; + } + + /** + * Required. The user-provided identifier of the network policy to be created. + * This identifier must be unique within parent + * `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes + * the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string network_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNetworkPolicyId($var) + { + GPBUtil::checkString($var, True); + $this->network_policy_id = $var; + + return $this; + } + + /** + * Required. The network policy configuration to use in the request. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\NetworkPolicy|null + */ + public function getNetworkPolicy() + { + return $this->network_policy; + } + + public function hasNetworkPolicy() + { + return isset($this->network_policy); + } + + public function clearNetworkPolicy() + { + unset($this->network_policy); + } + + /** + * Required. The network policy configuration to use in the request. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\NetworkPolicy $var + * @return $this + */ + public function setNetworkPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkPolicy::class); + $this->network_policy = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateCloudRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateCloudRequest.php new file mode 100644 index 000000000000..4b306cdb6911 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateCloudRequest.php @@ -0,0 +1,306 @@ +google.cloud.vmwareengine.v1.CreatePrivateCloudRequest + */ +class CreatePrivateCloudRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location to create the new + * private cloud in. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The user-provided identifier of the private cloud to be created. + * This identifier must be unique among each `PrivateCloud` within the parent + * and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string private_cloud_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $private_cloud_id = ''; + /** + * Required. The initial description of the new private cloud. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $private_cloud = null; + /** + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The resource name of the location to create the new + * private cloud in. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. + * @param \Google\Cloud\VmwareEngine\V1\PrivateCloud $privateCloud Required. The initial description of the new private cloud. + * @param string $privateCloudId Required. The user-provided identifier of the private cloud to be created. + * This identifier must be unique among each `PrivateCloud` within the parent + * and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * @return \Google\Cloud\VmwareEngine\V1\CreatePrivateCloudRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\PrivateCloud $privateCloud, string $privateCloudId): self + { + return (new self()) + ->setParent($parent) + ->setPrivateCloud($privateCloud) + ->setPrivateCloudId($privateCloudId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the location to create the new + * private cloud in. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * @type string $private_cloud_id + * Required. The user-provided identifier of the private cloud to be created. + * This identifier must be unique among each `PrivateCloud` within the parent + * and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * @type \Google\Cloud\VmwareEngine\V1\PrivateCloud $private_cloud + * Required. The initial description of the new private cloud. + * @type string $request_id + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location to create the new + * private cloud in. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the location to create the new + * private cloud in. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The user-provided identifier of the private cloud to be created. + * This identifier must be unique among each `PrivateCloud` within the parent + * and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string private_cloud_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrivateCloudId() + { + return $this->private_cloud_id; + } + + /** + * Required. The user-provided identifier of the private cloud to be created. + * This identifier must be unique among each `PrivateCloud` within the parent + * and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string private_cloud_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrivateCloudId($var) + { + GPBUtil::checkString($var, True); + $this->private_cloud_id = $var; + + return $this; + } + + /** + * Required. The initial description of the new private cloud. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\PrivateCloud|null + */ + public function getPrivateCloud() + { + return $this->private_cloud; + } + + public function hasPrivateCloud() + { + return isset($this->private_cloud); + } + + public function clearPrivateCloud() + { + unset($this->private_cloud); + } + + /** + * Required. The initial description of the new private cloud. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\PrivateCloud $var + * @return $this + */ + public function setPrivateCloud($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\PrivateCloud::class); + $this->private_cloud = $var; + + return $this; + } + + /** + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateVmwareEngineNetworkRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateVmwareEngineNetworkRequest.php new file mode 100644 index 000000000000..ba26cffddd41 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateVmwareEngineNetworkRequest.php @@ -0,0 +1,333 @@ +google.cloud.vmwareengine.v1.CreateVmwareEngineNetworkRequest + */ +class CreateVmwareEngineNetworkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location to create the new VMware Engine + * network in. A VMware Engine network of type + * `LEGACY` is a regional resource, and a VMware + * Engine network of type `STANDARD` is a global resource. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The user-provided identifier of the new VMware Engine network. + * This identifier must be unique among VMware Engine network resources + * within the parent and becomes the final token in the name URI. The + * identifier must meet the following requirements: + * * For networks of type LEGACY, adheres to the format: + * `{region-id}-default`. Replace `{region-id}` with the region where you want + * to create the VMware Engine network. For example, "us-central1-default". + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string vmware_engine_network_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $vmware_engine_network_id = ''; + /** + * Required. The initial description of the new VMware Engine network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $vmware_engine_network = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The resource name of the location to create the new VMware Engine + * network in. A VMware Engine network of type + * `LEGACY` is a regional resource, and a VMware + * Engine network of type `STANDARD` is a global resource. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global` + * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. + * @param \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $vmwareEngineNetwork Required. The initial description of the new VMware Engine network. + * @param string $vmwareEngineNetworkId Required. The user-provided identifier of the new VMware Engine network. + * This identifier must be unique among VMware Engine network resources + * within the parent and becomes the final token in the name URI. The + * identifier must meet the following requirements: + * + * * For networks of type LEGACY, adheres to the format: + * `{region-id}-default`. Replace `{region-id}` with the region where you want + * to create the VMware Engine network. For example, "us-central1-default". + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * @return \Google\Cloud\VmwareEngine\V1\CreateVmwareEngineNetworkRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $vmwareEngineNetwork, string $vmwareEngineNetworkId): self + { + return (new self()) + ->setParent($parent) + ->setVmwareEngineNetwork($vmwareEngineNetwork) + ->setVmwareEngineNetworkId($vmwareEngineNetworkId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the location to create the new VMware Engine + * network in. A VMware Engine network of type + * `LEGACY` is a regional resource, and a VMware + * Engine network of type `STANDARD` is a global resource. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global` + * @type string $vmware_engine_network_id + * Required. The user-provided identifier of the new VMware Engine network. + * This identifier must be unique among VMware Engine network resources + * within the parent and becomes the final token in the name URI. The + * identifier must meet the following requirements: + * * For networks of type LEGACY, adheres to the format: + * `{region-id}-default`. Replace `{region-id}` with the region where you want + * to create the VMware Engine network. For example, "us-central1-default". + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * @type \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $vmware_engine_network + * Required. The initial description of the new VMware Engine network. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location to create the new VMware Engine + * network in. A VMware Engine network of type + * `LEGACY` is a regional resource, and a VMware + * Engine network of type `STANDARD` is a global resource. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the location to create the new VMware Engine + * network in. A VMware Engine network of type + * `LEGACY` is a regional resource, and a VMware + * Engine network of type `STANDARD` is a global resource. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The user-provided identifier of the new VMware Engine network. + * This identifier must be unique among VMware Engine network resources + * within the parent and becomes the final token in the name URI. The + * identifier must meet the following requirements: + * * For networks of type LEGACY, adheres to the format: + * `{region-id}-default`. Replace `{region-id}` with the region where you want + * to create the VMware Engine network. For example, "us-central1-default". + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string vmware_engine_network_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getVmwareEngineNetworkId() + { + return $this->vmware_engine_network_id; + } + + /** + * Required. The user-provided identifier of the new VMware Engine network. + * This identifier must be unique among VMware Engine network resources + * within the parent and becomes the final token in the name URI. The + * identifier must meet the following requirements: + * * For networks of type LEGACY, adheres to the format: + * `{region-id}-default`. Replace `{region-id}` with the region where you want + * to create the VMware Engine network. For example, "us-central1-default". + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string vmware_engine_network_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setVmwareEngineNetworkId($var) + { + GPBUtil::checkString($var, True); + $this->vmware_engine_network_id = $var; + + return $this; + } + + /** + * Required. The initial description of the new VMware Engine network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork|null + */ + public function getVmwareEngineNetwork() + { + return $this->vmware_engine_network; + } + + public function hasVmwareEngineNetwork() + { + return isset($this->vmware_engine_network); + } + + public function clearVmwareEngineNetwork() + { + unset($this->vmware_engine_network); + } + + /** + * Required. The initial description of the new VMware Engine network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $var + * @return $this + */ + public function setVmwareEngineNetwork($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork::class); + $this->vmware_engine_network = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Credentials.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Credentials.php new file mode 100644 index 000000000000..262d839c299f --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Credentials.php @@ -0,0 +1,101 @@ +google.cloud.vmwareengine.v1.Credentials + */ +class Credentials extends \Google\Protobuf\Internal\Message +{ + /** + * Initial username. + * + * Generated from protobuf field string username = 1; + */ + protected $username = ''; + /** + * Initial password. + * + * Generated from protobuf field string password = 2; + */ + protected $password = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $username + * Initial username. + * @type string $password + * Initial password. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Initial username. + * + * Generated from protobuf field string username = 1; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Initial username. + * + * Generated from protobuf field string username = 1; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * Initial password. + * + * Generated from protobuf field string password = 2; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Initial password. + * + * Generated from protobuf field string password = 2; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteClusterRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteClusterRequest.php new file mode 100644 index 000000000000..9338e958e48b --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteClusterRequest.php @@ -0,0 +1,140 @@ +google.cloud.vmwareengine.v1.DeleteClusterRequest + */ +class DeleteClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the cluster to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The resource name of the cluster to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * Please see {@see VmwareEngineClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\DeleteClusterRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the cluster to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * @type string $request_id + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the cluster to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the cluster to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPolicyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPolicyRequest.php new file mode 100644 index 000000000000..557ee72de847 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPolicyRequest.php @@ -0,0 +1,180 @@ +google.cloud.vmwareengine.v1.DeleteNetworkPolicyRequest + */ +class DeleteNetworkPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the network policy to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The resource name of the network policy to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * Please see {@see VmwareEngineClient::networkPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\DeleteNetworkPolicyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the network policy to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the network policy to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the network policy to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateCloudRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateCloudRequest.php new file mode 100644 index 000000000000..4421609c05c7 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateCloudRequest.php @@ -0,0 +1,262 @@ +google.cloud.vmwareengine.v1.DeletePrivateCloudRequest + */ +class DeletePrivateCloudRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. If set to true, cascade delete is enabled and all children of + * this private cloud resource are also deleted. When this flag is set to + * false, the private cloud will not be deleted if there are any children + * other than the management cluster. The management cluster is always + * deleted. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + /** + * Optional. Time delay of the deletion specified in hours. The default value + * is `3`. Specifying a non-zero value for this field changes the value of + * `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned + * deletion time. Deletion can be cancelled before `expire_time` elapses using + * [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]. + * Specifying a value of `0` for this field instead begins the deletion + * process and ceases billing immediately. During the final deletion process, + * the value of `PrivateCloud.state` becomes `PURGING`. + * + * Generated from protobuf field optional int32 delay_hours = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $delay_hours = null; + + /** + * @param string $name Required. The resource name of the private cloud to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\DeletePrivateCloudRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the private cloud to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type string $request_id + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * @type bool $force + * Optional. If set to true, cascade delete is enabled and all children of + * this private cloud resource are also deleted. When this flag is set to + * false, the private cloud will not be deleted if there are any children + * other than the management cluster. The management cluster is always + * deleted. + * @type int $delay_hours + * Optional. Time delay of the deletion specified in hours. The default value + * is `3`. Specifying a non-zero value for this field changes the value of + * `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned + * deletion time. Deletion can be cancelled before `expire_time` elapses using + * [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]. + * Specifying a value of `0` for this field instead begins the deletion + * process and ceases billing immediately. During the final deletion process, + * the value of `PrivateCloud.state` becomes `PURGING`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the private cloud to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set to true, cascade delete is enabled and all children of + * this private cloud resource are also deleted. When this flag is set to + * false, the private cloud will not be deleted if there are any children + * other than the management cluster. The management cluster is always + * deleted. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. If set to true, cascade delete is enabled and all children of + * this private cloud resource are also deleted. When this flag is set to + * false, the private cloud will not be deleted if there are any children + * other than the management cluster. The management cluster is always + * deleted. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + + /** + * Optional. Time delay of the deletion specified in hours. The default value + * is `3`. Specifying a non-zero value for this field changes the value of + * `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned + * deletion time. Deletion can be cancelled before `expire_time` elapses using + * [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]. + * Specifying a value of `0` for this field instead begins the deletion + * process and ceases billing immediately. During the final deletion process, + * the value of `PrivateCloud.state` becomes `PURGING`. + * + * Generated from protobuf field optional int32 delay_hours = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDelayHours() + { + return isset($this->delay_hours) ? $this->delay_hours : 0; + } + + public function hasDelayHours() + { + return isset($this->delay_hours); + } + + public function clearDelayHours() + { + unset($this->delay_hours); + } + + /** + * Optional. Time delay of the deletion specified in hours. The default value + * is `3`. Specifying a non-zero value for this field changes the value of + * `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned + * deletion time. Deletion can be cancelled before `expire_time` elapses using + * [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]. + * Specifying a value of `0` for this field instead begins the deletion + * process and ceases billing immediately. During the final deletion process, + * the value of `PrivateCloud.state` becomes `PURGING`. + * + * Generated from protobuf field optional int32 delay_hours = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDelayHours($var) + { + GPBUtil::checkInt32($var); + $this->delay_hours = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteVmwareEngineNetworkRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteVmwareEngineNetworkRequest.php new file mode 100644 index 000000000000..27b7a9e393f0 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteVmwareEngineNetworkRequest.php @@ -0,0 +1,226 @@ +google.cloud.vmwareengine.v1.DeleteVmwareEngineNetworkRequest + */ +class DeleteVmwareEngineNetworkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the VMware Engine network to be deleted. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. Checksum used to ensure that the user-provided value is up to + * date before the server processes the request. The server compares provided + * checksum with the current checksum of the resource. If the user-provided + * value is out of date, this request returns an `ABORTED` error. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * @param string $name Required. The resource name of the VMware Engine network to be deleted. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * Please see {@see VmwareEngineClient::vmwareEngineNetworkName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\DeleteVmwareEngineNetworkRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the VMware Engine network to be deleted. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type string $etag + * Optional. Checksum used to ensure that the user-provided value is up to + * date before the server processes the request. The server compares provided + * checksum with the current checksum of the resource. If the user-provided + * value is out of date, this request returns an `ABORTED` error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the VMware Engine network to be deleted. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the VMware Engine network to be deleted. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. Checksum used to ensure that the user-provided value is up to + * date before the server processes the request. The server compares provided + * checksum with the current checksum of the resource. If the user-provided + * value is out of date, this request returns an `ABORTED` error. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. Checksum used to ensure that the user-provided value is up to + * date before the server processes the request. The server compares provided + * checksum with the current checksum of the resource. If the user-provided + * value is out of date, this request returns an `ABORTED` error. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetClusterRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetClusterRequest.php new file mode 100644 index 000000000000..765ce8ca31d1 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetClusterRequest.php @@ -0,0 +1,102 @@ +google.cloud.vmwareengine.v1.GetClusterRequest + */ +class GetClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The cluster resource name to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The cluster resource name to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * Please see {@see VmwareEngineClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\GetClusterRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The cluster resource name to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The cluster resource name to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The cluster resource name to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetHcxActivationKeyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetHcxActivationKeyRequest.php new file mode 100644 index 000000000000..d561638f4a50 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetHcxActivationKeyRequest.php @@ -0,0 +1,101 @@ +google.cloud.vmwareengine.v1.GetHcxActivationKeyRequest + */ +class GetHcxActivationKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the HCX activation key to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the HCX activation key to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` + * Please see {@see VmwareEngineClient::hcxActivationKeyName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\GetHcxActivationKeyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the HCX activation key to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the HCX activation key to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the HCX activation key to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPolicyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPolicyRequest.php new file mode 100644 index 000000000000..ca390af59e74 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPolicyRequest.php @@ -0,0 +1,102 @@ +google.cloud.vmwareengine.v1.GetNetworkPolicyRequest + */ +class GetNetworkPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the network policy to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the network policy to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * Please see {@see VmwareEngineClient::networkPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\GetNetworkPolicyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the network policy to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the network policy to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the network policy to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeTypeRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeTypeRequest.php new file mode 100644 index 000000000000..a117aa736a7c --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeTypeRequest.php @@ -0,0 +1,102 @@ +google.cloud.vmwareengine.v1.GetNodeTypeRequest + */ +class GetNodeTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the node type to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the node type to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + * Please see {@see VmwareEngineClient::nodeTypeName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\GetNodeTypeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the node type to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the node type to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the node type to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateCloudRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateCloudRequest.php new file mode 100644 index 000000000000..16b916600d36 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateCloudRequest.php @@ -0,0 +1,102 @@ +google.cloud.vmwareengine.v1.GetPrivateCloudRequest + */ +class GetPrivateCloudRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the private cloud to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\GetPrivateCloudRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the private cloud to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the private cloud to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetVmwareEngineNetworkRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetVmwareEngineNetworkRequest.php new file mode 100644 index 000000000000..d9f69bd5c370 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetVmwareEngineNetworkRequest.php @@ -0,0 +1,102 @@ +google.cloud.vmwareengine.v1.GetVmwareEngineNetworkRequest + */ +class GetVmwareEngineNetworkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the VMware Engine network to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the VMware Engine network to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * Please see {@see VmwareEngineClient::vmwareEngineNetworkName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\GetVmwareEngineNetworkRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the VMware Engine network to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the VMware Engine network to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the VMware Engine network to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx.php new file mode 100644 index 000000000000..2beef5b8868d --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx.php @@ -0,0 +1,169 @@ +google.cloud.vmwareengine.v1.Hcx + */ +class Hcx extends \Google\Protobuf\Internal\Message +{ + /** + * Internal IP address of the appliance. + * + * Generated from protobuf field string internal_ip = 2; + */ + protected $internal_ip = ''; + /** + * Version of the appliance. + * + * Generated from protobuf field string version = 4; + */ + protected $version = ''; + /** + * Output only. The state of the appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Fully qualified domain name of the appliance. + * + * Generated from protobuf field string fqdn = 6; + */ + protected $fqdn = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $internal_ip + * Internal IP address of the appliance. + * @type string $version + * Version of the appliance. + * @type int $state + * Output only. The state of the appliance. + * @type string $fqdn + * Fully qualified domain name of the appliance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Internal IP address of the appliance. + * + * Generated from protobuf field string internal_ip = 2; + * @return string + */ + public function getInternalIp() + { + return $this->internal_ip; + } + + /** + * Internal IP address of the appliance. + * + * Generated from protobuf field string internal_ip = 2; + * @param string $var + * @return $this + */ + public function setInternalIp($var) + { + GPBUtil::checkString($var, True); + $this->internal_ip = $var; + + return $this; + } + + /** + * Version of the appliance. + * + * Generated from protobuf field string version = 4; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Version of the appliance. + * + * Generated from protobuf field string version = 4; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Output only. The state of the appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\Hcx\State::class); + $this->state = $var; + + return $this; + } + + /** + * Fully qualified domain name of the appliance. + * + * Generated from protobuf field string fqdn = 6; + * @return string + */ + public function getFqdn() + { + return $this->fqdn; + } + + /** + * Fully qualified domain name of the appliance. + * + * Generated from protobuf field string fqdn = 6; + * @param string $var + * @return $this + */ + public function setFqdn($var) + { + GPBUtil::checkString($var, True); + $this->fqdn = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx/State.php new file mode 100644 index 000000000000..98ba3730325b --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx/State.php @@ -0,0 +1,64 @@ +google.cloud.vmwareengine.v1.Hcx.State + */ +class State +{ + /** + * Unspecified appliance state. This is the default value. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The appliance is operational and can be used. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The appliance is being deployed. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\Hcx_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey.php new file mode 100644 index 000000000000..2ac89929e489 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey.php @@ -0,0 +1,236 @@ +google.cloud.vmwareengine.v1.HcxActivationKey + */ +class HcxActivationKey extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of this HcxActivationKey. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Creation time of HCX activation key. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. State of HCX activation key. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. HCX activation key. + * + * Generated from protobuf field string activation_key = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $activation_key = ''; + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of this HcxActivationKey. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of HCX activation key. + * @type int $state + * Output only. State of HCX activation key. + * @type string $activation_key + * Output only. HCX activation key. + * @type string $uid + * Output only. System-generated unique identifier for the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of this HcxActivationKey. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of this HcxActivationKey. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Creation time of HCX activation key. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Creation time of HCX activation key. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. State of HCX activation key. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of HCX activation key. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\HcxActivationKey\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. HCX activation key. + * + * Generated from protobuf field string activation_key = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getActivationKey() + { + return $this->activation_key; + } + + /** + * Output only. HCX activation key. + * + * Generated from protobuf field string activation_key = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setActivationKey($var) + { + GPBUtil::checkString($var, True); + $this->activation_key = $var; + + return $this; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey/State.php new file mode 100644 index 000000000000..403d108006b2 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey/State.php @@ -0,0 +1,71 @@ +google.cloud.vmwareengine.v1.HcxActivationKey.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * State of a newly generated activation key. + * + * Generated from protobuf enum AVAILABLE = 1; + */ + const AVAILABLE = 1; + /** + * State of key when it has been used to activate HCX appliance. + * + * Generated from protobuf enum CONSUMED = 2; + */ + const CONSUMED = 2; + /** + * State of key when it is being created. + * + * Generated from protobuf enum CREATING = 3; + */ + const CREATING = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::AVAILABLE => 'AVAILABLE', + self::CONSUMED => 'CONSUMED', + self::CREATING => 'CREATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\HcxActivationKey_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersRequest.php new file mode 100644 index 000000000000..e5a2087e9eba --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersRequest.php @@ -0,0 +1,322 @@ +google.cloud.vmwareengine.v1.ListClustersRequest + */ +class ListClustersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud to query for clusters. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of clusters to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListClusters` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListClusters` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-cluster") + * (nodeCount = "3") + * ``` + * By default, each expression is an `AND` expression. However, you can + * include `AND` and `OR` expressions explicitly. For example: + * ``` + * (name = "example-cluster-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-cluster-2") + * ``` + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Sorts list results by a certain order. By default, returned results are + * ordered by `name` in ascending order. You can also sort results in + * descending order based on the `name` value using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the private cloud to query for clusters. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ListClustersRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the private cloud to query for clusters. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type int $page_size + * The maximum number of clusters to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListClusters` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListClusters` + * must match the call that provided the page token. + * @type string $filter + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-cluster") + * (nodeCount = "3") + * ``` + * By default, each expression is an `AND` expression. However, you can + * include `AND` and `OR` expressions explicitly. For example: + * ``` + * (name = "example-cluster-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-cluster-2") + * ``` + * @type string $order_by + * Sorts list results by a certain order. By default, returned results are + * ordered by `name` in ascending order. You can also sort results in + * descending order based on the `name` value using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud to query for clusters. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the private cloud to query for clusters. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of clusters to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of clusters to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListClusters` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListClusters` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListClusters` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListClusters` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-cluster") + * (nodeCount = "3") + * ``` + * By default, each expression is an `AND` expression. However, you can + * include `AND` and `OR` expressions explicitly. For example: + * ``` + * (name = "example-cluster-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-cluster-2") + * ``` + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-cluster") + * (nodeCount = "3") + * ``` + * By default, each expression is an `AND` expression. However, you can + * include `AND` and `OR` expressions explicitly. For example: + * ``` + * (name = "example-cluster-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-cluster-2") + * ``` + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Sorts list results by a certain order. By default, returned results are + * ordered by `name` in ascending order. You can also sort results in + * descending order based on the `name` value using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sorts list results by a certain order. By default, returned results are + * ordered by `name` in ascending order. You can also sort results in + * descending order based on the `name` value using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersResponse.php new file mode 100644 index 000000000000..1db7f0ab9272 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersResponse.php @@ -0,0 +1,144 @@ +google.cloud.vmwareengine.v1.ListClustersResponse + */ +class ListClustersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of private cloud clusters. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Cluster clusters = 1; + */ + private $clusters; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VmwareEngine\V1\Cluster>|\Google\Protobuf\Internal\RepeatedField $clusters + * A list of private cloud clusters. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached when making an aggregated query using + * wildcards. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * A list of private cloud clusters. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Cluster clusters = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getClusters() + { + return $this->clusters; + } + + /** + * A list of private cloud clusters. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Cluster clusters = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\Cluster>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setClusters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\Cluster::class); + $this->clusters = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysRequest.php new file mode 100644 index 000000000000..0a19130f8a2c --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysRequest.php @@ -0,0 +1,203 @@ +google.cloud.vmwareengine.v1.ListHcxActivationKeysRequest + */ +class ListHcxActivationKeysRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud + * to be queried for HCX activation keys. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of HCX activation keys to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListHcxActivationKeys` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListHcxActivationKeys` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource name of the private cloud + * to be queried for HCX activation keys. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ListHcxActivationKeysRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the private cloud + * to be queried for HCX activation keys. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud` + * @type int $page_size + * The maximum number of HCX activation keys to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListHcxActivationKeys` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListHcxActivationKeys` must match the call that provided the page + * token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud + * to be queried for HCX activation keys. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the private cloud + * to be queried for HCX activation keys. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of HCX activation keys to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of HCX activation keys to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListHcxActivationKeys` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListHcxActivationKeys` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListHcxActivationKeys` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListHcxActivationKeys` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysResponse.php new file mode 100644 index 000000000000..d38aeee53fb8 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysResponse.php @@ -0,0 +1,144 @@ +google.cloud.vmwareengine.v1.ListHcxActivationKeysResponse + */ +class ListHcxActivationKeysResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of HCX activation keys. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_keys = 1; + */ + private $hcx_activation_keys; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VmwareEngine\V1\HcxActivationKey>|\Google\Protobuf\Internal\RepeatedField $hcx_activation_keys + * List of HCX activation keys. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached when making an aggregated query using + * wildcards. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * List of HCX activation keys. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_keys = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHcxActivationKeys() + { + return $this->hcx_activation_keys; + } + + /** + * List of HCX activation keys. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_keys = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\HcxActivationKey>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHcxActivationKeys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\HcxActivationKey::class); + $this->hcx_activation_keys = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesRequest.php new file mode 100644 index 000000000000..bee75e476e17 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesRequest.php @@ -0,0 +1,361 @@ +google.cloud.vmwareengine.v1.ListNetworkPoliciesRequest + */ +class ListNetworkPoliciesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location (region) to query for + * network policies. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/us-central1` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of network policies to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListNetworkPolicies` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNetworkPolicies` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of network policies, you can + * exclude the ones named `example-policy` by specifying + * `name != "example-policy"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-policy") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-policy-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-policy-2") + * ``` + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the location (region) to query for + * network policies. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/us-central1` + * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ListNetworkPoliciesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the location (region) to query for + * network policies. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/us-central1` + * @type int $page_size + * The maximum number of network policies to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListNetworkPolicies` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNetworkPolicies` must match the call that provided the page + * token. + * @type string $filter + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of network policies, you can + * exclude the ones named `example-policy` by specifying + * `name != "example-policy"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-policy") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-policy-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-policy-2") + * ``` + * @type string $order_by + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location (region) to query for + * network policies. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/us-central1` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the location (region) to query for + * network policies. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/us-central1` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of network policies to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of network policies to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListNetworkPolicies` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNetworkPolicies` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListNetworkPolicies` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNetworkPolicies` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of network policies, you can + * exclude the ones named `example-policy` by specifying + * `name != "example-policy"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-policy") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-policy-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-policy-2") + * ``` + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of network policies, you can + * exclude the ones named `example-policy` by specifying + * `name != "example-policy"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-policy") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-policy-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-policy-2") + * ``` + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesResponse.php new file mode 100644 index 000000000000..abad447203f7 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesResponse.php @@ -0,0 +1,144 @@ +google.cloud.vmwareengine.v1.ListNetworkPoliciesResponse + */ +class ListNetworkPoliciesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of network policies. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NetworkPolicy network_policies = 1; + */ + private $network_policies; + /** + * A token, which can be send as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VmwareEngine\V1\NetworkPolicy>|\Google\Protobuf\Internal\RepeatedField $network_policies + * A list of network policies. + * @type string $next_page_token + * A token, which can be send as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached when making an aggregated query using + * wildcards. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * A list of network policies. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NetworkPolicy network_policies = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkPolicies() + { + return $this->network_policies; + } + + /** + * A list of network policies. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NetworkPolicy network_policies = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\NetworkPolicy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\NetworkPolicy::class); + $this->network_policies = $arr; + + return $this; + } + + /** + * A token, which can be send as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be send as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesRequest.php new file mode 100644 index 000000000000..d8b2a072333f --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesRequest.php @@ -0,0 +1,312 @@ +google.cloud.vmwareengine.v1.ListNodeTypesRequest + */ +class ListNodeTypesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location to be queried for node types. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of node types to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListNodeTypes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNodeTypes` must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of node types, you can + * exclude the ones named `standard-72` by specifying + * `name != "standard-72"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "standard-72") + * (virtual_cpu_count > 2) + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "standard-96") AND + * (virtual_cpu_count > 2) OR + * (name = "standard-72") + * ``` + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The resource name of the location to be queried for node types. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ListNodeTypesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the location to be queried for node types. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * @type int $page_size + * The maximum number of node types to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListNodeTypes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNodeTypes` must match the call that provided the page token. + * @type string $filter + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of node types, you can + * exclude the ones named `standard-72` by specifying + * `name != "standard-72"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "standard-72") + * (virtual_cpu_count > 2) + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "standard-96") AND + * (virtual_cpu_count > 2) OR + * (name = "standard-72") + * ``` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location to be queried for node types. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the location to be queried for node types. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of node types to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of node types to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListNodeTypes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNodeTypes` must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListNodeTypes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNodeTypes` must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of node types, you can + * exclude the ones named `standard-72` by specifying + * `name != "standard-72"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "standard-72") + * (virtual_cpu_count > 2) + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "standard-96") AND + * (virtual_cpu_count > 2) OR + * (name = "standard-72") + * ``` + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of node types, you can + * exclude the ones named `standard-72` by specifying + * `name != "standard-72"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "standard-72") + * (virtual_cpu_count > 2) + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "standard-96") AND + * (virtual_cpu_count > 2) OR + * (name = "standard-72") + * ``` + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesResponse.php new file mode 100644 index 000000000000..c8de39d538ae --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesResponse.php @@ -0,0 +1,144 @@ +google.cloud.vmwareengine.v1.ListNodeTypesResponse + */ +class ListNodeTypesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of Node Types. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NodeType node_types = 1; + */ + private $node_types; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VmwareEngine\V1\NodeType>|\Google\Protobuf\Internal\RepeatedField $node_types + * A list of Node Types. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached when making an aggregated query using + * wildcards. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * A list of Node Types. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NodeType node_types = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNodeTypes() + { + return $this->node_types; + } + + /** + * A list of Node Types. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NodeType node_types = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\NodeType>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNodeTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\NodeType::class); + $this->node_types = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsRequest.php new file mode 100644 index 000000000000..8e9d635b77be --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsRequest.php @@ -0,0 +1,362 @@ +google.cloud.vmwareengine.v1.ListPrivateCloudsRequest + */ +class ListPrivateCloudsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud to be queried for + * clusters. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of private clouds to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListPrivateClouds` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListPrivateClouds` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or + * `<`. + * For example, if you are filtering a list of private clouds, you can exclude + * the ones named `example-pc` by specifying `name != "example-pc"`. + * You can also filter nested fields. For example, you could specify + * `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds + * only if they have a matching address in their network configuration. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-pc") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you can + * include `AND` and `OR` expressions explicitly. For example: + * ``` + * (name = "private-cloud-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "private-cloud-2") + * ``` + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Sorts list results by a certain order. By default, returned results are + * ordered by `name` in ascending order. You can also sort results in + * descending order based on the `name` value using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the private cloud to be queried for + * clusters. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ListPrivateCloudsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the private cloud to be queried for + * clusters. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * @type int $page_size + * The maximum number of private clouds to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListPrivateClouds` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListPrivateClouds` must + * match the call that provided the page token. + * @type string $filter + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or + * `<`. + * For example, if you are filtering a list of private clouds, you can exclude + * the ones named `example-pc` by specifying `name != "example-pc"`. + * You can also filter nested fields. For example, you could specify + * `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds + * only if they have a matching address in their network configuration. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-pc") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you can + * include `AND` and `OR` expressions explicitly. For example: + * ``` + * (name = "private-cloud-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "private-cloud-2") + * ``` + * @type string $order_by + * Sorts list results by a certain order. By default, returned results are + * ordered by `name` in ascending order. You can also sort results in + * descending order based on the `name` value using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud to be queried for + * clusters. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the private cloud to be queried for + * clusters. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of private clouds to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of private clouds to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListPrivateClouds` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListPrivateClouds` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListPrivateClouds` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListPrivateClouds` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or + * `<`. + * For example, if you are filtering a list of private clouds, you can exclude + * the ones named `example-pc` by specifying `name != "example-pc"`. + * You can also filter nested fields. For example, you could specify + * `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds + * only if they have a matching address in their network configuration. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-pc") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you can + * include `AND` and `OR` expressions explicitly. For example: + * ``` + * (name = "private-cloud-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "private-cloud-2") + * ``` + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or + * `<`. + * For example, if you are filtering a list of private clouds, you can exclude + * the ones named `example-pc` by specifying `name != "example-pc"`. + * You can also filter nested fields. For example, you could specify + * `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds + * only if they have a matching address in their network configuration. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-pc") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you can + * include `AND` and `OR` expressions explicitly. For example: + * ``` + * (name = "private-cloud-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "private-cloud-2") + * ``` + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Sorts list results by a certain order. By default, returned results are + * ordered by `name` in ascending order. You can also sort results in + * descending order based on the `name` value using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sorts list results by a certain order. By default, returned results are + * ordered by `name` in ascending order. You can also sort results in + * descending order based on the `name` value using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsResponse.php new file mode 100644 index 000000000000..bb0c02544fb4 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsResponse.php @@ -0,0 +1,144 @@ +google.cloud.vmwareengine.v1.ListPrivateCloudsResponse + */ +class ListPrivateCloudsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of private clouds. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PrivateCloud private_clouds = 1; + */ + private $private_clouds; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VmwareEngine\V1\PrivateCloud>|\Google\Protobuf\Internal\RepeatedField $private_clouds + * A list of private clouds. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached when making an aggregated query using + * wildcards. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * A list of private clouds. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PrivateCloud private_clouds = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPrivateClouds() + { + return $this->private_clouds; + } + + /** + * A list of private clouds. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PrivateCloud private_clouds = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\PrivateCloud>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPrivateClouds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\PrivateCloud::class); + $this->private_clouds = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsRequest.php new file mode 100644 index 000000000000..8cd0a8dbe644 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsRequest.php @@ -0,0 +1,199 @@ +google.cloud.vmwareengine.v1.ListSubnetsRequest + */ +class ListSubnetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud to be queried for + * subnets. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of subnets to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListSubnetsRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListSubnetsRequest` must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource name of the private cloud to be queried for + * subnets. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ListSubnetsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the private cloud to be queried for + * subnets. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type int $page_size + * The maximum number of subnets to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListSubnetsRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListSubnetsRequest` must match the call that provided the page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud to be queried for + * subnets. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the private cloud to be queried for + * subnets. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of subnets to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of subnets to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListSubnetsRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListSubnetsRequest` must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListSubnetsRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListSubnetsRequest` must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsResponse.php new file mode 100644 index 000000000000..d656dc7500ea --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsResponse.php @@ -0,0 +1,106 @@ +google.cloud.vmwareengine.v1.ListSubnetsResponse + */ +class ListSubnetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of subnets. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Subnet subnets = 1; + */ + private $subnets; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VmwareEngine\V1\Subnet>|\Google\Protobuf\Internal\RepeatedField $subnets + * A list of subnets. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * A list of subnets. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Subnet subnets = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSubnets() + { + return $this->subnets; + } + + /** + * A list of subnets. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Subnet subnets = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\Subnet>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSubnets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\Subnet::class); + $this->subnets = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksRequest.php new file mode 100644 index 000000000000..5d04a5162774 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksRequest.php @@ -0,0 +1,357 @@ +google.cloud.vmwareengine.v1.ListVmwareEngineNetworksRequest + */ +class ListVmwareEngineNetworksRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location to query for + * VMware Engine networks. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/global` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of results to return in one page. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListVmwareEngineNetworks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListVmwareEngineNetworks` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of network peerings, you can + * exclude the ones named `example-network` by specifying + * `name != "example-network"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-network") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-network-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-network-2") + * ``` + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the location to query for + * VMware Engine networks. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/global` + * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ListVmwareEngineNetworksRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the location to query for + * VMware Engine networks. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/global` + * @type int $page_size + * The maximum number of results to return in one page. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListVmwareEngineNetworks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListVmwareEngineNetworks` must match the call that provided the page + * token. + * @type string $filter + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of network peerings, you can + * exclude the ones named `example-network` by specifying + * `name != "example-network"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-network") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-network-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-network-2") + * ``` + * @type string $order_by + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location to query for + * VMware Engine networks. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/global` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the location to query for + * VMware Engine networks. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/global` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of results to return in one page. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in one page. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListVmwareEngineNetworks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListVmwareEngineNetworks` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListVmwareEngineNetworks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListVmwareEngineNetworks` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of network peerings, you can + * exclude the ones named `example-network` by specifying + * `name != "example-network"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-network") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-network-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-network-2") + * ``` + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of network peerings, you can + * exclude the ones named `example-network` by specifying + * `name != "example-network"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-network") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-network-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-network-2") + * ``` + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksResponse.php new file mode 100644 index 000000000000..0ca339105be3 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksResponse.php @@ -0,0 +1,140 @@ +google.cloud.vmwareengine.v1.ListVmwareEngineNetworksResponse + */ +class ListVmwareEngineNetworksResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of VMware Engine networks. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_networks = 1; + */ + private $vmware_engine_networks; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Unreachable resources. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork>|\Google\Protobuf\Internal\RepeatedField $vmware_engine_networks + * A list of VMware Engine networks. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Unreachable resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * A list of VMware Engine networks. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_networks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVmwareEngineNetworks() + { + return $this->vmware_engine_networks; + } + + /** + * A list of VMware Engine networks. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_networks = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVmwareEngineNetworks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork::class); + $this->vmware_engine_networks = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Unreachable resources. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Unreachable resources. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkConfig.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkConfig.php new file mode 100644 index 000000000000..47865959a4aa --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkConfig.php @@ -0,0 +1,214 @@ +google.cloud.vmwareengine.v1.NetworkConfig + */ +class NetworkConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Management CIDR used by VMware management appliances. + * + * Generated from protobuf field string management_cidr = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $management_cidr = ''; + /** + * Optional. The relative resource name of the VMware Engine network attached + * to the private cloud. Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}` can either be a project number or a project ID. + * + * Generated from protobuf field string vmware_engine_network = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $vmware_engine_network = ''; + /** + * Output only. The canonical name of the VMware Engine network in the form: + * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * + * Generated from protobuf field string vmware_engine_network_canonical = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $vmware_engine_network_canonical = ''; + /** + * Output only. The IP address layout version of the management IP address + * range. Possible versions include: + * * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address + * layout used by some existing private clouds. This is no longer supported + * for new private clouds as it does not support all features. + * * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address + * layout used by all newly created private clouds. This version supports all + * current features. + * + * Generated from protobuf field int32 management_ip_address_layout_version = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $management_ip_address_layout_version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $management_cidr + * Required. Management CIDR used by VMware management appliances. + * @type string $vmware_engine_network + * Optional. The relative resource name of the VMware Engine network attached + * to the private cloud. Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}` can either be a project number or a project ID. + * @type string $vmware_engine_network_canonical + * Output only. The canonical name of the VMware Engine network in the form: + * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * @type int $management_ip_address_layout_version + * Output only. The IP address layout version of the management IP address + * range. Possible versions include: + * * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address + * layout used by some existing private clouds. This is no longer supported + * for new private clouds as it does not support all features. + * * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address + * layout used by all newly created private clouds. This version supports all + * current features. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Management CIDR used by VMware management appliances. + * + * Generated from protobuf field string management_cidr = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getManagementCidr() + { + return $this->management_cidr; + } + + /** + * Required. Management CIDR used by VMware management appliances. + * + * Generated from protobuf field string management_cidr = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setManagementCidr($var) + { + GPBUtil::checkString($var, True); + $this->management_cidr = $var; + + return $this; + } + + /** + * Optional. The relative resource name of the VMware Engine network attached + * to the private cloud. Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}` can either be a project number or a project ID. + * + * Generated from protobuf field string vmware_engine_network = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getVmwareEngineNetwork() + { + return $this->vmware_engine_network; + } + + /** + * Optional. The relative resource name of the VMware Engine network attached + * to the private cloud. Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}` can either be a project number or a project ID. + * + * Generated from protobuf field string vmware_engine_network = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVmwareEngineNetwork($var) + { + GPBUtil::checkString($var, True); + $this->vmware_engine_network = $var; + + return $this; + } + + /** + * Output only. The canonical name of the VMware Engine network in the form: + * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * + * Generated from protobuf field string vmware_engine_network_canonical = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getVmwareEngineNetworkCanonical() + { + return $this->vmware_engine_network_canonical; + } + + /** + * Output only. The canonical name of the VMware Engine network in the form: + * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * + * Generated from protobuf field string vmware_engine_network_canonical = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVmwareEngineNetworkCanonical($var) + { + GPBUtil::checkString($var, True); + $this->vmware_engine_network_canonical = $var; + + return $this; + } + + /** + * Output only. The IP address layout version of the management IP address + * range. Possible versions include: + * * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address + * layout used by some existing private clouds. This is no longer supported + * for new private clouds as it does not support all features. + * * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address + * layout used by all newly created private clouds. This version supports all + * current features. + * + * Generated from protobuf field int32 management_ip_address_layout_version = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getManagementIpAddressLayoutVersion() + { + return $this->management_ip_address_layout_version; + } + + /** + * Output only. The IP address layout version of the management IP address + * range. Possible versions include: + * * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address + * layout used by some existing private clouds. This is no longer supported + * for new private clouds as it does not support all features. + * * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address + * layout used by all newly created private clouds. This version supports all + * current features. + * + * Generated from protobuf field int32 management_ip_address_layout_version = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setManagementIpAddressLayoutVersion($var) + { + GPBUtil::checkInt32($var); + $this->management_ip_address_layout_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy.php new file mode 100644 index 000000000000..a0706a1327c9 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy.php @@ -0,0 +1,470 @@ +google.cloud.vmwareengine.v1.NetworkPolicy + */ +class NetworkPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of this network policy. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Network service that allows VMware workloads to access the internet. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService internet_access = 6; + */ + protected $internet_access = null; + /** + * Network service that allows External IP addresses to be assigned to VMware + * workloads. This service can only be enabled when `internet_access` is also + * enabled. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService external_ip = 7; + */ + protected $external_ip = null; + /** + * Required. IP address range in CIDR notation used to create internet access + * and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is + * required. The range cannot overlap with any prefixes either in the consumer + * VPC network or in use by the private clouds attached to that VPC network. + * + * Generated from protobuf field string edge_services_cidr = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $edge_services_cidr = ''; + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Optional. The relative resource name of the VMware Engine network. + * Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}` can either be a project number or a project ID. + * + * Generated from protobuf field string vmware_engine_network = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $vmware_engine_network = ''; + /** + * Optional. User-provided description for this network policy. + * + * Generated from protobuf field string description = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. The canonical name of the VMware Engine network in the form: + * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * + * Generated from protobuf field string vmware_engine_network_canonical = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $vmware_engine_network_canonical = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of this network policy. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of this resource. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last update time of this resource. + * @type \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService $internet_access + * Network service that allows VMware workloads to access the internet. + * @type \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService $external_ip + * Network service that allows External IP addresses to be assigned to VMware + * workloads. This service can only be enabled when `internet_access` is also + * enabled. + * @type string $edge_services_cidr + * Required. IP address range in CIDR notation used to create internet access + * and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is + * required. The range cannot overlap with any prefixes either in the consumer + * VPC network or in use by the private clouds attached to that VPC network. + * @type string $uid + * Output only. System-generated unique identifier for the resource. + * @type string $vmware_engine_network + * Optional. The relative resource name of the VMware Engine network. + * Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}` can either be a project number or a project ID. + * @type string $description + * Optional. User-provided description for this network policy. + * @type string $vmware_engine_network_canonical + * Output only. The canonical name of the VMware Engine network in the form: + * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of this network policy. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of this network policy. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Network service that allows VMware workloads to access the internet. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService internet_access = 6; + * @return \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService|null + */ + public function getInternetAccess() + { + return $this->internet_access; + } + + public function hasInternetAccess() + { + return isset($this->internet_access); + } + + public function clearInternetAccess() + { + unset($this->internet_access); + } + + /** + * Network service that allows VMware workloads to access the internet. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService internet_access = 6; + * @param \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService $var + * @return $this + */ + public function setInternetAccess($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService::class); + $this->internet_access = $var; + + return $this; + } + + /** + * Network service that allows External IP addresses to be assigned to VMware + * workloads. This service can only be enabled when `internet_access` is also + * enabled. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService external_ip = 7; + * @return \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService|null + */ + public function getExternalIp() + { + return $this->external_ip; + } + + public function hasExternalIp() + { + return isset($this->external_ip); + } + + public function clearExternalIp() + { + unset($this->external_ip); + } + + /** + * Network service that allows External IP addresses to be assigned to VMware + * workloads. This service can only be enabled when `internet_access` is also + * enabled. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService external_ip = 7; + * @param \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService $var + * @return $this + */ + public function setExternalIp($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService::class); + $this->external_ip = $var; + + return $this; + } + + /** + * Required. IP address range in CIDR notation used to create internet access + * and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is + * required. The range cannot overlap with any prefixes either in the consumer + * VPC network or in use by the private clouds attached to that VPC network. + * + * Generated from protobuf field string edge_services_cidr = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEdgeServicesCidr() + { + return $this->edge_services_cidr; + } + + /** + * Required. IP address range in CIDR notation used to create internet access + * and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is + * required. The range cannot overlap with any prefixes either in the consumer + * VPC network or in use by the private clouds attached to that VPC network. + * + * Generated from protobuf field string edge_services_cidr = 9 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEdgeServicesCidr($var) + { + GPBUtil::checkString($var, True); + $this->edge_services_cidr = $var; + + return $this; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Optional. The relative resource name of the VMware Engine network. + * Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}` can either be a project number or a project ID. + * + * Generated from protobuf field string vmware_engine_network = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getVmwareEngineNetwork() + { + return $this->vmware_engine_network; + } + + /** + * Optional. The relative resource name of the VMware Engine network. + * Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}` can either be a project number or a project ID. + * + * Generated from protobuf field string vmware_engine_network = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVmwareEngineNetwork($var) + { + GPBUtil::checkString($var, True); + $this->vmware_engine_network = $var; + + return $this; + } + + /** + * Optional. User-provided description for this network policy. + * + * Generated from protobuf field string description = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. User-provided description for this network policy. + * + * Generated from protobuf field string description = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The canonical name of the VMware Engine network in the form: + * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * + * Generated from protobuf field string vmware_engine_network_canonical = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getVmwareEngineNetworkCanonical() + { + return $this->vmware_engine_network_canonical; + } + + /** + * Output only. The canonical name of the VMware Engine network in the form: + * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * + * Generated from protobuf field string vmware_engine_network_canonical = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVmwareEngineNetworkCanonical($var) + { + GPBUtil::checkString($var, True); + $this->vmware_engine_network_canonical = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService.php new file mode 100644 index 000000000000..7569a32d83be --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService.php @@ -0,0 +1,112 @@ +google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService + */ +class NetworkService extends \Google\Protobuf\Internal\Message +{ + /** + * True if the service is enabled; false otherwise. + * + * Generated from protobuf field bool enabled = 1; + */ + protected $enabled = false; + /** + * Output only. State of the service. New values may be added to this enum + * when appropriate. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * True if the service is enabled; false otherwise. + * @type int $state + * Output only. State of the service. New values may be added to this enum + * when appropriate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * True if the service is enabled; false otherwise. + * + * Generated from protobuf field bool enabled = 1; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * True if the service is enabled; false otherwise. + * + * Generated from protobuf field bool enabled = 1; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Output only. State of the service. New values may be added to this enum + * when appropriate. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the service. New values may be added to this enum + * when appropriate. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService\State::class); + $this->state = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NetworkService::class, \Google\Cloud\VmwareEngine\V1\NetworkPolicy_NetworkService::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService/State.php new file mode 100644 index 000000000000..7254794bb492 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService/State.php @@ -0,0 +1,72 @@ +google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State + */ +class State +{ + /** + * Unspecified service state. This is the default value. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Service is not provisioned. + * + * Generated from protobuf enum UNPROVISIONED = 1; + */ + const UNPROVISIONED = 1; + /** + * Service is in the process of being provisioned/deprovisioned. + * + * Generated from protobuf enum RECONCILING = 2; + */ + const RECONCILING = 2; + /** + * Service is active. + * + * Generated from protobuf enum ACTIVE = 3; + */ + const ACTIVE = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::UNPROVISIONED => 'UNPROVISIONED', + self::RECONCILING => 'RECONCILING', + self::ACTIVE => 'ACTIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\NetworkPolicy_NetworkService_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType.php new file mode 100644 index 000000000000..0dd50764f83f --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType.php @@ -0,0 +1,329 @@ +google.cloud.vmwareengine.v1.NodeType + */ +class NodeType extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of this node type. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The canonical identifier of the node type + * (corresponds to the `NodeType`). For example: standard-72. + * + * Generated from protobuf field string node_type_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $node_type_id = ''; + /** + * Output only. The friendly name for this node type. + * For example: ve1-standard-72 + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Output only. The total number of virtual CPUs in a single node. + * + * Generated from protobuf field int32 virtual_cpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $virtual_cpu_count = 0; + /** + * Output only. The total number of CPU cores in a single node. + * + * Generated from protobuf field int32 total_core_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $total_core_count = 0; + /** + * Output only. The amount of physical memory available, defined in GB. + * + * Generated from protobuf field int32 memory_gb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $memory_gb = 0; + /** + * Output only. The amount of storage available, defined in GB. + * + * Generated from protobuf field int32 disk_size_gb = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $disk_size_gb = 0; + /** + * Output only. List of possible values of custom core count. + * + * Generated from protobuf field repeated int32 available_custom_core_counts = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $available_custom_core_counts; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of this node type. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + * @type string $node_type_id + * Output only. The canonical identifier of the node type + * (corresponds to the `NodeType`). For example: standard-72. + * @type string $display_name + * Output only. The friendly name for this node type. + * For example: ve1-standard-72 + * @type int $virtual_cpu_count + * Output only. The total number of virtual CPUs in a single node. + * @type int $total_core_count + * Output only. The total number of CPU cores in a single node. + * @type int $memory_gb + * Output only. The amount of physical memory available, defined in GB. + * @type int $disk_size_gb + * Output only. The amount of storage available, defined in GB. + * @type array|\Google\Protobuf\Internal\RepeatedField $available_custom_core_counts + * Output only. List of possible values of custom core count. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of this node type. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of this node type. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The canonical identifier of the node type + * (corresponds to the `NodeType`). For example: standard-72. + * + * Generated from protobuf field string node_type_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNodeTypeId() + { + return $this->node_type_id; + } + + /** + * Output only. The canonical identifier of the node type + * (corresponds to the `NodeType`). For example: standard-72. + * + * Generated from protobuf field string node_type_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNodeTypeId($var) + { + GPBUtil::checkString($var, True); + $this->node_type_id = $var; + + return $this; + } + + /** + * Output only. The friendly name for this node type. + * For example: ve1-standard-72 + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. The friendly name for this node type. + * For example: ve1-standard-72 + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. The total number of virtual CPUs in a single node. + * + * Generated from protobuf field int32 virtual_cpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getVirtualCpuCount() + { + return $this->virtual_cpu_count; + } + + /** + * Output only. The total number of virtual CPUs in a single node. + * + * Generated from protobuf field int32 virtual_cpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setVirtualCpuCount($var) + { + GPBUtil::checkInt32($var); + $this->virtual_cpu_count = $var; + + return $this; + } + + /** + * Output only. The total number of CPU cores in a single node. + * + * Generated from protobuf field int32 total_core_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTotalCoreCount() + { + return $this->total_core_count; + } + + /** + * Output only. The total number of CPU cores in a single node. + * + * Generated from protobuf field int32 total_core_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTotalCoreCount($var) + { + GPBUtil::checkInt32($var); + $this->total_core_count = $var; + + return $this; + } + + /** + * Output only. The amount of physical memory available, defined in GB. + * + * Generated from protobuf field int32 memory_gb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getMemoryGb() + { + return $this->memory_gb; + } + + /** + * Output only. The amount of physical memory available, defined in GB. + * + * Generated from protobuf field int32 memory_gb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setMemoryGb($var) + { + GPBUtil::checkInt32($var); + $this->memory_gb = $var; + + return $this; + } + + /** + * Output only. The amount of storage available, defined in GB. + * + * Generated from protobuf field int32 disk_size_gb = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getDiskSizeGb() + { + return $this->disk_size_gb; + } + + /** + * Output only. The amount of storage available, defined in GB. + * + * Generated from protobuf field int32 disk_size_gb = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDiskSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->disk_size_gb = $var; + + return $this; + } + + /** + * Output only. List of possible values of custom core count. + * + * Generated from protobuf field repeated int32 available_custom_core_counts = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAvailableCustomCoreCounts() + { + return $this->available_custom_core_counts; + } + + /** + * Output only. List of possible values of custom core count. + * + * Generated from protobuf field repeated int32 available_custom_core_counts = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAvailableCustomCoreCounts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->available_custom_core_counts = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeTypeConfig.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeTypeConfig.php new file mode 100644 index 000000000000..5308613bd056 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeTypeConfig.php @@ -0,0 +1,113 @@ +google.cloud.vmwareengine.v1.NodeTypeConfig + */ +class NodeTypeConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The number of nodes of this type in the cluster + * + * Generated from protobuf field int32 node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $node_count = 0; + /** + * Optional. Customized number of cores available to each node of the type. + * This number must always be one of `nodeType.availableCustomCoreCounts`. + * If zero is provided max value from `nodeType.availableCustomCoreCounts` + * will be used. + * + * Generated from protobuf field int32 custom_core_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $custom_core_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $node_count + * Required. The number of nodes of this type in the cluster + * @type int $custom_core_count + * Optional. Customized number of cores available to each node of the type. + * This number must always be one of `nodeType.availableCustomCoreCounts`. + * If zero is provided max value from `nodeType.availableCustomCoreCounts` + * will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The number of nodes of this type in the cluster + * + * Generated from protobuf field int32 node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getNodeCount() + { + return $this->node_count; + } + + /** + * Required. The number of nodes of this type in the cluster + * + * Generated from protobuf field int32 node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setNodeCount($var) + { + GPBUtil::checkInt32($var); + $this->node_count = $var; + + return $this; + } + + /** + * Optional. Customized number of cores available to each node of the type. + * This number must always be one of `nodeType.availableCustomCoreCounts`. + * If zero is provided max value from `nodeType.availableCustomCoreCounts` + * will be used. + * + * Generated from protobuf field int32 custom_core_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getCustomCoreCount() + { + return $this->custom_core_count; + } + + /** + * Optional. Customized number of cores available to each node of the type. + * This number must always be one of `nodeType.availableCustomCoreCounts`. + * If zero is provided max value from `nodeType.availableCustomCoreCounts` + * will be used. + * + * Generated from protobuf field int32 custom_core_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setCustomCoreCount($var) + { + GPBUtil::checkInt32($var); + $this->custom_core_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx.php new file mode 100644 index 000000000000..21cfc7076157 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx.php @@ -0,0 +1,169 @@ +google.cloud.vmwareengine.v1.Nsx + */ +class Nsx extends \Google\Protobuf\Internal\Message +{ + /** + * Internal IP address of the appliance. + * + * Generated from protobuf field string internal_ip = 2; + */ + protected $internal_ip = ''; + /** + * Version of the appliance. + * + * Generated from protobuf field string version = 4; + */ + protected $version = ''; + /** + * Output only. The state of the appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Fully qualified domain name of the appliance. + * + * Generated from protobuf field string fqdn = 6; + */ + protected $fqdn = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $internal_ip + * Internal IP address of the appliance. + * @type string $version + * Version of the appliance. + * @type int $state + * Output only. The state of the appliance. + * @type string $fqdn + * Fully qualified domain name of the appliance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Internal IP address of the appliance. + * + * Generated from protobuf field string internal_ip = 2; + * @return string + */ + public function getInternalIp() + { + return $this->internal_ip; + } + + /** + * Internal IP address of the appliance. + * + * Generated from protobuf field string internal_ip = 2; + * @param string $var + * @return $this + */ + public function setInternalIp($var) + { + GPBUtil::checkString($var, True); + $this->internal_ip = $var; + + return $this; + } + + /** + * Version of the appliance. + * + * Generated from protobuf field string version = 4; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Version of the appliance. + * + * Generated from protobuf field string version = 4; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Output only. The state of the appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\Nsx\State::class); + $this->state = $var; + + return $this; + } + + /** + * Fully qualified domain name of the appliance. + * + * Generated from protobuf field string fqdn = 6; + * @return string + */ + public function getFqdn() + { + return $this->fqdn; + } + + /** + * Fully qualified domain name of the appliance. + * + * Generated from protobuf field string fqdn = 6; + * @param string $var + * @return $this + */ + public function setFqdn($var) + { + GPBUtil::checkString($var, True); + $this->fqdn = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx/State.php new file mode 100644 index 000000000000..768f7cb3f320 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx/State.php @@ -0,0 +1,64 @@ +google.cloud.vmwareengine.v1.Nsx.State + */ +class State +{ + /** + * Unspecified appliance state. This is the default value. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The appliance is operational and can be used. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The appliance is being deployed. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\Nsx_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/OperationMetadata.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/OperationMetadata.php new file mode 100644 index 000000000000..a520f27cb3e3 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/OperationMetadata.php @@ -0,0 +1,311 @@ +google.cloud.vmwareengine.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. True if the user has requested cancellation + * of the operation; false otherwise. + * Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_message + * Output only. Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. True if the user has requested cancellation + * of the operation; false otherwise. + * Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. True if the user has requested cancellation + * of the operation; false otherwise. + * Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. True if the user has requested cancellation + * of the operation; false otherwise. + * Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud.php new file mode 100644 index 000000000000..2a16bce58536 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud.php @@ -0,0 +1,601 @@ +google.cloud.vmwareengine.v1.PrivateCloud + */ +class PrivateCloud extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of this private cloud. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Time when the resource was scheduled for deletion. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Output only. Time when the resource will be irreversibly deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * Output only. State of the resource. New values may be added to this enum + * when appropriate. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Required. Network configuration of the private cloud. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkConfig network_config = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network_config = null; + /** + * Required. Input only. The management cluster for this private cloud. + * This field is required during creation of the private cloud to provide + * details for the default cluster. + * The following fields can't be changed after private cloud creation: + * `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster management_cluster = 10 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + */ + protected $management_cluster = null; + /** + * User-provided description for this private cloud. + * + * Generated from protobuf field string description = 11; + */ + protected $description = ''; + /** + * Output only. HCX appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx hcx = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $hcx = null; + /** + * Output only. NSX appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx nsx = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $nsx = null; + /** + * Output only. Vcenter appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter vcenter = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $vcenter = null; + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of this private cloud. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of this resource. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last update time of this resource. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. Time when the resource was scheduled for deletion. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. Time when the resource will be irreversibly deleted. + * @type int $state + * Output only. State of the resource. New values may be added to this enum + * when appropriate. + * @type \Google\Cloud\VmwareEngine\V1\NetworkConfig $network_config + * Required. Network configuration of the private cloud. + * @type \Google\Cloud\VmwareEngine\V1\PrivateCloud\ManagementCluster $management_cluster + * Required. Input only. The management cluster for this private cloud. + * This field is required during creation of the private cloud to provide + * details for the default cluster. + * The following fields can't be changed after private cloud creation: + * `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`. + * @type string $description + * User-provided description for this private cloud. + * @type \Google\Cloud\VmwareEngine\V1\Hcx $hcx + * Output only. HCX appliance. + * @type \Google\Cloud\VmwareEngine\V1\Nsx $nsx + * Output only. NSX appliance. + * @type \Google\Cloud\VmwareEngine\V1\Vcenter $vcenter + * Output only. Vcenter appliance. + * @type string $uid + * Output only. System-generated unique identifier for the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of this private cloud. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of this private cloud. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. Time when the resource was scheduled for deletion. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. Time when the resource was scheduled for deletion. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Output only. Time when the resource will be irreversibly deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Output only. Time when the resource will be irreversibly deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + + /** + * Output only. State of the resource. New values may be added to this enum + * when appropriate. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the resource. New values may be added to this enum + * when appropriate. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\PrivateCloud\State::class); + $this->state = $var; + + return $this; + } + + /** + * Required. Network configuration of the private cloud. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkConfig network_config = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\NetworkConfig|null + */ + public function getNetworkConfig() + { + return $this->network_config; + } + + public function hasNetworkConfig() + { + return isset($this->network_config); + } + + public function clearNetworkConfig() + { + unset($this->network_config); + } + + /** + * Required. Network configuration of the private cloud. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkConfig network_config = 9 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\NetworkConfig $var + * @return $this + */ + public function setNetworkConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkConfig::class); + $this->network_config = $var; + + return $this; + } + + /** + * Required. Input only. The management cluster for this private cloud. + * This field is required during creation of the private cloud to provide + * details for the default cluster. + * The following fields can't be changed after private cloud creation: + * `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster management_cluster = 10 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\PrivateCloud\ManagementCluster|null + */ + public function getManagementCluster() + { + return $this->management_cluster; + } + + public function hasManagementCluster() + { + return isset($this->management_cluster); + } + + public function clearManagementCluster() + { + unset($this->management_cluster); + } + + /** + * Required. Input only. The management cluster for this private cloud. + * This field is required during creation of the private cloud to provide + * details for the default cluster. + * The following fields can't be changed after private cloud creation: + * `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster management_cluster = 10 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\PrivateCloud\ManagementCluster $var + * @return $this + */ + public function setManagementCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\PrivateCloud\ManagementCluster::class); + $this->management_cluster = $var; + + return $this; + } + + /** + * User-provided description for this private cloud. + * + * Generated from protobuf field string description = 11; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User-provided description for this private cloud. + * + * Generated from protobuf field string description = 11; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. HCX appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx hcx = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VmwareEngine\V1\Hcx|null + */ + public function getHcx() + { + return $this->hcx; + } + + public function hasHcx() + { + return isset($this->hcx); + } + + public function clearHcx() + { + unset($this->hcx); + } + + /** + * Output only. HCX appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx hcx = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VmwareEngine\V1\Hcx $var + * @return $this + */ + public function setHcx($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Hcx::class); + $this->hcx = $var; + + return $this; + } + + /** + * Output only. NSX appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx nsx = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VmwareEngine\V1\Nsx|null + */ + public function getNsx() + { + return $this->nsx; + } + + public function hasNsx() + { + return isset($this->nsx); + } + + public function clearNsx() + { + unset($this->nsx); + } + + /** + * Output only. NSX appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx nsx = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VmwareEngine\V1\Nsx $var + * @return $this + */ + public function setNsx($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Nsx::class); + $this->nsx = $var; + + return $this; + } + + /** + * Output only. Vcenter appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter vcenter = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VmwareEngine\V1\Vcenter|null + */ + public function getVcenter() + { + return $this->vcenter; + } + + public function hasVcenter() + { + return isset($this->vcenter); + } + + public function clearVcenter() + { + unset($this->vcenter); + } + + /** + * Output only. Vcenter appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter vcenter = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VmwareEngine\V1\Vcenter $var + * @return $this + */ + public function setVcenter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Vcenter::class); + $this->vcenter = $var; + + return $this; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/ManagementCluster.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/ManagementCluster.php new file mode 100644 index 000000000000..015764f0fc4b --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/ManagementCluster.php @@ -0,0 +1,136 @@ +google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster + */ +class ManagementCluster extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The user-provided identifier of the new `Cluster`. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC + * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) + * + * Generated from protobuf field string cluster_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cluster_id = ''; + /** + * Required. The map of cluster node types in this cluster, where the key is + * canonical identifier of the node type (corresponds to the `NodeType`). + * + * Generated from protobuf field map node_type_configs = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + private $node_type_configs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cluster_id + * Required. The user-provided identifier of the new `Cluster`. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC + * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) + * @type array|\Google\Protobuf\Internal\MapField $node_type_configs + * Required. The map of cluster node types in this cluster, where the key is + * canonical identifier of the node type (corresponds to the `NodeType`). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The user-provided identifier of the new `Cluster`. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC + * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) + * + * Generated from protobuf field string cluster_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getClusterId() + { + return $this->cluster_id; + } + + /** + * Required. The user-provided identifier of the new `Cluster`. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC + * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) + * + * Generated from protobuf field string cluster_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setClusterId($var) + { + GPBUtil::checkString($var, True); + $this->cluster_id = $var; + + return $this; + } + + /** + * Required. The map of cluster node types in this cluster, where the key is + * canonical identifier of the node type (corresponds to the `NodeType`). + * + * Generated from protobuf field map node_type_configs = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getNodeTypeConfigs() + { + return $this->node_type_configs; + } + + /** + * Required. The map of cluster node types in this cluster, where the key is + * canonical identifier of the node type (corresponds to the `NodeType`). + * + * Generated from protobuf field map node_type_configs = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setNodeTypeConfigs($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\NodeTypeConfig::class); + $this->node_type_configs = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ManagementCluster::class, \Google\Cloud\VmwareEngine\V1\PrivateCloud_ManagementCluster::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/State.php new file mode 100644 index 000000000000..d7c021d20aec --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/State.php @@ -0,0 +1,94 @@ +google.cloud.vmwareengine.v1.PrivateCloud.State + */ +class State +{ + /** + * The default value. This value should never be used. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The private cloud is ready. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The private cloud is being created. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * The private cloud is being updated. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * The private cloud is in failed state. + * + * Generated from protobuf enum FAILED = 5; + */ + const FAILED = 5; + /** + * The private cloud is scheduled for deletion. The deletion process can be + * cancelled by using the corresponding undelete method. + * + * Generated from protobuf enum DELETED = 6; + */ + const DELETED = 6; + /** + * The private cloud is irreversibly deleted and is being removed from the + * system. + * + * Generated from protobuf enum PURGING = 7; + */ + const PURGING = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + self::UPDATING => 'UPDATING', + self::FAILED => 'FAILED', + self::DELETED => 'DELETED', + self::PURGING => 'PURGING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\PrivateCloud_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetNsxCredentialsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetNsxCredentialsRequest.php new file mode 100644 index 000000000000..9da980200072 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetNsxCredentialsRequest.php @@ -0,0 +1,185 @@ +google.cloud.vmwareengine.v1.ResetNsxCredentialsRequest + */ +class ResetNsxCredentialsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud + * to reset credentials for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $private_cloud = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $privateCloud Required. The resource name of the private cloud + * to reset credentials for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ResetNsxCredentialsRequest + * + * @experimental + */ + public static function build(string $privateCloud): self + { + return (new self()) + ->setPrivateCloud($privateCloud); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $private_cloud + * Required. The resource name of the private cloud + * to reset credentials for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud + * to reset credentials for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getPrivateCloud() + { + return $this->private_cloud; + } + + /** + * Required. The resource name of the private cloud + * to reset credentials for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPrivateCloud($var) + { + GPBUtil::checkString($var, True); + $this->private_cloud = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetVcenterCredentialsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetVcenterCredentialsRequest.php new file mode 100644 index 000000000000..78492c06f46f --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetVcenterCredentialsRequest.php @@ -0,0 +1,185 @@ +google.cloud.vmwareengine.v1.ResetVcenterCredentialsRequest + */ +class ResetVcenterCredentialsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud + * to reset credentials for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $private_cloud = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $privateCloud Required. The resource name of the private cloud + * to reset credentials for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ResetVcenterCredentialsRequest + * + * @experimental + */ + public static function build(string $privateCloud): self + { + return (new self()) + ->setPrivateCloud($privateCloud); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $private_cloud + * Required. The resource name of the private cloud + * to reset credentials for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud + * to reset credentials for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getPrivateCloud() + { + return $this->private_cloud; + } + + /** + * Required. The resource name of the private cloud + * to reset credentials for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPrivateCloud($var) + { + GPBUtil::checkString($var, True); + $this->private_cloud = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowNsxCredentialsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowNsxCredentialsRequest.php new file mode 100644 index 000000000000..a84e71cca4cd --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowNsxCredentialsRequest.php @@ -0,0 +1,107 @@ +google.cloud.vmwareengine.v1.ShowNsxCredentialsRequest + */ +class ShowNsxCredentialsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud + * to be queried for credentials. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $private_cloud = ''; + + /** + * @param string $privateCloud Required. The resource name of the private cloud + * to be queried for credentials. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ShowNsxCredentialsRequest + * + * @experimental + */ + public static function build(string $privateCloud): self + { + return (new self()) + ->setPrivateCloud($privateCloud); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $private_cloud + * Required. The resource name of the private cloud + * to be queried for credentials. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud + * to be queried for credentials. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getPrivateCloud() + { + return $this->private_cloud; + } + + /** + * Required. The resource name of the private cloud + * to be queried for credentials. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPrivateCloud($var) + { + GPBUtil::checkString($var, True); + $this->private_cloud = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowVcenterCredentialsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowVcenterCredentialsRequest.php new file mode 100644 index 000000000000..3c4bf5917df0 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowVcenterCredentialsRequest.php @@ -0,0 +1,107 @@ +google.cloud.vmwareengine.v1.ShowVcenterCredentialsRequest + */ +class ShowVcenterCredentialsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud + * to be queried for credentials. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $private_cloud = ''; + + /** + * @param string $privateCloud Required. The resource name of the private cloud + * to be queried for credentials. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ShowVcenterCredentialsRequest + * + * @experimental + */ + public static function build(string $privateCloud): self + { + return (new self()) + ->setPrivateCloud($privateCloud); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $private_cloud + * Required. The resource name of the private cloud + * to be queried for credentials. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud + * to be queried for credentials. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getPrivateCloud() + { + return $this->private_cloud; + } + + /** + * Required. The resource name of the private cloud + * to be queried for credentials. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPrivateCloud($var) + { + GPBUtil::checkString($var, True); + $this->private_cloud = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet.php new file mode 100644 index 000000000000..7ba099337b9f --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet.php @@ -0,0 +1,228 @@ +google.cloud.vmwareengine.v1.Subnet + */ +class Subnet extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of this subnet. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * The IP address range of the subnet in CIDR format '10.0.0.0/24'. + * + * Generated from protobuf field string ip_cidr_range = 7; + */ + protected $ip_cidr_range = ''; + /** + * The IP address of the gateway of this subnet. + * Must fall within the IP prefix defined above. + * + * Generated from protobuf field string gateway_ip = 8; + */ + protected $gateway_ip = ''; + /** + * Output only. The type of the subnet. For example "management" or + * "userDefined". + * + * Generated from protobuf field string type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $type = ''; + /** + * Output only. The state of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Subnet.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of this subnet. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` + * @type string $ip_cidr_range + * The IP address range of the subnet in CIDR format '10.0.0.0/24'. + * @type string $gateway_ip + * The IP address of the gateway of this subnet. + * Must fall within the IP prefix defined above. + * @type string $type + * Output only. The type of the subnet. For example "management" or + * "userDefined". + * @type int $state + * Output only. The state of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of this subnet. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of this subnet. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The IP address range of the subnet in CIDR format '10.0.0.0/24'. + * + * Generated from protobuf field string ip_cidr_range = 7; + * @return string + */ + public function getIpCidrRange() + { + return $this->ip_cidr_range; + } + + /** + * The IP address range of the subnet in CIDR format '10.0.0.0/24'. + * + * Generated from protobuf field string ip_cidr_range = 7; + * @param string $var + * @return $this + */ + public function setIpCidrRange($var) + { + GPBUtil::checkString($var, True); + $this->ip_cidr_range = $var; + + return $this; + } + + /** + * The IP address of the gateway of this subnet. + * Must fall within the IP prefix defined above. + * + * Generated from protobuf field string gateway_ip = 8; + * @return string + */ + public function getGatewayIp() + { + return $this->gateway_ip; + } + + /** + * The IP address of the gateway of this subnet. + * Must fall within the IP prefix defined above. + * + * Generated from protobuf field string gateway_ip = 8; + * @param string $var + * @return $this + */ + public function setGatewayIp($var) + { + GPBUtil::checkString($var, True); + $this->gateway_ip = $var; + + return $this; + } + + /** + * Output only. The type of the subnet. For example "management" or + * "userDefined". + * + * Generated from protobuf field string type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Output only. The type of the subnet. For example "management" or + * "userDefined". + * + * Generated from protobuf field string type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Output only. The state of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Subnet.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Subnet.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\Subnet\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet/State.php new file mode 100644 index 000000000000..d66488785c28 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet/State.php @@ -0,0 +1,78 @@ +google.cloud.vmwareengine.v1.Subnet.State + */ +class State +{ + /** + * The default value. This value should never be used. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The subnet is ready. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The subnet is being created. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * The subnet is being updated. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * The subnet is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\Subnet_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UndeletePrivateCloudRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UndeletePrivateCloudRequest.php new file mode 100644 index 000000000000..821fbcbc6865 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UndeletePrivateCloudRequest.php @@ -0,0 +1,140 @@ +google.cloud.vmwareengine.v1.UndeletePrivateCloudRequest + */ +class UndeletePrivateCloudRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud scheduled for deletion. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The resource name of the private cloud scheduled for deletion. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\UndeletePrivateCloudRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the private cloud scheduled for deletion. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type string $request_id + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud scheduled for deletion. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the private cloud scheduled for deletion. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateClusterRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateClusterRequest.php new file mode 100644 index 000000000000..badc304f0823 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateClusterRequest.php @@ -0,0 +1,233 @@ +google.cloud.vmwareengine.v1.UpdateClusterRequest + */ +class UpdateClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `Cluster` resource by the update. The fields specified in the `updateMask` + * are relative to the resource, not the full request. A field will be + * overwritten if it is in the mask. If the user does not provide a mask then + * all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The description of the cluster. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cluster = null; + /** + * Optional. The request ID must be a valid UUID with the exception that + * zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param \Google\Cloud\VmwareEngine\V1\Cluster $cluster Required. The description of the cluster. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `Cluster` resource by the update. The fields specified in the `updateMask` + * are relative to the resource, not the full request. A field will be + * overwritten if it is in the mask. If the user does not provide a mask then + * all fields will be overwritten. + * + * @return \Google\Cloud\VmwareEngine\V1\UpdateClusterRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VmwareEngine\V1\Cluster $cluster, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCluster($cluster) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * `Cluster` resource by the update. The fields specified in the `updateMask` + * are relative to the resource, not the full request. A field will be + * overwritten if it is in the mask. If the user does not provide a mask then + * all fields will be overwritten. + * @type \Google\Cloud\VmwareEngine\V1\Cluster $cluster + * Required. The description of the cluster. + * @type string $request_id + * Optional. The request ID must be a valid UUID with the exception that + * zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `Cluster` resource by the update. The fields specified in the `updateMask` + * are relative to the resource, not the full request. A field will be + * overwritten if it is in the mask. If the user does not provide a mask then + * all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `Cluster` resource by the update. The fields specified in the `updateMask` + * are relative to the resource, not the full request. A field will be + * overwritten if it is in the mask. If the user does not provide a mask then + * all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The description of the cluster. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\Cluster|null + */ + public function getCluster() + { + return $this->cluster; + } + + public function hasCluster() + { + return isset($this->cluster); + } + + public function clearCluster() + { + unset($this->cluster); + } + + /** + * Required. The description of the cluster. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\Cluster $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Cluster::class); + $this->cluster = $var; + + return $this; + } + + /** + * Optional. The request ID must be a valid UUID with the exception that + * zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. The request ID must be a valid UUID with the exception that + * zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPolicyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPolicyRequest.php new file mode 100644 index 000000000000..7fddaaad169e --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPolicyRequest.php @@ -0,0 +1,235 @@ +google.cloud.vmwareengine.v1.UpdateNetworkPolicyRequest + */ +class UpdateNetworkPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Network policy description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network_policy = null; + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `NetworkPolicy` resource by the update. + * The fields specified in the `update_mask` are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VmwareEngine\V1\NetworkPolicy $networkPolicy Required. Network policy description. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `NetworkPolicy` resource by the update. + * The fields specified in the `update_mask` are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\VmwareEngine\V1\UpdateNetworkPolicyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VmwareEngine\V1\NetworkPolicy $networkPolicy, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setNetworkPolicy($networkPolicy) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VmwareEngine\V1\NetworkPolicy $network_policy + * Required. Network policy description. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * `NetworkPolicy` resource by the update. + * The fields specified in the `update_mask` are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. Network policy description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\NetworkPolicy|null + */ + public function getNetworkPolicy() + { + return $this->network_policy; + } + + public function hasNetworkPolicy() + { + return isset($this->network_policy); + } + + public function clearNetworkPolicy() + { + unset($this->network_policy); + } + + /** + * Required. Network policy description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\NetworkPolicy $var + * @return $this + */ + public function setNetworkPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkPolicy::class); + $this->network_policy = $var; + + return $this; + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `NetworkPolicy` resource by the update. + * The fields specified in the `update_mask` are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `NetworkPolicy` resource by the update. + * The fields specified in the `update_mask` are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateCloudRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateCloudRequest.php new file mode 100644 index 000000000000..16c19f6e1410 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateCloudRequest.php @@ -0,0 +1,195 @@ +google.cloud.vmwareengine.v1.UpdatePrivateCloudRequest + */ +class UpdatePrivateCloudRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Private cloud description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $private_cloud = null; + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `PrivateCloud` resource by the update. The fields specified in `updateMask` + * are relative to the resource, not the full request. A field will be + * overwritten if it is in the mask. If the user does not provide a mask then + * all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VmwareEngine\V1\PrivateCloud $privateCloud Required. Private cloud description. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `PrivateCloud` resource by the update. The fields specified in `updateMask` + * are relative to the resource, not the full request. A field will be + * overwritten if it is in the mask. If the user does not provide a mask then + * all fields will be overwritten. + * + * @return \Google\Cloud\VmwareEngine\V1\UpdatePrivateCloudRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VmwareEngine\V1\PrivateCloud $privateCloud, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setPrivateCloud($privateCloud) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VmwareEngine\V1\PrivateCloud $private_cloud + * Required. Private cloud description. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * `PrivateCloud` resource by the update. The fields specified in `updateMask` + * are relative to the resource, not the full request. A field will be + * overwritten if it is in the mask. If the user does not provide a mask then + * all fields will be overwritten. + * @type string $request_id + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. Private cloud description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\PrivateCloud|null + */ + public function getPrivateCloud() + { + return $this->private_cloud; + } + + public function hasPrivateCloud() + { + return isset($this->private_cloud); + } + + public function clearPrivateCloud() + { + unset($this->private_cloud); + } + + /** + * Required. Private cloud description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\PrivateCloud $var + * @return $this + */ + public function setPrivateCloud($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\PrivateCloud::class); + $this->private_cloud = $var; + + return $this; + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `PrivateCloud` resource by the update. The fields specified in `updateMask` + * are relative to the resource, not the full request. A field will be + * overwritten if it is in the mask. If the user does not provide a mask then + * all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `PrivateCloud` resource by the update. The fields specified in `updateMask` + * are relative to the resource, not the full request. A field will be + * overwritten if it is in the mask. If the user does not provide a mask then + * all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateVmwareEngineNetworkRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateVmwareEngineNetworkRequest.php new file mode 100644 index 000000000000..38f1091baa29 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateVmwareEngineNetworkRequest.php @@ -0,0 +1,240 @@ +google.cloud.vmwareengine.v1.UpdateVmwareEngineNetworkRequest + */ +class UpdateVmwareEngineNetworkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. VMware Engine network description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $vmware_engine_network = null; + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * VMware Engine network resource by the update. + * The fields specified in the `update_mask` are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. Only the + * following fields can be updated: `description`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $vmwareEngineNetwork Required. VMware Engine network description. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * VMware Engine network resource by the update. + * The fields specified in the `update_mask` are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. Only the + * following fields can be updated: `description`. + * + * @return \Google\Cloud\VmwareEngine\V1\UpdateVmwareEngineNetworkRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $vmwareEngineNetwork, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setVmwareEngineNetwork($vmwareEngineNetwork) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $vmware_engine_network + * Required. VMware Engine network description. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * VMware Engine network resource by the update. + * The fields specified in the `update_mask` are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. Only the + * following fields can be updated: `description`. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. VMware Engine network description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork|null + */ + public function getVmwareEngineNetwork() + { + return $this->vmware_engine_network; + } + + public function hasVmwareEngineNetwork() + { + return isset($this->vmware_engine_network); + } + + public function clearVmwareEngineNetwork() + { + unset($this->vmware_engine_network); + } + + /** + * Required. VMware Engine network description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $var + * @return $this + */ + public function setVmwareEngineNetwork($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork::class); + $this->vmware_engine_network = $var; + + return $this; + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * VMware Engine network resource by the update. + * The fields specified in the `update_mask` are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. Only the + * following fields can be updated: `description`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * VMware Engine network resource by the update. + * The fields specified in the `update_mask` are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. Only the + * following fields can be updated: `description`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter.php new file mode 100644 index 000000000000..1d7fb8297ae3 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter.php @@ -0,0 +1,169 @@ +google.cloud.vmwareengine.v1.Vcenter + */ +class Vcenter extends \Google\Protobuf\Internal\Message +{ + /** + * Internal IP address of the appliance. + * + * Generated from protobuf field string internal_ip = 2; + */ + protected $internal_ip = ''; + /** + * Version of the appliance. + * + * Generated from protobuf field string version = 4; + */ + protected $version = ''; + /** + * Output only. The state of the appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Fully qualified domain name of the appliance. + * + * Generated from protobuf field string fqdn = 6; + */ + protected $fqdn = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $internal_ip + * Internal IP address of the appliance. + * @type string $version + * Version of the appliance. + * @type int $state + * Output only. The state of the appliance. + * @type string $fqdn + * Fully qualified domain name of the appliance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Internal IP address of the appliance. + * + * Generated from protobuf field string internal_ip = 2; + * @return string + */ + public function getInternalIp() + { + return $this->internal_ip; + } + + /** + * Internal IP address of the appliance. + * + * Generated from protobuf field string internal_ip = 2; + * @param string $var + * @return $this + */ + public function setInternalIp($var) + { + GPBUtil::checkString($var, True); + $this->internal_ip = $var; + + return $this; + } + + /** + * Version of the appliance. + * + * Generated from protobuf field string version = 4; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Version of the appliance. + * + * Generated from protobuf field string version = 4; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Output only. The state of the appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\Vcenter\State::class); + $this->state = $var; + + return $this; + } + + /** + * Fully qualified domain name of the appliance. + * + * Generated from protobuf field string fqdn = 6; + * @return string + */ + public function getFqdn() + { + return $this->fqdn; + } + + /** + * Fully qualified domain name of the appliance. + * + * Generated from protobuf field string fqdn = 6; + * @param string $var + * @return $this + */ + public function setFqdn($var) + { + GPBUtil::checkString($var, True); + $this->fqdn = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter/State.php new file mode 100644 index 000000000000..37b87d5973f6 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter/State.php @@ -0,0 +1,64 @@ +google.cloud.vmwareengine.v1.Vcenter.State + */ +class State +{ + /** + * Unspecified appliance state. This is the default value. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The appliance is operational and can be used. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The appliance is being deployed. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\Vcenter_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineGrpcClient.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineGrpcClient.php new file mode 100644 index 000000000000..1600c3f6b886 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineGrpcClient.php @@ -0,0 +1,566 @@ +_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/ListPrivateClouds', + $argument, + ['\Google\Cloud\VmwareEngine\V1\ListPrivateCloudsResponse', 'decode'], + $metadata, $options); + } + + /** + * Retrieves a `PrivateCloud` resource by its resource name. + * @param \Google\Cloud\VmwareEngine\V1\GetPrivateCloudRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetPrivateCloud(\Google\Cloud\VmwareEngine\V1\GetPrivateCloudRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/GetPrivateCloud', + $argument, + ['\Google\Cloud\VmwareEngine\V1\PrivateCloud', 'decode'], + $metadata, $options); + } + + /** + * Creates a new `PrivateCloud` resource in a given project and location. + * Private clouds can only be created in zones, regional private clouds are + * not supported. + * + * Creating a private cloud also creates a [management + * cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) + * for that private cloud. + * @param \Google\Cloud\VmwareEngine\V1\CreatePrivateCloudRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreatePrivateCloud(\Google\Cloud\VmwareEngine\V1\CreatePrivateCloudRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/CreatePrivateCloud', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Modifies a `PrivateCloud` resource. Only the following fields can be + * updated: `description`. + * Only fields specified in `updateMask` are applied. + * + * During operation processing, the resource is temporarily in the `ACTIVE` + * state before the operation fully completes. For that period of time, you + * can't update the resource. Use the operation status to determine when the + * processing fully completes. + * @param \Google\Cloud\VmwareEngine\V1\UpdatePrivateCloudRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdatePrivateCloud(\Google\Cloud\VmwareEngine\V1\UpdatePrivateCloudRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/UpdatePrivateCloud', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Schedules a `PrivateCloud` resource for deletion. + * + * A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` + * set to `DELETED` and `expireTime` set to the time when deletion is final + * and can no longer be reversed. The delete operation is marked as done + * as soon as the `PrivateCloud` is successfully scheduled for deletion + * (this also applies when `delayHours` is set to zero), and the operation is + * not kept in pending state until `PrivateCloud` is purged. + * `PrivateCloud` can be restored using `UndeletePrivateCloud` method before + * the `expireTime` elapses. When `expireTime` is reached, deletion is final + * and all private cloud resources are irreversibly removed and billing stops. + * During the final removal process, `PrivateCloud.state` is set to `PURGING`. + * `PrivateCloud` can be polled using standard `GET` method for the whole + * period of deletion and purging. It will not be returned only + * when it is completely purged. + * @param \Google\Cloud\VmwareEngine\V1\DeletePrivateCloudRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeletePrivateCloud(\Google\Cloud\VmwareEngine\V1\DeletePrivateCloudRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/DeletePrivateCloud', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Restores a private cloud that was previously scheduled for deletion by + * `DeletePrivateCloud`. A `PrivateCloud` resource scheduled for deletion has + * `PrivateCloud.state` set to `DELETED` and `PrivateCloud.expireTime` set to + * the time when deletion can no longer be reversed. + * @param \Google\Cloud\VmwareEngine\V1\UndeletePrivateCloudRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UndeletePrivateCloud(\Google\Cloud\VmwareEngine\V1\UndeletePrivateCloudRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/UndeletePrivateCloud', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists `Cluster` resources in a given private cloud. + * @param \Google\Cloud\VmwareEngine\V1\ListClustersRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListClusters(\Google\Cloud\VmwareEngine\V1\ListClustersRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/ListClusters', + $argument, + ['\Google\Cloud\VmwareEngine\V1\ListClustersResponse', 'decode'], + $metadata, $options); + } + + /** + * Retrieves a `Cluster` resource by its resource name. + * @param \Google\Cloud\VmwareEngine\V1\GetClusterRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetCluster(\Google\Cloud\VmwareEngine\V1\GetClusterRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/GetCluster', + $argument, + ['\Google\Cloud\VmwareEngine\V1\Cluster', 'decode'], + $metadata, $options); + } + + /** + * Creates a new cluster in a given private cloud. + * Creating a new cluster provides additional nodes for + * use in the parent private cloud and requires sufficient [node + * quota](https://cloud.google.com/vmware-engine/quotas). + * @param \Google\Cloud\VmwareEngine\V1\CreateClusterRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateCluster(\Google\Cloud\VmwareEngine\V1\CreateClusterRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/CreateCluster', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Modifies a `Cluster` resource. Only the following fields can be updated: + * `node_type_configs.*.node_count`. Only fields specified in `updateMask` are + * applied. + * + * During operation processing, the resource is temporarily in the `ACTIVE` + * state before the operation fully completes. For that period of time, you + * can't update the resource. Use the operation status to determine when the + * processing fully completes. + * @param \Google\Cloud\VmwareEngine\V1\UpdateClusterRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateCluster(\Google\Cloud\VmwareEngine\V1\UpdateClusterRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/UpdateCluster', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes a `Cluster` resource. To avoid unintended data loss, migrate or + * gracefully shut down any workloads running on the cluster before deletion. + * You cannot delete the management cluster of a private cloud using this + * method. + * @param \Google\Cloud\VmwareEngine\V1\DeleteClusterRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteCluster(\Google\Cloud\VmwareEngine\V1\DeleteClusterRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/DeleteCluster', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists subnets in a given private cloud. + * @param \Google\Cloud\VmwareEngine\V1\ListSubnetsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListSubnets(\Google\Cloud\VmwareEngine\V1\ListSubnetsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/ListSubnets', + $argument, + ['\Google\Cloud\VmwareEngine\V1\ListSubnetsResponse', 'decode'], + $metadata, $options); + } + + /** + * Lists node types + * @param \Google\Cloud\VmwareEngine\V1\ListNodeTypesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListNodeTypes(\Google\Cloud\VmwareEngine\V1\ListNodeTypesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/ListNodeTypes', + $argument, + ['\Google\Cloud\VmwareEngine\V1\ListNodeTypesResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets details of a single `NodeType`. + * @param \Google\Cloud\VmwareEngine\V1\GetNodeTypeRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetNodeType(\Google\Cloud\VmwareEngine\V1\GetNodeTypeRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/GetNodeType', + $argument, + ['\Google\Cloud\VmwareEngine\V1\NodeType', 'decode'], + $metadata, $options); + } + + /** + * Gets details of credentials for NSX appliance. + * @param \Google\Cloud\VmwareEngine\V1\ShowNsxCredentialsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ShowNsxCredentials(\Google\Cloud\VmwareEngine\V1\ShowNsxCredentialsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/ShowNsxCredentials', + $argument, + ['\Google\Cloud\VmwareEngine\V1\Credentials', 'decode'], + $metadata, $options); + } + + /** + * Gets details of credentials for Vcenter appliance. + * @param \Google\Cloud\VmwareEngine\V1\ShowVcenterCredentialsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ShowVcenterCredentials(\Google\Cloud\VmwareEngine\V1\ShowVcenterCredentialsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/ShowVcenterCredentials', + $argument, + ['\Google\Cloud\VmwareEngine\V1\Credentials', 'decode'], + $metadata, $options); + } + + /** + * Resets credentials of the NSX appliance. + * @param \Google\Cloud\VmwareEngine\V1\ResetNsxCredentialsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ResetNsxCredentials(\Google\Cloud\VmwareEngine\V1\ResetNsxCredentialsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/ResetNsxCredentials', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Resets credentials of the Vcenter appliance. + * @param \Google\Cloud\VmwareEngine\V1\ResetVcenterCredentialsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ResetVcenterCredentials(\Google\Cloud\VmwareEngine\V1\ResetVcenterCredentialsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/ResetVcenterCredentials', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Creates a new HCX activation key in a given private cloud. + * @param \Google\Cloud\VmwareEngine\V1\CreateHcxActivationKeyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateHcxActivationKey(\Google\Cloud\VmwareEngine\V1\CreateHcxActivationKeyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/CreateHcxActivationKey', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists `HcxActivationKey` resources in a given private cloud. + * @param \Google\Cloud\VmwareEngine\V1\ListHcxActivationKeysRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListHcxActivationKeys(\Google\Cloud\VmwareEngine\V1\ListHcxActivationKeysRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/ListHcxActivationKeys', + $argument, + ['\Google\Cloud\VmwareEngine\V1\ListHcxActivationKeysResponse', 'decode'], + $metadata, $options); + } + + /** + * Retrieves a `HcxActivationKey` resource by its resource name. + * @param \Google\Cloud\VmwareEngine\V1\GetHcxActivationKeyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetHcxActivationKey(\Google\Cloud\VmwareEngine\V1\GetHcxActivationKeyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/GetHcxActivationKey', + $argument, + ['\Google\Cloud\VmwareEngine\V1\HcxActivationKey', 'decode'], + $metadata, $options); + } + + /** + * Retrieves a `NetworkPolicy` resource by its resource name. + * @param \Google\Cloud\VmwareEngine\V1\GetNetworkPolicyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetNetworkPolicy(\Google\Cloud\VmwareEngine\V1\GetNetworkPolicyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/GetNetworkPolicy', + $argument, + ['\Google\Cloud\VmwareEngine\V1\NetworkPolicy', 'decode'], + $metadata, $options); + } + + /** + * Lists `NetworkPolicy` resources in a specified project and location. + * @param \Google\Cloud\VmwareEngine\V1\ListNetworkPoliciesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListNetworkPolicies(\Google\Cloud\VmwareEngine\V1\ListNetworkPoliciesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/ListNetworkPolicies', + $argument, + ['\Google\Cloud\VmwareEngine\V1\ListNetworkPoliciesResponse', 'decode'], + $metadata, $options); + } + + /** + * Creates a new network policy in a given VMware Engine network of a + * project and location (region). A new network policy cannot be created if + * another network policy already exists in the same scope. + * @param \Google\Cloud\VmwareEngine\V1\CreateNetworkPolicyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateNetworkPolicy(\Google\Cloud\VmwareEngine\V1\CreateNetworkPolicyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/CreateNetworkPolicy', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Modifies a `NetworkPolicy` resource. Only the following fields can be + * updated: `internet_access`, `external_ip`, `edge_services_cidr`. + * Only fields specified in `updateMask` are applied. When updating a network + * policy, the external IP network service can only be disabled if there are + * no external IP addresses present in the scope of the policy. Also, a + * `NetworkService` cannot be updated when `NetworkService.state` is set + * to `RECONCILING`. + * + * During operation processing, the resource is temporarily in the `ACTIVE` + * state before the operation fully completes. For that period of time, you + * can't update the resource. Use the operation status to determine when the + * processing fully completes. + * @param \Google\Cloud\VmwareEngine\V1\UpdateNetworkPolicyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateNetworkPolicy(\Google\Cloud\VmwareEngine\V1\UpdateNetworkPolicyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/UpdateNetworkPolicy', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes a `NetworkPolicy` resource. A network policy cannot be deleted + * when `NetworkService.state` is set to `RECONCILING` for either its external + * IP or internet access service. + * @param \Google\Cloud\VmwareEngine\V1\DeleteNetworkPolicyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteNetworkPolicy(\Google\Cloud\VmwareEngine\V1\DeleteNetworkPolicyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/DeleteNetworkPolicy', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Creates a new VMware Engine network that can be used by a private cloud. + * @param \Google\Cloud\VmwareEngine\V1\CreateVmwareEngineNetworkRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateVmwareEngineNetwork(\Google\Cloud\VmwareEngine\V1\CreateVmwareEngineNetworkRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/CreateVmwareEngineNetwork', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Modifies a VMware Engine network resource. Only the following fields can be + * updated: `description`. Only fields specified in `updateMask` are + * applied. + * @param \Google\Cloud\VmwareEngine\V1\UpdateVmwareEngineNetworkRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateVmwareEngineNetwork(\Google\Cloud\VmwareEngine\V1\UpdateVmwareEngineNetworkRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/UpdateVmwareEngineNetwork', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes a `VmwareEngineNetwork` resource. You can only delete a VMware + * Engine network after all resources that refer to it are deleted. For + * example, a private cloud, a network peering, and a network policy can all + * refer to the same VMware Engine network. + * @param \Google\Cloud\VmwareEngine\V1\DeleteVmwareEngineNetworkRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteVmwareEngineNetwork(\Google\Cloud\VmwareEngine\V1\DeleteVmwareEngineNetworkRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/DeleteVmwareEngineNetwork', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Retrieves a `VmwareEngineNetwork` resource by its resource name. The + * resource contains details of the VMware Engine network, such as its VMware + * Engine network type, peered networks in a service project, and state + * (for example, `CREATING`, `ACTIVE`, `DELETING`). + * @param \Google\Cloud\VmwareEngine\V1\GetVmwareEngineNetworkRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetVmwareEngineNetwork(\Google\Cloud\VmwareEngine\V1\GetVmwareEngineNetworkRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/GetVmwareEngineNetwork', + $argument, + ['\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork', 'decode'], + $metadata, $options); + } + + /** + * Lists `VmwareEngineNetwork` resources in a given project and location. + * @param \Google\Cloud\VmwareEngine\V1\ListVmwareEngineNetworksRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListVmwareEngineNetworks(\Google\Cloud\VmwareEngine\V1\ListVmwareEngineNetworksRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/ListVmwareEngineNetworks', + $argument, + ['\Google\Cloud\VmwareEngine\V1\ListVmwareEngineNetworksResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork.php new file mode 100644 index 000000000000..11b48b25b570 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork.php @@ -0,0 +1,396 @@ +google.cloud.vmwareengine.v1.VmwareEngineNetwork + */ +class VmwareEngineNetwork extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the VMware Engine network. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * User-provided description for this VMware Engine network. + * + * Generated from protobuf field string description = 5; + */ + protected $description = ''; + /** + * Output only. VMware Engine service VPC networks that provide connectivity + * from a private cloud to customer projects, the internet, and other Google + * Cloud services. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork vpc_networks = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $vpc_networks; + /** + * Output only. State of the VMware Engine network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Required. VMware Engine network type. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.Type type = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Checksum that may be sent on update and delete requests to ensure that the + * user-provided value is up to date before the server processes a request. + * The server computes checksums based on the value of other fields in the + * request. + * + * Generated from protobuf field string etag = 10; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the VMware Engine network. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of this resource. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last update time of this resource. + * @type string $description + * User-provided description for this VMware Engine network. + * @type array<\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\VpcNetwork>|\Google\Protobuf\Internal\RepeatedField $vpc_networks + * Output only. VMware Engine service VPC networks that provide connectivity + * from a private cloud to customer projects, the internet, and other Google + * Cloud services. + * @type int $state + * Output only. State of the VMware Engine network. + * @type int $type + * Required. VMware Engine network type. + * @type string $uid + * Output only. System-generated unique identifier for the resource. + * @type string $etag + * Checksum that may be sent on update and delete requests to ensure that the + * user-provided value is up to date before the server processes a request. + * The server computes checksums based on the value of other fields in the + * request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the VMware Engine network. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the VMware Engine network. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * User-provided description for this VMware Engine network. + * + * Generated from protobuf field string description = 5; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User-provided description for this VMware Engine network. + * + * Generated from protobuf field string description = 5; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. VMware Engine service VPC networks that provide connectivity + * from a private cloud to customer projects, the internet, and other Google + * Cloud services. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork vpc_networks = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVpcNetworks() + { + return $this->vpc_networks; + } + + /** + * Output only. VMware Engine service VPC networks that provide connectivity + * from a private cloud to customer projects, the internet, and other Google + * Cloud services. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork vpc_networks = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\VpcNetwork>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVpcNetworks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\VpcNetwork::class); + $this->vpc_networks = $arr; + + return $this; + } + + /** + * Output only. State of the VMware Engine network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the VMware Engine network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\State::class); + $this->state = $var; + + return $this; + } + + /** + * Required. VMware Engine network type. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.Type type = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. VMware Engine network type. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.Type type = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Checksum that may be sent on update and delete requests to ensure that the + * user-provided value is up to date before the server processes a request. + * The server computes checksums based on the value of other fields in the + * request. + * + * Generated from protobuf field string etag = 10; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Checksum that may be sent on update and delete requests to ensure that the + * user-provided value is up to date before the server processes a request. + * The server computes checksums based on the value of other fields in the + * request. + * + * Generated from protobuf field string etag = 10; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/State.php new file mode 100644 index 000000000000..3f8a6067ccdb --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/State.php @@ -0,0 +1,78 @@ +google.cloud.vmwareengine.v1.VmwareEngineNetwork.State + */ +class State +{ + /** + * The default value. This value is used if the state is omitted. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The VMware Engine network is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The VMware Engine network is ready. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * The VMware Engine network is being updated. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * The VMware Engine network is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/Type.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/Type.php new file mode 100644 index 000000000000..6f14f3e4abee --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/Type.php @@ -0,0 +1,59 @@ +google.cloud.vmwareengine.v1.VmwareEngineNetwork.Type + */ +class Type +{ + /** + * The default value. This value should never be used. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Network type used by private clouds created in projects without a network + * of type `STANDARD`. This network type is no longer used for new VMware + * Engine private cloud deployments. + * + * Generated from protobuf enum LEGACY = 1; + */ + const LEGACY = 1; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::LEGACY => 'LEGACY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork_Type::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork.php new file mode 100644 index 000000000000..9ef0665f0e7f --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork.php @@ -0,0 +1,117 @@ +google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork + */ +class VpcNetwork extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Type of VPC network (INTRANET, INTERNET, or + * GOOGLE_CLOUD) + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $type = 0; + /** + * Output only. The relative resource name of the service VPC network this + * VMware Engine network is attached to. For example: + * `projects/123123/global/networks/my-network` + * + * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $network = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Output only. Type of VPC network (INTRANET, INTERNET, or + * GOOGLE_CLOUD) + * @type string $network + * Output only. The relative resource name of the service VPC network this + * VMware Engine network is attached to. For example: + * `projects/123123/global/networks/my-network` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Type of VPC network (INTRANET, INTERNET, or + * GOOGLE_CLOUD) + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Output only. Type of VPC network (INTRANET, INTERNET, or + * GOOGLE_CLOUD) + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\VpcNetwork\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. The relative resource name of the service VPC network this + * VMware Engine network is attached to. For example: + * `projects/123123/global/networks/my-network` + * + * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Output only. The relative resource name of the service VPC network this + * VMware Engine network is attached to. For example: + * `projects/123123/global/networks/my-network` + * + * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VpcNetwork::class, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork_VpcNetwork::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork/Type.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork/Type.php new file mode 100644 index 000000000000..194c6e10931a --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork/Type.php @@ -0,0 +1,76 @@ +google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork.Type + */ +class Type +{ + /** + * The default value. This value should never be used. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * VPC network that will be peered with a consumer VPC network or the + * intranet VPC of another VMware Engine network. Access a private cloud + * through Compute Engine VMs on a peered VPC network or an on-premises + * resource connected to a peered consumer VPC network. + * + * Generated from protobuf enum INTRANET = 1; + */ + const INTRANET = 1; + /** + * VPC network used for internet access to and from a private cloud. + * + * Generated from protobuf enum INTERNET = 2; + */ + const INTERNET = 2; + /** + * VPC network used for access to Google Cloud services like + * Cloud Storage. + * + * Generated from protobuf enum GOOGLE_CLOUD = 3; + */ + const GOOGLE_CLOUD = 3; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::INTRANET => 'INTRANET', + self::INTERNET => 'INTERNET', + self::GOOGLE_CLOUD => 'GOOGLE_CLOUD', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork_VpcNetwork_Type::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_cluster.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_cluster.php new file mode 100644 index 000000000000..400fd2b82142 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_cluster.php @@ -0,0 +1,111 @@ +setNodeTypeConfigs($clusterNodeTypeConfigs); + $request = (new CreateClusterRequest()) + ->setParent($formattedParent) + ->setClusterId($clusterId) + ->setCluster($cluster); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->createCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Cluster $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + $clusterId = '[CLUSTER_ID]'; + + create_cluster_sample($formattedParent, $clusterId); +} +// [END vmwareengine_v1_generated_VmwareEngine_CreateCluster_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_hcx_activation_key.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_hcx_activation_key.php new file mode 100644 index 000000000000..b6a3e7c74f75 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_hcx_activation_key.php @@ -0,0 +1,108 @@ +setParent($formattedParent) + ->setHcxActivationKey($hcxActivationKey) + ->setHcxActivationKeyId($hcxActivationKeyId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->createHcxActivationKey($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var HcxActivationKey $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + $hcxActivationKeyId = '[HCX_ACTIVATION_KEY_ID]'; + + create_hcx_activation_key_sample($formattedParent, $hcxActivationKeyId); +} +// [END vmwareengine_v1_generated_VmwareEngine_CreateHcxActivationKey_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_policy.php new file mode 100644 index 000000000000..484a50dbaf4f --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_policy.php @@ -0,0 +1,115 @@ +setEdgeServicesCidr($networkPolicyEdgeServicesCidr); + $request = (new CreateNetworkPolicyRequest()) + ->setParent($formattedParent) + ->setNetworkPolicyId($networkPolicyId) + ->setNetworkPolicy($networkPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->createNetworkPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var NetworkPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); + $networkPolicyId = '[NETWORK_POLICY_ID]'; + $networkPolicyEdgeServicesCidr = '[EDGE_SERVICES_CIDR]'; + + create_network_policy_sample($formattedParent, $networkPolicyId, $networkPolicyEdgeServicesCidr); +} +// [END vmwareengine_v1_generated_VmwareEngine_CreateNetworkPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_cloud.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_cloud.php new file mode 100644 index 000000000000..427dae1c4b93 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_cloud.php @@ -0,0 +1,139 @@ +setManagementCidr($privateCloudNetworkConfigManagementCidr); + $privateCloudManagementClusterNodeTypeConfigs = []; + $privateCloudManagementCluster = (new ManagementCluster()) + ->setClusterId($privateCloudManagementClusterClusterId) + ->setNodeTypeConfigs($privateCloudManagementClusterNodeTypeConfigs); + $privateCloud = (new PrivateCloud()) + ->setNetworkConfig($privateCloudNetworkConfig) + ->setManagementCluster($privateCloudManagementCluster); + $request = (new CreatePrivateCloudRequest()) + ->setParent($formattedParent) + ->setPrivateCloudId($privateCloudId) + ->setPrivateCloud($privateCloud); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->createPrivateCloud($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PrivateCloud $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); + $privateCloudId = '[PRIVATE_CLOUD_ID]'; + $privateCloudNetworkConfigManagementCidr = '[MANAGEMENT_CIDR]'; + $privateCloudManagementClusterClusterId = '[CLUSTER_ID]'; + + create_private_cloud_sample( + $formattedParent, + $privateCloudId, + $privateCloudNetworkConfigManagementCidr, + $privateCloudManagementClusterClusterId + ); +} +// [END vmwareengine_v1_generated_VmwareEngine_CreatePrivateCloud_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_vmware_engine_network.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_vmware_engine_network.php new file mode 100644 index 000000000000..6f75a8173983 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_vmware_engine_network.php @@ -0,0 +1,118 @@ +setType($vmwareEngineNetworkType); + $request = (new CreateVmwareEngineNetworkRequest()) + ->setParent($formattedParent) + ->setVmwareEngineNetworkId($vmwareEngineNetworkId) + ->setVmwareEngineNetwork($vmwareEngineNetwork); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->createVmwareEngineNetwork($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var VmwareEngineNetwork $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); + $vmwareEngineNetworkId = '[VMWARE_ENGINE_NETWORK_ID]'; + $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; + + create_vmware_engine_network_sample( + $formattedParent, + $vmwareEngineNetworkId, + $vmwareEngineNetworkType + ); +} +// [END vmwareengine_v1_generated_VmwareEngine_CreateVmwareEngineNetwork_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_cluster.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_cluster.php new file mode 100644 index 000000000000..c6ac9a48b0e9 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_cluster.php @@ -0,0 +1,92 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->deleteCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmwareEngineClient::clusterName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]', + '[CLUSTER]' + ); + + delete_cluster_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_DeleteCluster_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_policy.php new file mode 100644 index 000000000000..a72032648ac2 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_policy.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->deleteNetworkPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmwareEngineClient::networkPolicyName( + '[PROJECT]', + '[LOCATION]', + '[NETWORK_POLICY]' + ); + + delete_network_policy_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_DeleteNetworkPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_cloud.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_cloud.php new file mode 100644 index 000000000000..df902eae06d6 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_cloud.php @@ -0,0 +1,101 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->deletePrivateCloud($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PrivateCloud $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmwareEngineClient::privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + + delete_private_cloud_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_DeletePrivateCloud_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_vmware_engine_network.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_vmware_engine_network.php new file mode 100644 index 000000000000..f0efb858657b --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_vmware_engine_network.php @@ -0,0 +1,91 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->deleteVmwareEngineNetwork($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmwareEngineClient::vmwareEngineNetworkName( + '[PROJECT]', + '[LOCATION]', + '[VMWARE_ENGINE_NETWORK]' + ); + + delete_vmware_engine_network_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_DeleteVmwareEngineNetwork_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_cluster.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_cluster.php new file mode 100644 index 000000000000..04d93eab58e4 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_cluster.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Cluster $response */ + $response = $vmwareEngineClient->getCluster($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmwareEngineClient::clusterName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]', + '[CLUSTER]' + ); + + get_cluster_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetCluster_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_hcx_activation_key.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_hcx_activation_key.php new file mode 100644 index 000000000000..062e39158490 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_hcx_activation_key.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var HcxActivationKey $response */ + $response = $vmwareEngineClient->getHcxActivationKey($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmwareEngineClient::hcxActivationKeyName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]', + '[HCX_ACTIVATION_KEY]' + ); + + get_hcx_activation_key_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetHcxActivationKey_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_iam_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_iam_policy.php new file mode 100644 index 000000000000..d7c3c7ff6c26 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $vmwareEngineClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetIamPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_location.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_location.php new file mode 100644 index 000000000000..be14be20fb6a --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END vmwareengine_v1_generated_VmwareEngine_GetLocation_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_policy.php new file mode 100644 index 000000000000..28fa5c73b42b --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_policy.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var NetworkPolicy $response */ + $response = $vmwareEngineClient->getNetworkPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmwareEngineClient::networkPolicyName( + '[PROJECT]', + '[LOCATION]', + '[NETWORK_POLICY]' + ); + + get_network_policy_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetNetworkPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node_type.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node_type.php new file mode 100644 index 000000000000..d3e9bf0e8d2e --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node_type.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var NodeType $response */ + $response = $vmwareEngineClient->getNodeType($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmwareEngineClient::nodeTypeName('[PROJECT]', '[LOCATION]', '[NODE_TYPE]'); + + get_node_type_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetNodeType_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_cloud.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_cloud.php new file mode 100644 index 000000000000..48dc7564df1a --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_cloud.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PrivateCloud $response */ + $response = $vmwareEngineClient->getPrivateCloud($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmwareEngineClient::privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + + get_private_cloud_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetPrivateCloud_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_vmware_engine_network.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_vmware_engine_network.php new file mode 100644 index 000000000000..a41570d07ff7 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_vmware_engine_network.php @@ -0,0 +1,82 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var VmwareEngineNetwork $response */ + $response = $vmwareEngineClient->getVmwareEngineNetwork($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmwareEngineClient::vmwareEngineNetworkName( + '[PROJECT]', + '[LOCATION]', + '[VMWARE_ENGINE_NETWORK]' + ); + + get_vmware_engine_network_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetVmwareEngineNetwork_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_clusters.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_clusters.php new file mode 100644 index 000000000000..3b83832311ce --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_clusters.php @@ -0,0 +1,84 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->listClusters($request); + + /** @var Cluster $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + + list_clusters_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListClusters_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_hcx_activation_keys.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_hcx_activation_keys.php new file mode 100644 index 000000000000..292a9a52195c --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_hcx_activation_keys.php @@ -0,0 +1,85 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->listHcxActivationKeys($request); + + /** @var HcxActivationKey $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + + list_hcx_activation_keys_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListHcxActivationKeys_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_locations.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_locations.php new file mode 100644 index 000000000000..d24341e9b4c6 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END vmwareengine_v1_generated_VmwareEngine_ListLocations_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_policies.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_policies.php new file mode 100644 index 000000000000..3655c8abbfad --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_policies.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->listNetworkPolicies($request); + + /** @var NetworkPolicy $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); + + list_network_policies_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListNetworkPolicies_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_node_types.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_node_types.php new file mode 100644 index 000000000000..616008f6041d --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_node_types.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->listNodeTypes($request); + + /** @var NodeType $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); + + list_node_types_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListNodeTypes_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_clouds.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_clouds.php new file mode 100644 index 000000000000..5d23ee78f3cd --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_clouds.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->listPrivateClouds($request); + + /** @var PrivateCloud $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); + + list_private_clouds_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListPrivateClouds_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_subnets.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_subnets.php new file mode 100644 index 000000000000..01dcfa61ff5e --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_subnets.php @@ -0,0 +1,85 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->listSubnets($request); + + /** @var Subnet $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + + list_subnets_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListSubnets_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_vmware_engine_networks.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_vmware_engine_networks.php new file mode 100644 index 000000000000..295d9952b969 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_vmware_engine_networks.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->listVmwareEngineNetworks($request); + + /** @var VmwareEngineNetwork $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); + + list_vmware_engine_networks_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListVmwareEngineNetworks_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_nsx_credentials.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_nsx_credentials.php new file mode 100644 index 000000000000..eeb9f21c8fa4 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_nsx_credentials.php @@ -0,0 +1,92 @@ +setPrivateCloud($formattedPrivateCloud); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->resetNsxCredentials($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PrivateCloud $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedPrivateCloud = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + + reset_nsx_credentials_sample($formattedPrivateCloud); +} +// [END vmwareengine_v1_generated_VmwareEngine_ResetNsxCredentials_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_vcenter_credentials.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_vcenter_credentials.php new file mode 100644 index 000000000000..50d291a7a94d --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_vcenter_credentials.php @@ -0,0 +1,92 @@ +setPrivateCloud($formattedPrivateCloud); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->resetVcenterCredentials($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PrivateCloud $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedPrivateCloud = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + + reset_vcenter_credentials_sample($formattedPrivateCloud); +} +// [END vmwareengine_v1_generated_VmwareEngine_ResetVcenterCredentials_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/set_iam_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/set_iam_policy.php new file mode 100644 index 000000000000..c8464ef7fc2c --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $vmwareEngineClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END vmwareengine_v1_generated_VmwareEngine_SetIamPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_nsx_credentials.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_nsx_credentials.php new file mode 100644 index 000000000000..450e5cdfd14c --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_nsx_credentials.php @@ -0,0 +1,80 @@ +setPrivateCloud($formattedPrivateCloud); + + // Call the API and handle any network failures. + try { + /** @var Credentials $response */ + $response = $vmwareEngineClient->showNsxCredentials($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedPrivateCloud = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + + show_nsx_credentials_sample($formattedPrivateCloud); +} +// [END vmwareengine_v1_generated_VmwareEngine_ShowNsxCredentials_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_vcenter_credentials.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_vcenter_credentials.php new file mode 100644 index 000000000000..f88b803b60b7 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_vcenter_credentials.php @@ -0,0 +1,80 @@ +setPrivateCloud($formattedPrivateCloud); + + // Call the API and handle any network failures. + try { + /** @var Credentials $response */ + $response = $vmwareEngineClient->showVcenterCredentials($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedPrivateCloud = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + + show_vcenter_credentials_sample($formattedPrivateCloud); +} +// [END vmwareengine_v1_generated_VmwareEngine_ShowVcenterCredentials_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/test_iam_permissions.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/test_iam_permissions.php new file mode 100644 index 000000000000..afd7da3c5cfe --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $vmwareEngineClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END vmwareengine_v1_generated_VmwareEngine_TestIamPermissions_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/undelete_private_cloud.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/undelete_private_cloud.php new file mode 100644 index 000000000000..dc624d92681e --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/undelete_private_cloud.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->undeletePrivateCloud($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PrivateCloud $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VmwareEngineClient::privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + + undelete_private_cloud_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_UndeletePrivateCloud_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_cluster.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_cluster.php new file mode 100644 index 000000000000..22c7d81aa97b --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_cluster.php @@ -0,0 +1,83 @@ +setNodeTypeConfigs($clusterNodeTypeConfigs); + $request = (new UpdateClusterRequest()) + ->setUpdateMask($updateMask) + ->setCluster($cluster); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->updateCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Cluster $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END vmwareengine_v1_generated_VmwareEngine_UpdateCluster_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_policy.php new file mode 100644 index 000000000000..e1df8f856a8c --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_policy.php @@ -0,0 +1,101 @@ +setEdgeServicesCidr($networkPolicyEdgeServicesCidr); + $updateMask = new FieldMask(); + $request = (new UpdateNetworkPolicyRequest()) + ->setNetworkPolicy($networkPolicy) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->updateNetworkPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var NetworkPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $networkPolicyEdgeServicesCidr = '[EDGE_SERVICES_CIDR]'; + + update_network_policy_sample($networkPolicyEdgeServicesCidr); +} +// [END vmwareengine_v1_generated_VmwareEngine_UpdateNetworkPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_cloud.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_cloud.php new file mode 100644 index 000000000000..990b0d5c9bfa --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_cloud.php @@ -0,0 +1,118 @@ +setManagementCidr($privateCloudNetworkConfigManagementCidr); + $privateCloudManagementClusterNodeTypeConfigs = []; + $privateCloudManagementCluster = (new ManagementCluster()) + ->setClusterId($privateCloudManagementClusterClusterId) + ->setNodeTypeConfigs($privateCloudManagementClusterNodeTypeConfigs); + $privateCloud = (new PrivateCloud()) + ->setNetworkConfig($privateCloudNetworkConfig) + ->setManagementCluster($privateCloudManagementCluster); + $updateMask = new FieldMask(); + $request = (new UpdatePrivateCloudRequest()) + ->setPrivateCloud($privateCloud) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->updatePrivateCloud($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PrivateCloud $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $privateCloudNetworkConfigManagementCidr = '[MANAGEMENT_CIDR]'; + $privateCloudManagementClusterClusterId = '[CLUSTER_ID]'; + + update_private_cloud_sample( + $privateCloudNetworkConfigManagementCidr, + $privateCloudManagementClusterClusterId + ); +} +// [END vmwareengine_v1_generated_VmwareEngine_UpdatePrivateCloud_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_vmware_engine_network.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_vmware_engine_network.php new file mode 100644 index 000000000000..511d61bf7201 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_vmware_engine_network.php @@ -0,0 +1,90 @@ +setType($vmwareEngineNetworkType); + $updateMask = new FieldMask(); + $request = (new UpdateVmwareEngineNetworkRequest()) + ->setVmwareEngineNetwork($vmwareEngineNetwork) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->updateVmwareEngineNetwork($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var VmwareEngineNetwork $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; + + update_vmware_engine_network_sample($vmwareEngineNetworkType); +} +// [END vmwareengine_v1_generated_VmwareEngine_UpdateVmwareEngineNetwork_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/src/V1/Client/BaseClient/VmwareEngineBaseClient.php b/owl-bot-staging/VmwareEngine/v1/src/V1/Client/BaseClient/VmwareEngineBaseClient.php new file mode 100644 index 000000000000..1dd6664b310d --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/src/V1/Client/BaseClient/VmwareEngineBaseClient.php @@ -0,0 +1,1408 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/vmware_engine_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/vmware_engine_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/vmware_engine_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/vmware_engine_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a cluster + * resource. + * + * @param string $project + * @param string $location + * @param string $privateCloud + * @param string $cluster + * + * @return string The formatted cluster resource. + */ + public static function clusterName(string $project, string $location, string $privateCloud, string $cluster): string + { + return self::getPathTemplate('cluster')->render([ + 'project' => $project, + 'location' => $location, + 'private_cloud' => $privateCloud, + 'cluster' => $cluster, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * hcx_activation_key resource. + * + * @param string $project + * @param string $location + * @param string $privateCloud + * @param string $hcxActivationKey + * + * @return string The formatted hcx_activation_key resource. + */ + public static function hcxActivationKeyName(string $project, string $location, string $privateCloud, string $hcxActivationKey): string + { + return self::getPathTemplate('hcxActivationKey')->render([ + 'project' => $project, + 'location' => $location, + 'private_cloud' => $privateCloud, + 'hcx_activation_key' => $hcxActivationKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $project + * @param string $network + * + * @return string The formatted network resource. + */ + public static function networkName(string $project, string $network): string + { + return self::getPathTemplate('network')->render([ + 'project' => $project, + 'network' => $network, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * network_policy resource. + * + * @param string $project + * @param string $location + * @param string $networkPolicy + * + * @return string The formatted network_policy resource. + */ + public static function networkPolicyName(string $project, string $location, string $networkPolicy): string + { + return self::getPathTemplate('networkPolicy')->render([ + 'project' => $project, + 'location' => $location, + 'network_policy' => $networkPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a node_type + * resource. + * + * @param string $project + * @param string $location + * @param string $nodeType + * + * @return string The formatted node_type resource. + */ + public static function nodeTypeName(string $project, string $location, string $nodeType): string + { + return self::getPathTemplate('nodeType')->render([ + 'project' => $project, + 'location' => $location, + 'node_type' => $nodeType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * private_cloud resource. + * + * @param string $project + * @param string $location + * @param string $privateCloud + * + * @return string The formatted private_cloud resource. + */ + public static function privateCloudName(string $project, string $location, string $privateCloud): string + { + return self::getPathTemplate('privateCloud')->render([ + 'project' => $project, + 'location' => $location, + 'private_cloud' => $privateCloud, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * vmware_engine_network resource. + * + * @param string $project + * @param string $location + * @param string $vmwareEngineNetwork + * + * @return string The formatted vmware_engine_network resource. + */ + public static function vmwareEngineNetworkName(string $project, string $location, string $vmwareEngineNetwork): string + { + return self::getPathTemplate('vmwareEngineNetwork')->render([ + 'project' => $project, + 'location' => $location, + 'vmware_engine_network' => $vmwareEngineNetwork, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - cluster: projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster} + * - hcxActivationKey: projects/{project}/locations/{location}/privateClouds/{private_cloud}/hcxActivationKeys/{hcx_activation_key} + * - location: projects/{project}/locations/{location} + * - network: projects/{project}/global/networks/{network} + * - networkPolicy: projects/{project}/locations/{location}/networkPolicies/{network_policy} + * - nodeType: projects/{project}/locations/{location}/nodeTypes/{node_type} + * - privateCloud: projects/{project}/locations/{location}/privateClouds/{private_cloud} + * - vmwareEngineNetwork: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'vmwareengine.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new cluster in a given private cloud. + * Creating a new cluster provides additional nodes for + * use in the parent private cloud and requires sufficient [node + * quota](https://cloud.google.com/vmware-engine/quotas). + * + * The async variant is {@see self::createClusterAsync()} . + * + * @param CreateClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createCluster(CreateClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateCluster', $request, $callOptions)->wait(); + } + + /** + * Creates a new HCX activation key in a given private cloud. + * + * The async variant is {@see self::createHcxActivationKeyAsync()} . + * + * @param CreateHcxActivationKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createHcxActivationKey(CreateHcxActivationKeyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateHcxActivationKey', $request, $callOptions)->wait(); + } + + /** + * Creates a new network policy in a given VMware Engine network of a + * project and location (region). A new network policy cannot be created if + * another network policy already exists in the same scope. + * + * The async variant is {@see self::createNetworkPolicyAsync()} . + * + * @param CreateNetworkPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createNetworkPolicy(CreateNetworkPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateNetworkPolicy', $request, $callOptions)->wait(); + } + + /** + * Creates a new `PrivateCloud` resource in a given project and location. + * Private clouds can only be created in zones, regional private clouds are + * not supported. + * + * Creating a private cloud also creates a [management + * cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) + * for that private cloud. + * + * The async variant is {@see self::createPrivateCloudAsync()} . + * + * @param CreatePrivateCloudRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createPrivateCloud(CreatePrivateCloudRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreatePrivateCloud', $request, $callOptions)->wait(); + } + + /** + * Creates a new VMware Engine network that can be used by a private cloud. + * + * The async variant is {@see self::createVmwareEngineNetworkAsync()} . + * + * @param CreateVmwareEngineNetworkRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createVmwareEngineNetwork(CreateVmwareEngineNetworkRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateVmwareEngineNetwork', $request, $callOptions)->wait(); + } + + /** + * Deletes a `Cluster` resource. To avoid unintended data loss, migrate or + * gracefully shut down any workloads running on the cluster before deletion. + * You cannot delete the management cluster of a private cloud using this + * method. + * + * The async variant is {@see self::deleteClusterAsync()} . + * + * @param DeleteClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteCluster(DeleteClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteCluster', $request, $callOptions)->wait(); + } + + /** + * Deletes a `NetworkPolicy` resource. A network policy cannot be deleted + * when `NetworkService.state` is set to `RECONCILING` for either its external + * IP or internet access service. + * + * The async variant is {@see self::deleteNetworkPolicyAsync()} . + * + * @param DeleteNetworkPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteNetworkPolicy(DeleteNetworkPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteNetworkPolicy', $request, $callOptions)->wait(); + } + + /** + * Schedules a `PrivateCloud` resource for deletion. + * + * A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` + * set to `DELETED` and `expireTime` set to the time when deletion is final + * and can no longer be reversed. The delete operation is marked as done + * as soon as the `PrivateCloud` is successfully scheduled for deletion + * (this also applies when `delayHours` is set to zero), and the operation is + * not kept in pending state until `PrivateCloud` is purged. + * `PrivateCloud` can be restored using `UndeletePrivateCloud` method before + * the `expireTime` elapses. When `expireTime` is reached, deletion is final + * and all private cloud resources are irreversibly removed and billing stops. + * During the final removal process, `PrivateCloud.state` is set to `PURGING`. + * `PrivateCloud` can be polled using standard `GET` method for the whole + * period of deletion and purging. It will not be returned only + * when it is completely purged. + * + * The async variant is {@see self::deletePrivateCloudAsync()} . + * + * @param DeletePrivateCloudRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deletePrivateCloud(DeletePrivateCloudRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeletePrivateCloud', $request, $callOptions)->wait(); + } + + /** + * Deletes a `VmwareEngineNetwork` resource. You can only delete a VMware + * Engine network after all resources that refer to it are deleted. For + * example, a private cloud, a network peering, and a network policy can all + * refer to the same VMware Engine network. + * + * The async variant is {@see self::deleteVmwareEngineNetworkAsync()} . + * + * @param DeleteVmwareEngineNetworkRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteVmwareEngineNetwork(DeleteVmwareEngineNetworkRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteVmwareEngineNetwork', $request, $callOptions)->wait(); + } + + /** + * Retrieves a `Cluster` resource by its resource name. + * + * The async variant is {@see self::getClusterAsync()} . + * + * @param GetClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Cluster + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCluster(GetClusterRequest $request, array $callOptions = []): Cluster + { + return $this->startApiCall('GetCluster', $request, $callOptions)->wait(); + } + + /** + * Retrieves a `HcxActivationKey` resource by its resource name. + * + * The async variant is {@see self::getHcxActivationKeyAsync()} . + * + * @param GetHcxActivationKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return HcxActivationKey + * + * @throws ApiException Thrown if the API call fails. + */ + public function getHcxActivationKey(GetHcxActivationKeyRequest $request, array $callOptions = []): HcxActivationKey + { + return $this->startApiCall('GetHcxActivationKey', $request, $callOptions)->wait(); + } + + /** + * Retrieves a `NetworkPolicy` resource by its resource name. + * + * The async variant is {@see self::getNetworkPolicyAsync()} . + * + * @param GetNetworkPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return NetworkPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getNetworkPolicy(GetNetworkPolicyRequest $request, array $callOptions = []): NetworkPolicy + { + return $this->startApiCall('GetNetworkPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single `NodeType`. + * + * The async variant is {@see self::getNodeTypeAsync()} . + * + * @param GetNodeTypeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return NodeType + * + * @throws ApiException Thrown if the API call fails. + */ + public function getNodeType(GetNodeTypeRequest $request, array $callOptions = []): NodeType + { + return $this->startApiCall('GetNodeType', $request, $callOptions)->wait(); + } + + /** + * Retrieves a `PrivateCloud` resource by its resource name. + * + * The async variant is {@see self::getPrivateCloudAsync()} . + * + * @param GetPrivateCloudRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PrivateCloud + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPrivateCloud(GetPrivateCloudRequest $request, array $callOptions = []): PrivateCloud + { + return $this->startApiCall('GetPrivateCloud', $request, $callOptions)->wait(); + } + + /** + * Retrieves a `VmwareEngineNetwork` resource by its resource name. The + * resource contains details of the VMware Engine network, such as its VMware + * Engine network type, peered networks in a service project, and state + * (for example, `CREATING`, `ACTIVE`, `DELETING`). + * + * The async variant is {@see self::getVmwareEngineNetworkAsync()} . + * + * @param GetVmwareEngineNetworkRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return VmwareEngineNetwork + * + * @throws ApiException Thrown if the API call fails. + */ + public function getVmwareEngineNetwork(GetVmwareEngineNetworkRequest $request, array $callOptions = []): VmwareEngineNetwork + { + return $this->startApiCall('GetVmwareEngineNetwork', $request, $callOptions)->wait(); + } + + /** + * Lists `Cluster` resources in a given private cloud. + * + * The async variant is {@see self::listClustersAsync()} . + * + * @param ListClustersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listClusters(ListClustersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListClusters', $request, $callOptions); + } + + /** + * Lists `HcxActivationKey` resources in a given private cloud. + * + * The async variant is {@see self::listHcxActivationKeysAsync()} . + * + * @param ListHcxActivationKeysRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listHcxActivationKeys(ListHcxActivationKeysRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListHcxActivationKeys', $request, $callOptions); + } + + /** + * Lists `NetworkPolicy` resources in a specified project and location. + * + * The async variant is {@see self::listNetworkPoliciesAsync()} . + * + * @param ListNetworkPoliciesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listNetworkPolicies(ListNetworkPoliciesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListNetworkPolicies', $request, $callOptions); + } + + /** + * Lists node types + * + * The async variant is {@see self::listNodeTypesAsync()} . + * + * @param ListNodeTypesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listNodeTypes(ListNodeTypesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListNodeTypes', $request, $callOptions); + } + + /** + * Lists `PrivateCloud` resources in a given project and location. + * + * The async variant is {@see self::listPrivateCloudsAsync()} . + * + * @param ListPrivateCloudsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listPrivateClouds(ListPrivateCloudsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPrivateClouds', $request, $callOptions); + } + + /** + * Lists subnets in a given private cloud. + * + * The async variant is {@see self::listSubnetsAsync()} . + * + * @param ListSubnetsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listSubnets(ListSubnetsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSubnets', $request, $callOptions); + } + + /** + * Lists `VmwareEngineNetwork` resources in a given project and location. + * + * The async variant is {@see self::listVmwareEngineNetworksAsync()} . + * + * @param ListVmwareEngineNetworksRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listVmwareEngineNetworks(ListVmwareEngineNetworksRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListVmwareEngineNetworks', $request, $callOptions); + } + + /** + * Resets credentials of the NSX appliance. + * + * The async variant is {@see self::resetNsxCredentialsAsync()} . + * + * @param ResetNsxCredentialsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function resetNsxCredentials(ResetNsxCredentialsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ResetNsxCredentials', $request, $callOptions)->wait(); + } + + /** + * Resets credentials of the Vcenter appliance. + * + * The async variant is {@see self::resetVcenterCredentialsAsync()} . + * + * @param ResetVcenterCredentialsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function resetVcenterCredentials(ResetVcenterCredentialsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ResetVcenterCredentials', $request, $callOptions)->wait(); + } + + /** + * Gets details of credentials for NSX appliance. + * + * The async variant is {@see self::showNsxCredentialsAsync()} . + * + * @param ShowNsxCredentialsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Credentials + * + * @throws ApiException Thrown if the API call fails. + */ + public function showNsxCredentials(ShowNsxCredentialsRequest $request, array $callOptions = []): Credentials + { + return $this->startApiCall('ShowNsxCredentials', $request, $callOptions)->wait(); + } + + /** + * Gets details of credentials for Vcenter appliance. + * + * The async variant is {@see self::showVcenterCredentialsAsync()} . + * + * @param ShowVcenterCredentialsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Credentials + * + * @throws ApiException Thrown if the API call fails. + */ + public function showVcenterCredentials(ShowVcenterCredentialsRequest $request, array $callOptions = []): Credentials + { + return $this->startApiCall('ShowVcenterCredentials', $request, $callOptions)->wait(); + } + + /** + * Restores a private cloud that was previously scheduled for deletion by + * `DeletePrivateCloud`. A `PrivateCloud` resource scheduled for deletion has + * `PrivateCloud.state` set to `DELETED` and `PrivateCloud.expireTime` set to + * the time when deletion can no longer be reversed. + * + * The async variant is {@see self::undeletePrivateCloudAsync()} . + * + * @param UndeletePrivateCloudRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function undeletePrivateCloud(UndeletePrivateCloudRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UndeletePrivateCloud', $request, $callOptions)->wait(); + } + + /** + * Modifies a `Cluster` resource. Only the following fields can be updated: + * `node_type_configs.*.node_count`. Only fields specified in `updateMask` are + * applied. + * + * During operation processing, the resource is temporarily in the `ACTIVE` + * state before the operation fully completes. For that period of time, you + * can't update the resource. Use the operation status to determine when the + * processing fully completes. + * + * The async variant is {@see self::updateClusterAsync()} . + * + * @param UpdateClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateCluster(UpdateClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateCluster', $request, $callOptions)->wait(); + } + + /** + * Modifies a `NetworkPolicy` resource. Only the following fields can be + * updated: `internet_access`, `external_ip`, `edge_services_cidr`. + * Only fields specified in `updateMask` are applied. When updating a network + * policy, the external IP network service can only be disabled if there are + * no external IP addresses present in the scope of the policy. Also, a + * `NetworkService` cannot be updated when `NetworkService.state` is set + * to `RECONCILING`. + * + * During operation processing, the resource is temporarily in the `ACTIVE` + * state before the operation fully completes. For that period of time, you + * can't update the resource. Use the operation status to determine when the + * processing fully completes. + * + * The async variant is {@see self::updateNetworkPolicyAsync()} . + * + * @param UpdateNetworkPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateNetworkPolicy(UpdateNetworkPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateNetworkPolicy', $request, $callOptions)->wait(); + } + + /** + * Modifies a `PrivateCloud` resource. Only the following fields can be + * updated: `description`. + * Only fields specified in `updateMask` are applied. + * + * During operation processing, the resource is temporarily in the `ACTIVE` + * state before the operation fully completes. For that period of time, you + * can't update the resource. Use the operation status to determine when the + * processing fully completes. + * + * The async variant is {@see self::updatePrivateCloudAsync()} . + * + * @param UpdatePrivateCloudRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updatePrivateCloud(UpdatePrivateCloudRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdatePrivateCloud', $request, $callOptions)->wait(); + } + + /** + * Modifies a VMware Engine network resource. Only the following fields can be + * updated: `description`. Only fields specified in `updateMask` are + * applied. + * + * The async variant is {@see self::updateVmwareEngineNetworkAsync()} . + * + * @param UpdateVmwareEngineNetworkRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateVmwareEngineNetwork(UpdateVmwareEngineNetworkRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateVmwareEngineNetwork', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see self::getLocationAsync()} . + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see self::listLocationsAsync()} . + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see self::getIamPolicyAsync()} . + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see self::setIamPolicyAsync()} . + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is {@see self::testIamPermissionsAsync()} . + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/VmwareEngine/v1/src/V1/Client/VmwareEngineClient.php b/owl-bot-staging/VmwareEngine/v1/src/V1/Client/VmwareEngineClient.php new file mode 100644 index 000000000000..e10617998cd4 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/src/V1/Client/VmwareEngineClient.php @@ -0,0 +1,40 @@ +privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + * $clusterId = 'cluster_id'; + * $cluster = new Cluster(); + * $operationResponse = $vmwareEngineClient->createCluster($formattedParent, $clusterId, $cluster); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmwareEngineClient->createCluster($formattedParent, $clusterId, $cluster); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'createCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + */ +class VmwareEngineGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.vmwareengine.v1.VmwareEngine'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'vmwareengine.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $clusterNameTemplate; + + private static $hcxActivationKeyNameTemplate; + + private static $locationNameTemplate; + + private static $networkNameTemplate; + + private static $networkPolicyNameTemplate; + + private static $nodeTypeNameTemplate; + + private static $privateCloudNameTemplate; + + private static $vmwareEngineNetworkNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/vmware_engine_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/vmware_engine_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/vmware_engine_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/vmware_engine_rest_client_config.php', + ], + ], + ]; + } + + private static function getClusterNameTemplate() + { + if (self::$clusterNameTemplate == null) { + self::$clusterNameTemplate = new PathTemplate('projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}'); + } + + return self::$clusterNameTemplate; + } + + private static function getHcxActivationKeyNameTemplate() + { + if (self::$hcxActivationKeyNameTemplate == null) { + self::$hcxActivationKeyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/privateClouds/{private_cloud}/hcxActivationKeys/{hcx_activation_key}'); + } + + return self::$hcxActivationKeyNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getNetworkNameTemplate() + { + if (self::$networkNameTemplate == null) { + self::$networkNameTemplate = new PathTemplate('projects/{project}/global/networks/{network}'); + } + + return self::$networkNameTemplate; + } + + private static function getNetworkPolicyNameTemplate() + { + if (self::$networkPolicyNameTemplate == null) { + self::$networkPolicyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/networkPolicies/{network_policy}'); + } + + return self::$networkPolicyNameTemplate; + } + + private static function getNodeTypeNameTemplate() + { + if (self::$nodeTypeNameTemplate == null) { + self::$nodeTypeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/nodeTypes/{node_type}'); + } + + return self::$nodeTypeNameTemplate; + } + + private static function getPrivateCloudNameTemplate() + { + if (self::$privateCloudNameTemplate == null) { + self::$privateCloudNameTemplate = new PathTemplate('projects/{project}/locations/{location}/privateClouds/{private_cloud}'); + } + + return self::$privateCloudNameTemplate; + } + + private static function getVmwareEngineNetworkNameTemplate() + { + if (self::$vmwareEngineNetworkNameTemplate == null) { + self::$vmwareEngineNetworkNameTemplate = new PathTemplate('projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network}'); + } + + return self::$vmwareEngineNetworkNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'cluster' => self::getClusterNameTemplate(), + 'hcxActivationKey' => self::getHcxActivationKeyNameTemplate(), + 'location' => self::getLocationNameTemplate(), + 'network' => self::getNetworkNameTemplate(), + 'networkPolicy' => self::getNetworkPolicyNameTemplate(), + 'nodeType' => self::getNodeTypeNameTemplate(), + 'privateCloud' => self::getPrivateCloudNameTemplate(), + 'vmwareEngineNetwork' => self::getVmwareEngineNetworkNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a cluster + * resource. + * + * @param string $project + * @param string $location + * @param string $privateCloud + * @param string $cluster + * + * @return string The formatted cluster resource. + */ + public static function clusterName($project, $location, $privateCloud, $cluster) + { + return self::getClusterNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'private_cloud' => $privateCloud, + 'cluster' => $cluster, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * hcx_activation_key resource. + * + * @param string $project + * @param string $location + * @param string $privateCloud + * @param string $hcxActivationKey + * + * @return string The formatted hcx_activation_key resource. + */ + public static function hcxActivationKeyName($project, $location, $privateCloud, $hcxActivationKey) + { + return self::getHcxActivationKeyNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'private_cloud' => $privateCloud, + 'hcx_activation_key' => $hcxActivationKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $project + * @param string $network + * + * @return string The formatted network resource. + */ + public static function networkName($project, $network) + { + return self::getNetworkNameTemplate()->render([ + 'project' => $project, + 'network' => $network, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * network_policy resource. + * + * @param string $project + * @param string $location + * @param string $networkPolicy + * + * @return string The formatted network_policy resource. + */ + public static function networkPolicyName($project, $location, $networkPolicy) + { + return self::getNetworkPolicyNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'network_policy' => $networkPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a node_type + * resource. + * + * @param string $project + * @param string $location + * @param string $nodeType + * + * @return string The formatted node_type resource. + */ + public static function nodeTypeName($project, $location, $nodeType) + { + return self::getNodeTypeNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'node_type' => $nodeType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * private_cloud resource. + * + * @param string $project + * @param string $location + * @param string $privateCloud + * + * @return string The formatted private_cloud resource. + */ + public static function privateCloudName($project, $location, $privateCloud) + { + return self::getPrivateCloudNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'private_cloud' => $privateCloud, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * vmware_engine_network resource. + * + * @param string $project + * @param string $location + * @param string $vmwareEngineNetwork + * + * @return string The formatted vmware_engine_network resource. + */ + public static function vmwareEngineNetworkName($project, $location, $vmwareEngineNetwork) + { + return self::getVmwareEngineNetworkNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'vmware_engine_network' => $vmwareEngineNetwork, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - cluster: projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster} + * - hcxActivationKey: projects/{project}/locations/{location}/privateClouds/{private_cloud}/hcxActivationKeys/{hcx_activation_key} + * - location: projects/{project}/locations/{location} + * - network: projects/{project}/global/networks/{network} + * - networkPolicy: projects/{project}/locations/{location}/networkPolicies/{network_policy} + * - nodeType: projects/{project}/locations/{location}/nodeTypes/{node_type} + * - privateCloud: projects/{project}/locations/{location}/privateClouds/{private_cloud} + * - vmwareEngineNetwork: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'vmwareengine.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a new cluster in a given private cloud. + * Creating a new cluster provides additional nodes for + * use in the parent private cloud and requires sufficient [node + * quota](https://cloud.google.com/vmware-engine/quotas). + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedParent = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + * $clusterId = 'cluster_id'; + * $cluster = new Cluster(); + * $operationResponse = $vmwareEngineClient->createCluster($formattedParent, $clusterId, $cluster); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmwareEngineClient->createCluster($formattedParent, $clusterId, $cluster); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'createCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the private cloud to create a new cluster + * in. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @param string $clusterId Required. The user-provided identifier of the new `Cluster`. + * This identifier must be unique among clusters within the parent and becomes + * the final token in the name URI. + * The identifier must meet the following requirements: + * + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * @param Cluster $cluster Required. The initial description of the new cluster. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validateOnly + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createCluster($parent, $clusterId, $cluster, array $optionalArgs = []) + { + $request = new CreateClusterRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setClusterId($clusterId); + $request->setCluster($cluster); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a new HCX activation key in a given private cloud. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedParent = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + * $hcxActivationKey = new HcxActivationKey(); + * $hcxActivationKeyId = 'hcx_activation_key_id'; + * $operationResponse = $vmwareEngineClient->createHcxActivationKey($formattedParent, $hcxActivationKey, $hcxActivationKeyId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmwareEngineClient->createHcxActivationKey($formattedParent, $hcxActivationKey, $hcxActivationKeyId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'createHcxActivationKey'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the private cloud to create the key for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud` + * @param HcxActivationKey $hcxActivationKey Required. The initial description of a new HCX activation key. When + * creating a new key, this field must be an empty object. + * @param string $hcxActivationKeyId Required. The user-provided identifier of the `HcxActivationKey` to be + * created. This identifier must be unique among `HcxActivationKey` resources + * within the parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createHcxActivationKey($parent, $hcxActivationKey, $hcxActivationKeyId, array $optionalArgs = []) + { + $request = new CreateHcxActivationKeyRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setHcxActivationKey($hcxActivationKey); + $request->setHcxActivationKeyId($hcxActivationKeyId); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateHcxActivationKey', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a new network policy in a given VMware Engine network of a + * project and location (region). A new network policy cannot be created if + * another network policy already exists in the same scope. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedParent = $vmwareEngineClient->locationName('[PROJECT]', '[LOCATION]'); + * $networkPolicyId = 'network_policy_id'; + * $networkPolicy = new NetworkPolicy(); + * $operationResponse = $vmwareEngineClient->createNetworkPolicy($formattedParent, $networkPolicyId, $networkPolicy); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmwareEngineClient->createNetworkPolicy($formattedParent, $networkPolicyId, $networkPolicy); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'createNetworkPolicy'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the location (region) + * to create the new network policy in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1` + * @param string $networkPolicyId Required. The user-provided identifier of the network policy to be created. + * This identifier must be unique within parent + * `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes + * the final token in the name URI. + * The identifier must meet the following requirements: + * + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * @param NetworkPolicy $networkPolicy Required. The network policy configuration to use in the request. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createNetworkPolicy($parent, $networkPolicyId, $networkPolicy, array $optionalArgs = []) + { + $request = new CreateNetworkPolicyRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setNetworkPolicyId($networkPolicyId); + $request->setNetworkPolicy($networkPolicy); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateNetworkPolicy', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a new `PrivateCloud` resource in a given project and location. + * Private clouds can only be created in zones, regional private clouds are + * not supported. + * + * Creating a private cloud also creates a [management + * cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) + * for that private cloud. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedParent = $vmwareEngineClient->locationName('[PROJECT]', '[LOCATION]'); + * $privateCloudId = 'private_cloud_id'; + * $privateCloud = new PrivateCloud(); + * $operationResponse = $vmwareEngineClient->createPrivateCloud($formattedParent, $privateCloudId, $privateCloud); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmwareEngineClient->createPrivateCloud($formattedParent, $privateCloudId, $privateCloud); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'createPrivateCloud'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the location to create the new + * private cloud in. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * @param string $privateCloudId Required. The user-provided identifier of the private cloud to be created. + * This identifier must be unique among each `PrivateCloud` within the parent + * and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * @param PrivateCloud $privateCloud Required. The initial description of the new private cloud. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validateOnly + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createPrivateCloud($parent, $privateCloudId, $privateCloud, array $optionalArgs = []) + { + $request = new CreatePrivateCloudRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setPrivateCloudId($privateCloudId); + $request->setPrivateCloud($privateCloud); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreatePrivateCloud', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a new VMware Engine network that can be used by a private cloud. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedParent = $vmwareEngineClient->locationName('[PROJECT]', '[LOCATION]'); + * $vmwareEngineNetworkId = 'vmware_engine_network_id'; + * $vmwareEngineNetwork = new VmwareEngineNetwork(); + * $operationResponse = $vmwareEngineClient->createVmwareEngineNetwork($formattedParent, $vmwareEngineNetworkId, $vmwareEngineNetwork); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmwareEngineClient->createVmwareEngineNetwork($formattedParent, $vmwareEngineNetworkId, $vmwareEngineNetwork); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'createVmwareEngineNetwork'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the location to create the new VMware Engine + * network in. A VMware Engine network of type + * `LEGACY` is a regional resource, and a VMware + * Engine network of type `STANDARD` is a global resource. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global` + * @param string $vmwareEngineNetworkId Required. The user-provided identifier of the new VMware Engine network. + * This identifier must be unique among VMware Engine network resources + * within the parent and becomes the final token in the name URI. The + * identifier must meet the following requirements: + * + * * For networks of type LEGACY, adheres to the format: + * `{region-id}-default`. Replace `{region-id}` with the region where you want + * to create the VMware Engine network. For example, "us-central1-default". + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * @param VmwareEngineNetwork $vmwareEngineNetwork Required. The initial description of the new VMware Engine network. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createVmwareEngineNetwork($parent, $vmwareEngineNetworkId, $vmwareEngineNetwork, array $optionalArgs = []) + { + $request = new CreateVmwareEngineNetworkRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setVmwareEngineNetworkId($vmwareEngineNetworkId); + $request->setVmwareEngineNetwork($vmwareEngineNetwork); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateVmwareEngineNetwork', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a `Cluster` resource. To avoid unintended data loss, migrate or + * gracefully shut down any workloads running on the cluster before deletion. + * You cannot delete the management cluster of a private cloud using this + * method. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedName = $vmwareEngineClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]'); + * $operationResponse = $vmwareEngineClient->deleteCluster($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmwareEngineClient->deleteCluster($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'deleteCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the cluster to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteCluster($name, array $optionalArgs = []) + { + $request = new DeleteClusterRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a `NetworkPolicy` resource. A network policy cannot be deleted + * when `NetworkService.state` is set to `RECONCILING` for either its external + * IP or internet access service. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedName = $vmwareEngineClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); + * $operationResponse = $vmwareEngineClient->deleteNetworkPolicy($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmwareEngineClient->deleteNetworkPolicy($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'deleteNetworkPolicy'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the network policy to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteNetworkPolicy($name, array $optionalArgs = []) + { + $request = new DeleteNetworkPolicyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteNetworkPolicy', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Schedules a `PrivateCloud` resource for deletion. + * + * A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` + * set to `DELETED` and `expireTime` set to the time when deletion is final + * and can no longer be reversed. The delete operation is marked as done + * as soon as the `PrivateCloud` is successfully scheduled for deletion + * (this also applies when `delayHours` is set to zero), and the operation is + * not kept in pending state until `PrivateCloud` is purged. + * `PrivateCloud` can be restored using `UndeletePrivateCloud` method before + * the `expireTime` elapses. When `expireTime` is reached, deletion is final + * and all private cloud resources are irreversibly removed and billing stops. + * During the final removal process, `PrivateCloud.state` is set to `PURGING`. + * `PrivateCloud` can be polled using standard `GET` method for the whole + * period of deletion and purging. It will not be returned only + * when it is completely purged. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedName = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + * $operationResponse = $vmwareEngineClient->deletePrivateCloud($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmwareEngineClient->deletePrivateCloud($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'deletePrivateCloud'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the private cloud to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * @type bool $force + * Optional. If set to true, cascade delete is enabled and all children of + * this private cloud resource are also deleted. When this flag is set to + * false, the private cloud will not be deleted if there are any children + * other than the management cluster. The management cluster is always + * deleted. + * @type int $delayHours + * Optional. Time delay of the deletion specified in hours. The default value + * is `3`. Specifying a non-zero value for this field changes the value of + * `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned + * deletion time. Deletion can be cancelled before `expire_time` elapses using + * [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]. + * Specifying a value of `0` for this field instead begins the deletion + * process and ceases billing immediately. During the final deletion process, + * the value of `PrivateCloud.state` becomes `PURGING`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deletePrivateCloud($name, array $optionalArgs = []) + { + $request = new DeletePrivateCloudRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + if (isset($optionalArgs['force'])) { + $request->setForce($optionalArgs['force']); + } + + if (isset($optionalArgs['delayHours'])) { + $request->setDelayHours($optionalArgs['delayHours']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeletePrivateCloud', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a `VmwareEngineNetwork` resource. You can only delete a VMware + * Engine network after all resources that refer to it are deleted. For + * example, a private cloud, a network peering, and a network policy can all + * refer to the same VMware Engine network. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedName = $vmwareEngineClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); + * $operationResponse = $vmwareEngineClient->deleteVmwareEngineNetwork($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmwareEngineClient->deleteVmwareEngineNetwork($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'deleteVmwareEngineNetwork'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the VMware Engine network to be deleted. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type string $etag + * Optional. Checksum used to ensure that the user-provided value is up to + * date before the server processes the request. The server compares provided + * checksum with the current checksum of the resource. If the user-provided + * value is out of date, this request returns an `ABORTED` error. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteVmwareEngineNetwork($name, array $optionalArgs = []) + { + $request = new DeleteVmwareEngineNetworkRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + if (isset($optionalArgs['etag'])) { + $request->setEtag($optionalArgs['etag']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteVmwareEngineNetwork', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Retrieves a `Cluster` resource by its resource name. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedName = $vmwareEngineClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]'); + * $response = $vmwareEngineClient->getCluster($formattedName); + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $name Required. The cluster resource name to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\VmwareEngine\V1\Cluster + * + * @throws ApiException if the remote call fails + */ + public function getCluster($name, array $optionalArgs = []) + { + $request = new GetClusterRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetCluster', Cluster::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves a `HcxActivationKey` resource by its resource name. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedName = $vmwareEngineClient->hcxActivationKeyName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[HCX_ACTIVATION_KEY]'); + * $response = $vmwareEngineClient->getHcxActivationKey($formattedName); + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the HCX activation key to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\VmwareEngine\V1\HcxActivationKey + * + * @throws ApiException if the remote call fails + */ + public function getHcxActivationKey($name, array $optionalArgs = []) + { + $request = new GetHcxActivationKeyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetHcxActivationKey', HcxActivationKey::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves a `NetworkPolicy` resource by its resource name. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedName = $vmwareEngineClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); + * $response = $vmwareEngineClient->getNetworkPolicy($formattedName); + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the network policy to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\VmwareEngine\V1\NetworkPolicy + * + * @throws ApiException if the remote call fails + */ + public function getNetworkPolicy($name, array $optionalArgs = []) + { + $request = new GetNetworkPolicyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetNetworkPolicy', NetworkPolicy::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets details of a single `NodeType`. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedName = $vmwareEngineClient->nodeTypeName('[PROJECT]', '[LOCATION]', '[NODE_TYPE]'); + * $response = $vmwareEngineClient->getNodeType($formattedName); + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the node type to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\VmwareEngine\V1\NodeType + * + * @throws ApiException if the remote call fails + */ + public function getNodeType($name, array $optionalArgs = []) + { + $request = new GetNodeTypeRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetNodeType', NodeType::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves a `PrivateCloud` resource by its resource name. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedName = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + * $response = $vmwareEngineClient->getPrivateCloud($formattedName); + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the private cloud to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\VmwareEngine\V1\PrivateCloud + * + * @throws ApiException if the remote call fails + */ + public function getPrivateCloud($name, array $optionalArgs = []) + { + $request = new GetPrivateCloudRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetPrivateCloud', PrivateCloud::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves a `VmwareEngineNetwork` resource by its resource name. The + * resource contains details of the VMware Engine network, such as its VMware + * Engine network type, peered networks in a service project, and state + * (for example, `CREATING`, `ACTIVE`, `DELETING`). + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedName = $vmwareEngineClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); + * $response = $vmwareEngineClient->getVmwareEngineNetwork($formattedName); + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the VMware Engine network to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork + * + * @throws ApiException if the remote call fails + */ + public function getVmwareEngineNetwork($name, array $optionalArgs = []) + { + $request = new GetVmwareEngineNetworkRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetVmwareEngineNetwork', VmwareEngineNetwork::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists `Cluster` resources in a given private cloud. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedParent = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + * // Iterate over pages of elements + * $pagedResponse = $vmwareEngineClient->listClusters($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $vmwareEngineClient->listClusters($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the private cloud to query for clusters. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-cluster") + * (nodeCount = "3") + * ``` + * + * By default, each expression is an `AND` expression. However, you can + * include `AND` and `OR` expressions explicitly. For example: + * ``` + * (name = "example-cluster-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-cluster-2") + * ``` + * @type string $orderBy + * Sorts list results by a certain order. By default, returned results are + * ordered by `name` in ascending order. You can also sort results in + * descending order based on the `name` value using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listClusters($parent, array $optionalArgs = []) + { + $request = new ListClustersRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListClusters', $optionalArgs, ListClustersResponse::class, $request); + } + + /** + * Lists `HcxActivationKey` resources in a given private cloud. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedParent = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + * // Iterate over pages of elements + * $pagedResponse = $vmwareEngineClient->listHcxActivationKeys($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $vmwareEngineClient->listHcxActivationKeys($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the private cloud + * to be queried for HCX activation keys. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud` + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listHcxActivationKeys($parent, array $optionalArgs = []) + { + $request = new ListHcxActivationKeysRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListHcxActivationKeys', $optionalArgs, ListHcxActivationKeysResponse::class, $request); + } + + /** + * Lists `NetworkPolicy` resources in a specified project and location. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedParent = $vmwareEngineClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $vmwareEngineClient->listNetworkPolicies($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $vmwareEngineClient->listNetworkPolicies($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the location (region) to query for + * network policies. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/us-central1` + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * + * For example, if you are filtering a list of network policies, you can + * exclude the ones named `example-policy` by specifying + * `name != "example-policy"`. + * + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-policy") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-policy-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-policy-2") + * ``` + * @type string $orderBy + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listNetworkPolicies($parent, array $optionalArgs = []) + { + $request = new ListNetworkPoliciesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListNetworkPolicies', $optionalArgs, ListNetworkPoliciesResponse::class, $request); + } + + /** + * Lists node types + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedParent = $vmwareEngineClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $vmwareEngineClient->listNodeTypes($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $vmwareEngineClient->listNodeTypes($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the location to be queried for node types. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * + * For example, if you are filtering a list of node types, you can + * exclude the ones named `standard-72` by specifying + * `name != "standard-72"`. + * + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "standard-72") + * (virtual_cpu_count > 2) + * ``` + * + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "standard-96") AND + * (virtual_cpu_count > 2) OR + * (name = "standard-72") + * ``` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listNodeTypes($parent, array $optionalArgs = []) + { + $request = new ListNodeTypesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListNodeTypes', $optionalArgs, ListNodeTypesResponse::class, $request); + } + + /** + * Lists `PrivateCloud` resources in a given project and location. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedParent = $vmwareEngineClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $vmwareEngineClient->listPrivateClouds($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $vmwareEngineClient->listPrivateClouds($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the private cloud to be queried for + * clusters. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or + * `<`. + * + * For example, if you are filtering a list of private clouds, you can exclude + * the ones named `example-pc` by specifying `name != "example-pc"`. + * + * You can also filter nested fields. For example, you could specify + * `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds + * only if they have a matching address in their network configuration. + * + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-pc") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * + * By default, each expression is an `AND` expression. However, you can + * include `AND` and `OR` expressions explicitly. For example: + * ``` + * (name = "private-cloud-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "private-cloud-2") + * ``` + * @type string $orderBy + * Sorts list results by a certain order. By default, returned results are + * ordered by `name` in ascending order. You can also sort results in + * descending order based on the `name` value using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listPrivateClouds($parent, array $optionalArgs = []) + { + $request = new ListPrivateCloudsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListPrivateClouds', $optionalArgs, ListPrivateCloudsResponse::class, $request); + } + + /** + * Lists subnets in a given private cloud. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedParent = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + * // Iterate over pages of elements + * $pagedResponse = $vmwareEngineClient->listSubnets($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $vmwareEngineClient->listSubnets($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the private cloud to be queried for + * subnets. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listSubnets($parent, array $optionalArgs = []) + { + $request = new ListSubnetsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListSubnets', $optionalArgs, ListSubnetsResponse::class, $request); + } + + /** + * Lists `VmwareEngineNetwork` resources in a given project and location. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedParent = $vmwareEngineClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $vmwareEngineClient->listVmwareEngineNetworks($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $vmwareEngineClient->listVmwareEngineNetworks($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the location to query for + * VMware Engine networks. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/global` + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * + * For example, if you are filtering a list of network peerings, you can + * exclude the ones named `example-network` by specifying + * `name != "example-network"`. + * + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-network") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-network-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-network-2") + * ``` + * @type string $orderBy + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listVmwareEngineNetworks($parent, array $optionalArgs = []) + { + $request = new ListVmwareEngineNetworksRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListVmwareEngineNetworks', $optionalArgs, ListVmwareEngineNetworksResponse::class, $request); + } + + /** + * Resets credentials of the NSX appliance. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedPrivateCloud = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + * $operationResponse = $vmwareEngineClient->resetNsxCredentials($formattedPrivateCloud); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmwareEngineClient->resetNsxCredentials($formattedPrivateCloud); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'resetNsxCredentials'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $privateCloud Required. The resource name of the private cloud + * to reset credentials for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function resetNsxCredentials($privateCloud, array $optionalArgs = []) + { + $request = new ResetNsxCredentialsRequest(); + $requestParamHeaders = []; + $request->setPrivateCloud($privateCloud); + $requestParamHeaders['private_cloud'] = $privateCloud; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ResetNsxCredentials', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Resets credentials of the Vcenter appliance. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedPrivateCloud = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + * $operationResponse = $vmwareEngineClient->resetVcenterCredentials($formattedPrivateCloud); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmwareEngineClient->resetVcenterCredentials($formattedPrivateCloud); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'resetVcenterCredentials'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $privateCloud Required. The resource name of the private cloud + * to reset credentials for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function resetVcenterCredentials($privateCloud, array $optionalArgs = []) + { + $request = new ResetVcenterCredentialsRequest(); + $requestParamHeaders = []; + $request->setPrivateCloud($privateCloud); + $requestParamHeaders['private_cloud'] = $privateCloud; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ResetVcenterCredentials', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets details of credentials for NSX appliance. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedPrivateCloud = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + * $response = $vmwareEngineClient->showNsxCredentials($formattedPrivateCloud); + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $privateCloud Required. The resource name of the private cloud + * to be queried for credentials. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\VmwareEngine\V1\Credentials + * + * @throws ApiException if the remote call fails + */ + public function showNsxCredentials($privateCloud, array $optionalArgs = []) + { + $request = new ShowNsxCredentialsRequest(); + $requestParamHeaders = []; + $request->setPrivateCloud($privateCloud); + $requestParamHeaders['private_cloud'] = $privateCloud; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ShowNsxCredentials', Credentials::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets details of credentials for Vcenter appliance. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedPrivateCloud = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + * $response = $vmwareEngineClient->showVcenterCredentials($formattedPrivateCloud); + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $privateCloud Required. The resource name of the private cloud + * to be queried for credentials. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\VmwareEngine\V1\Credentials + * + * @throws ApiException if the remote call fails + */ + public function showVcenterCredentials($privateCloud, array $optionalArgs = []) + { + $request = new ShowVcenterCredentialsRequest(); + $requestParamHeaders = []; + $request->setPrivateCloud($privateCloud); + $requestParamHeaders['private_cloud'] = $privateCloud; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ShowVcenterCredentials', Credentials::class, $optionalArgs, $request)->wait(); + } + + /** + * Restores a private cloud that was previously scheduled for deletion by + * `DeletePrivateCloud`. A `PrivateCloud` resource scheduled for deletion has + * `PrivateCloud.state` set to `DELETED` and `PrivateCloud.expireTime` set to + * the time when deletion can no longer be reversed. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $formattedName = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + * $operationResponse = $vmwareEngineClient->undeletePrivateCloud($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmwareEngineClient->undeletePrivateCloud($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'undeletePrivateCloud'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the private cloud scheduled for deletion. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function undeletePrivateCloud($name, array $optionalArgs = []) + { + $request = new UndeletePrivateCloudRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UndeletePrivateCloud', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Modifies a `Cluster` resource. Only the following fields can be updated: + * `node_type_configs.*.node_count`. Only fields specified in `updateMask` are + * applied. + * + * During operation processing, the resource is temporarily in the `ACTIVE` + * state before the operation fully completes. For that period of time, you + * can't update the resource. Use the operation status to determine when the + * processing fully completes. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $updateMask = new FieldMask(); + * $cluster = new Cluster(); + * $operationResponse = $vmwareEngineClient->updateCluster($updateMask, $cluster); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmwareEngineClient->updateCluster($updateMask, $cluster); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'updateCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `Cluster` resource by the update. The fields specified in the `updateMask` + * are relative to the resource, not the full request. A field will be + * overwritten if it is in the mask. If the user does not provide a mask then + * all fields will be overwritten. + * @param Cluster $cluster Required. The description of the cluster. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * Optional. The request ID must be a valid UUID with the exception that + * zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validateOnly + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateCluster($updateMask, $cluster, array $optionalArgs = []) + { + $request = new UpdateClusterRequest(); + $requestParamHeaders = []; + $request->setUpdateMask($updateMask); + $request->setCluster($cluster); + $requestParamHeaders['cluster.name'] = $cluster->getName(); + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Modifies a `NetworkPolicy` resource. Only the following fields can be + * updated: `internet_access`, `external_ip`, `edge_services_cidr`. + * Only fields specified in `updateMask` are applied. When updating a network + * policy, the external IP network service can only be disabled if there are + * no external IP addresses present in the scope of the policy. Also, a + * `NetworkService` cannot be updated when `NetworkService.state` is set + * to `RECONCILING`. + * + * During operation processing, the resource is temporarily in the `ACTIVE` + * state before the operation fully completes. For that period of time, you + * can't update the resource. Use the operation status to determine when the + * processing fully completes. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $networkPolicy = new NetworkPolicy(); + * $updateMask = new FieldMask(); + * $operationResponse = $vmwareEngineClient->updateNetworkPolicy($networkPolicy, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmwareEngineClient->updateNetworkPolicy($networkPolicy, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'updateNetworkPolicy'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param NetworkPolicy $networkPolicy Required. Network policy description. + * @param FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `NetworkPolicy` resource by the update. + * The fields specified in the `update_mask` are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateNetworkPolicy($networkPolicy, $updateMask, array $optionalArgs = []) + { + $request = new UpdateNetworkPolicyRequest(); + $requestParamHeaders = []; + $request->setNetworkPolicy($networkPolicy); + $request->setUpdateMask($updateMask); + $requestParamHeaders['network_policy.name'] = $networkPolicy->getName(); + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateNetworkPolicy', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Modifies a `PrivateCloud` resource. Only the following fields can be + * updated: `description`. + * Only fields specified in `updateMask` are applied. + * + * During operation processing, the resource is temporarily in the `ACTIVE` + * state before the operation fully completes. For that period of time, you + * can't update the resource. Use the operation status to determine when the + * processing fully completes. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $privateCloud = new PrivateCloud(); + * $updateMask = new FieldMask(); + * $operationResponse = $vmwareEngineClient->updatePrivateCloud($privateCloud, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmwareEngineClient->updatePrivateCloud($privateCloud, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'updatePrivateCloud'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param PrivateCloud $privateCloud Required. Private cloud description. + * @param FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `PrivateCloud` resource by the update. The fields specified in `updateMask` + * are relative to the resource, not the full request. A field will be + * overwritten if it is in the mask. If the user does not provide a mask then + * all fields will be overwritten. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updatePrivateCloud($privateCloud, $updateMask, array $optionalArgs = []) + { + $request = new UpdatePrivateCloudRequest(); + $requestParamHeaders = []; + $request->setPrivateCloud($privateCloud); + $request->setUpdateMask($updateMask); + $requestParamHeaders['private_cloud.name'] = $privateCloud->getName(); + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdatePrivateCloud', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Modifies a VMware Engine network resource. Only the following fields can be + * updated: `description`. Only fields specified in `updateMask` are + * applied. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $vmwareEngineNetwork = new VmwareEngineNetwork(); + * $updateMask = new FieldMask(); + * $operationResponse = $vmwareEngineClient->updateVmwareEngineNetwork($vmwareEngineNetwork, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vmwareEngineClient->updateVmwareEngineNetwork($vmwareEngineNetwork, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'updateVmwareEngineNetwork'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param VmwareEngineNetwork $vmwareEngineNetwork Required. VMware Engine network description. + * @param FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * VMware Engine network resource by the update. + * The fields specified in the `update_mask` are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. Only the + * following fields can be updated: `description`. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateVmwareEngineNetwork($vmwareEngineNetwork, $updateMask, array $optionalArgs = []) + { + $request = new UpdateVmwareEngineNetworkRequest(); + $requestParamHeaders = []; + $request->setVmwareEngineNetwork($vmwareEngineNetwork); + $request->setUpdateMask($updateMask); + $requestParamHeaders['vmware_engine_network.name'] = $vmwareEngineNetwork->getName(); + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateVmwareEngineNetwork', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $response = $vmwareEngineClient->getLocation(); + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $vmwareEngineClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $vmwareEngineClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $resource = 'resource'; + * $response = $vmwareEngineClient->getIamPolicy($resource); + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $vmwareEngineClient->setIamPolicy($resource, $policy); + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * Sample code: + * ``` + * $vmwareEngineClient = new VmwareEngineClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $vmwareEngineClient->testIamPermissions($resource, $permissions); + * } finally { + * $vmwareEngineClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions($resource, $permissions, array $optionalArgs = []) + { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } +} diff --git a/owl-bot-staging/VmwareEngine/v1/src/V1/VmwareEngineClient.php b/owl-bot-staging/VmwareEngine/v1/src/V1/VmwareEngineClient.php new file mode 100644 index 000000000000..93559473651a --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/src/V1/VmwareEngineClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.vmwareengine.v1.VmwareEngine' => [ + 'CreateCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\Cluster', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateHcxActivationKey' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\HcxActivationKey', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateNetworkPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\NetworkPolicy', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreatePrivateCloud' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateVmwareEngineNetwork' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteNetworkPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeletePrivateCloud' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteVmwareEngineNetwork' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ResetNsxCredentials' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'private_cloud', + 'fieldAccessors' => [ + 'getPrivateCloud', + ], + ], + ], + ], + 'ResetVcenterCredentials' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'private_cloud', + 'fieldAccessors' => [ + 'getPrivateCloud', + ], + ], + ], + ], + 'UndeletePrivateCloud' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\Cluster', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'cluster.name', + 'fieldAccessors' => [ + 'getCluster', + 'getName', + ], + ], + ], + ], + 'UpdateNetworkPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\NetworkPolicy', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'network_policy.name', + 'fieldAccessors' => [ + 'getNetworkPolicy', + 'getName', + ], + ], + ], + ], + 'UpdatePrivateCloud' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'private_cloud.name', + 'fieldAccessors' => [ + 'getPrivateCloud', + 'getName', + ], + ], + ], + ], + 'UpdateVmwareEngineNetwork' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'vmware_engine_network.name', + 'fieldAccessors' => [ + 'getVmwareEngineNetwork', + 'getName', + ], + ], + ], + ], + 'GetCluster' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\Cluster', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetHcxActivationKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\HcxActivationKey', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetNetworkPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\NetworkPolicy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetNodeType' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\NodeType', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetPrivateCloud' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\PrivateCloud', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetVmwareEngineNetwork' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListClusters' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getClusters', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListClustersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListHcxActivationKeys' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getHcxActivationKeys', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListHcxActivationKeysResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListNetworkPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getNetworkPolicies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListNetworkPoliciesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListNodeTypes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getNodeTypes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListNodeTypesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListPrivateClouds' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPrivateClouds', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListPrivateCloudsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSubnets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSubnets', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListSubnetsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListVmwareEngineNetworks' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getVmwareEngineNetworks', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListVmwareEngineNetworksResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ShowNsxCredentials' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\Credentials', + 'headerParams' => [ + [ + 'keyName' => 'private_cloud', + 'fieldAccessors' => [ + 'getPrivateCloud', + ], + ], + ], + ], + 'ShowVcenterCredentials' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\Credentials', + 'headerParams' => [ + [ + 'keyName' => 'private_cloud', + 'fieldAccessors' => [ + 'getPrivateCloud', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'cluster' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}', + 'hcxActivationKey' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}/hcxActivationKeys/{hcx_activation_key}', + 'location' => 'projects/{project}/locations/{location}', + 'network' => 'projects/{project}/global/networks/{network}', + 'networkPolicy' => 'projects/{project}/locations/{location}/networkPolicies/{network_policy}', + 'nodeType' => 'projects/{project}/locations/{location}/nodeTypes/{node_type}', + 'privateCloud' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}', + 'vmwareEngineNetwork' => 'projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network}', + ], + ], + ], +]; diff --git a/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_rest_client_config.php b/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_rest_client_config.php new file mode 100644 index 000000000000..7946f284ffdd --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_rest_client_config.php @@ -0,0 +1,523 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.vmwareengine.v1.VmwareEngine' => [ + 'CreateCluster' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/clusters', + 'body' => 'cluster', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'cluster_id', + ], + ], + 'CreateHcxActivationKey' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/hcxActivationKeys', + 'body' => 'hcx_activation_key', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'hcx_activation_key_id', + ], + ], + 'CreateNetworkPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/networkPolicies', + 'body' => 'network_policy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'network_policy_id', + ], + ], + 'CreatePrivateCloud' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/privateClouds', + 'body' => 'private_cloud', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'private_cloud_id', + ], + ], + 'CreateVmwareEngineNetwork' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/vmwareEngineNetworks', + 'body' => 'vmware_engine_network', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'vmware_engine_network_id', + ], + ], + 'DeleteCluster' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/clusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteNetworkPolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/networkPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeletePrivateCloud' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteVmwareEngineNetwork' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/vmwareEngineNetworks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCluster' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/clusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetHcxActivationKey' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/hcxActivationKeys/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetNetworkPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/networkPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetNodeType' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/nodeTypes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPrivateCloud' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetVmwareEngineNetwork' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/vmwareEngineNetworks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListClusters' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/clusters', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListHcxActivationKeys' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/hcxActivationKeys', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListNetworkPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/networkPolicies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListNodeTypes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/nodeTypes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListPrivateClouds' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/privateClouds', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSubnets' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/subnets', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListVmwareEngineNetworks' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/vmwareEngineNetworks', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ResetNsxCredentials' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{private_cloud=projects/*/locations/*/privateClouds/*}:resetNsxCredentials', + 'body' => '*', + 'placeholders' => [ + 'private_cloud' => [ + 'getters' => [ + 'getPrivateCloud', + ], + ], + ], + ], + 'ResetVcenterCredentials' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{private_cloud=projects/*/locations/*/privateClouds/*}:resetVcenterCredentials', + 'body' => '*', + 'placeholders' => [ + 'private_cloud' => [ + 'getters' => [ + 'getPrivateCloud', + ], + ], + ], + ], + 'ShowNsxCredentials' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{private_cloud=projects/*/locations/*/privateClouds/*}:showNsxCredentials', + 'placeholders' => [ + 'private_cloud' => [ + 'getters' => [ + 'getPrivateCloud', + ], + ], + ], + ], + 'ShowVcenterCredentials' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{private_cloud=projects/*/locations/*/privateClouds/*}:showVcenterCredentials', + 'placeholders' => [ + 'private_cloud' => [ + 'getters' => [ + 'getPrivateCloud', + ], + ], + ], + ], + 'UndeletePrivateCloud' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*}:undelete', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateCluster' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{cluster.name=projects/*/locations/*/privateClouds/*/clusters/*}', + 'body' => 'cluster', + 'placeholders' => [ + 'cluster.name' => [ + 'getters' => [ + 'getCluster', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateNetworkPolicy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{network_policy.name=projects/*/locations/*/networkPolicies/*}', + 'body' => 'network_policy', + 'placeholders' => [ + 'network_policy.name' => [ + 'getters' => [ + 'getNetworkPolicy', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdatePrivateCloud' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{private_cloud.name=projects/*/locations/*/privateClouds/*}', + 'body' => 'private_cloud', + 'placeholders' => [ + 'private_cloud.name' => [ + 'getters' => [ + 'getPrivateCloud', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateVmwareEngineNetwork' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{vmware_engine_network.name=projects/*/locations/*/vmwareEngineNetworks/*}', + 'body' => 'vmware_engine_network', + 'placeholders' => [ + 'vmware_engine_network.name' => [ + 'getters' => [ + 'getVmwareEngineNetwork', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/clusters/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/hcxActivationKeys/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/clusters/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/hcxActivationKeys/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/clusters/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/hcxActivationKeys/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/VmwareEngine/v1/tests/Unit/V1/Client/VmwareEngineClientTest.php b/owl-bot-staging/VmwareEngine/v1/tests/Unit/V1/Client/VmwareEngineClientTest.php new file mode 100644 index 000000000000..a222ff4fe21b --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/tests/Unit/V1/Client/VmwareEngineClientTest.php @@ -0,0 +1,3818 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return VmwareEngineClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new VmwareEngineClient($options); + } + + /** @test */ + public function createClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $management = false; + $uid = 'uid115792'; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name); + $expectedResponse->setManagement($management); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $clusterId = 'clusterId240280960'; + $cluster = new Cluster(); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $clusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); + $request = (new CreateClusterRequest()) + ->setParent($formattedParent) + ->setClusterId($clusterId) + ->setCluster($cluster); + $response = $gapicClient->createCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/CreateCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getClusterId(); + $this->assertProtobufEquals($clusterId, $actualValue); + $actualValue = $actualApiRequestObject->getCluster(); + $this->assertProtobufEquals($cluster, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $clusterId = 'clusterId240280960'; + $cluster = new Cluster(); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $clusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); + $request = (new CreateClusterRequest()) + ->setParent($formattedParent) + ->setClusterId($clusterId) + ->setCluster($cluster); + $response = $gapicClient->createCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createHcxActivationKeyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createHcxActivationKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $activationKey = 'activationKey-1343958090'; + $uid = 'uid115792'; + $expectedResponse = new HcxActivationKey(); + $expectedResponse->setName($name); + $expectedResponse->setActivationKey($activationKey); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createHcxActivationKeyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $hcxActivationKey = new HcxActivationKey(); + $hcxActivationKeyId = 'hcxActivationKeyId26532194'; + $request = (new CreateHcxActivationKeyRequest()) + ->setParent($formattedParent) + ->setHcxActivationKey($hcxActivationKey) + ->setHcxActivationKeyId($hcxActivationKeyId); + $response = $gapicClient->createHcxActivationKey($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/CreateHcxActivationKey', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getHcxActivationKey(); + $this->assertProtobufEquals($hcxActivationKey, $actualValue); + $actualValue = $actualApiRequestObject->getHcxActivationKeyId(); + $this->assertProtobufEquals($hcxActivationKeyId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createHcxActivationKeyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createHcxActivationKeyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createHcxActivationKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $hcxActivationKey = new HcxActivationKey(); + $hcxActivationKeyId = 'hcxActivationKeyId26532194'; + $request = (new CreateHcxActivationKeyRequest()) + ->setParent($formattedParent) + ->setHcxActivationKey($hcxActivationKey) + ->setHcxActivationKeyId($hcxActivationKeyId); + $response = $gapicClient->createHcxActivationKey($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createHcxActivationKeyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createNetworkPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createNetworkPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $edgeServicesCidr = 'edgeServicesCidr-792872013'; + $uid = 'uid115792'; + $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; + $description = 'description-1724546052'; + $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; + $expectedResponse = new NetworkPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setEdgeServicesCidr($edgeServicesCidr); + $expectedResponse->setUid($uid); + $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); + $expectedResponse->setDescription($description); + $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createNetworkPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $networkPolicyId = 'networkPolicyId173955703'; + $networkPolicy = new NetworkPolicy(); + $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; + $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); + $request = (new CreateNetworkPolicyRequest()) + ->setParent($formattedParent) + ->setNetworkPolicyId($networkPolicyId) + ->setNetworkPolicy($networkPolicy); + $response = $gapicClient->createNetworkPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/CreateNetworkPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getNetworkPolicyId(); + $this->assertProtobufEquals($networkPolicyId, $actualValue); + $actualValue = $actualApiRequestObject->getNetworkPolicy(); + $this->assertProtobufEquals($networkPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createNetworkPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createNetworkPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createNetworkPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $networkPolicyId = 'networkPolicyId173955703'; + $networkPolicy = new NetworkPolicy(); + $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; + $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); + $request = (new CreateNetworkPolicyRequest()) + ->setParent($formattedParent) + ->setNetworkPolicyId($networkPolicyId) + ->setNetworkPolicy($networkPolicy); + $response = $gapicClient->createNetworkPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createNetworkPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createPrivateCloudTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPrivateCloudTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $expectedResponse = new PrivateCloud(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createPrivateCloudTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $privateCloudId = 'privateCloudId1366391457'; + $privateCloud = new PrivateCloud(); + $privateCloudNetworkConfig = new NetworkConfig(); + $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; + $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); + $privateCloud->setNetworkConfig($privateCloudNetworkConfig); + $privateCloudManagementCluster = new ManagementCluster(); + $managementClusterClusterId = 'managementClusterClusterId311493182'; + $privateCloudManagementCluster->setClusterId($managementClusterClusterId); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $managementClusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); + $privateCloud->setManagementCluster($privateCloudManagementCluster); + $request = (new CreatePrivateCloudRequest()) + ->setParent($formattedParent) + ->setPrivateCloudId($privateCloudId) + ->setPrivateCloud($privateCloud); + $response = $gapicClient->createPrivateCloud($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/CreatePrivateCloud', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getPrivateCloudId(); + $this->assertProtobufEquals($privateCloudId, $actualValue); + $actualValue = $actualApiRequestObject->getPrivateCloud(); + $this->assertProtobufEquals($privateCloud, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPrivateCloudTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createPrivateCloudExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPrivateCloudTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $privateCloudId = 'privateCloudId1366391457'; + $privateCloud = new PrivateCloud(); + $privateCloudNetworkConfig = new NetworkConfig(); + $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; + $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); + $privateCloud->setNetworkConfig($privateCloudNetworkConfig); + $privateCloudManagementCluster = new ManagementCluster(); + $managementClusterClusterId = 'managementClusterClusterId311493182'; + $privateCloudManagementCluster->setClusterId($managementClusterClusterId); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $managementClusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); + $privateCloud->setManagementCluster($privateCloudManagementCluster); + $request = (new CreatePrivateCloudRequest()) + ->setParent($formattedParent) + ->setPrivateCloudId($privateCloudId) + ->setPrivateCloud($privateCloud); + $response = $gapicClient->createPrivateCloud($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPrivateCloudTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createVmwareEngineNetworkTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createVmwareEngineNetworkTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new VmwareEngineNetwork(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createVmwareEngineNetworkTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $vmwareEngineNetworkId = 'vmwareEngineNetworkId2131972382'; + $vmwareEngineNetwork = new VmwareEngineNetwork(); + $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; + $vmwareEngineNetwork->setType($vmwareEngineNetworkType); + $request = (new CreateVmwareEngineNetworkRequest()) + ->setParent($formattedParent) + ->setVmwareEngineNetworkId($vmwareEngineNetworkId) + ->setVmwareEngineNetwork($vmwareEngineNetwork); + $response = $gapicClient->createVmwareEngineNetwork($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/CreateVmwareEngineNetwork', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getVmwareEngineNetworkId(); + $this->assertProtobufEquals($vmwareEngineNetworkId, $actualValue); + $actualValue = $actualApiRequestObject->getVmwareEngineNetwork(); + $this->assertProtobufEquals($vmwareEngineNetwork, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createVmwareEngineNetworkTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createVmwareEngineNetworkExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createVmwareEngineNetworkTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $vmwareEngineNetworkId = 'vmwareEngineNetworkId2131972382'; + $vmwareEngineNetwork = new VmwareEngineNetwork(); + $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; + $vmwareEngineNetwork->setType($vmwareEngineNetworkType); + $request = (new CreateVmwareEngineNetworkRequest()) + ->setParent($formattedParent) + ->setVmwareEngineNetworkId($vmwareEngineNetworkId) + ->setVmwareEngineNetwork($vmwareEngineNetwork); + $response = $gapicClient->createVmwareEngineNetwork($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createVmwareEngineNetworkTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]'); + $request = (new DeleteClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/DeleteCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]'); + $request = (new DeleteClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteNetworkPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteNetworkPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteNetworkPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); + $request = (new DeleteNetworkPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteNetworkPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/DeleteNetworkPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteNetworkPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteNetworkPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteNetworkPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); + $request = (new DeleteNetworkPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteNetworkPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteNetworkPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deletePrivateCloudTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deletePrivateCloudTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $expectedResponse = new PrivateCloud(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deletePrivateCloudTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new DeletePrivateCloudRequest()) + ->setName($formattedName); + $response = $gapicClient->deletePrivateCloud($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/DeletePrivateCloud', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deletePrivateCloudTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deletePrivateCloudExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deletePrivateCloudTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new DeletePrivateCloudRequest()) + ->setName($formattedName); + $response = $gapicClient->deletePrivateCloud($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deletePrivateCloudTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteVmwareEngineNetworkTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteVmwareEngineNetworkTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteVmwareEngineNetworkTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); + $request = (new DeleteVmwareEngineNetworkRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteVmwareEngineNetwork($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/DeleteVmwareEngineNetwork', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteVmwareEngineNetworkTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteVmwareEngineNetworkExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteVmwareEngineNetworkTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); + $request = (new DeleteVmwareEngineNetworkRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteVmwareEngineNetwork($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteVmwareEngineNetworkTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getClusterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $management = false; + $uid = 'uid115792'; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name2); + $expectedResponse->setManagement($management); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]'); + $request = (new GetClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->getCluster($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetCluster', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getClusterExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]'); + $request = (new GetClusterRequest()) + ->setName($formattedName); + try { + $gapicClient->getCluster($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getHcxActivationKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $activationKey = 'activationKey-1343958090'; + $uid = 'uid115792'; + $expectedResponse = new HcxActivationKey(); + $expectedResponse->setName($name2); + $expectedResponse->setActivationKey($activationKey); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->hcxActivationKeyName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[HCX_ACTIVATION_KEY]'); + $request = (new GetHcxActivationKeyRequest()) + ->setName($formattedName); + $response = $gapicClient->getHcxActivationKey($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetHcxActivationKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getHcxActivationKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->hcxActivationKeyName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[HCX_ACTIVATION_KEY]'); + $request = (new GetHcxActivationKeyRequest()) + ->setName($formattedName); + try { + $gapicClient->getHcxActivationKey($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNetworkPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $edgeServicesCidr = 'edgeServicesCidr-792872013'; + $uid = 'uid115792'; + $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; + $description = 'description-1724546052'; + $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; + $expectedResponse = new NetworkPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setEdgeServicesCidr($edgeServicesCidr); + $expectedResponse->setUid($uid); + $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); + $expectedResponse->setDescription($description); + $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); + $request = (new GetNetworkPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->getNetworkPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetNetworkPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNetworkPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); + $request = (new GetNetworkPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->getNetworkPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNodeTypeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $nodeTypeId = 'nodeTypeId585437955'; + $displayName = 'displayName1615086568'; + $virtualCpuCount = 289038212; + $totalCoreCount = 282953654; + $memoryGb = 1726613721; + $diskSizeGb = 757478089; + $expectedResponse = new NodeType(); + $expectedResponse->setName($name2); + $expectedResponse->setNodeTypeId($nodeTypeId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setVirtualCpuCount($virtualCpuCount); + $expectedResponse->setTotalCoreCount($totalCoreCount); + $expectedResponse->setMemoryGb($memoryGb); + $expectedResponse->setDiskSizeGb($diskSizeGb); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->nodeTypeName('[PROJECT]', '[LOCATION]', '[NODE_TYPE]'); + $request = (new GetNodeTypeRequest()) + ->setName($formattedName); + $response = $gapicClient->getNodeType($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetNodeType', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNodeTypeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->nodeTypeName('[PROJECT]', '[LOCATION]', '[NODE_TYPE]'); + $request = (new GetNodeTypeRequest()) + ->setName($formattedName); + try { + $gapicClient->getNodeType($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPrivateCloudTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $expectedResponse = new PrivateCloud(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new GetPrivateCloudRequest()) + ->setName($formattedName); + $response = $gapicClient->getPrivateCloud($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetPrivateCloud', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPrivateCloudExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new GetPrivateCloudRequest()) + ->setName($formattedName); + try { + $gapicClient->getPrivateCloud($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVmwareEngineNetworkTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new VmwareEngineNetwork(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); + $request = (new GetVmwareEngineNetworkRequest()) + ->setName($formattedName); + $response = $gapicClient->getVmwareEngineNetwork($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetVmwareEngineNetwork', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVmwareEngineNetworkExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); + $request = (new GetVmwareEngineNetworkRequest()) + ->setName($formattedName); + try { + $gapicClient->getVmwareEngineNetwork($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listClustersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $clustersElement = new Cluster(); + $clusters = [ + $clustersElement, + ]; + $expectedResponse = new ListClustersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setClusters($clusters); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ListClustersRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listClusters($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getClusters()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListClusters', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listClustersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ListClustersRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listClusters($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listHcxActivationKeysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $hcxActivationKeysElement = new HcxActivationKey(); + $hcxActivationKeys = [ + $hcxActivationKeysElement, + ]; + $expectedResponse = new ListHcxActivationKeysResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setHcxActivationKeys($hcxActivationKeys); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ListHcxActivationKeysRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listHcxActivationKeys($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getHcxActivationKeys()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListHcxActivationKeys', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listHcxActivationKeysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ListHcxActivationKeysRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listHcxActivationKeys($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNetworkPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $networkPoliciesElement = new NetworkPolicy(); + $networkPolicies = [ + $networkPoliciesElement, + ]; + $expectedResponse = new ListNetworkPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setNetworkPolicies($networkPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListNetworkPoliciesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listNetworkPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getNetworkPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListNetworkPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNetworkPoliciesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListNetworkPoliciesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listNetworkPolicies($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNodeTypesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $nodeTypesElement = new NodeType(); + $nodeTypes = [ + $nodeTypesElement, + ]; + $expectedResponse = new ListNodeTypesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setNodeTypes($nodeTypes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListNodeTypesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listNodeTypes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getNodeTypes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListNodeTypes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNodeTypesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListNodeTypesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listNodeTypes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPrivateCloudsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $privateCloudsElement = new PrivateCloud(); + $privateClouds = [ + $privateCloudsElement, + ]; + $expectedResponse = new ListPrivateCloudsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPrivateClouds($privateClouds); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListPrivateCloudsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPrivateClouds($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPrivateClouds()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListPrivateClouds', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPrivateCloudsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListPrivateCloudsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPrivateClouds($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSubnetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $subnetsElement = new Subnet(); + $subnets = [ + $subnetsElement, + ]; + $expectedResponse = new ListSubnetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSubnets($subnets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ListSubnetsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSubnets($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSubnets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListSubnets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSubnetsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ListSubnetsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSubnets($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVmwareEngineNetworksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $vmwareEngineNetworksElement = new VmwareEngineNetwork(); + $vmwareEngineNetworks = [ + $vmwareEngineNetworksElement, + ]; + $expectedResponse = new ListVmwareEngineNetworksResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setVmwareEngineNetworks($vmwareEngineNetworks); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListVmwareEngineNetworksRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listVmwareEngineNetworks($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getVmwareEngineNetworks()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListVmwareEngineNetworks', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVmwareEngineNetworksExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListVmwareEngineNetworksRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listVmwareEngineNetworks($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resetNsxCredentialsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resetNsxCredentialsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $expectedResponse = new PrivateCloud(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/resetNsxCredentialsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ResetNsxCredentialsRequest()) + ->setPrivateCloud($formattedPrivateCloud); + $response = $gapicClient->resetNsxCredentials($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ResetNsxCredentials', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getPrivateCloud(); + $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resetNsxCredentialsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resetNsxCredentialsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resetNsxCredentialsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ResetNsxCredentialsRequest()) + ->setPrivateCloud($formattedPrivateCloud); + $response = $gapicClient->resetNsxCredentials($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resetNsxCredentialsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resetVcenterCredentialsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resetVcenterCredentialsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $expectedResponse = new PrivateCloud(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/resetVcenterCredentialsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ResetVcenterCredentialsRequest()) + ->setPrivateCloud($formattedPrivateCloud); + $response = $gapicClient->resetVcenterCredentials($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ResetVcenterCredentials', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getPrivateCloud(); + $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resetVcenterCredentialsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resetVcenterCredentialsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resetVcenterCredentialsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ResetVcenterCredentialsRequest()) + ->setPrivateCloud($formattedPrivateCloud); + $response = $gapicClient->resetVcenterCredentials($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resetVcenterCredentialsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function showNsxCredentialsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $username = 'username-265713450'; + $password = 'password1216985755'; + $expectedResponse = new Credentials(); + $expectedResponse->setUsername($username); + $expectedResponse->setPassword($password); + $transport->addResponse($expectedResponse); + // Mock request + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ShowNsxCredentialsRequest()) + ->setPrivateCloud($formattedPrivateCloud); + $response = $gapicClient->showNsxCredentials($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ShowNsxCredentials', $actualFuncCall); + $actualValue = $actualRequestObject->getPrivateCloud(); + $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function showNsxCredentialsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ShowNsxCredentialsRequest()) + ->setPrivateCloud($formattedPrivateCloud); + try { + $gapicClient->showNsxCredentials($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function showVcenterCredentialsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $username = 'username-265713450'; + $password = 'password1216985755'; + $expectedResponse = new Credentials(); + $expectedResponse->setUsername($username); + $expectedResponse->setPassword($password); + $transport->addResponse($expectedResponse); + // Mock request + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ShowVcenterCredentialsRequest()) + ->setPrivateCloud($formattedPrivateCloud); + $response = $gapicClient->showVcenterCredentials($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ShowVcenterCredentials', $actualFuncCall); + $actualValue = $actualRequestObject->getPrivateCloud(); + $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function showVcenterCredentialsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ShowVcenterCredentialsRequest()) + ->setPrivateCloud($formattedPrivateCloud); + try { + $gapicClient->showVcenterCredentials($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function undeletePrivateCloudTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/undeletePrivateCloudTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $expectedResponse = new PrivateCloud(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/undeletePrivateCloudTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new UndeletePrivateCloudRequest()) + ->setName($formattedName); + $response = $gapicClient->undeletePrivateCloud($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/UndeletePrivateCloud', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/undeletePrivateCloudTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function undeletePrivateCloudExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/undeletePrivateCloudTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new UndeletePrivateCloudRequest()) + ->setName($formattedName); + $response = $gapicClient->undeletePrivateCloud($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/undeletePrivateCloudTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $management = false; + $uid = 'uid115792'; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name); + $expectedResponse->setManagement($management); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $cluster = new Cluster(); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $clusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); + $request = (new UpdateClusterRequest()) + ->setUpdateMask($updateMask) + ->setCluster($cluster); + $response = $gapicClient->updateCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/UpdateCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getCluster(); + $this->assertProtobufEquals($cluster, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $cluster = new Cluster(); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $clusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); + $request = (new UpdateClusterRequest()) + ->setUpdateMask($updateMask) + ->setCluster($cluster); + $response = $gapicClient->updateCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateNetworkPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateNetworkPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $edgeServicesCidr = 'edgeServicesCidr-792872013'; + $uid = 'uid115792'; + $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; + $description = 'description-1724546052'; + $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; + $expectedResponse = new NetworkPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setEdgeServicesCidr($edgeServicesCidr); + $expectedResponse->setUid($uid); + $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); + $expectedResponse->setDescription($description); + $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateNetworkPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $networkPolicy = new NetworkPolicy(); + $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; + $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); + $updateMask = new FieldMask(); + $request = (new UpdateNetworkPolicyRequest()) + ->setNetworkPolicy($networkPolicy) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateNetworkPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/UpdateNetworkPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getNetworkPolicy(); + $this->assertProtobufEquals($networkPolicy, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateNetworkPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateNetworkPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateNetworkPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $networkPolicy = new NetworkPolicy(); + $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; + $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); + $updateMask = new FieldMask(); + $request = (new UpdateNetworkPolicyRequest()) + ->setNetworkPolicy($networkPolicy) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateNetworkPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateNetworkPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updatePrivateCloudTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updatePrivateCloudTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $expectedResponse = new PrivateCloud(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updatePrivateCloudTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $privateCloud = new PrivateCloud(); + $privateCloudNetworkConfig = new NetworkConfig(); + $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; + $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); + $privateCloud->setNetworkConfig($privateCloudNetworkConfig); + $privateCloudManagementCluster = new ManagementCluster(); + $managementClusterClusterId = 'managementClusterClusterId311493182'; + $privateCloudManagementCluster->setClusterId($managementClusterClusterId); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $managementClusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); + $privateCloud->setManagementCluster($privateCloudManagementCluster); + $updateMask = new FieldMask(); + $request = (new UpdatePrivateCloudRequest()) + ->setPrivateCloud($privateCloud) + ->setUpdateMask($updateMask); + $response = $gapicClient->updatePrivateCloud($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/UpdatePrivateCloud', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getPrivateCloud(); + $this->assertProtobufEquals($privateCloud, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updatePrivateCloudTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updatePrivateCloudExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updatePrivateCloudTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $privateCloud = new PrivateCloud(); + $privateCloudNetworkConfig = new NetworkConfig(); + $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; + $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); + $privateCloud->setNetworkConfig($privateCloudNetworkConfig); + $privateCloudManagementCluster = new ManagementCluster(); + $managementClusterClusterId = 'managementClusterClusterId311493182'; + $privateCloudManagementCluster->setClusterId($managementClusterClusterId); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $managementClusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); + $privateCloud->setManagementCluster($privateCloudManagementCluster); + $updateMask = new FieldMask(); + $request = (new UpdatePrivateCloudRequest()) + ->setPrivateCloud($privateCloud) + ->setUpdateMask($updateMask); + $response = $gapicClient->updatePrivateCloud($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updatePrivateCloudTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateVmwareEngineNetworkTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateVmwareEngineNetworkTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new VmwareEngineNetwork(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateVmwareEngineNetworkTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $vmwareEngineNetwork = new VmwareEngineNetwork(); + $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; + $vmwareEngineNetwork->setType($vmwareEngineNetworkType); + $updateMask = new FieldMask(); + $request = (new UpdateVmwareEngineNetworkRequest()) + ->setVmwareEngineNetwork($vmwareEngineNetwork) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateVmwareEngineNetwork($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/UpdateVmwareEngineNetwork', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getVmwareEngineNetwork(); + $this->assertProtobufEquals($vmwareEngineNetwork, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateVmwareEngineNetworkTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateVmwareEngineNetworkExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateVmwareEngineNetworkTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $vmwareEngineNetwork = new VmwareEngineNetwork(); + $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; + $vmwareEngineNetwork->setType($vmwareEngineNetworkType); + $updateMask = new FieldMask(); + $request = (new UpdateVmwareEngineNetworkRequest()) + ->setVmwareEngineNetwork($vmwareEngineNetwork) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateVmwareEngineNetwork($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateVmwareEngineNetworkTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createClusterAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $management = false; + $uid = 'uid115792'; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name); + $expectedResponse->setManagement($management); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $clusterId = 'clusterId240280960'; + $cluster = new Cluster(); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $clusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); + $request = (new CreateClusterRequest()) + ->setParent($formattedParent) + ->setClusterId($clusterId) + ->setCluster($cluster); + $response = $gapicClient->createClusterAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/CreateCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getClusterId(); + $this->assertProtobufEquals($clusterId, $actualValue); + $actualValue = $actualApiRequestObject->getCluster(); + $this->assertProtobufEquals($cluster, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/VmwareEngine/v1/tests/Unit/V1/VmwareEngineClientTest.php b/owl-bot-staging/VmwareEngine/v1/tests/Unit/V1/VmwareEngineClientTest.php new file mode 100644 index 000000000000..8096ec9a5330 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/tests/Unit/V1/VmwareEngineClientTest.php @@ -0,0 +1,3525 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return VmwareEngineClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new VmwareEngineClient($options); + } + + /** @test */ + public function createClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $management = false; + $uid = 'uid115792'; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name); + $expectedResponse->setManagement($management); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $clusterId = 'clusterId240280960'; + $cluster = new Cluster(); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $clusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); + $response = $gapicClient->createCluster($formattedParent, $clusterId, $cluster); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/CreateCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getClusterId(); + $this->assertProtobufEquals($clusterId, $actualValue); + $actualValue = $actualApiRequestObject->getCluster(); + $this->assertProtobufEquals($cluster, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $clusterId = 'clusterId240280960'; + $cluster = new Cluster(); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $clusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); + $response = $gapicClient->createCluster($formattedParent, $clusterId, $cluster); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createHcxActivationKeyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createHcxActivationKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $activationKey = 'activationKey-1343958090'; + $uid = 'uid115792'; + $expectedResponse = new HcxActivationKey(); + $expectedResponse->setName($name); + $expectedResponse->setActivationKey($activationKey); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createHcxActivationKeyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $hcxActivationKey = new HcxActivationKey(); + $hcxActivationKeyId = 'hcxActivationKeyId26532194'; + $response = $gapicClient->createHcxActivationKey($formattedParent, $hcxActivationKey, $hcxActivationKeyId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/CreateHcxActivationKey', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getHcxActivationKey(); + $this->assertProtobufEquals($hcxActivationKey, $actualValue); + $actualValue = $actualApiRequestObject->getHcxActivationKeyId(); + $this->assertProtobufEquals($hcxActivationKeyId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createHcxActivationKeyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createHcxActivationKeyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createHcxActivationKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $hcxActivationKey = new HcxActivationKey(); + $hcxActivationKeyId = 'hcxActivationKeyId26532194'; + $response = $gapicClient->createHcxActivationKey($formattedParent, $hcxActivationKey, $hcxActivationKeyId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createHcxActivationKeyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createNetworkPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createNetworkPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $edgeServicesCidr = 'edgeServicesCidr-792872013'; + $uid = 'uid115792'; + $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; + $description = 'description-1724546052'; + $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; + $expectedResponse = new NetworkPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setEdgeServicesCidr($edgeServicesCidr); + $expectedResponse->setUid($uid); + $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); + $expectedResponse->setDescription($description); + $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createNetworkPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $networkPolicyId = 'networkPolicyId173955703'; + $networkPolicy = new NetworkPolicy(); + $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; + $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); + $response = $gapicClient->createNetworkPolicy($formattedParent, $networkPolicyId, $networkPolicy); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/CreateNetworkPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getNetworkPolicyId(); + $this->assertProtobufEquals($networkPolicyId, $actualValue); + $actualValue = $actualApiRequestObject->getNetworkPolicy(); + $this->assertProtobufEquals($networkPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createNetworkPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createNetworkPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createNetworkPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $networkPolicyId = 'networkPolicyId173955703'; + $networkPolicy = new NetworkPolicy(); + $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; + $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); + $response = $gapicClient->createNetworkPolicy($formattedParent, $networkPolicyId, $networkPolicy); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createNetworkPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createPrivateCloudTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPrivateCloudTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $expectedResponse = new PrivateCloud(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createPrivateCloudTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $privateCloudId = 'privateCloudId1366391457'; + $privateCloud = new PrivateCloud(); + $privateCloudNetworkConfig = new NetworkConfig(); + $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; + $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); + $privateCloud->setNetworkConfig($privateCloudNetworkConfig); + $privateCloudManagementCluster = new ManagementCluster(); + $managementClusterClusterId = 'managementClusterClusterId311493182'; + $privateCloudManagementCluster->setClusterId($managementClusterClusterId); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $managementClusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); + $privateCloud->setManagementCluster($privateCloudManagementCluster); + $response = $gapicClient->createPrivateCloud($formattedParent, $privateCloudId, $privateCloud); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/CreatePrivateCloud', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getPrivateCloudId(); + $this->assertProtobufEquals($privateCloudId, $actualValue); + $actualValue = $actualApiRequestObject->getPrivateCloud(); + $this->assertProtobufEquals($privateCloud, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPrivateCloudTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createPrivateCloudExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPrivateCloudTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $privateCloudId = 'privateCloudId1366391457'; + $privateCloud = new PrivateCloud(); + $privateCloudNetworkConfig = new NetworkConfig(); + $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; + $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); + $privateCloud->setNetworkConfig($privateCloudNetworkConfig); + $privateCloudManagementCluster = new ManagementCluster(); + $managementClusterClusterId = 'managementClusterClusterId311493182'; + $privateCloudManagementCluster->setClusterId($managementClusterClusterId); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $managementClusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); + $privateCloud->setManagementCluster($privateCloudManagementCluster); + $response = $gapicClient->createPrivateCloud($formattedParent, $privateCloudId, $privateCloud); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPrivateCloudTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createVmwareEngineNetworkTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createVmwareEngineNetworkTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new VmwareEngineNetwork(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createVmwareEngineNetworkTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $vmwareEngineNetworkId = 'vmwareEngineNetworkId2131972382'; + $vmwareEngineNetwork = new VmwareEngineNetwork(); + $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; + $vmwareEngineNetwork->setType($vmwareEngineNetworkType); + $response = $gapicClient->createVmwareEngineNetwork($formattedParent, $vmwareEngineNetworkId, $vmwareEngineNetwork); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/CreateVmwareEngineNetwork', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getVmwareEngineNetworkId(); + $this->assertProtobufEquals($vmwareEngineNetworkId, $actualValue); + $actualValue = $actualApiRequestObject->getVmwareEngineNetwork(); + $this->assertProtobufEquals($vmwareEngineNetwork, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createVmwareEngineNetworkTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createVmwareEngineNetworkExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createVmwareEngineNetworkTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $vmwareEngineNetworkId = 'vmwareEngineNetworkId2131972382'; + $vmwareEngineNetwork = new VmwareEngineNetwork(); + $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; + $vmwareEngineNetwork->setType($vmwareEngineNetworkType); + $response = $gapicClient->createVmwareEngineNetwork($formattedParent, $vmwareEngineNetworkId, $vmwareEngineNetwork); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createVmwareEngineNetworkTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]'); + $response = $gapicClient->deleteCluster($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/DeleteCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]'); + $response = $gapicClient->deleteCluster($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteNetworkPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteNetworkPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteNetworkPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); + $response = $gapicClient->deleteNetworkPolicy($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/DeleteNetworkPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteNetworkPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteNetworkPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteNetworkPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); + $response = $gapicClient->deleteNetworkPolicy($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteNetworkPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deletePrivateCloudTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deletePrivateCloudTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $expectedResponse = new PrivateCloud(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deletePrivateCloudTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $response = $gapicClient->deletePrivateCloud($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/DeletePrivateCloud', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deletePrivateCloudTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deletePrivateCloudExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deletePrivateCloudTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $response = $gapicClient->deletePrivateCloud($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deletePrivateCloudTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteVmwareEngineNetworkTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteVmwareEngineNetworkTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteVmwareEngineNetworkTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); + $response = $gapicClient->deleteVmwareEngineNetwork($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/DeleteVmwareEngineNetwork', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteVmwareEngineNetworkTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteVmwareEngineNetworkExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteVmwareEngineNetworkTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); + $response = $gapicClient->deleteVmwareEngineNetwork($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteVmwareEngineNetworkTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getClusterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $management = false; + $uid = 'uid115792'; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name2); + $expectedResponse->setManagement($management); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]'); + $response = $gapicClient->getCluster($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetCluster', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getClusterExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]'); + try { + $gapicClient->getCluster($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getHcxActivationKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $activationKey = 'activationKey-1343958090'; + $uid = 'uid115792'; + $expectedResponse = new HcxActivationKey(); + $expectedResponse->setName($name2); + $expectedResponse->setActivationKey($activationKey); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->hcxActivationKeyName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[HCX_ACTIVATION_KEY]'); + $response = $gapicClient->getHcxActivationKey($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetHcxActivationKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getHcxActivationKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->hcxActivationKeyName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[HCX_ACTIVATION_KEY]'); + try { + $gapicClient->getHcxActivationKey($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNetworkPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $edgeServicesCidr = 'edgeServicesCidr-792872013'; + $uid = 'uid115792'; + $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; + $description = 'description-1724546052'; + $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; + $expectedResponse = new NetworkPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setEdgeServicesCidr($edgeServicesCidr); + $expectedResponse->setUid($uid); + $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); + $expectedResponse->setDescription($description); + $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); + $response = $gapicClient->getNetworkPolicy($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetNetworkPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNetworkPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); + try { + $gapicClient->getNetworkPolicy($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNodeTypeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $nodeTypeId = 'nodeTypeId585437955'; + $displayName = 'displayName1615086568'; + $virtualCpuCount = 289038212; + $totalCoreCount = 282953654; + $memoryGb = 1726613721; + $diskSizeGb = 757478089; + $expectedResponse = new NodeType(); + $expectedResponse->setName($name2); + $expectedResponse->setNodeTypeId($nodeTypeId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setVirtualCpuCount($virtualCpuCount); + $expectedResponse->setTotalCoreCount($totalCoreCount); + $expectedResponse->setMemoryGb($memoryGb); + $expectedResponse->setDiskSizeGb($diskSizeGb); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->nodeTypeName('[PROJECT]', '[LOCATION]', '[NODE_TYPE]'); + $response = $gapicClient->getNodeType($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetNodeType', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNodeTypeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->nodeTypeName('[PROJECT]', '[LOCATION]', '[NODE_TYPE]'); + try { + $gapicClient->getNodeType($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPrivateCloudTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $expectedResponse = new PrivateCloud(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $response = $gapicClient->getPrivateCloud($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetPrivateCloud', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPrivateCloudExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + try { + $gapicClient->getPrivateCloud($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVmwareEngineNetworkTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new VmwareEngineNetwork(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); + $response = $gapicClient->getVmwareEngineNetwork($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetVmwareEngineNetwork', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVmwareEngineNetworkExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); + try { + $gapicClient->getVmwareEngineNetwork($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listClustersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $clustersElement = new Cluster(); + $clusters = [ + $clustersElement, + ]; + $expectedResponse = new ListClustersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setClusters($clusters); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $response = $gapicClient->listClusters($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getClusters()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListClusters', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listClustersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + try { + $gapicClient->listClusters($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listHcxActivationKeysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $hcxActivationKeysElement = new HcxActivationKey(); + $hcxActivationKeys = [ + $hcxActivationKeysElement, + ]; + $expectedResponse = new ListHcxActivationKeysResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setHcxActivationKeys($hcxActivationKeys); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $response = $gapicClient->listHcxActivationKeys($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getHcxActivationKeys()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListHcxActivationKeys', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listHcxActivationKeysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + try { + $gapicClient->listHcxActivationKeys($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNetworkPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $networkPoliciesElement = new NetworkPolicy(); + $networkPolicies = [ + $networkPoliciesElement, + ]; + $expectedResponse = new ListNetworkPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setNetworkPolicies($networkPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listNetworkPolicies($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getNetworkPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListNetworkPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNetworkPoliciesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listNetworkPolicies($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNodeTypesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $nodeTypesElement = new NodeType(); + $nodeTypes = [ + $nodeTypesElement, + ]; + $expectedResponse = new ListNodeTypesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setNodeTypes($nodeTypes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listNodeTypes($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getNodeTypes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListNodeTypes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNodeTypesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listNodeTypes($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPrivateCloudsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $privateCloudsElement = new PrivateCloud(); + $privateClouds = [ + $privateCloudsElement, + ]; + $expectedResponse = new ListPrivateCloudsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPrivateClouds($privateClouds); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listPrivateClouds($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPrivateClouds()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListPrivateClouds', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPrivateCloudsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listPrivateClouds($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSubnetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $subnetsElement = new Subnet(); + $subnets = [ + $subnetsElement, + ]; + $expectedResponse = new ListSubnetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSubnets($subnets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $response = $gapicClient->listSubnets($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSubnets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListSubnets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSubnetsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + try { + $gapicClient->listSubnets($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVmwareEngineNetworksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $vmwareEngineNetworksElement = new VmwareEngineNetwork(); + $vmwareEngineNetworks = [ + $vmwareEngineNetworksElement, + ]; + $expectedResponse = new ListVmwareEngineNetworksResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setVmwareEngineNetworks($vmwareEngineNetworks); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listVmwareEngineNetworks($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getVmwareEngineNetworks()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListVmwareEngineNetworks', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVmwareEngineNetworksExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listVmwareEngineNetworks($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resetNsxCredentialsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resetNsxCredentialsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $expectedResponse = new PrivateCloud(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/resetNsxCredentialsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $response = $gapicClient->resetNsxCredentials($formattedPrivateCloud); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ResetNsxCredentials', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getPrivateCloud(); + $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resetNsxCredentialsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resetNsxCredentialsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resetNsxCredentialsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $response = $gapicClient->resetNsxCredentials($formattedPrivateCloud); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resetNsxCredentialsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resetVcenterCredentialsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resetVcenterCredentialsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $expectedResponse = new PrivateCloud(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/resetVcenterCredentialsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $response = $gapicClient->resetVcenterCredentials($formattedPrivateCloud); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ResetVcenterCredentials', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getPrivateCloud(); + $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resetVcenterCredentialsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resetVcenterCredentialsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resetVcenterCredentialsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $response = $gapicClient->resetVcenterCredentials($formattedPrivateCloud); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resetVcenterCredentialsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function showNsxCredentialsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $username = 'username-265713450'; + $password = 'password1216985755'; + $expectedResponse = new Credentials(); + $expectedResponse->setUsername($username); + $expectedResponse->setPassword($password); + $transport->addResponse($expectedResponse); + // Mock request + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $response = $gapicClient->showNsxCredentials($formattedPrivateCloud); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ShowNsxCredentials', $actualFuncCall); + $actualValue = $actualRequestObject->getPrivateCloud(); + $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function showNsxCredentialsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + try { + $gapicClient->showNsxCredentials($formattedPrivateCloud); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function showVcenterCredentialsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $username = 'username-265713450'; + $password = 'password1216985755'; + $expectedResponse = new Credentials(); + $expectedResponse->setUsername($username); + $expectedResponse->setPassword($password); + $transport->addResponse($expectedResponse); + // Mock request + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $response = $gapicClient->showVcenterCredentials($formattedPrivateCloud); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ShowVcenterCredentials', $actualFuncCall); + $actualValue = $actualRequestObject->getPrivateCloud(); + $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function showVcenterCredentialsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + try { + $gapicClient->showVcenterCredentials($formattedPrivateCloud); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function undeletePrivateCloudTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/undeletePrivateCloudTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $expectedResponse = new PrivateCloud(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/undeletePrivateCloudTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $response = $gapicClient->undeletePrivateCloud($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/UndeletePrivateCloud', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/undeletePrivateCloudTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function undeletePrivateCloudExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/undeletePrivateCloudTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $response = $gapicClient->undeletePrivateCloud($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/undeletePrivateCloudTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $management = false; + $uid = 'uid115792'; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name); + $expectedResponse->setManagement($management); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $cluster = new Cluster(); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $clusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); + $response = $gapicClient->updateCluster($updateMask, $cluster); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/UpdateCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getCluster(); + $this->assertProtobufEquals($cluster, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $cluster = new Cluster(); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $clusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); + $response = $gapicClient->updateCluster($updateMask, $cluster); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateNetworkPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateNetworkPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $edgeServicesCidr = 'edgeServicesCidr-792872013'; + $uid = 'uid115792'; + $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; + $description = 'description-1724546052'; + $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; + $expectedResponse = new NetworkPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setEdgeServicesCidr($edgeServicesCidr); + $expectedResponse->setUid($uid); + $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); + $expectedResponse->setDescription($description); + $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateNetworkPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $networkPolicy = new NetworkPolicy(); + $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; + $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); + $updateMask = new FieldMask(); + $response = $gapicClient->updateNetworkPolicy($networkPolicy, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/UpdateNetworkPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getNetworkPolicy(); + $this->assertProtobufEquals($networkPolicy, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateNetworkPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateNetworkPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateNetworkPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $networkPolicy = new NetworkPolicy(); + $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; + $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); + $updateMask = new FieldMask(); + $response = $gapicClient->updateNetworkPolicy($networkPolicy, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateNetworkPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updatePrivateCloudTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updatePrivateCloudTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $expectedResponse = new PrivateCloud(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updatePrivateCloudTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $privateCloud = new PrivateCloud(); + $privateCloudNetworkConfig = new NetworkConfig(); + $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; + $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); + $privateCloud->setNetworkConfig($privateCloudNetworkConfig); + $privateCloudManagementCluster = new ManagementCluster(); + $managementClusterClusterId = 'managementClusterClusterId311493182'; + $privateCloudManagementCluster->setClusterId($managementClusterClusterId); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $managementClusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); + $privateCloud->setManagementCluster($privateCloudManagementCluster); + $updateMask = new FieldMask(); + $response = $gapicClient->updatePrivateCloud($privateCloud, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/UpdatePrivateCloud', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getPrivateCloud(); + $this->assertProtobufEquals($privateCloud, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updatePrivateCloudTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updatePrivateCloudExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updatePrivateCloudTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $privateCloud = new PrivateCloud(); + $privateCloudNetworkConfig = new NetworkConfig(); + $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; + $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); + $privateCloud->setNetworkConfig($privateCloudNetworkConfig); + $privateCloudManagementCluster = new ManagementCluster(); + $managementClusterClusterId = 'managementClusterClusterId311493182'; + $privateCloudManagementCluster->setClusterId($managementClusterClusterId); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $managementClusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); + $privateCloud->setManagementCluster($privateCloudManagementCluster); + $updateMask = new FieldMask(); + $response = $gapicClient->updatePrivateCloud($privateCloud, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updatePrivateCloudTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateVmwareEngineNetworkTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateVmwareEngineNetworkTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new VmwareEngineNetwork(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateVmwareEngineNetworkTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $vmwareEngineNetwork = new VmwareEngineNetwork(); + $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; + $vmwareEngineNetwork->setType($vmwareEngineNetworkType); + $updateMask = new FieldMask(); + $response = $gapicClient->updateVmwareEngineNetwork($vmwareEngineNetwork, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/UpdateVmwareEngineNetwork', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getVmwareEngineNetwork(); + $this->assertProtobufEquals($vmwareEngineNetwork, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateVmwareEngineNetworkTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateVmwareEngineNetworkExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateVmwareEngineNetworkTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $vmwareEngineNetwork = new VmwareEngineNetwork(); + $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; + $vmwareEngineNetwork->setType($vmwareEngineNetworkType); + $updateMask = new FieldMask(); + $response = $gapicClient->updateVmwareEngineNetwork($vmwareEngineNetwork, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateVmwareEngineNetworkTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->getLocation(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->listLocations(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $response = $gapicClient->getIamPolicy($resource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/GPBMetadata/Google/Cloud/Vpcaccess/V1/VpcAccess.php b/owl-bot-staging/VpcAccess/v1/proto/src/GPBMetadata/Google/Cloud/Vpcaccess/V1/VpcAccess.php new file mode 100644 index 0000000000000000000000000000000000000000..53424ce5774245c3b12a7c4461ffd27e98c7a453 GIT binary patch literal 3596 zcmb_fPj3@P6tC^r;7J<7(gYKgvY1E&7j|*l1KkkN`VUd0lvqwcYGu`0ugCVldUm@z zPDmqPIQ8C-&|B4Wzd@xcQdOzFapKTJ#YaFKI)8S@8z-R#)fey1&U^FT@BQ9;^X}gF zdLFo@u0srci@>(p+E+;rs-Eu>*LEGXHRyDpui9?kLk{#cRjq8P54U#IYGq^RDisaf zfp0@Y?YeH)fx7LugSNiw*_Lg?AkcSE*G_Do^Z1rK_SvFMHYo#wCvDy}~8tYs` zqs%lk9!DA)kBh4S*p3whDqS?WT5teV`tt@Y2ia;sEJFX5P|!pe5o9^&JL<}s+OeDf zQt9J+I|FPJAN{8 zW4D7S>4??$PPUlG{MJ1bM%Zk(Wk4TL<}b?-uz*|#-_L`>k8qRpe0R|8c>|J5Q$=aMZas^yXZZRR zpxDA>*ltqKo>1e1+!-~soD~XJK_(cqsO`D4RA74L)5$F2BFaZ#rf=Cjgkh8HdoTy6 zimXCiXEq{CJ*BlI$W3!o*fKS7v^>L>7YiV>Ewmj)Q~@Bgw~5*U)ciLf&9R_IoZsFt zcdE@t54UU8^2URWYGv*NB@5E^s#*DJE@CKDYmUzuW!}o zrr3u^wTjr5HoC9OHpq|oD1t)?6=<~N>oOwBy$DMEAbc9?j%$l-)DNP^p&o+o`hk8R zpNILM6JVk2LmF18vkt!<(2P{R02$BnDencdN;h7b$=BvJa5YjIgb|WvZH5Ocm%xlX zLxRS_oK)_Dto+2OIK8qoNu;@SehXY!hvb;4cj75fDsV%WCc!Vi59T*fFwz+O58j^# zS`3lUbeCJ-?|hFCsr`@9@w85dHo&55|M@+Jf3Neh1gBW9h!QhmqYWDc-J@~az7@(Ogy_3Ei(E9KjRxCCnw@)evP|&TM@3Z z)^&=b@tRc_zA$;4Q+`Q+*`s-*+PzBR(RhYdbr#%a*W=T-7!A!-<0)-dE} k`dDmbICh_1mzUF=OnLzEcbcLofv3U$q;q8vpgoogle.cloud.vpcaccess.v1.Connector + */ +class Connector extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name in the format `projects/*/locations/*/connectors/*`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Name of a VPC network. + * + * Generated from protobuf field string network = 2; + */ + protected $network = ''; + /** + * The range of internal addresses that follows RFC 4632 notation. + * Example: `10.132.0.0/28`. + * + * Generated from protobuf field string ip_cidr_range = 3; + */ + protected $ip_cidr_range = ''; + /** + * Output only. State of the VPC access connector. + * + * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Minimum throughput of the connector in Mbps. Default and min is 200. + * + * Generated from protobuf field int32 min_throughput = 5; + */ + protected $min_throughput = 0; + /** + * Maximum throughput of the connector in Mbps. Default is 300, max is 1000. + * + * Generated from protobuf field int32 max_throughput = 6; + */ + protected $max_throughput = 0; + /** + * Output only. List of projects using the connector. + * + * Generated from protobuf field repeated string connected_projects = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $connected_projects; + /** + * The subnet in which to house the VPC Access Connector. + * + * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.Subnet subnet = 8; + */ + protected $subnet = null; + /** + * Machine type of VM Instance underlying connector. Default is e2-micro + * + * Generated from protobuf field string machine_type = 10; + */ + protected $machine_type = ''; + /** + * Minimum value of instances in autoscaling group underlying the connector. + * + * Generated from protobuf field int32 min_instances = 11; + */ + protected $min_instances = 0; + /** + * Maximum value of instances in autoscaling group underlying the connector. + * + * Generated from protobuf field int32 max_instances = 12; + */ + protected $max_instances = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name in the format `projects/*/locations/*/connectors/*`. + * @type string $network + * Name of a VPC network. + * @type string $ip_cidr_range + * The range of internal addresses that follows RFC 4632 notation. + * Example: `10.132.0.0/28`. + * @type int $state + * Output only. State of the VPC access connector. + * @type int $min_throughput + * Minimum throughput of the connector in Mbps. Default and min is 200. + * @type int $max_throughput + * Maximum throughput of the connector in Mbps. Default is 300, max is 1000. + * @type array|\Google\Protobuf\Internal\RepeatedField $connected_projects + * Output only. List of projects using the connector. + * @type \Google\Cloud\VpcAccess\V1\Connector\Subnet $subnet + * The subnet in which to house the VPC Access Connector. + * @type string $machine_type + * Machine type of VM Instance underlying connector. Default is e2-micro + * @type int $min_instances + * Minimum value of instances in autoscaling group underlying the connector. + * @type int $max_instances + * Maximum value of instances in autoscaling group underlying the connector. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); + parent::__construct($data); + } + + /** + * The resource name in the format `projects/*/locations/*/connectors/*`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name in the format `projects/*/locations/*/connectors/*`. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Name of a VPC network. + * + * Generated from protobuf field string network = 2; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Name of a VPC network. + * + * Generated from protobuf field string network = 2; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * The range of internal addresses that follows RFC 4632 notation. + * Example: `10.132.0.0/28`. + * + * Generated from protobuf field string ip_cidr_range = 3; + * @return string + */ + public function getIpCidrRange() + { + return $this->ip_cidr_range; + } + + /** + * The range of internal addresses that follows RFC 4632 notation. + * Example: `10.132.0.0/28`. + * + * Generated from protobuf field string ip_cidr_range = 3; + * @param string $var + * @return $this + */ + public function setIpCidrRange($var) + { + GPBUtil::checkString($var, True); + $this->ip_cidr_range = $var; + + return $this; + } + + /** + * Output only. State of the VPC access connector. + * + * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the VPC access connector. + * + * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VpcAccess\V1\Connector\State::class); + $this->state = $var; + + return $this; + } + + /** + * Minimum throughput of the connector in Mbps. Default and min is 200. + * + * Generated from protobuf field int32 min_throughput = 5; + * @return int + */ + public function getMinThroughput() + { + return $this->min_throughput; + } + + /** + * Minimum throughput of the connector in Mbps. Default and min is 200. + * + * Generated from protobuf field int32 min_throughput = 5; + * @param int $var + * @return $this + */ + public function setMinThroughput($var) + { + GPBUtil::checkInt32($var); + $this->min_throughput = $var; + + return $this; + } + + /** + * Maximum throughput of the connector in Mbps. Default is 300, max is 1000. + * + * Generated from protobuf field int32 max_throughput = 6; + * @return int + */ + public function getMaxThroughput() + { + return $this->max_throughput; + } + + /** + * Maximum throughput of the connector in Mbps. Default is 300, max is 1000. + * + * Generated from protobuf field int32 max_throughput = 6; + * @param int $var + * @return $this + */ + public function setMaxThroughput($var) + { + GPBUtil::checkInt32($var); + $this->max_throughput = $var; + + return $this; + } + + /** + * Output only. List of projects using the connector. + * + * Generated from protobuf field repeated string connected_projects = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConnectedProjects() + { + return $this->connected_projects; + } + + /** + * Output only. List of projects using the connector. + * + * Generated from protobuf field repeated string connected_projects = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConnectedProjects($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->connected_projects = $arr; + + return $this; + } + + /** + * The subnet in which to house the VPC Access Connector. + * + * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.Subnet subnet = 8; + * @return \Google\Cloud\VpcAccess\V1\Connector\Subnet|null + */ + public function getSubnet() + { + return $this->subnet; + } + + public function hasSubnet() + { + return isset($this->subnet); + } + + public function clearSubnet() + { + unset($this->subnet); + } + + /** + * The subnet in which to house the VPC Access Connector. + * + * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.Subnet subnet = 8; + * @param \Google\Cloud\VpcAccess\V1\Connector\Subnet $var + * @return $this + */ + public function setSubnet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VpcAccess\V1\Connector\Subnet::class); + $this->subnet = $var; + + return $this; + } + + /** + * Machine type of VM Instance underlying connector. Default is e2-micro + * + * Generated from protobuf field string machine_type = 10; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * Machine type of VM Instance underlying connector. Default is e2-micro + * + * Generated from protobuf field string machine_type = 10; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + + /** + * Minimum value of instances in autoscaling group underlying the connector. + * + * Generated from protobuf field int32 min_instances = 11; + * @return int + */ + public function getMinInstances() + { + return $this->min_instances; + } + + /** + * Minimum value of instances in autoscaling group underlying the connector. + * + * Generated from protobuf field int32 min_instances = 11; + * @param int $var + * @return $this + */ + public function setMinInstances($var) + { + GPBUtil::checkInt32($var); + $this->min_instances = $var; + + return $this; + } + + /** + * Maximum value of instances in autoscaling group underlying the connector. + * + * Generated from protobuf field int32 max_instances = 12; + * @return int + */ + public function getMaxInstances() + { + return $this->max_instances; + } + + /** + * Maximum value of instances in autoscaling group underlying the connector. + * + * Generated from protobuf field int32 max_instances = 12; + * @param int $var + * @return $this + */ + public function setMaxInstances($var) + { + GPBUtil::checkInt32($var); + $this->max_instances = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/State.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/State.php new file mode 100644 index 000000000000..a8ea7061ed87 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/State.php @@ -0,0 +1,85 @@ +google.cloud.vpcaccess.v1.Connector.State + */ +class State +{ + /** + * Invalid state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Connector is deployed and ready to receive traffic. + * + * Generated from protobuf enum READY = 1; + */ + const READY = 1; + /** + * An Insert operation is in progress. Transient condition. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * A Delete operation is in progress. Transient condition. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * Connector is in a bad state, manual deletion recommended. + * + * Generated from protobuf enum ERROR = 4; + */ + const ERROR = 4; + /** + * The connector is being updated. + * + * Generated from protobuf enum UPDATING = 5; + */ + const UPDATING = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::READY => 'READY', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + self::ERROR => 'ERROR', + self::UPDATING => 'UPDATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VpcAccess\V1\Connector_State::class); + diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/Subnet.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/Subnet.php new file mode 100644 index 000000000000..4ea82c2b3192 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/Subnet.php @@ -0,0 +1,124 @@ +google.cloud.vpcaccess.v1.Connector.Subnet + */ +class Subnet extends \Google\Protobuf\Internal\Message +{ + /** + * Subnet name (relative, not fully qualified). + * E.g. if the full subnet selfLink is + * https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} + * the correct input for this field would be {subnetName} + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Project in which the subnet exists. + * If not set, this project is assumed to be the project for which + * the connector create request was issued. + * + * Generated from protobuf field string project_id = 2; + */ + protected $project_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Subnet name (relative, not fully qualified). + * E.g. if the full subnet selfLink is + * https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} + * the correct input for this field would be {subnetName} + * @type string $project_id + * Project in which the subnet exists. + * If not set, this project is assumed to be the project for which + * the connector create request was issued. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); + parent::__construct($data); + } + + /** + * Subnet name (relative, not fully qualified). + * E.g. if the full subnet selfLink is + * https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} + * the correct input for this field would be {subnetName} + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Subnet name (relative, not fully qualified). + * E.g. if the full subnet selfLink is + * https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} + * the correct input for this field would be {subnetName} + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Project in which the subnet exists. + * If not set, this project is assumed to be the project for which + * the connector create request was issued. + * + * Generated from protobuf field string project_id = 2; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Project in which the subnet exists. + * If not set, this project is assumed to be the project for which + * the connector create request was issued. + * + * Generated from protobuf field string project_id = 2; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Subnet::class, \Google\Cloud\VpcAccess\V1\Connector_Subnet::class); + diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/CreateConnectorRequest.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/CreateConnectorRequest.php new file mode 100644 index 000000000000..8b40233b6b2d --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/CreateConnectorRequest.php @@ -0,0 +1,168 @@ +google.cloud.vpcaccess.v1.CreateConnectorRequest + */ +class CreateConnectorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location in which the configuration should be created, + * specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to use for this connector. + * + * Generated from protobuf field string connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $connector_id = ''; + /** + * Required. Resource to create. + * + * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector connector = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $connector = null; + + /** + * @param string $parent Required. The project and location in which the configuration should be created, + * specified in the format `projects/*/locations/*`. Please see + * {@see VpcAccessServiceClient::locationName()} for help formatting this field. + * @param string $connectorId Required. The ID to use for this connector. + * @param \Google\Cloud\VpcAccess\V1\Connector $connector Required. Resource to create. + * + * @return \Google\Cloud\VpcAccess\V1\CreateConnectorRequest + * + * @experimental + */ + public static function build(string $parent, string $connectorId, \Google\Cloud\VpcAccess\V1\Connector $connector): self + { + return (new self()) + ->setParent($parent) + ->setConnectorId($connectorId) + ->setConnector($connector); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location in which the configuration should be created, + * specified in the format `projects/*/locations/*`. + * @type string $connector_id + * Required. The ID to use for this connector. + * @type \Google\Cloud\VpcAccess\V1\Connector $connector + * Required. Resource to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location in which the configuration should be created, + * specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project and location in which the configuration should be created, + * specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID to use for this connector. + * + * Generated from protobuf field string connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getConnectorId() + { + return $this->connector_id; + } + + /** + * Required. The ID to use for this connector. + * + * Generated from protobuf field string connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setConnectorId($var) + { + GPBUtil::checkString($var, True); + $this->connector_id = $var; + + return $this; + } + + /** + * Required. Resource to create. + * + * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VpcAccess\V1\Connector|null + */ + public function getConnector() + { + return $this->connector; + } + + public function hasConnector() + { + return isset($this->connector); + } + + public function clearConnector() + { + unset($this->connector); + } + + /** + * Required. Resource to create. + * + * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VpcAccess\V1\Connector $var + * @return $this + */ + public function setConnector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VpcAccess\V1\Connector::class); + $this->connector = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/DeleteConnectorRequest.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/DeleteConnectorRequest.php new file mode 100644 index 000000000000..dff74532e1f0 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/DeleteConnectorRequest.php @@ -0,0 +1,81 @@ +google.cloud.vpcaccess.v1.DeleteConnectorRequest + */ +class DeleteConnectorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of a Serverless VPC Access connector to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of a Serverless VPC Access connector to delete. Please see + * {@see VpcAccessServiceClient::connectorName()} for help formatting this field. + * + * @return \Google\Cloud\VpcAccess\V1\DeleteConnectorRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of a Serverless VPC Access connector to delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of a Serverless VPC Access connector to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of a Serverless VPC Access connector to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/GetConnectorRequest.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/GetConnectorRequest.php new file mode 100644 index 000000000000..e0e5f30df34b --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/GetConnectorRequest.php @@ -0,0 +1,81 @@ +google.cloud.vpcaccess.v1.GetConnectorRequest + */ +class GetConnectorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of a Serverless VPC Access connector to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of a Serverless VPC Access connector to get. Please see + * {@see VpcAccessServiceClient::connectorName()} for help formatting this field. + * + * @return \Google\Cloud\VpcAccess\V1\GetConnectorRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of a Serverless VPC Access connector to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of a Serverless VPC Access connector to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of a Serverless VPC Access connector to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsRequest.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsRequest.php new file mode 100644 index 000000000000..c5aa13828211 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsRequest.php @@ -0,0 +1,149 @@ +google.cloud.vpcaccess.v1.ListConnectorsRequest + */ +class ListConnectorsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the routes should be listed. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of functions to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Continuation token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project and location from which the routes should be listed. Please see + * {@see VpcAccessServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VpcAccess\V1\ListConnectorsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location from which the routes should be listed. + * @type int $page_size + * Maximum number of functions to return per call. + * @type string $page_token + * Continuation token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the routes should be listed. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project and location from which the routes should be listed. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of functions to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of functions to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Continuation token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Continuation token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsResponse.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsResponse.php new file mode 100644 index 000000000000..58ddaece4918 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsResponse.php @@ -0,0 +1,101 @@ +google.cloud.vpcaccess.v1.ListConnectorsResponse + */ +class ListConnectorsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of Serverless VPC Access connectors. + * + * Generated from protobuf field repeated .google.cloud.vpcaccess.v1.Connector connectors = 1; + */ + private $connectors; + /** + * Continuation token. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VpcAccess\V1\Connector>|\Google\Protobuf\Internal\RepeatedField $connectors + * List of Serverless VPC Access connectors. + * @type string $next_page_token + * Continuation token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); + parent::__construct($data); + } + + /** + * List of Serverless VPC Access connectors. + * + * Generated from protobuf field repeated .google.cloud.vpcaccess.v1.Connector connectors = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConnectors() + { + return $this->connectors; + } + + /** + * List of Serverless VPC Access connectors. + * + * Generated from protobuf field repeated .google.cloud.vpcaccess.v1.Connector connectors = 1; + * @param array<\Google\Cloud\VpcAccess\V1\Connector>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConnectors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VpcAccess\V1\Connector::class); + $this->connectors = $arr; + + return $this; + } + + /** + * Continuation token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Continuation token. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/OperationMetadata.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/OperationMetadata.php new file mode 100644 index 000000000000..45680ee1e154 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/OperationMetadata.php @@ -0,0 +1,197 @@ +google.cloud.vpcaccess.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Method that initiated the operation e.g. + * google.cloud.vpcaccess.v1.Connectors.CreateConnector. + * + * Generated from protobuf field string method = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $method = ''; + /** + * Output only. Time when the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Time when the operation completed. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Name of the resource that this operation is acting on e.g. + * projects/my-project/locations/us-central1/connectors/v1. + * + * Generated from protobuf field string target = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $target = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $method + * Output only. Method that initiated the operation e.g. + * google.cloud.vpcaccess.v1.Connectors.CreateConnector. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Time when the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. Time when the operation completed. + * @type string $target + * Output only. Name of the resource that this operation is acting on e.g. + * projects/my-project/locations/us-central1/connectors/v1. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Method that initiated the operation e.g. + * google.cloud.vpcaccess.v1.Connectors.CreateConnector. + * + * Generated from protobuf field string method = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMethod() + { + return $this->method; + } + + /** + * Output only. Method that initiated the operation e.g. + * google.cloud.vpcaccess.v1.Connectors.CreateConnector. + * + * Generated from protobuf field string method = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMethod($var) + { + GPBUtil::checkString($var, True); + $this->method = $var; + + return $this; + } + + /** + * Output only. Time when the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Time when the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Time when the operation completed. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. Time when the operation completed. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Name of the resource that this operation is acting on e.g. + * projects/my-project/locations/us-central1/connectors/v1. + * + * Generated from protobuf field string target = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Name of the resource that this operation is acting on e.g. + * projects/my-project/locations/us-central1/connectors/v1. + * + * Generated from protobuf field string target = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/VpcAccessServiceGrpcClient.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/VpcAccessServiceGrpcClient.php new file mode 100644 index 000000000000..47280648734e --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/VpcAccessServiceGrpcClient.php @@ -0,0 +1,99 @@ +_simpleRequest('/google.cloud.vpcaccess.v1.VpcAccessService/CreateConnector', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource + * does not exist. + * @param \Google\Cloud\VpcAccess\V1\GetConnectorRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetConnector(\Google\Cloud\VpcAccess\V1\GetConnectorRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vpcaccess.v1.VpcAccessService/GetConnector', + $argument, + ['\Google\Cloud\VpcAccess\V1\Connector', 'decode'], + $metadata, $options); + } + + /** + * Lists Serverless VPC Access connectors. + * @param \Google\Cloud\VpcAccess\V1\ListConnectorsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListConnectors(\Google\Cloud\VpcAccess\V1\ListConnectorsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vpcaccess.v1.VpcAccessService/ListConnectors', + $argument, + ['\Google\Cloud\VpcAccess\V1\ListConnectorsResponse', 'decode'], + $metadata, $options); + } + + /** + * Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the + * resource does not exist. + * @param \Google\Cloud\VpcAccess\V1\DeleteConnectorRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteConnector(\Google\Cloud\VpcAccess\V1\DeleteConnectorRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.vpcaccess.v1.VpcAccessService/DeleteConnector', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/create_connector.php b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/create_connector.php new file mode 100644 index 000000000000..8feb96c4aeb2 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/create_connector.php @@ -0,0 +1,84 @@ +createConnector($formattedParent, $connectorId, $connector); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Connector $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VpcAccessServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $connectorId = '[CONNECTOR_ID]'; + + create_connector_sample($formattedParent, $connectorId); +} +// [END vpcaccess_v1_generated_VpcAccessService_CreateConnector_sync] diff --git a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/delete_connector.php b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/delete_connector.php new file mode 100644 index 000000000000..54a52e1af55d --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/delete_connector.php @@ -0,0 +1,76 @@ +deleteConnector($formattedName); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VpcAccessServiceClient::connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); + + delete_connector_sample($formattedName); +} +// [END vpcaccess_v1_generated_VpcAccessService_DeleteConnector_sync] diff --git a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/get_connector.php b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/get_connector.php new file mode 100644 index 000000000000..59d5356bed21 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/get_connector.php @@ -0,0 +1,67 @@ +getConnector($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = VpcAccessServiceClient::connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); + + get_connector_sample($formattedName); +} +// [END vpcaccess_v1_generated_VpcAccessService_GetConnector_sync] diff --git a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_connectors.php b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_connectors.php new file mode 100644 index 000000000000..c352bf7b7af6 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_connectors.php @@ -0,0 +1,71 @@ +listConnectors($formattedParent); + + /** @var Connector $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = VpcAccessServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_connectors_sample($formattedParent); +} +// [END vpcaccess_v1_generated_VpcAccessService_ListConnectors_sync] diff --git a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_locations.php b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_locations.php new file mode 100644 index 000000000000..0806a5c27ccb --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END vpcaccess_v1_generated_VpcAccessService_ListLocations_sync] diff --git a/owl-bot-staging/VpcAccess/v1/src/V1/Client/BaseClient/VpcAccessServiceBaseClient.php b/owl-bot-staging/VpcAccess/v1/src/V1/Client/BaseClient/VpcAccessServiceBaseClient.php new file mode 100644 index 000000000000..bfeaaac097f7 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/src/V1/Client/BaseClient/VpcAccessServiceBaseClient.php @@ -0,0 +1,398 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/vpc_access_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/vpc_access_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/vpc_access_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/vpc_access_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a connector + * resource. + * + * @param string $project + * @param string $location + * @param string $connector + * + * @return string The formatted connector resource. + */ + public static function connectorName(string $project, string $location, string $connector): string + { + return self::getPathTemplate('connector')->render([ + 'project' => $project, + 'location' => $location, + 'connector' => $connector, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - connector: projects/{project}/locations/{location}/connectors/{connector} + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'vpcaccess.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a Serverless VPC Access connector, returns an operation. + * + * The async variant is {@see self::createConnectorAsync()} . + * + * @param CreateConnectorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createConnector(CreateConnectorRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateConnector', $request, $callOptions)->wait(); + } + + /** + * Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the + * resource does not exist. + * + * The async variant is {@see self::deleteConnectorAsync()} . + * + * @param DeleteConnectorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteConnector(DeleteConnectorRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteConnector', $request, $callOptions)->wait(); + } + + /** + * Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource + * does not exist. + * + * The async variant is {@see self::getConnectorAsync()} . + * + * @param GetConnectorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Connector + * + * @throws ApiException Thrown if the API call fails. + */ + public function getConnector(GetConnectorRequest $request, array $callOptions = []): Connector + { + return $this->startApiCall('GetConnector', $request, $callOptions)->wait(); + } + + /** + * Lists Serverless VPC Access connectors. + * + * The async variant is {@see self::listConnectorsAsync()} . + * + * @param ListConnectorsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listConnectors(ListConnectorsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListConnectors', $request, $callOptions); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see self::listLocationsAsync()} . + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/VpcAccess/v1/src/V1/Client/VpcAccessServiceClient.php b/owl-bot-staging/VpcAccess/v1/src/V1/Client/VpcAccessServiceClient.php new file mode 100644 index 000000000000..7c6a17daa2fc --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/src/V1/Client/VpcAccessServiceClient.php @@ -0,0 +1,40 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $connectorId = 'connector_id'; + * $connector = new Connector(); + * $operationResponse = $vpcAccessServiceClient->createConnector($formattedParent, $connectorId, $connector); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vpcAccessServiceClient->createConnector($formattedParent, $connectorId, $connector); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vpcAccessServiceClient->resumeOperation($operationName, 'createConnector'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vpcAccessServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + */ +class VpcAccessServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.vpcaccess.v1.VpcAccessService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'vpcaccess.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $connectorNameTemplate; + + private static $locationNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/vpc_access_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/vpc_access_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/vpc_access_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/vpc_access_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getConnectorNameTemplate() + { + if (self::$connectorNameTemplate == null) { + self::$connectorNameTemplate = new PathTemplate('projects/{project}/locations/{location}/connectors/{connector}'); + } + + return self::$connectorNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'connector' => self::getConnectorNameTemplate(), + 'location' => self::getLocationNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a connector + * resource. + * + * @param string $project + * @param string $location + * @param string $connector + * + * @return string The formatted connector resource. + */ + public static function connectorName($project, $location, $connector) + { + return self::getConnectorNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'connector' => $connector, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - connector: projects/{project}/locations/{location}/connectors/{connector} + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'vpcaccess.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a Serverless VPC Access connector, returns an operation. + * + * Sample code: + * ``` + * $vpcAccessServiceClient = new VpcAccessServiceClient(); + * try { + * $formattedParent = $vpcAccessServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $connectorId = 'connector_id'; + * $connector = new Connector(); + * $operationResponse = $vpcAccessServiceClient->createConnector($formattedParent, $connectorId, $connector); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vpcAccessServiceClient->createConnector($formattedParent, $connectorId, $connector); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vpcAccessServiceClient->resumeOperation($operationName, 'createConnector'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vpcAccessServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The project and location in which the configuration should be created, + * specified in the format `projects/*/locations/*`. + * @param string $connectorId Required. The ID to use for this connector. + * @param Connector $connector Required. Resource to create. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createConnector($parent, $connectorId, $connector, array $optionalArgs = []) + { + $request = new CreateConnectorRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setConnectorId($connectorId); + $request->setConnector($connector); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateConnector', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the + * resource does not exist. + * + * Sample code: + * ``` + * $vpcAccessServiceClient = new VpcAccessServiceClient(); + * try { + * $formattedName = $vpcAccessServiceClient->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); + * $operationResponse = $vpcAccessServiceClient->deleteConnector($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $vpcAccessServiceClient->deleteConnector($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $vpcAccessServiceClient->resumeOperation($operationName, 'deleteConnector'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $vpcAccessServiceClient->close(); + * } + * ``` + * + * @param string $name Required. Name of a Serverless VPC Access connector to delete. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteConnector($name, array $optionalArgs = []) + { + $request = new DeleteConnectorRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteConnector', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource + * does not exist. + * + * Sample code: + * ``` + * $vpcAccessServiceClient = new VpcAccessServiceClient(); + * try { + * $formattedName = $vpcAccessServiceClient->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); + * $response = $vpcAccessServiceClient->getConnector($formattedName); + * } finally { + * $vpcAccessServiceClient->close(); + * } + * ``` + * + * @param string $name Required. Name of a Serverless VPC Access connector to get. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\VpcAccess\V1\Connector + * + * @throws ApiException if the remote call fails + */ + public function getConnector($name, array $optionalArgs = []) + { + $request = new GetConnectorRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetConnector', Connector::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists Serverless VPC Access connectors. + * + * Sample code: + * ``` + * $vpcAccessServiceClient = new VpcAccessServiceClient(); + * try { + * $formattedParent = $vpcAccessServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $vpcAccessServiceClient->listConnectors($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $vpcAccessServiceClient->listConnectors($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $vpcAccessServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The project and location from which the routes should be listed. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listConnectors($parent, array $optionalArgs = []) + { + $request = new ListConnectorsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListConnectors', $optionalArgs, ListConnectorsResponse::class, $request); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $vpcAccessServiceClient = new VpcAccessServiceClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $vpcAccessServiceClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $vpcAccessServiceClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $vpcAccessServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/VpcAccess/v1/src/V1/VpcAccessServiceClient.php b/owl-bot-staging/VpcAccess/v1/src/V1/VpcAccessServiceClient.php new file mode 100644 index 000000000000..19dc8ae100a5 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/src/V1/VpcAccessServiceClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.vpcaccess.v1.VpcAccessService' => [ + 'CreateConnector' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VpcAccess\V1\Connector', + 'metadataReturnType' => '\Google\Cloud\VpcAccess\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteConnector' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VpcAccess\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetConnector' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VpcAccess\V1\Connector', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListConnectors' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getConnectors', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VpcAccess\V1\ListConnectorsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'connector' => 'projects/{project}/locations/{location}/connectors/{connector}', + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_rest_client_config.php b/owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_rest_client_config.php new file mode 100644 index 000000000000..941ea8196186 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_rest_client_config.php @@ -0,0 +1,94 @@ + [ + 'google.cloud.location.Locations' => [ + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.vpcaccess.v1.VpcAccessService' => [ + 'CreateConnector' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/connectors', + 'body' => 'connector', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'connector_id', + ], + ], + 'DeleteConnector' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/connectors/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetConnector' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/connectors/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListConnectors' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/connectors', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/VpcAccess/v1/tests/Unit/V1/Client/VpcAccessServiceClientTest.php b/owl-bot-staging/VpcAccess/v1/tests/Unit/V1/Client/VpcAccessServiceClientTest.php new file mode 100644 index 000000000000..8a9300b77463 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/tests/Unit/V1/Client/VpcAccessServiceClientTest.php @@ -0,0 +1,646 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return VpcAccessServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new VpcAccessServiceClient($options); + } + + /** @test */ + public function createConnectorTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $network = 'network1843485230'; + $ipCidrRange = 'ipCidrRange-2049366326'; + $minThroughput = 2064735799; + $maxThroughput = 1407819749; + $machineType = 'machineType1838323762'; + $minInstances = 1491624145; + $maxInstances = 330682013; + $expectedResponse = new Connector(); + $expectedResponse->setName($name); + $expectedResponse->setNetwork($network); + $expectedResponse->setIpCidrRange($ipCidrRange); + $expectedResponse->setMinThroughput($minThroughput); + $expectedResponse->setMaxThroughput($maxThroughput); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setMinInstances($minInstances); + $expectedResponse->setMaxInstances($maxInstances); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createConnectorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $connectorId = 'connectorId1928724045'; + $connector = new Connector(); + $request = (new CreateConnectorRequest()) + ->setParent($formattedParent) + ->setConnectorId($connectorId) + ->setConnector($connector); + $response = $gapicClient->createConnector($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vpcaccess.v1.VpcAccessService/CreateConnector', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getConnectorId(); + $this->assertProtobufEquals($connectorId, $actualValue); + $actualValue = $actualApiRequestObject->getConnector(); + $this->assertProtobufEquals($connector, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createConnectorTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createConnectorExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $connectorId = 'connectorId1928724045'; + $connector = new Connector(); + $request = (new CreateConnectorRequest()) + ->setParent($formattedParent) + ->setConnectorId($connectorId) + ->setConnector($connector); + $response = $gapicClient->createConnector($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createConnectorTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteConnectorTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteConnectorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); + $request = (new DeleteConnectorRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteConnector($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vpcaccess.v1.VpcAccessService/DeleteConnector', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteConnectorTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteConnectorExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); + $request = (new DeleteConnectorRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteConnector($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteConnectorTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getConnectorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $network = 'network1843485230'; + $ipCidrRange = 'ipCidrRange-2049366326'; + $minThroughput = 2064735799; + $maxThroughput = 1407819749; + $machineType = 'machineType1838323762'; + $minInstances = 1491624145; + $maxInstances = 330682013; + $expectedResponse = new Connector(); + $expectedResponse->setName($name2); + $expectedResponse->setNetwork($network); + $expectedResponse->setIpCidrRange($ipCidrRange); + $expectedResponse->setMinThroughput($minThroughput); + $expectedResponse->setMaxThroughput($maxThroughput); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setMinInstances($minInstances); + $expectedResponse->setMaxInstances($maxInstances); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); + $request = (new GetConnectorRequest()) + ->setName($formattedName); + $response = $gapicClient->getConnector($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vpcaccess.v1.VpcAccessService/GetConnector', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConnectorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); + $request = (new GetConnectorRequest()) + ->setName($formattedName); + try { + $gapicClient->getConnector($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConnectorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $connectorsElement = new Connector(); + $connectors = [ + $connectorsElement, + ]; + $expectedResponse = new ListConnectorsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setConnectors($connectors); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListConnectorsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listConnectors($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getConnectors()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vpcaccess.v1.VpcAccessService/ListConnectors', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConnectorsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListConnectorsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listConnectors($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createConnectorAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $network = 'network1843485230'; + $ipCidrRange = 'ipCidrRange-2049366326'; + $minThroughput = 2064735799; + $maxThroughput = 1407819749; + $machineType = 'machineType1838323762'; + $minInstances = 1491624145; + $maxInstances = 330682013; + $expectedResponse = new Connector(); + $expectedResponse->setName($name); + $expectedResponse->setNetwork($network); + $expectedResponse->setIpCidrRange($ipCidrRange); + $expectedResponse->setMinThroughput($minThroughput); + $expectedResponse->setMaxThroughput($maxThroughput); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setMinInstances($minInstances); + $expectedResponse->setMaxInstances($maxInstances); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createConnectorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $connectorId = 'connectorId1928724045'; + $connector = new Connector(); + $request = (new CreateConnectorRequest()) + ->setParent($formattedParent) + ->setConnectorId($connectorId) + ->setConnector($connector); + $response = $gapicClient->createConnectorAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vpcaccess.v1.VpcAccessService/CreateConnector', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getConnectorId(); + $this->assertProtobufEquals($connectorId, $actualValue); + $actualValue = $actualApiRequestObject->getConnector(); + $this->assertProtobufEquals($connector, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createConnectorTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/VpcAccess/v1/tests/Unit/V1/VpcAccessServiceClientTest.php b/owl-bot-staging/VpcAccess/v1/tests/Unit/V1/VpcAccessServiceClientTest.php new file mode 100644 index 000000000000..57ca058785a2 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/tests/Unit/V1/VpcAccessServiceClientTest.php @@ -0,0 +1,531 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return VpcAccessServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new VpcAccessServiceClient($options); + } + + /** @test */ + public function createConnectorTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $network = 'network1843485230'; + $ipCidrRange = 'ipCidrRange-2049366326'; + $minThroughput = 2064735799; + $maxThroughput = 1407819749; + $machineType = 'machineType1838323762'; + $minInstances = 1491624145; + $maxInstances = 330682013; + $expectedResponse = new Connector(); + $expectedResponse->setName($name); + $expectedResponse->setNetwork($network); + $expectedResponse->setIpCidrRange($ipCidrRange); + $expectedResponse->setMinThroughput($minThroughput); + $expectedResponse->setMaxThroughput($maxThroughput); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setMinInstances($minInstances); + $expectedResponse->setMaxInstances($maxInstances); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createConnectorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $connectorId = 'connectorId1928724045'; + $connector = new Connector(); + $response = $gapicClient->createConnector($formattedParent, $connectorId, $connector); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vpcaccess.v1.VpcAccessService/CreateConnector', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getConnectorId(); + $this->assertProtobufEquals($connectorId, $actualValue); + $actualValue = $actualApiRequestObject->getConnector(); + $this->assertProtobufEquals($connector, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createConnectorTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createConnectorExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $connectorId = 'connectorId1928724045'; + $connector = new Connector(); + $response = $gapicClient->createConnector($formattedParent, $connectorId, $connector); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createConnectorTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteConnectorTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteConnectorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); + $response = $gapicClient->deleteConnector($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vpcaccess.v1.VpcAccessService/DeleteConnector', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteConnectorTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteConnectorExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); + $response = $gapicClient->deleteConnector($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteConnectorTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getConnectorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $network = 'network1843485230'; + $ipCidrRange = 'ipCidrRange-2049366326'; + $minThroughput = 2064735799; + $maxThroughput = 1407819749; + $machineType = 'machineType1838323762'; + $minInstances = 1491624145; + $maxInstances = 330682013; + $expectedResponse = new Connector(); + $expectedResponse->setName($name2); + $expectedResponse->setNetwork($network); + $expectedResponse->setIpCidrRange($ipCidrRange); + $expectedResponse->setMinThroughput($minThroughput); + $expectedResponse->setMaxThroughput($maxThroughput); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setMinInstances($minInstances); + $expectedResponse->setMaxInstances($maxInstances); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); + $response = $gapicClient->getConnector($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vpcaccess.v1.VpcAccessService/GetConnector', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConnectorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); + try { + $gapicClient->getConnector($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConnectorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $connectorsElement = new Connector(); + $connectors = [ + $connectorsElement, + ]; + $expectedResponse = new ListConnectorsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setConnectors($connectors); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listConnectors($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getConnectors()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vpcaccess.v1.VpcAccessService/ListConnectors', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConnectorsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listConnectors($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->listLocations(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/WebRisk/v1/proto/src/GPBMetadata/Google/Cloud/Webrisk/V1/Webrisk.php b/owl-bot-staging/WebRisk/v1/proto/src/GPBMetadata/Google/Cloud/Webrisk/V1/Webrisk.php new file mode 100644 index 0000000000000000000000000000000000000000..5c4a86d2f058d6643bd5fb48cb7e3dcc7093bbc8 GIT binary patch literal 6405 zcmd5=&2t-B5sxIxA1%k0U!26zZYskhTkAN^2zxgnD4T?lG`1CFNl0=Giwo6w^kh#W z&xo0k9kZ1Shdpqis6A1|1qy1b_7C99ITRO`Q%+RDi9dk@MZfoEMv`s$qu2w!cr?@9 zuRnj?uRnR#+3mn>X_Z>k(LLIfwhtw5mr5PS_H4s$OWWO6i#n2F?{&;Jbrea;m!(p< zE@}Bf{aeWD+Fi$>8EMD1ciJ>1~%H?{V5z*D^fQwj{<-whTIdR}wNA?VXN|7C(^!bt=pW=zy()xnamFLLf5f3^LPDYnK-j0%?lkfnPW;mkvykM`%jl7hk9Mddd&4^0^WpA zTPHY6?U-AtW!cONw&i9rJ)3$WhB4;aCbhha@vNA%-OSQmec!a5i?LRzpC;#4vS?d7 zPS>(bYiFz6Vaa(hBg5F$O-wjX-|L*LF^~EEr=}lawb={a7tB7in6De#zO#LT8+`bcXil*!3%~q>Qf7(Sak|&Vx_=kpf z*r9U~DKbB`d|Me}sv?Bcku)3oyBZ}|;qpFpT#RJHvtLnbE{Xys$&VpnUT&Ms`$Of50BY!_L#zzJM4rO9L-*``MA^Af zE@1II0;)a_xdAg4J!lMO!WasgBtL+0W0xAQ-0t4oI2ZkFsOVE&sN{Sxiq_aD)hb%9uu{J_dcd*axBlKLv6RFQ50DXe~ zhagPC2y>o~%SS>YaQT#ikr8WWg(62F;~{{fA2gV34!6ux@=#Az^#kE1@(dD=Y0!X? zA#q}PVK^hw=4sp0HOsJ@I6BC`iolgVjY151go05a(`q7%XaI>*N(wb92vWq)Nv=}B zdU2g@0`$q7hOs~t%b>XYF--IvfY~e(x#8k)%daO69k!vu;4e00&&f+-O@@U5yG3$qi*xb67$GdQx%)%sPzC`3?gZdn6M3eGQ0BYUs zJ(D*;@=YUFO#Z`YkkAFIWfK)Z-|k{Z?i)JJ>RF6YQ5hHSdIgyA#NdLHM$2rXQ31v% zL(@ql4wr-zgwI7bVAdD)vg>+g%QX0G>W?koIgd0U_<28j>d#ojeWy%A+%;@R1TDID ziIgGUru($bqcyes^gQSE+uHI=1GVS}&AKjiQ=8X6SXevaXgk)MDd> zRt-tf@M%bF)U;}&s#VHW?BZA=Np+)MURUc{K6o3G4VdU!rtGDyJKx?0>+ zs~QTwhMl^cE8wYGX|+(&@aWPio^cgsHcFdni5*cZuhcntO#V{@riF9zCT0sxREH!7 zxeBI18ZUq^so{}N0NfC(c=4PD^gSi` z>?MB@g(QFH;dt}^qZbYf!9~nOp!2cktdWp|X%><`d^Lld;i#TCoTDx7l!WDMO7_9cI2JbOUVAuf)>f~wWA zVvpx;b)!^bMHeBLVWPH?%V}C3NBAiFnNtxLi$(kyV*t3K7TEI$d(IWhHGGaQ;0)vs zW4!Ua2iNOsRZXpb!?jQ5;m&cWXlOsIYbDgTkt-u^sjFIYWMPE?eRyBxT5+IXui!Q@B>r0LQ`RNFjliT3;g80{ z@7(=lfnLMMr9o<6vyZuESI7+0Oib;eZgcFnf4v&i@sANm9>sDp90rb(2D%Q1u^u}6 z0bi1DGYvlzZQ=>u;Th(;>4i6GHw1k*)7JsssWXCju}46@j9{q;ct-9Hk6}O)sCqLX z?c2L4;kr_;a5v5mS5gF>OU*A+<;Bw5;LDc3`Dd$t1}|H<`~O!oCD<|< t&X>vfA2XR3OWUJ-UGve0;d*va?9=google.cloud.webrisk.v1.CompressionType + */ +class CompressionType +{ + /** + * Unknown. + * + * Generated from protobuf enum COMPRESSION_TYPE_UNSPECIFIED = 0; + */ + const COMPRESSION_TYPE_UNSPECIFIED = 0; + /** + * Raw, uncompressed data. + * + * Generated from protobuf enum RAW = 1; + */ + const RAW = 1; + /** + * Rice-Golomb encoded data. + * + * Generated from protobuf enum RICE = 2; + */ + const RICE = 2; + + private static $valueToName = [ + self::COMPRESSION_TYPE_UNSPECIFIED => 'COMPRESSION_TYPE_UNSPECIFIED', + self::RAW => 'RAW', + self::RICE => 'RICE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffRequest.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffRequest.php new file mode 100644 index 000000000000..d894cf327832 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffRequest.php @@ -0,0 +1,193 @@ +google.cloud.webrisk.v1.ComputeThreatListDiffRequest + */ +class ComputeThreatListDiffRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The threat list to update. Only a single ThreatType should be + * specified per request. If you want to handle multiple ThreatTypes, you must + * make one request per ThreatType. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatType threat_type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $threat_type = 0; + /** + * The current version token of the client for the requested list (the + * client version that was received from the last successful diff). + * If the client does not have a version token (this is the first time calling + * ComputeThreatListDiff), this may be left empty and a full database + * snapshot will be returned. + * + * Generated from protobuf field bytes version_token = 2; + */ + protected $version_token = ''; + /** + * Required. The constraints associated with this request. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $constraints = null; + + /** + * @param int $threatType Required. The threat list to update. Only a single ThreatType should be + * specified per request. If you want to handle multiple ThreatTypes, you must + * make one request per ThreatType. + * For allowed values, use constants defined on {@see \Google\Cloud\WebRisk\V1\ThreatType} + * @param string $versionToken The current version token of the client for the requested list (the + * client version that was received from the last successful diff). + * If the client does not have a version token (this is the first time calling + * ComputeThreatListDiff), this may be left empty and a full database + * snapshot will be returned. + * @param \Google\Cloud\WebRisk\V1\ComputeThreatListDiffRequest\Constraints $constraints Required. The constraints associated with this request. + * + * @return \Google\Cloud\WebRisk\V1\ComputeThreatListDiffRequest + * + * @experimental + */ + public static function build(int $threatType, string $versionToken, \Google\Cloud\WebRisk\V1\ComputeThreatListDiffRequest\Constraints $constraints): self + { + return (new self()) + ->setThreatType($threatType) + ->setVersionToken($versionToken) + ->setConstraints($constraints); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $threat_type + * Required. The threat list to update. Only a single ThreatType should be + * specified per request. If you want to handle multiple ThreatTypes, you must + * make one request per ThreatType. + * @type string $version_token + * The current version token of the client for the requested list (the + * client version that was received from the last successful diff). + * If the client does not have a version token (this is the first time calling + * ComputeThreatListDiff), this may be left empty and a full database + * snapshot will be returned. + * @type \Google\Cloud\WebRisk\V1\ComputeThreatListDiffRequest\Constraints $constraints + * Required. The constraints associated with this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * Required. The threat list to update. Only a single ThreatType should be + * specified per request. If you want to handle multiple ThreatTypes, you must + * make one request per ThreatType. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatType threat_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getThreatType() + { + return $this->threat_type; + } + + /** + * Required. The threat list to update. Only a single ThreatType should be + * specified per request. If you want to handle multiple ThreatTypes, you must + * make one request per ThreatType. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatType threat_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setThreatType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebRisk\V1\ThreatType::class); + $this->threat_type = $var; + + return $this; + } + + /** + * The current version token of the client for the requested list (the + * client version that was received from the last successful diff). + * If the client does not have a version token (this is the first time calling + * ComputeThreatListDiff), this may be left empty and a full database + * snapshot will be returned. + * + * Generated from protobuf field bytes version_token = 2; + * @return string + */ + public function getVersionToken() + { + return $this->version_token; + } + + /** + * The current version token of the client for the requested list (the + * client version that was received from the last successful diff). + * If the client does not have a version token (this is the first time calling + * ComputeThreatListDiff), this may be left empty and a full database + * snapshot will be returned. + * + * Generated from protobuf field bytes version_token = 2; + * @param string $var + * @return $this + */ + public function setVersionToken($var) + { + GPBUtil::checkString($var, False); + $this->version_token = $var; + + return $this; + } + + /** + * Required. The constraints associated with this request. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\WebRisk\V1\ComputeThreatListDiffRequest\Constraints|null + */ + public function getConstraints() + { + return $this->constraints; + } + + public function hasConstraints() + { + return isset($this->constraints); + } + + public function clearConstraints() + { + unset($this->constraints); + } + + /** + * Required. The constraints associated with this request. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\WebRisk\V1\ComputeThreatListDiffRequest\Constraints $var + * @return $this + */ + public function setConstraints($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\ComputeThreatListDiffRequest\Constraints::class); + $this->constraints = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffRequest/Constraints.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffRequest/Constraints.php new file mode 100644 index 000000000000..c232ef01ef1d --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffRequest/Constraints.php @@ -0,0 +1,154 @@ +google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints + */ +class Constraints extends \Google\Protobuf\Internal\Message +{ + /** + * The maximum size in number of entries. The diff will not contain more + * entries than this value. This should be a power of 2 between 2**10 and + * 2**20. If zero, no diff size limit is set. + * + * Generated from protobuf field int32 max_diff_entries = 1; + */ + protected $max_diff_entries = 0; + /** + * Sets the maximum number of entries that the client is willing to have + * in the local database. This should be a power of 2 between 2**10 and + * 2**20. If zero, no database size limit is set. + * + * Generated from protobuf field int32 max_database_entries = 2; + */ + protected $max_database_entries = 0; + /** + * The compression types supported by the client. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3; + */ + private $supported_compressions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $max_diff_entries + * The maximum size in number of entries. The diff will not contain more + * entries than this value. This should be a power of 2 between 2**10 and + * 2**20. If zero, no diff size limit is set. + * @type int $max_database_entries + * Sets the maximum number of entries that the client is willing to have + * in the local database. This should be a power of 2 between 2**10 and + * 2**20. If zero, no database size limit is set. + * @type array|\Google\Protobuf\Internal\RepeatedField $supported_compressions + * The compression types supported by the client. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The maximum size in number of entries. The diff will not contain more + * entries than this value. This should be a power of 2 between 2**10 and + * 2**20. If zero, no diff size limit is set. + * + * Generated from protobuf field int32 max_diff_entries = 1; + * @return int + */ + public function getMaxDiffEntries() + { + return $this->max_diff_entries; + } + + /** + * The maximum size in number of entries. The diff will not contain more + * entries than this value. This should be a power of 2 between 2**10 and + * 2**20. If zero, no diff size limit is set. + * + * Generated from protobuf field int32 max_diff_entries = 1; + * @param int $var + * @return $this + */ + public function setMaxDiffEntries($var) + { + GPBUtil::checkInt32($var); + $this->max_diff_entries = $var; + + return $this; + } + + /** + * Sets the maximum number of entries that the client is willing to have + * in the local database. This should be a power of 2 between 2**10 and + * 2**20. If zero, no database size limit is set. + * + * Generated from protobuf field int32 max_database_entries = 2; + * @return int + */ + public function getMaxDatabaseEntries() + { + return $this->max_database_entries; + } + + /** + * Sets the maximum number of entries that the client is willing to have + * in the local database. This should be a power of 2 between 2**10 and + * 2**20. If zero, no database size limit is set. + * + * Generated from protobuf field int32 max_database_entries = 2; + * @param int $var + * @return $this + */ + public function setMaxDatabaseEntries($var) + { + GPBUtil::checkInt32($var); + $this->max_database_entries = $var; + + return $this; + } + + /** + * The compression types supported by the client. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSupportedCompressions() + { + return $this->supported_compressions; + } + + /** + * The compression types supported by the client. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSupportedCompressions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1\CompressionType::class); + $this->supported_compressions = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Constraints::class, \Google\Cloud\WebRisk\V1\ComputeThreatListDiffRequest_Constraints::class); + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse.php new file mode 100644 index 000000000000..501d0b91126b --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse.php @@ -0,0 +1,315 @@ +google.cloud.webrisk.v1.ComputeThreatListDiffResponse + */ +class ComputeThreatListDiffResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The type of response. This may indicate that an action must be taken by the + * client when the response is received. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ComputeThreatListDiffResponse.ResponseType response_type = 4; + */ + protected $response_type = 0; + /** + * A set of entries to add to a local threat type's list. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatEntryAdditions additions = 5; + */ + protected $additions = null; + /** + * A set of entries to remove from a local threat type's list. + * This field may be empty. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatEntryRemovals removals = 6; + */ + protected $removals = null; + /** + * The new opaque client version token. This should be retained by the client + * and passed into the next call of ComputeThreatListDiff as 'version_token'. + * A separate version token should be stored and used for each threatList. + * + * Generated from protobuf field bytes new_version_token = 7; + */ + protected $new_version_token = ''; + /** + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * discard this diff and retry later. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ComputeThreatListDiffResponse.Checksum checksum = 8; + */ + protected $checksum = null; + /** + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + * + * Generated from protobuf field .google.protobuf.Timestamp recommended_next_diff = 2; + */ + protected $recommended_next_diff = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $response_type + * The type of response. This may indicate that an action must be taken by the + * client when the response is received. + * @type \Google\Cloud\WebRisk\V1\ThreatEntryAdditions $additions + * A set of entries to add to a local threat type's list. + * @type \Google\Cloud\WebRisk\V1\ThreatEntryRemovals $removals + * A set of entries to remove from a local threat type's list. + * This field may be empty. + * @type string $new_version_token + * The new opaque client version token. This should be retained by the client + * and passed into the next call of ComputeThreatListDiff as 'version_token'. + * A separate version token should be stored and used for each threatList. + * @type \Google\Cloud\WebRisk\V1\ComputeThreatListDiffResponse\Checksum $checksum + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * discard this diff and retry later. + * @type \Google\Protobuf\Timestamp $recommended_next_diff + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The type of response. This may indicate that an action must be taken by the + * client when the response is received. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ComputeThreatListDiffResponse.ResponseType response_type = 4; + * @return int + */ + public function getResponseType() + { + return $this->response_type; + } + + /** + * The type of response. This may indicate that an action must be taken by the + * client when the response is received. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ComputeThreatListDiffResponse.ResponseType response_type = 4; + * @param int $var + * @return $this + */ + public function setResponseType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebRisk\V1\ComputeThreatListDiffResponse\ResponseType::class); + $this->response_type = $var; + + return $this; + } + + /** + * A set of entries to add to a local threat type's list. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatEntryAdditions additions = 5; + * @return \Google\Cloud\WebRisk\V1\ThreatEntryAdditions|null + */ + public function getAdditions() + { + return $this->additions; + } + + public function hasAdditions() + { + return isset($this->additions); + } + + public function clearAdditions() + { + unset($this->additions); + } + + /** + * A set of entries to add to a local threat type's list. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatEntryAdditions additions = 5; + * @param \Google\Cloud\WebRisk\V1\ThreatEntryAdditions $var + * @return $this + */ + public function setAdditions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\ThreatEntryAdditions::class); + $this->additions = $var; + + return $this; + } + + /** + * A set of entries to remove from a local threat type's list. + * This field may be empty. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatEntryRemovals removals = 6; + * @return \Google\Cloud\WebRisk\V1\ThreatEntryRemovals|null + */ + public function getRemovals() + { + return $this->removals; + } + + public function hasRemovals() + { + return isset($this->removals); + } + + public function clearRemovals() + { + unset($this->removals); + } + + /** + * A set of entries to remove from a local threat type's list. + * This field may be empty. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatEntryRemovals removals = 6; + * @param \Google\Cloud\WebRisk\V1\ThreatEntryRemovals $var + * @return $this + */ + public function setRemovals($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\ThreatEntryRemovals::class); + $this->removals = $var; + + return $this; + } + + /** + * The new opaque client version token. This should be retained by the client + * and passed into the next call of ComputeThreatListDiff as 'version_token'. + * A separate version token should be stored and used for each threatList. + * + * Generated from protobuf field bytes new_version_token = 7; + * @return string + */ + public function getNewVersionToken() + { + return $this->new_version_token; + } + + /** + * The new opaque client version token. This should be retained by the client + * and passed into the next call of ComputeThreatListDiff as 'version_token'. + * A separate version token should be stored and used for each threatList. + * + * Generated from protobuf field bytes new_version_token = 7; + * @param string $var + * @return $this + */ + public function setNewVersionToken($var) + { + GPBUtil::checkString($var, False); + $this->new_version_token = $var; + + return $this; + } + + /** + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * discard this diff and retry later. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ComputeThreatListDiffResponse.Checksum checksum = 8; + * @return \Google\Cloud\WebRisk\V1\ComputeThreatListDiffResponse\Checksum|null + */ + public function getChecksum() + { + return $this->checksum; + } + + public function hasChecksum() + { + return isset($this->checksum); + } + + public function clearChecksum() + { + unset($this->checksum); + } + + /** + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * discard this diff and retry later. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ComputeThreatListDiffResponse.Checksum checksum = 8; + * @param \Google\Cloud\WebRisk\V1\ComputeThreatListDiffResponse\Checksum $var + * @return $this + */ + public function setChecksum($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\ComputeThreatListDiffResponse\Checksum::class); + $this->checksum = $var; + + return $this; + } + + /** + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + * + * Generated from protobuf field .google.protobuf.Timestamp recommended_next_diff = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRecommendedNextDiff() + { + return $this->recommended_next_diff; + } + + public function hasRecommendedNextDiff() + { + return isset($this->recommended_next_diff); + } + + public function clearRecommendedNextDiff() + { + unset($this->recommended_next_diff); + } + + /** + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + * + * Generated from protobuf field .google.protobuf.Timestamp recommended_next_diff = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRecommendedNextDiff($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->recommended_next_diff = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse/Checksum.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse/Checksum.php new file mode 100644 index 000000000000..750cdf43d71f --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse/Checksum.php @@ -0,0 +1,74 @@ +google.cloud.webrisk.v1.ComputeThreatListDiffResponse.Checksum + */ +class Checksum extends \Google\Protobuf\Internal\Message +{ + /** + * The SHA256 hash of the client state; that is, of the sorted list of all + * hashes present in the database. + * + * Generated from protobuf field bytes sha256 = 1; + */ + protected $sha256 = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $sha256 + * The SHA256 hash of the client state; that is, of the sorted list of all + * hashes present in the database. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The SHA256 hash of the client state; that is, of the sorted list of all + * hashes present in the database. + * + * Generated from protobuf field bytes sha256 = 1; + * @return string + */ + public function getSha256() + { + return $this->sha256; + } + + /** + * The SHA256 hash of the client state; that is, of the sorted list of all + * hashes present in the database. + * + * Generated from protobuf field bytes sha256 = 1; + * @param string $var + * @return $this + */ + public function setSha256($var) + { + GPBUtil::checkString($var, False); + $this->sha256 = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Checksum::class, \Google\Cloud\WebRisk\V1\ComputeThreatListDiffResponse_Checksum::class); + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse/ResponseType.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse/ResponseType.php new file mode 100644 index 000000000000..99910931557d --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse/ResponseType.php @@ -0,0 +1,66 @@ +google.cloud.webrisk.v1.ComputeThreatListDiffResponse.ResponseType + */ +class ResponseType +{ + /** + * Unknown. + * + * Generated from protobuf enum RESPONSE_TYPE_UNSPECIFIED = 0; + */ + const RESPONSE_TYPE_UNSPECIFIED = 0; + /** + * Partial updates are applied to the client's existing local database. + * + * Generated from protobuf enum DIFF = 1; + */ + const DIFF = 1; + /** + * Full updates resets the client's entire local database. This means + * that either the client had no state, was seriously out-of-date, + * or the client is believed to be corrupt. + * + * Generated from protobuf enum RESET = 2; + */ + const RESET = 2; + + private static $valueToName = [ + self::RESPONSE_TYPE_UNSPECIFIED => 'RESPONSE_TYPE_UNSPECIFIED', + self::DIFF => 'DIFF', + self::RESET => 'RESET', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ResponseType::class, \Google\Cloud\WebRisk\V1\ComputeThreatListDiffResponse_ResponseType::class); + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/CreateSubmissionRequest.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/CreateSubmissionRequest.php new file mode 100644 index 000000000000..ef012d860b58 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/CreateSubmissionRequest.php @@ -0,0 +1,132 @@ +google.cloud.webrisk.v1.CreateSubmissionRequest + */ +class CreateSubmissionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the project that is making the submission. This + * string is in the format "projects/{project_number}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The submission that contains the content of the phishing report. + * + * Generated from protobuf field .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $submission = null; + + /** + * @param string $parent Required. The name of the project that is making the submission. This + * string is in the format "projects/{project_number}". Please see + * {@see WebRiskServiceClient::projectName()} for help formatting this field. + * @param \Google\Cloud\WebRisk\V1\Submission $submission Required. The submission that contains the content of the phishing report. + * + * @return \Google\Cloud\WebRisk\V1\CreateSubmissionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\WebRisk\V1\Submission $submission): self + { + return (new self()) + ->setParent($parent) + ->setSubmission($submission); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the project that is making the submission. This + * string is in the format "projects/{project_number}". + * @type \Google\Cloud\WebRisk\V1\Submission $submission + * Required. The submission that contains the content of the phishing report. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the project that is making the submission. This + * string is in the format "projects/{project_number}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the project that is making the submission. This + * string is in the format "projects/{project_number}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The submission that contains the content of the phishing report. + * + * Generated from protobuf field .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\WebRisk\V1\Submission|null + */ + public function getSubmission() + { + return $this->submission; + } + + public function hasSubmission() + { + return isset($this->submission); + } + + public function clearSubmission() + { + unset($this->submission); + } + + /** + * Required. The submission that contains the content of the phishing report. + * + * Generated from protobuf field .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\WebRisk\V1\Submission $var + * @return $this + */ + public function setSubmission($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\Submission::class); + $this->submission = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RawHashes.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RawHashes.php new file mode 100644 index 000000000000..f78700b5e095 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RawHashes.php @@ -0,0 +1,123 @@ +google.cloud.webrisk.v1.RawHashes + */ +class RawHashes extends \Google\Protobuf\Internal\Message +{ + /** + * The number of bytes for each prefix encoded below. This field can be + * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). + * In practice this is almost always 4, except in exceptional circumstances. + * + * Generated from protobuf field int32 prefix_size = 1; + */ + protected $prefix_size = 0; + /** + * The hashes, in binary format, concatenated into one long string. Hashes are + * sorted in lexicographic order. For JSON API users, hashes are + * base64-encoded. + * + * Generated from protobuf field bytes raw_hashes = 2; + */ + protected $raw_hashes = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $prefix_size + * The number of bytes for each prefix encoded below. This field can be + * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). + * In practice this is almost always 4, except in exceptional circumstances. + * @type string $raw_hashes + * The hashes, in binary format, concatenated into one long string. Hashes are + * sorted in lexicographic order. For JSON API users, hashes are + * base64-encoded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The number of bytes for each prefix encoded below. This field can be + * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). + * In practice this is almost always 4, except in exceptional circumstances. + * + * Generated from protobuf field int32 prefix_size = 1; + * @return int + */ + public function getPrefixSize() + { + return $this->prefix_size; + } + + /** + * The number of bytes for each prefix encoded below. This field can be + * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). + * In practice this is almost always 4, except in exceptional circumstances. + * + * Generated from protobuf field int32 prefix_size = 1; + * @param int $var + * @return $this + */ + public function setPrefixSize($var) + { + GPBUtil::checkInt32($var); + $this->prefix_size = $var; + + return $this; + } + + /** + * The hashes, in binary format, concatenated into one long string. Hashes are + * sorted in lexicographic order. For JSON API users, hashes are + * base64-encoded. + * + * Generated from protobuf field bytes raw_hashes = 2; + * @return string + */ + public function getRawHashes() + { + return $this->raw_hashes; + } + + /** + * The hashes, in binary format, concatenated into one long string. Hashes are + * sorted in lexicographic order. For JSON API users, hashes are + * base64-encoded. + * + * Generated from protobuf field bytes raw_hashes = 2; + * @param string $var + * @return $this + */ + public function setRawHashes($var) + { + GPBUtil::checkString($var, False); + $this->raw_hashes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RawIndices.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RawIndices.php new file mode 100644 index 000000000000..49698f202720 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RawIndices.php @@ -0,0 +1,67 @@ +google.cloud.webrisk.v1.RawIndices + */ +class RawIndices extends \Google\Protobuf\Internal\Message +{ + /** + * The indices to remove from a lexicographically-sorted local list. + * + * Generated from protobuf field repeated int32 indices = 1; + */ + private $indices; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $indices + * The indices to remove from a lexicographically-sorted local list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The indices to remove from a lexicographically-sorted local list. + * + * Generated from protobuf field repeated int32 indices = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIndices() + { + return $this->indices; + } + + /** + * The indices to remove from a lexicographically-sorted local list. + * + * Generated from protobuf field repeated int32 indices = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIndices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->indices = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RiceDeltaEncoding.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RiceDeltaEncoding.php new file mode 100644 index 000000000000..32b56a763a7e --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RiceDeltaEncoding.php @@ -0,0 +1,190 @@ +google.cloud.webrisk.v1.RiceDeltaEncoding + */ +class RiceDeltaEncoding extends \Google\Protobuf\Internal\Message +{ + /** + * The offset of the first entry in the encoded data, or, if only a single + * integer was encoded, that single integer's value. If the field is empty or + * missing, assume zero. + * + * Generated from protobuf field int64 first_value = 1; + */ + protected $first_value = 0; + /** + * The Golomb-Rice parameter, which is a number between 2 and 28. This field + * is missing (that is, zero) if `num_entries` is zero. + * + * Generated from protobuf field int32 rice_parameter = 2; + */ + protected $rice_parameter = 0; + /** + * The number of entries that are delta encoded in the encoded data. If only a + * single integer was encoded, this will be zero and the single value will be + * stored in `first_value`. + * + * Generated from protobuf field int32 entry_count = 3; + */ + protected $entry_count = 0; + /** + * The encoded deltas that are encoded using the Golomb-Rice coder. + * + * Generated from protobuf field bytes encoded_data = 4; + */ + protected $encoded_data = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $first_value + * The offset of the first entry in the encoded data, or, if only a single + * integer was encoded, that single integer's value. If the field is empty or + * missing, assume zero. + * @type int $rice_parameter + * The Golomb-Rice parameter, which is a number between 2 and 28. This field + * is missing (that is, zero) if `num_entries` is zero. + * @type int $entry_count + * The number of entries that are delta encoded in the encoded data. If only a + * single integer was encoded, this will be zero and the single value will be + * stored in `first_value`. + * @type string $encoded_data + * The encoded deltas that are encoded using the Golomb-Rice coder. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The offset of the first entry in the encoded data, or, if only a single + * integer was encoded, that single integer's value. If the field is empty or + * missing, assume zero. + * + * Generated from protobuf field int64 first_value = 1; + * @return int|string + */ + public function getFirstValue() + { + return $this->first_value; + } + + /** + * The offset of the first entry in the encoded data, or, if only a single + * integer was encoded, that single integer's value. If the field is empty or + * missing, assume zero. + * + * Generated from protobuf field int64 first_value = 1; + * @param int|string $var + * @return $this + */ + public function setFirstValue($var) + { + GPBUtil::checkInt64($var); + $this->first_value = $var; + + return $this; + } + + /** + * The Golomb-Rice parameter, which is a number between 2 and 28. This field + * is missing (that is, zero) if `num_entries` is zero. + * + * Generated from protobuf field int32 rice_parameter = 2; + * @return int + */ + public function getRiceParameter() + { + return $this->rice_parameter; + } + + /** + * The Golomb-Rice parameter, which is a number between 2 and 28. This field + * is missing (that is, zero) if `num_entries` is zero. + * + * Generated from protobuf field int32 rice_parameter = 2; + * @param int $var + * @return $this + */ + public function setRiceParameter($var) + { + GPBUtil::checkInt32($var); + $this->rice_parameter = $var; + + return $this; + } + + /** + * The number of entries that are delta encoded in the encoded data. If only a + * single integer was encoded, this will be zero and the single value will be + * stored in `first_value`. + * + * Generated from protobuf field int32 entry_count = 3; + * @return int + */ + public function getEntryCount() + { + return $this->entry_count; + } + + /** + * The number of entries that are delta encoded in the encoded data. If only a + * single integer was encoded, this will be zero and the single value will be + * stored in `first_value`. + * + * Generated from protobuf field int32 entry_count = 3; + * @param int $var + * @return $this + */ + public function setEntryCount($var) + { + GPBUtil::checkInt32($var); + $this->entry_count = $var; + + return $this; + } + + /** + * The encoded deltas that are encoded using the Golomb-Rice coder. + * + * Generated from protobuf field bytes encoded_data = 4; + * @return string + */ + public function getEncodedData() + { + return $this->encoded_data; + } + + /** + * The encoded deltas that are encoded using the Golomb-Rice coder. + * + * Generated from protobuf field bytes encoded_data = 4; + * @param string $var + * @return $this + */ + public function setEncodedData($var) + { + GPBUtil::checkString($var, False); + $this->encoded_data = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesRequest.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesRequest.php new file mode 100644 index 000000000000..c9435e1e82a0 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesRequest.php @@ -0,0 +1,137 @@ +google.cloud.webrisk.v1.SearchHashesRequest + */ +class SearchHashesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + * hash. For JSON requests, this field is base64-encoded. + * Note that if this parameter is provided by a URI, it must be encoded using + * the web safe base64 variant (RFC 4648). + * + * Generated from protobuf field bytes hash_prefix = 1; + */ + protected $hash_prefix = ''; + /** + * Required. The ThreatLists to search in. Multiple ThreatLists may be + * specified. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $threat_types; + + /** + * @param string $hashPrefix A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + * hash. For JSON requests, this field is base64-encoded. + * Note that if this parameter is provided by a URI, it must be encoded using + * the web safe base64 variant (RFC 4648). + * @param int[] $threatTypes Required. The ThreatLists to search in. Multiple ThreatLists may be + * specified. + * For allowed values, use constants defined on {@see \Google\Cloud\WebRisk\V1\ThreatType} + * + * @return \Google\Cloud\WebRisk\V1\SearchHashesRequest + * + * @experimental + */ + public static function build(string $hashPrefix, array $threatTypes): self + { + return (new self()) + ->setHashPrefix($hashPrefix) + ->setThreatTypes($threatTypes); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $hash_prefix + * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + * hash. For JSON requests, this field is base64-encoded. + * Note that if this parameter is provided by a URI, it must be encoded using + * the web safe base64 variant (RFC 4648). + * @type array|\Google\Protobuf\Internal\RepeatedField $threat_types + * Required. The ThreatLists to search in. Multiple ThreatLists may be + * specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + * hash. For JSON requests, this field is base64-encoded. + * Note that if this parameter is provided by a URI, it must be encoded using + * the web safe base64 variant (RFC 4648). + * + * Generated from protobuf field bytes hash_prefix = 1; + * @return string + */ + public function getHashPrefix() + { + return $this->hash_prefix; + } + + /** + * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + * hash. For JSON requests, this field is base64-encoded. + * Note that if this parameter is provided by a URI, it must be encoded using + * the web safe base64 variant (RFC 4648). + * + * Generated from protobuf field bytes hash_prefix = 1; + * @param string $var + * @return $this + */ + public function setHashPrefix($var) + { + GPBUtil::checkString($var, False); + $this->hash_prefix = $var; + + return $this; + } + + /** + * Required. The ThreatLists to search in. Multiple ThreatLists may be + * specified. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getThreatTypes() + { + return $this->threat_types; + } + + /** + * Required. The ThreatLists to search in. Multiple ThreatLists may be + * specified. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setThreatTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1\ThreatType::class); + $this->threat_types = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesResponse.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesResponse.php new file mode 100644 index 000000000000..c390a94c67bc --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesResponse.php @@ -0,0 +1,117 @@ +google.cloud.webrisk.v1.SearchHashesResponse + */ +class SearchHashesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.SearchHashesResponse.ThreatHash threats = 1; + */ + private $threats; + /** + * For requested entities that did not match the threat list, how long to + * cache the response until. + * + * Generated from protobuf field .google.protobuf.Timestamp negative_expire_time = 2; + */ + protected $negative_expire_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\WebRisk\V1\SearchHashesResponse\ThreatHash>|\Google\Protobuf\Internal\RepeatedField $threats + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + * @type \Google\Protobuf\Timestamp $negative_expire_time + * For requested entities that did not match the threat list, how long to + * cache the response until. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.SearchHashesResponse.ThreatHash threats = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getThreats() + { + return $this->threats; + } + + /** + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.SearchHashesResponse.ThreatHash threats = 1; + * @param array<\Google\Cloud\WebRisk\V1\SearchHashesResponse\ThreatHash>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setThreats($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebRisk\V1\SearchHashesResponse\ThreatHash::class); + $this->threats = $arr; + + return $this; + } + + /** + * For requested entities that did not match the threat list, how long to + * cache the response until. + * + * Generated from protobuf field .google.protobuf.Timestamp negative_expire_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getNegativeExpireTime() + { + return $this->negative_expire_time; + } + + public function hasNegativeExpireTime() + { + return isset($this->negative_expire_time); + } + + public function clearNegativeExpireTime() + { + unset($this->negative_expire_time); + } + + /** + * For requested entities that did not match the threat list, how long to + * cache the response until. + * + * Generated from protobuf field .google.protobuf.Timestamp negative_expire_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setNegativeExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->negative_expire_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesResponse/ThreatHash.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesResponse/ThreatHash.php new file mode 100644 index 000000000000..7e9556854399 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesResponse/ThreatHash.php @@ -0,0 +1,160 @@ +google.cloud.webrisk.v1.SearchHashesResponse.ThreatHash + */ +class ThreatHash extends \Google\Protobuf\Internal\Message +{ + /** + * The ThreatList this threat belongs to. + * This must contain at least one entry. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1; + */ + private $threat_types; + /** + * A 32 byte SHA256 hash. This field is in binary format. For JSON + * requests, hashes are base64-encoded. + * + * Generated from protobuf field bytes hash = 2; + */ + protected $hash = ''; + /** + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3; + */ + protected $expire_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $threat_types + * The ThreatList this threat belongs to. + * This must contain at least one entry. + * @type string $hash + * A 32 byte SHA256 hash. This field is in binary format. For JSON + * requests, hashes are base64-encoded. + * @type \Google\Protobuf\Timestamp $expire_time + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The ThreatList this threat belongs to. + * This must contain at least one entry. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getThreatTypes() + { + return $this->threat_types; + } + + /** + * The ThreatList this threat belongs to. + * This must contain at least one entry. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setThreatTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1\ThreatType::class); + $this->threat_types = $arr; + + return $this; + } + + /** + * A 32 byte SHA256 hash. This field is in binary format. For JSON + * requests, hashes are base64-encoded. + * + * Generated from protobuf field bytes hash = 2; + * @return string + */ + public function getHash() + { + return $this->hash; + } + + /** + * A 32 byte SHA256 hash. This field is in binary format. For JSON + * requests, hashes are base64-encoded. + * + * Generated from protobuf field bytes hash = 2; + * @param string $var + * @return $this + */ + public function setHash($var) + { + GPBUtil::checkString($var, False); + $this->hash = $var; + + return $this; + } + + /** + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ThreatHash::class, \Google\Cloud\WebRisk\V1\SearchHashesResponse_ThreatHash::class); + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisRequest.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisRequest.php new file mode 100644 index 000000000000..f9697b4e8665 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisRequest.php @@ -0,0 +1,122 @@ +google.cloud.webrisk.v1.SearchUrisRequest + */ +class SearchUrisRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The URI to be checked for matches. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + /** + * Required. The ThreatLists to search in. Multiple ThreatLists may be + * specified. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $threat_types; + + /** + * @param string $uri Required. The URI to be checked for matches. + * @param int[] $threatTypes Required. The ThreatLists to search in. Multiple ThreatLists may be + * specified. + * For allowed values, use constants defined on {@see \Google\Cloud\WebRisk\V1\ThreatType} + * + * @return \Google\Cloud\WebRisk\V1\SearchUrisRequest + * + * @experimental + */ + public static function build(string $uri, array $threatTypes): self + { + return (new self()) + ->setUri($uri) + ->setThreatTypes($threatTypes); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Required. The URI to be checked for matches. + * @type array|\Google\Protobuf\Internal\RepeatedField $threat_types + * Required. The ThreatLists to search in. Multiple ThreatLists may be + * specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * Required. The URI to be checked for matches. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. The URI to be checked for matches. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Required. The ThreatLists to search in. Multiple ThreatLists may be + * specified. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getThreatTypes() + { + return $this->threat_types; + } + + /** + * Required. The ThreatLists to search in. Multiple ThreatLists may be + * specified. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setThreatTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1\ThreatType::class); + $this->threat_types = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisResponse.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisResponse.php new file mode 100644 index 000000000000..0505e3049461 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisResponse.php @@ -0,0 +1,75 @@ +google.cloud.webrisk.v1.SearchUrisResponse + */ +class SearchUrisResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The threat list matches. This might be empty if the URI is on no list. + * + * Generated from protobuf field .google.cloud.webrisk.v1.SearchUrisResponse.ThreatUri threat = 1; + */ + protected $threat = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\WebRisk\V1\SearchUrisResponse\ThreatUri $threat + * The threat list matches. This might be empty if the URI is on no list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The threat list matches. This might be empty if the URI is on no list. + * + * Generated from protobuf field .google.cloud.webrisk.v1.SearchUrisResponse.ThreatUri threat = 1; + * @return \Google\Cloud\WebRisk\V1\SearchUrisResponse\ThreatUri|null + */ + public function getThreat() + { + return $this->threat; + } + + public function hasThreat() + { + return isset($this->threat); + } + + public function clearThreat() + { + unset($this->threat); + } + + /** + * The threat list matches. This might be empty if the URI is on no list. + * + * Generated from protobuf field .google.cloud.webrisk.v1.SearchUrisResponse.ThreatUri threat = 1; + * @param \Google\Cloud\WebRisk\V1\SearchUrisResponse\ThreatUri $var + * @return $this + */ + public function setThreat($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\SearchUrisResponse\ThreatUri::class); + $this->threat = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisResponse/ThreatUri.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisResponse/ThreatUri.php new file mode 100644 index 000000000000..30d655f4b0ed --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisResponse/ThreatUri.php @@ -0,0 +1,118 @@ +google.cloud.webrisk.v1.SearchUrisResponse.ThreatUri + */ +class ThreatUri extends \Google\Protobuf\Internal\Message +{ + /** + * The ThreatList this threat belongs to. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1; + */ + private $threat_types; + /** + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; + */ + protected $expire_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $threat_types + * The ThreatList this threat belongs to. + * @type \Google\Protobuf\Timestamp $expire_time + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The ThreatList this threat belongs to. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getThreatTypes() + { + return $this->threat_types; + } + + /** + * The ThreatList this threat belongs to. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setThreatTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1\ThreatType::class); + $this->threat_types = $arr; + + return $this; + } + + /** + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ThreatUri::class, \Google\Cloud\WebRisk\V1\SearchUrisResponse_ThreatUri::class); + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/Submission.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/Submission.php new file mode 100644 index 000000000000..bd04f68cb941 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/Submission.php @@ -0,0 +1,113 @@ +google.cloud.webrisk.v1.Submission + */ +class Submission extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The URI that is being reported for malicious content to be + * analyzed. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + /** + * Output only. ThreatTypes found to be associated with the submitted URI + * after reviewing it. This might be empty if the URI was not added to any + * list. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $threat_types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Required. The URI that is being reported for malicious content to be + * analyzed. + * @type array|\Google\Protobuf\Internal\RepeatedField $threat_types + * Output only. ThreatTypes found to be associated with the submitted URI + * after reviewing it. This might be empty if the URI was not added to any + * list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * Required. The URI that is being reported for malicious content to be + * analyzed. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. The URI that is being reported for malicious content to be + * analyzed. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Output only. ThreatTypes found to be associated with the submitted URI + * after reviewing it. This might be empty if the URI was not added to any + * list. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getThreatTypes() + { + return $this->threat_types; + } + + /** + * Output only. ThreatTypes found to be associated with the submitted URI + * after reviewing it. This might be empty if the URI was not added to any + * list. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setThreatTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1\ThreatType::class); + $this->threat_types = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriMetadata.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriMetadata.php new file mode 100644 index 000000000000..d2148bdd3847 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriMetadata.php @@ -0,0 +1,156 @@ +google.cloud.webrisk.v1.SubmitUriMetadata + */ +class SubmitUriMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The state of the operation. + * + * Generated from protobuf field .google.cloud.webrisk.v1.SubmitUriMetadata.State state = 1; + */ + protected $state = 0; + /** + * Creation time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + */ + protected $create_time = null; + /** + * Latest update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The state of the operation. + * @type \Google\Protobuf\Timestamp $create_time + * Creation time of the operation. + * @type \Google\Protobuf\Timestamp $update_time + * Latest update time of the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.cloud.webrisk.v1.SubmitUriMetadata.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.cloud.webrisk.v1.SubmitUriMetadata.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebRisk\V1\SubmitUriMetadata\State::class); + $this->state = $var; + + return $this; + } + + /** + * Creation time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Creation time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Latest update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Latest update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriMetadata/State.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriMetadata/State.php new file mode 100644 index 000000000000..9e9a51092de3 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriMetadata/State.php @@ -0,0 +1,85 @@ +google.cloud.webrisk.v1.SubmitUriMetadata.State + */ +class State +{ + /** + * Default unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The operation is currently running. + * + * Generated from protobuf enum RUNNING = 1; + */ + const RUNNING = 1; + /** + * The operation finished with a success status. + * + * Generated from protobuf enum SUCCEEDED = 2; + */ + const SUCCEEDED = 2; + /** + * The operation was cancelled. + * + * Generated from protobuf enum CANCELLED = 3; + */ + const CANCELLED = 3; + /** + * The operation finished with a failure status. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + /** + * The operation was closed with no action taken. + * + * Generated from protobuf enum CLOSED = 5; + */ + const CLOSED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::RUNNING => 'RUNNING', + self::SUCCEEDED => 'SUCCEEDED', + self::CANCELLED => 'CANCELLED', + self::FAILED => 'FAILED', + self::CLOSED => 'CLOSED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\WebRisk\V1\SubmitUriMetadata_State::class); + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriRequest.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriRequest.php new file mode 100644 index 000000000000..2941f5f391b3 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriRequest.php @@ -0,0 +1,203 @@ +google.cloud.webrisk.v1.SubmitUriRequest + */ +class SubmitUriRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the project that is making the submission. This + * string is in the format "projects/{project_number}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The submission that contains the URI to be scanned. + * + * Generated from protobuf field .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $submission = null; + /** + * Provides additional information about the submission. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo threat_info = 3; + */ + protected $threat_info = null; + /** + * Provides additional information about how the submission was discovered. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatDiscovery threat_discovery = 4; + */ + protected $threat_discovery = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the project that is making the submission. This + * string is in the format "projects/{project_number}". + * @type \Google\Cloud\WebRisk\V1\Submission $submission + * Required. The submission that contains the URI to be scanned. + * @type \Google\Cloud\WebRisk\V1\ThreatInfo $threat_info + * Provides additional information about the submission. + * @type \Google\Cloud\WebRisk\V1\ThreatDiscovery $threat_discovery + * Provides additional information about how the submission was discovered. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the project that is making the submission. This + * string is in the format "projects/{project_number}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the project that is making the submission. This + * string is in the format "projects/{project_number}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The submission that contains the URI to be scanned. + * + * Generated from protobuf field .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\WebRisk\V1\Submission|null + */ + public function getSubmission() + { + return $this->submission; + } + + public function hasSubmission() + { + return isset($this->submission); + } + + public function clearSubmission() + { + unset($this->submission); + } + + /** + * Required. The submission that contains the URI to be scanned. + * + * Generated from protobuf field .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\WebRisk\V1\Submission $var + * @return $this + */ + public function setSubmission($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\Submission::class); + $this->submission = $var; + + return $this; + } + + /** + * Provides additional information about the submission. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo threat_info = 3; + * @return \Google\Cloud\WebRisk\V1\ThreatInfo|null + */ + public function getThreatInfo() + { + return $this->threat_info; + } + + public function hasThreatInfo() + { + return isset($this->threat_info); + } + + public function clearThreatInfo() + { + unset($this->threat_info); + } + + /** + * Provides additional information about the submission. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo threat_info = 3; + * @param \Google\Cloud\WebRisk\V1\ThreatInfo $var + * @return $this + */ + public function setThreatInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\ThreatInfo::class); + $this->threat_info = $var; + + return $this; + } + + /** + * Provides additional information about how the submission was discovered. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatDiscovery threat_discovery = 4; + * @return \Google\Cloud\WebRisk\V1\ThreatDiscovery|null + */ + public function getThreatDiscovery() + { + return $this->threat_discovery; + } + + public function hasThreatDiscovery() + { + return isset($this->threat_discovery); + } + + public function clearThreatDiscovery() + { + unset($this->threat_discovery); + } + + /** + * Provides additional information about how the submission was discovered. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatDiscovery threat_discovery = 4; + * @param \Google\Cloud\WebRisk\V1\ThreatDiscovery $var + * @return $this + */ + public function setThreatDiscovery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\ThreatDiscovery::class); + $this->threat_discovery = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatDiscovery.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatDiscovery.php new file mode 100644 index 000000000000..78c9f33a4c39 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatDiscovery.php @@ -0,0 +1,105 @@ +google.cloud.webrisk.v1.ThreatDiscovery + */ +class ThreatDiscovery extends \Google\Protobuf\Internal\Message +{ + /** + * Platform on which the threat was discovered. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatDiscovery.Platform platform = 1; + */ + protected $platform = 0; + /** + * CLDR region code of the countries/regions the URI poses a threat ordered + * from most impact to least impact. Example: "US" for United States. + * + * Generated from protobuf field repeated string region_codes = 2; + */ + private $region_codes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $platform + * Platform on which the threat was discovered. + * @type array|\Google\Protobuf\Internal\RepeatedField $region_codes + * CLDR region code of the countries/regions the URI poses a threat ordered + * from most impact to least impact. Example: "US" for United States. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * Platform on which the threat was discovered. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatDiscovery.Platform platform = 1; + * @return int + */ + public function getPlatform() + { + return $this->platform; + } + + /** + * Platform on which the threat was discovered. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatDiscovery.Platform platform = 1; + * @param int $var + * @return $this + */ + public function setPlatform($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebRisk\V1\ThreatDiscovery\Platform::class); + $this->platform = $var; + + return $this; + } + + /** + * CLDR region code of the countries/regions the URI poses a threat ordered + * from most impact to least impact. Example: "US" for United States. + * + * Generated from protobuf field repeated string region_codes = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRegionCodes() + { + return $this->region_codes; + } + + /** + * CLDR region code of the countries/regions the URI poses a threat ordered + * from most impact to least impact. Example: "US" for United States. + * + * Generated from protobuf field repeated string region_codes = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRegionCodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->region_codes = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatDiscovery/Platform.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatDiscovery/Platform.php new file mode 100644 index 000000000000..21970d595dcc --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatDiscovery/Platform.php @@ -0,0 +1,78 @@ +google.cloud.webrisk.v1.ThreatDiscovery.Platform + */ +class Platform +{ + /** + * Default. + * + * Generated from protobuf enum PLATFORM_UNSPECIFIED = 0; + */ + const PLATFORM_UNSPECIFIED = 0; + /** + * General Android platform. + * + * Generated from protobuf enum ANDROID = 1; + */ + const ANDROID = 1; + /** + * General iOS platform. + * + * Generated from protobuf enum IOS = 2; + */ + const IOS = 2; + /** + * General macOS platform. + * + * Generated from protobuf enum MACOS = 3; + */ + const MACOS = 3; + /** + * General Windows platform. + * + * Generated from protobuf enum WINDOWS = 4; + */ + const WINDOWS = 4; + + private static $valueToName = [ + self::PLATFORM_UNSPECIFIED => 'PLATFORM_UNSPECIFIED', + self::ANDROID => 'ANDROID', + self::IOS => 'IOS', + self::MACOS => 'MACOS', + self::WINDOWS => 'WINDOWS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Platform::class, \Google\Cloud\WebRisk\V1\ThreatDiscovery_Platform::class); + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatEntryAdditions.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatEntryAdditions.php new file mode 100644 index 000000000000..ad3939be64a1 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatEntryAdditions.php @@ -0,0 +1,124 @@ +google.cloud.webrisk.v1.ThreatEntryAdditions + */ +class ThreatEntryAdditions extends \Google\Protobuf\Internal\Message +{ + /** + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.RawHashes raw_hashes = 1; + */ + private $raw_hashes; + /** + * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + * + * Generated from protobuf field .google.cloud.webrisk.v1.RiceDeltaEncoding rice_hashes = 2; + */ + protected $rice_hashes = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\WebRisk\V1\RawHashes>|\Google\Protobuf\Internal\RepeatedField $raw_hashes + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + * @type \Google\Cloud\WebRisk\V1\RiceDeltaEncoding $rice_hashes + * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.RawHashes raw_hashes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRawHashes() + { + return $this->raw_hashes; + } + + /** + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.RawHashes raw_hashes = 1; + * @param array<\Google\Cloud\WebRisk\V1\RawHashes>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRawHashes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebRisk\V1\RawHashes::class); + $this->raw_hashes = $arr; + + return $this; + } + + /** + * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + * + * Generated from protobuf field .google.cloud.webrisk.v1.RiceDeltaEncoding rice_hashes = 2; + * @return \Google\Cloud\WebRisk\V1\RiceDeltaEncoding|null + */ + public function getRiceHashes() + { + return $this->rice_hashes; + } + + public function hasRiceHashes() + { + return isset($this->rice_hashes); + } + + public function clearRiceHashes() + { + unset($this->rice_hashes); + } + + /** + * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + * + * Generated from protobuf field .google.cloud.webrisk.v1.RiceDeltaEncoding rice_hashes = 2; + * @param \Google\Cloud\WebRisk\V1\RiceDeltaEncoding $var + * @return $this + */ + public function setRiceHashes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\RiceDeltaEncoding::class); + $this->rice_hashes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatEntryRemovals.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatEntryRemovals.php new file mode 100644 index 000000000000..d51634f66877 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatEntryRemovals.php @@ -0,0 +1,133 @@ +google.cloud.webrisk.v1.ThreatEntryRemovals + */ +class ThreatEntryRemovals extends \Google\Protobuf\Internal\Message +{ + /** + * The raw removal indices for a local list. + * + * Generated from protobuf field .google.cloud.webrisk.v1.RawIndices raw_indices = 1; + */ + protected $raw_indices = null; + /** + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + * + * Generated from protobuf field .google.cloud.webrisk.v1.RiceDeltaEncoding rice_indices = 2; + */ + protected $rice_indices = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\WebRisk\V1\RawIndices $raw_indices + * The raw removal indices for a local list. + * @type \Google\Cloud\WebRisk\V1\RiceDeltaEncoding $rice_indices + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The raw removal indices for a local list. + * + * Generated from protobuf field .google.cloud.webrisk.v1.RawIndices raw_indices = 1; + * @return \Google\Cloud\WebRisk\V1\RawIndices|null + */ + public function getRawIndices() + { + return $this->raw_indices; + } + + public function hasRawIndices() + { + return isset($this->raw_indices); + } + + public function clearRawIndices() + { + unset($this->raw_indices); + } + + /** + * The raw removal indices for a local list. + * + * Generated from protobuf field .google.cloud.webrisk.v1.RawIndices raw_indices = 1; + * @param \Google\Cloud\WebRisk\V1\RawIndices $var + * @return $this + */ + public function setRawIndices($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\RawIndices::class); + $this->raw_indices = $var; + + return $this; + } + + /** + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + * + * Generated from protobuf field .google.cloud.webrisk.v1.RiceDeltaEncoding rice_indices = 2; + * @return \Google\Cloud\WebRisk\V1\RiceDeltaEncoding|null + */ + public function getRiceIndices() + { + return $this->rice_indices; + } + + public function hasRiceIndices() + { + return isset($this->rice_indices); + } + + public function clearRiceIndices() + { + unset($this->rice_indices); + } + + /** + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + * + * Generated from protobuf field .google.cloud.webrisk.v1.RiceDeltaEncoding rice_indices = 2; + * @param \Google\Cloud\WebRisk\V1\RiceDeltaEncoding $var + * @return $this + */ + public function setRiceIndices($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\RiceDeltaEncoding::class); + $this->rice_indices = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo.php new file mode 100644 index 000000000000..4536e1bea45f --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo.php @@ -0,0 +1,157 @@ +google.cloud.webrisk.v1.ThreatInfo + */ +class ThreatInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The type of abuse. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo.AbuseType abuse_type = 1; + */ + protected $abuse_type = 0; + /** + * Confidence that the URI is unsafe. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo.Confidence threat_confidence = 2; + */ + protected $threat_confidence = null; + /** + * Context about why the URI is unsafe. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification threat_justification = 3; + */ + protected $threat_justification = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $abuse_type + * The type of abuse. + * @type \Google\Cloud\WebRisk\V1\ThreatInfo\Confidence $threat_confidence + * Confidence that the URI is unsafe. + * @type \Google\Cloud\WebRisk\V1\ThreatInfo\ThreatJustification $threat_justification + * Context about why the URI is unsafe. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The type of abuse. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo.AbuseType abuse_type = 1; + * @return int + */ + public function getAbuseType() + { + return $this->abuse_type; + } + + /** + * The type of abuse. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo.AbuseType abuse_type = 1; + * @param int $var + * @return $this + */ + public function setAbuseType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebRisk\V1\ThreatInfo\AbuseType::class); + $this->abuse_type = $var; + + return $this; + } + + /** + * Confidence that the URI is unsafe. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo.Confidence threat_confidence = 2; + * @return \Google\Cloud\WebRisk\V1\ThreatInfo\Confidence|null + */ + public function getThreatConfidence() + { + return $this->threat_confidence; + } + + public function hasThreatConfidence() + { + return isset($this->threat_confidence); + } + + public function clearThreatConfidence() + { + unset($this->threat_confidence); + } + + /** + * Confidence that the URI is unsafe. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo.Confidence threat_confidence = 2; + * @param \Google\Cloud\WebRisk\V1\ThreatInfo\Confidence $var + * @return $this + */ + public function setThreatConfidence($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\ThreatInfo\Confidence::class); + $this->threat_confidence = $var; + + return $this; + } + + /** + * Context about why the URI is unsafe. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification threat_justification = 3; + * @return \Google\Cloud\WebRisk\V1\ThreatInfo\ThreatJustification|null + */ + public function getThreatJustification() + { + return $this->threat_justification; + } + + public function hasThreatJustification() + { + return isset($this->threat_justification); + } + + public function clearThreatJustification() + { + unset($this->threat_justification); + } + + /** + * Context about why the URI is unsafe. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification threat_justification = 3; + * @param \Google\Cloud\WebRisk\V1\ThreatInfo\ThreatJustification $var + * @return $this + */ + public function setThreatJustification($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\ThreatInfo\ThreatJustification::class); + $this->threat_justification = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/AbuseType.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/AbuseType.php new file mode 100644 index 000000000000..70f7ef17ada9 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/AbuseType.php @@ -0,0 +1,71 @@ +google.cloud.webrisk.v1.ThreatInfo.AbuseType + */ +class AbuseType +{ + /** + * Default. + * + * Generated from protobuf enum ABUSE_TYPE_UNSPECIFIED = 0; + */ + const ABUSE_TYPE_UNSPECIFIED = 0; + /** + * The URI contains malware. + * + * Generated from protobuf enum MALWARE = 1; + */ + const MALWARE = 1; + /** + * The URI contains social engineering. + * + * Generated from protobuf enum SOCIAL_ENGINEERING = 2; + */ + const SOCIAL_ENGINEERING = 2; + /** + * The URI contains unwanted software. + * + * Generated from protobuf enum UNWANTED_SOFTWARE = 3; + */ + const UNWANTED_SOFTWARE = 3; + + private static $valueToName = [ + self::ABUSE_TYPE_UNSPECIFIED => 'ABUSE_TYPE_UNSPECIFIED', + self::MALWARE => 'MALWARE', + self::SOCIAL_ENGINEERING => 'SOCIAL_ENGINEERING', + self::UNWANTED_SOFTWARE => 'UNWANTED_SOFTWARE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AbuseType::class, \Google\Cloud\WebRisk\V1\ThreatInfo_AbuseType::class); + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/Confidence.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/Confidence.php new file mode 100644 index 000000000000..88079fdc9e2c --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/Confidence.php @@ -0,0 +1,117 @@ +google.cloud.webrisk.v1.ThreatInfo.Confidence + */ +class Confidence extends \Google\Protobuf\Internal\Message +{ + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * A decimal representation of confidence in the range of 0 + * to 1 where 0 indicates no confidence and 1 indicates + * complete confidence. + * @type int $level + * Enum representation of confidence. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * A decimal representation of confidence in the range of 0 + * to 1 where 0 indicates no confidence and 1 indicates + * complete confidence. + * + * Generated from protobuf field float score = 1; + * @return float + */ + public function getScore() + { + return $this->readOneof(1); + } + + public function hasScore() + { + return $this->hasOneof(1); + } + + /** + * A decimal representation of confidence in the range of 0 + * to 1 where 0 indicates no confidence and 1 indicates + * complete confidence. + * + * Generated from protobuf field float score = 1; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Enum representation of confidence. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel level = 2; + * @return int + */ + public function getLevel() + { + return $this->readOneof(2); + } + + public function hasLevel() + { + return $this->hasOneof(2); + } + + /** + * Enum representation of confidence. + * + * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel level = 2; + * @param int $var + * @return $this + */ + public function setLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebRisk\V1\ThreatInfo\Confidence\ConfidenceLevel::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Confidence::class, \Google\Cloud\WebRisk\V1\ThreatInfo_Confidence::class); + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/Confidence/ConfidenceLevel.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/Confidence/ConfidenceLevel.php new file mode 100644 index 000000000000..04f25a28d07f --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/Confidence/ConfidenceLevel.php @@ -0,0 +1,71 @@ +google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel + */ +class ConfidenceLevel +{ + /** + * Default. + * + * Generated from protobuf enum CONFIDENCE_LEVEL_UNSPECIFIED = 0; + */ + const CONFIDENCE_LEVEL_UNSPECIFIED = 0; + /** + * Less than 60% confidence that the URI is unsafe. + * + * Generated from protobuf enum LOW = 1; + */ + const LOW = 1; + /** + * Between 60% and 80% confidence that the URI is unsafe. + * + * Generated from protobuf enum MEDIUM = 2; + */ + const MEDIUM = 2; + /** + * Greater than 80% confidence that the URI is unsafe. + * + * Generated from protobuf enum HIGH = 3; + */ + const HIGH = 3; + + private static $valueToName = [ + self::CONFIDENCE_LEVEL_UNSPECIFIED => 'CONFIDENCE_LEVEL_UNSPECIFIED', + self::LOW => 'LOW', + self::MEDIUM => 'MEDIUM', + self::HIGH => 'HIGH', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConfidenceLevel::class, \Google\Cloud\WebRisk\V1\ThreatInfo_Confidence_ConfidenceLevel::class); + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/ThreatJustification.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/ThreatJustification.php new file mode 100644 index 000000000000..fd68434daffd --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/ThreatJustification.php @@ -0,0 +1,104 @@ +google.cloud.webrisk.v1.ThreatInfo.ThreatJustification + */ +class ThreatJustification extends \Google\Protobuf\Internal\Message +{ + /** + * Labels associated with this URI that explain how it was classified. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1; + */ + private $labels; + /** + * Free-form context on why this URI is unsafe. + * + * Generated from protobuf field repeated string comments = 2; + */ + private $comments; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $labels + * Labels associated with this URI that explain how it was classified. + * @type array|\Google\Protobuf\Internal\RepeatedField $comments + * Free-form context on why this URI is unsafe. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * Labels associated with this URI that explain how it was classified. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels associated with this URI that explain how it was classified. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1\ThreatInfo\ThreatJustification\JustificationLabel::class); + $this->labels = $arr; + + return $this; + } + + /** + * Free-form context on why this URI is unsafe. + * + * Generated from protobuf field repeated string comments = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getComments() + { + return $this->comments; + } + + /** + * Free-form context on why this URI is unsafe. + * + * Generated from protobuf field repeated string comments = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setComments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->comments = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ThreatJustification::class, \Google\Cloud\WebRisk\V1\ThreatInfo_ThreatJustification::class); + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/ThreatJustification/JustificationLabel.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/ThreatJustification/JustificationLabel.php new file mode 100644 index 000000000000..49435a9f74fc --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/ThreatJustification/JustificationLabel.php @@ -0,0 +1,71 @@ +google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel + */ +class JustificationLabel +{ + /** + * Default. + * + * Generated from protobuf enum JUSTIFICATION_LABEL_UNSPECIFIED = 0; + */ + const JUSTIFICATION_LABEL_UNSPECIFIED = 0; + /** + * The submitter manually verified that the submission is unsafe. + * + * Generated from protobuf enum MANUAL_VERIFICATION = 1; + */ + const MANUAL_VERIFICATION = 1; + /** + * The submitter received the submission from an end user. + * + * Generated from protobuf enum USER_REPORT = 2; + */ + const USER_REPORT = 2; + /** + * The submitter received the submission from an automated system. + * + * Generated from protobuf enum AUTOMATED_REPORT = 3; + */ + const AUTOMATED_REPORT = 3; + + private static $valueToName = [ + self::JUSTIFICATION_LABEL_UNSPECIFIED => 'JUSTIFICATION_LABEL_UNSPECIFIED', + self::MANUAL_VERIFICATION => 'MANUAL_VERIFICATION', + self::USER_REPORT => 'USER_REPORT', + self::AUTOMATED_REPORT => 'AUTOMATED_REPORT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(JustificationLabel::class, \Google\Cloud\WebRisk\V1\ThreatInfo_ThreatJustification_JustificationLabel::class); + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatType.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatType.php new file mode 100644 index 000000000000..c9f1876eddb1 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatType.php @@ -0,0 +1,77 @@ +google.cloud.webrisk.v1.ThreatType + */ +class ThreatType +{ + /** + * No entries should match this threat type. This threat type is unused. + * + * Generated from protobuf enum THREAT_TYPE_UNSPECIFIED = 0; + */ + const THREAT_TYPE_UNSPECIFIED = 0; + /** + * Malware targeting any platform. + * + * Generated from protobuf enum MALWARE = 1; + */ + const MALWARE = 1; + /** + * Social engineering targeting any platform. + * + * Generated from protobuf enum SOCIAL_ENGINEERING = 2; + */ + const SOCIAL_ENGINEERING = 2; + /** + * Unwanted software targeting any platform. + * + * Generated from protobuf enum UNWANTED_SOFTWARE = 3; + */ + const UNWANTED_SOFTWARE = 3; + /** + * A list of extended coverage social engineering URIs targeting any + * platform. + * + * Generated from protobuf enum SOCIAL_ENGINEERING_EXTENDED_COVERAGE = 4; + */ + const SOCIAL_ENGINEERING_EXTENDED_COVERAGE = 4; + + private static $valueToName = [ + self::THREAT_TYPE_UNSPECIFIED => 'THREAT_TYPE_UNSPECIFIED', + self::MALWARE => 'MALWARE', + self::SOCIAL_ENGINEERING => 'SOCIAL_ENGINEERING', + self::UNWANTED_SOFTWARE => 'UNWANTED_SOFTWARE', + self::SOCIAL_ENGINEERING_EXTENDED_COVERAGE => 'SOCIAL_ENGINEERING_EXTENDED_COVERAGE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/WebRiskServiceGrpcClient.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/WebRiskServiceGrpcClient.php new file mode 100644 index 000000000000..d6feb9ceb031 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/WebRiskServiceGrpcClient.php @@ -0,0 +1,139 @@ +_simpleRequest('/google.cloud.webrisk.v1.WebRiskService/ComputeThreatListDiff', + $argument, + ['\Google\Cloud\WebRisk\V1\ComputeThreatListDiffResponse', 'decode'], + $metadata, $options); + } + + /** + * This method is used to check whether a URI is on a given threatList. + * Multiple threatLists may be searched in a single query. + * The response will list all requested threatLists the URI was found to + * match. If the URI is not found on any of the requested ThreatList an + * empty response will be returned. + * @param \Google\Cloud\WebRisk\V1\SearchUrisRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SearchUris(\Google\Cloud\WebRisk\V1\SearchUrisRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.webrisk.v1.WebRiskService/SearchUris', + $argument, + ['\Google\Cloud\WebRisk\V1\SearchUrisResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets the full hashes that match the requested hash prefix. + * This is used after a hash prefix is looked up in a threatList + * and there is a match. The client side threatList only holds partial hashes + * so the client must query this method to determine if there is a full + * hash match of a threat. + * @param \Google\Cloud\WebRisk\V1\SearchHashesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SearchHashes(\Google\Cloud\WebRisk\V1\SearchHashesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.webrisk.v1.WebRiskService/SearchHashes', + $argument, + ['\Google\Cloud\WebRisk\V1\SearchHashesResponse', 'decode'], + $metadata, $options); + } + + /** + * Creates a Submission of a URI suspected of containing phishing content to + * be reviewed. If the result verifies the existence of malicious phishing + * content, the site will be added to the [Google's Social Engineering + * lists](https://support.google.com/webmasters/answer/6350487/) in order to + * protect users that could get exposed to this threat in the future. Only + * allowlisted projects can use this method during Early Access. Please reach + * out to Sales or your customer engineer to obtain access. + * @param \Google\Cloud\WebRisk\V1\CreateSubmissionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateSubmission(\Google\Cloud\WebRisk\V1\CreateSubmissionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.webrisk.v1.WebRiskService/CreateSubmission', + $argument, + ['\Google\Cloud\WebRisk\V1\Submission', 'decode'], + $metadata, $options); + } + + /** + * Submits a URI suspected of containing malicious content to be reviewed. + * Returns a google.longrunning.Operation which, once the review is complete, + * is updated with its result. You can use the [Pub/Sub API] + * (https://cloud.google.com/pubsub) to receive notifications for the returned + * Operation. If the result verifies the existence of malicious content, the + * site will be added to the [Google's Social Engineering lists] + * (https://support.google.com/webmasters/answer/6350487/) in order to + * protect users that could get exposed to this threat in the future. Only + * allowlisted projects can use this method during Early Access. Please reach + * out to Sales or your customer engineer to obtain access. + * @param \Google\Cloud\WebRisk\V1\SubmitUriRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SubmitUri(\Google\Cloud\WebRisk\V1\SubmitUriRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.webrisk.v1.WebRiskService/SubmitUri', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/compute_threat_list_diff.php b/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/compute_threat_list_diff.php new file mode 100644 index 000000000000..5914770a57dc --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/compute_threat_list_diff.php @@ -0,0 +1,77 @@ +computeThreatListDiff($threatType, $constraints); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $threatType = ThreatType::THREAT_TYPE_UNSPECIFIED; + + compute_threat_list_diff_sample($threatType); +} +// [END webrisk_v1_generated_WebRiskService_ComputeThreatListDiff_sync] diff --git a/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/create_submission.php b/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/create_submission.php new file mode 100644 index 000000000000..9f887d0776f6 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/create_submission.php @@ -0,0 +1,80 @@ +setUri($submissionUri); + + // Call the API and handle any network failures. + try { + /** @var Submission $response */ + $response = $webRiskServiceClient->createSubmission($formattedParent, $submission); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = WebRiskServiceClient::projectName('[PROJECT]'); + $submissionUri = '[URI]'; + + create_submission_sample($formattedParent, $submissionUri); +} +// [END webrisk_v1_generated_WebRiskService_CreateSubmission_sync] diff --git a/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/search_hashes.php b/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/search_hashes.php new file mode 100644 index 000000000000..b49596c1d2d7 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/search_hashes.php @@ -0,0 +1,74 @@ +searchHashes($threatTypes); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $threatTypesElement = ThreatType::THREAT_TYPE_UNSPECIFIED; + + search_hashes_sample($threatTypesElement); +} +// [END webrisk_v1_generated_WebRiskService_SearchHashes_sync] diff --git a/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/search_uris.php b/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/search_uris.php new file mode 100644 index 000000000000..38adcd35213a --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/search_uris.php @@ -0,0 +1,76 @@ +searchUris($uri, $threatTypes); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $uri = '[URI]'; + $threatTypesElement = ThreatType::THREAT_TYPE_UNSPECIFIED; + + search_uris_sample($uri, $threatTypesElement); +} +// [END webrisk_v1_generated_WebRiskService_SearchUris_sync] diff --git a/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/submit_uri.php b/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/submit_uri.php new file mode 100644 index 000000000000..9ee648a246d8 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/submit_uri.php @@ -0,0 +1,95 @@ +setUri($submissionUri); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $webRiskServiceClient->submitUri($formattedParent, $submission); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Submission $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = WebRiskServiceClient::projectName('[PROJECT]'); + $submissionUri = '[URI]'; + + submit_uri_sample($formattedParent, $submissionUri); +} +// [END webrisk_v1_generated_WebRiskService_SubmitUri_sync] diff --git a/owl-bot-staging/WebRisk/v1/src/V1/Client/BaseClient/WebRiskServiceBaseClient.php b/owl-bot-staging/WebRisk/v1/src/V1/Client/BaseClient/WebRiskServiceBaseClient.php new file mode 100644 index 000000000000..fb5c20769a59 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/src/V1/Client/BaseClient/WebRiskServiceBaseClient.php @@ -0,0 +1,403 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/web_risk_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/web_risk_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/web_risk_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/web_risk_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - project: projects/{project} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'webrisk.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Gets the most recent threat list diffs. These diffs should be applied to + * a local database of hashes to keep it up-to-date. If the local database is + * empty or excessively out-of-date, a complete snapshot of the database will + * be returned. This Method only updates a single ThreatList at a time. To + * update multiple ThreatList databases, this method needs to be called once + * for each list. + * + * The async variant is {@see self::computeThreatListDiffAsync()} . + * + * @param ComputeThreatListDiffRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ComputeThreatListDiffResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function computeThreatListDiff(ComputeThreatListDiffRequest $request, array $callOptions = []): ComputeThreatListDiffResponse + { + return $this->startApiCall('ComputeThreatListDiff', $request, $callOptions)->wait(); + } + + /** + * Creates a Submission of a URI suspected of containing phishing content to + * be reviewed. If the result verifies the existence of malicious phishing + * content, the site will be added to the [Google's Social Engineering + * lists](https://support.google.com/webmasters/answer/6350487/) in order to + * protect users that could get exposed to this threat in the future. Only + * allowlisted projects can use this method during Early Access. Please reach + * out to Sales or your customer engineer to obtain access. + * + * The async variant is {@see self::createSubmissionAsync()} . + * + * @param CreateSubmissionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Submission + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSubmission(CreateSubmissionRequest $request, array $callOptions = []): Submission + { + return $this->startApiCall('CreateSubmission', $request, $callOptions)->wait(); + } + + /** + * Gets the full hashes that match the requested hash prefix. + * This is used after a hash prefix is looked up in a threatList + * and there is a match. The client side threatList only holds partial hashes + * so the client must query this method to determine if there is a full + * hash match of a threat. + * + * The async variant is {@see self::searchHashesAsync()} . + * + * @param SearchHashesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SearchHashesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function searchHashes(SearchHashesRequest $request, array $callOptions = []): SearchHashesResponse + { + return $this->startApiCall('SearchHashes', $request, $callOptions)->wait(); + } + + /** + * This method is used to check whether a URI is on a given threatList. + * Multiple threatLists may be searched in a single query. + * The response will list all requested threatLists the URI was found to + * match. If the URI is not found on any of the requested ThreatList an + * empty response will be returned. + * + * The async variant is {@see self::searchUrisAsync()} . + * + * @param SearchUrisRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SearchUrisResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function searchUris(SearchUrisRequest $request, array $callOptions = []): SearchUrisResponse + { + return $this->startApiCall('SearchUris', $request, $callOptions)->wait(); + } + + /** + * Submits a URI suspected of containing malicious content to be reviewed. + * Returns a google.longrunning.Operation which, once the review is complete, + * is updated with its result. You can use the [Pub/Sub API] + * (https://cloud.google.com/pubsub) to receive notifications for the returned + * Operation. If the result verifies the existence of malicious content, the + * site will be added to the [Google's Social Engineering lists] + * (https://support.google.com/webmasters/answer/6350487/) in order to + * protect users that could get exposed to this threat in the future. Only + * allowlisted projects can use this method during Early Access. Please reach + * out to Sales or your customer engineer to obtain access. + * + * The async variant is {@see self::submitUriAsync()} . + * + * @param SubmitUriRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function submitUri(SubmitUriRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('SubmitUri', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/WebRisk/v1/src/V1/Client/WebRiskServiceClient.php b/owl-bot-staging/WebRisk/v1/src/V1/Client/WebRiskServiceClient.php new file mode 100644 index 000000000000..521b57ce5bc2 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/src/V1/Client/WebRiskServiceClient.php @@ -0,0 +1,40 @@ +computeThreatListDiff($threatType, $constraints); + * } finally { + * $webRiskServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + */ +class WebRiskServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.webrisk.v1.WebRiskService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'webrisk.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $projectNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/web_risk_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/web_risk_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/web_risk_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/web_risk_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getProjectNameTemplate() + { + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$projectNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'project' => self::getProjectNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName($project) + { + return self::getProjectNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - project: projects/{project} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'webrisk.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Gets the most recent threat list diffs. These diffs should be applied to + * a local database of hashes to keep it up-to-date. If the local database is + * empty or excessively out-of-date, a complete snapshot of the database will + * be returned. This Method only updates a single ThreatList at a time. To + * update multiple ThreatList databases, this method needs to be called once + * for each list. + * + * Sample code: + * ``` + * $webRiskServiceClient = new WebRiskServiceClient(); + * try { + * $threatType = ThreatType::THREAT_TYPE_UNSPECIFIED; + * $constraints = new Constraints(); + * $response = $webRiskServiceClient->computeThreatListDiff($threatType, $constraints); + * } finally { + * $webRiskServiceClient->close(); + * } + * ``` + * + * @param int $threatType Required. The threat list to update. Only a single ThreatType should be + * specified per request. If you want to handle multiple ThreatTypes, you must + * make one request per ThreatType. + * For allowed values, use constants defined on {@see \Google\Cloud\WebRisk\V1\ThreatType} + * @param Constraints $constraints Required. The constraints associated with this request. + * @param array $optionalArgs { + * Optional. + * + * @type string $versionToken + * The current version token of the client for the requested list (the + * client version that was received from the last successful diff). + * If the client does not have a version token (this is the first time calling + * ComputeThreatListDiff), this may be left empty and a full database + * snapshot will be returned. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\WebRisk\V1\ComputeThreatListDiffResponse + * + * @throws ApiException if the remote call fails + */ + public function computeThreatListDiff($threatType, $constraints, array $optionalArgs = []) + { + $request = new ComputeThreatListDiffRequest(); + $request->setThreatType($threatType); + $request->setConstraints($constraints); + if (isset($optionalArgs['versionToken'])) { + $request->setVersionToken($optionalArgs['versionToken']); + } + + return $this->startCall('ComputeThreatListDiff', ComputeThreatListDiffResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a Submission of a URI suspected of containing phishing content to + * be reviewed. If the result verifies the existence of malicious phishing + * content, the site will be added to the [Google's Social Engineering + * lists](https://support.google.com/webmasters/answer/6350487/) in order to + * protect users that could get exposed to this threat in the future. Only + * allowlisted projects can use this method during Early Access. Please reach + * out to Sales or your customer engineer to obtain access. + * + * Sample code: + * ``` + * $webRiskServiceClient = new WebRiskServiceClient(); + * try { + * $formattedParent = $webRiskServiceClient->projectName('[PROJECT]'); + * $submission = new Submission(); + * $response = $webRiskServiceClient->createSubmission($formattedParent, $submission); + * } finally { + * $webRiskServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the project that is making the submission. This + * string is in the format "projects/{project_number}". + * @param Submission $submission Required. The submission that contains the content of the phishing report. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\WebRisk\V1\Submission + * + * @throws ApiException if the remote call fails + */ + public function createSubmission($parent, $submission, array $optionalArgs = []) + { + $request = new CreateSubmissionRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setSubmission($submission); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateSubmission', Submission::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the full hashes that match the requested hash prefix. + * This is used after a hash prefix is looked up in a threatList + * and there is a match. The client side threatList only holds partial hashes + * so the client must query this method to determine if there is a full + * hash match of a threat. + * + * Sample code: + * ``` + * $webRiskServiceClient = new WebRiskServiceClient(); + * try { + * $threatTypes = []; + * $response = $webRiskServiceClient->searchHashes($threatTypes); + * } finally { + * $webRiskServiceClient->close(); + * } + * ``` + * + * @param int[] $threatTypes Required. The ThreatLists to search in. Multiple ThreatLists may be + * specified. + * For allowed values, use constants defined on {@see \Google\Cloud\WebRisk\V1\ThreatType} + * @param array $optionalArgs { + * Optional. + * + * @type string $hashPrefix + * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + * hash. For JSON requests, this field is base64-encoded. + * Note that if this parameter is provided by a URI, it must be encoded using + * the web safe base64 variant (RFC 4648). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\WebRisk\V1\SearchHashesResponse + * + * @throws ApiException if the remote call fails + */ + public function searchHashes($threatTypes, array $optionalArgs = []) + { + $request = new SearchHashesRequest(); + $request->setThreatTypes($threatTypes); + if (isset($optionalArgs['hashPrefix'])) { + $request->setHashPrefix($optionalArgs['hashPrefix']); + } + + return $this->startCall('SearchHashes', SearchHashesResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * This method is used to check whether a URI is on a given threatList. + * Multiple threatLists may be searched in a single query. + * The response will list all requested threatLists the URI was found to + * match. If the URI is not found on any of the requested ThreatList an + * empty response will be returned. + * + * Sample code: + * ``` + * $webRiskServiceClient = new WebRiskServiceClient(); + * try { + * $uri = 'uri'; + * $threatTypes = []; + * $response = $webRiskServiceClient->searchUris($uri, $threatTypes); + * } finally { + * $webRiskServiceClient->close(); + * } + * ``` + * + * @param string $uri Required. The URI to be checked for matches. + * @param int[] $threatTypes Required. The ThreatLists to search in. Multiple ThreatLists may be + * specified. + * For allowed values, use constants defined on {@see \Google\Cloud\WebRisk\V1\ThreatType} + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\WebRisk\V1\SearchUrisResponse + * + * @throws ApiException if the remote call fails + */ + public function searchUris($uri, $threatTypes, array $optionalArgs = []) + { + $request = new SearchUrisRequest(); + $request->setUri($uri); + $request->setThreatTypes($threatTypes); + return $this->startCall('SearchUris', SearchUrisResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Submits a URI suspected of containing malicious content to be reviewed. + * Returns a google.longrunning.Operation which, once the review is complete, + * is updated with its result. You can use the [Pub/Sub API] + * (https://cloud.google.com/pubsub) to receive notifications for the returned + * Operation. If the result verifies the existence of malicious content, the + * site will be added to the [Google's Social Engineering lists] + * (https://support.google.com/webmasters/answer/6350487/) in order to + * protect users that could get exposed to this threat in the future. Only + * allowlisted projects can use this method during Early Access. Please reach + * out to Sales or your customer engineer to obtain access. + * + * Sample code: + * ``` + * $webRiskServiceClient = new WebRiskServiceClient(); + * try { + * $formattedParent = $webRiskServiceClient->projectName('[PROJECT]'); + * $submission = new Submission(); + * $operationResponse = $webRiskServiceClient->submitUri($formattedParent, $submission); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $webRiskServiceClient->submitUri($formattedParent, $submission); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $webRiskServiceClient->resumeOperation($operationName, 'submitUri'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $webRiskServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the project that is making the submission. This + * string is in the format "projects/{project_number}". + * @param Submission $submission Required. The submission that contains the URI to be scanned. + * @param array $optionalArgs { + * Optional. + * + * @type ThreatInfo $threatInfo + * Provides additional information about the submission. + * @type ThreatDiscovery $threatDiscovery + * Provides additional information about how the submission was discovered. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function submitUri($parent, $submission, array $optionalArgs = []) + { + $request = new SubmitUriRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setSubmission($submission); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['threatInfo'])) { + $request->setThreatInfo($optionalArgs['threatInfo']); + } + + if (isset($optionalArgs['threatDiscovery'])) { + $request->setThreatDiscovery($optionalArgs['threatDiscovery']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('SubmitUri', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } +} diff --git a/owl-bot-staging/WebRisk/v1/src/V1/WebRiskServiceClient.php b/owl-bot-staging/WebRisk/v1/src/V1/WebRiskServiceClient.php new file mode 100644 index 000000000000..f88354a1f2cc --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/src/V1/WebRiskServiceClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.webrisk.v1.WebRiskService' => [ + 'SubmitUri' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\WebRisk\V1\Submission', + 'metadataReturnType' => '\Google\Cloud\WebRisk\V1\SubmitUriMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ComputeThreatListDiff' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\WebRisk\V1\ComputeThreatListDiffResponse', + ], + 'CreateSubmission' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\WebRisk\V1\Submission', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'SearchHashes' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\WebRisk\V1\SearchHashesResponse', + ], + 'SearchUris' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\WebRisk\V1\SearchUrisResponse', + ], + 'templateMap' => [ + 'project' => 'projects/{project}', + ], + ], + ], +]; diff --git a/owl-bot-staging/WebRisk/v1/src/V1/resources/web_risk_service_rest_client_config.php b/owl-bot-staging/WebRisk/v1/src/V1/resources/web_risk_service_rest_client_config.php new file mode 100644 index 000000000000..ab0a604ffee1 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/src/V1/resources/web_risk_service_rest_client_config.php @@ -0,0 +1,92 @@ + [ + 'google.cloud.webrisk.v1.WebRiskService' => [ + 'ComputeThreatListDiff' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/threatLists:computeDiff', + ], + 'CreateSubmission' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/submissions', + 'body' => 'submission', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SearchHashes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/hashes:search', + ], + 'SearchUris' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/uris:search', + ], + 'SubmitUri' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/uris:submit', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/WebRisk/v1/tests/Unit/V1/Client/WebRiskServiceClientTest.php b/owl-bot-staging/WebRisk/v1/tests/Unit/V1/Client/WebRiskServiceClientTest.php new file mode 100644 index 000000000000..e722ac66e5b0 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/tests/Unit/V1/Client/WebRiskServiceClientTest.php @@ -0,0 +1,515 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return WebRiskServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new WebRiskServiceClient($options); + } + + /** @test */ + public function computeThreatListDiffTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $newVersionToken = '115'; + $expectedResponse = new ComputeThreatListDiffResponse(); + $expectedResponse->setNewVersionToken($newVersionToken); + $transport->addResponse($expectedResponse); + // Mock request + $threatType = ThreatType::THREAT_TYPE_UNSPECIFIED; + $constraints = new Constraints(); + $request = (new ComputeThreatListDiffRequest()) + ->setThreatType($threatType) + ->setConstraints($constraints); + $response = $gapicClient->computeThreatListDiff($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.webrisk.v1.WebRiskService/ComputeThreatListDiff', $actualFuncCall); + $actualValue = $actualRequestObject->getThreatType(); + $this->assertProtobufEquals($threatType, $actualValue); + $actualValue = $actualRequestObject->getConstraints(); + $this->assertProtobufEquals($constraints, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function computeThreatListDiffExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $threatType = ThreatType::THREAT_TYPE_UNSPECIFIED; + $constraints = new Constraints(); + $request = (new ComputeThreatListDiffRequest()) + ->setThreatType($threatType) + ->setConstraints($constraints); + try { + $gapicClient->computeThreatListDiff($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSubmissionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $uri = 'uri116076'; + $expectedResponse = new Submission(); + $expectedResponse->setUri($uri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $submission = new Submission(); + $submissionUri = 'submissionUri-1560297856'; + $submission->setUri($submissionUri); + $request = (new CreateSubmissionRequest()) + ->setParent($formattedParent) + ->setSubmission($submission); + $response = $gapicClient->createSubmission($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.webrisk.v1.WebRiskService/CreateSubmission', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSubmission(); + $this->assertProtobufEquals($submission, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSubmissionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $submission = new Submission(); + $submissionUri = 'submissionUri-1560297856'; + $submission->setUri($submissionUri); + $request = (new CreateSubmissionRequest()) + ->setParent($formattedParent) + ->setSubmission($submission); + try { + $gapicClient->createSubmission($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchHashesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new SearchHashesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $threatTypes = []; + $request = (new SearchHashesRequest()) + ->setThreatTypes($threatTypes); + $response = $gapicClient->searchHashes($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.webrisk.v1.WebRiskService/SearchHashes', $actualFuncCall); + $actualValue = $actualRequestObject->getThreatTypes(); + $this->assertProtobufEquals($threatTypes, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchHashesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $threatTypes = []; + $request = (new SearchHashesRequest()) + ->setThreatTypes($threatTypes); + try { + $gapicClient->searchHashes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchUrisTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new SearchUrisResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $uri = 'uri116076'; + $threatTypes = []; + $request = (new SearchUrisRequest()) + ->setUri($uri) + ->setThreatTypes($threatTypes); + $response = $gapicClient->searchUris($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.webrisk.v1.WebRiskService/SearchUris', $actualFuncCall); + $actualValue = $actualRequestObject->getUri(); + $this->assertProtobufEquals($uri, $actualValue); + $actualValue = $actualRequestObject->getThreatTypes(); + $this->assertProtobufEquals($threatTypes, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchUrisExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $uri = 'uri116076'; + $threatTypes = []; + $request = (new SearchUrisRequest()) + ->setUri($uri) + ->setThreatTypes($threatTypes); + try { + $gapicClient->searchUris($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function submitUriTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/submitUriTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $uri = 'uri116076'; + $expectedResponse = new Submission(); + $expectedResponse->setUri($uri); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/submitUriTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $submission = new Submission(); + $submissionUri = 'submissionUri-1560297856'; + $submission->setUri($submissionUri); + $request = (new SubmitUriRequest()) + ->setParent($formattedParent) + ->setSubmission($submission); + $response = $gapicClient->submitUri($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.webrisk.v1.WebRiskService/SubmitUri', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSubmission(); + $this->assertProtobufEquals($submission, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/submitUriTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function submitUriExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/submitUriTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $submission = new Submission(); + $submissionUri = 'submissionUri-1560297856'; + $submission->setUri($submissionUri); + $request = (new SubmitUriRequest()) + ->setParent($formattedParent) + ->setSubmission($submission); + $response = $gapicClient->submitUri($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/submitUriTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function computeThreatListDiffAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $newVersionToken = '115'; + $expectedResponse = new ComputeThreatListDiffResponse(); + $expectedResponse->setNewVersionToken($newVersionToken); + $transport->addResponse($expectedResponse); + // Mock request + $threatType = ThreatType::THREAT_TYPE_UNSPECIFIED; + $constraints = new Constraints(); + $request = (new ComputeThreatListDiffRequest()) + ->setThreatType($threatType) + ->setConstraints($constraints); + $response = $gapicClient->computeThreatListDiffAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.webrisk.v1.WebRiskService/ComputeThreatListDiff', $actualFuncCall); + $actualValue = $actualRequestObject->getThreatType(); + $this->assertProtobufEquals($threatType, $actualValue); + $actualValue = $actualRequestObject->getConstraints(); + $this->assertProtobufEquals($constraints, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/WebRisk/v1/tests/Unit/V1/WebRiskServiceClientTest.php b/owl-bot-staging/WebRisk/v1/tests/Unit/V1/WebRiskServiceClientTest.php new file mode 100644 index 000000000000..a03e7e8655d3 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1/tests/Unit/V1/WebRiskServiceClientTest.php @@ -0,0 +1,449 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return WebRiskServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new WebRiskServiceClient($options); + } + + /** @test */ + public function computeThreatListDiffTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $newVersionToken = '115'; + $expectedResponse = new ComputeThreatListDiffResponse(); + $expectedResponse->setNewVersionToken($newVersionToken); + $transport->addResponse($expectedResponse); + // Mock request + $threatType = ThreatType::THREAT_TYPE_UNSPECIFIED; + $constraints = new Constraints(); + $response = $gapicClient->computeThreatListDiff($threatType, $constraints); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.webrisk.v1.WebRiskService/ComputeThreatListDiff', $actualFuncCall); + $actualValue = $actualRequestObject->getThreatType(); + $this->assertProtobufEquals($threatType, $actualValue); + $actualValue = $actualRequestObject->getConstraints(); + $this->assertProtobufEquals($constraints, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function computeThreatListDiffExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $threatType = ThreatType::THREAT_TYPE_UNSPECIFIED; + $constraints = new Constraints(); + try { + $gapicClient->computeThreatListDiff($threatType, $constraints); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSubmissionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $uri = 'uri116076'; + $expectedResponse = new Submission(); + $expectedResponse->setUri($uri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $submission = new Submission(); + $submissionUri = 'submissionUri-1560297856'; + $submission->setUri($submissionUri); + $response = $gapicClient->createSubmission($formattedParent, $submission); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.webrisk.v1.WebRiskService/CreateSubmission', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSubmission(); + $this->assertProtobufEquals($submission, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSubmissionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $submission = new Submission(); + $submissionUri = 'submissionUri-1560297856'; + $submission->setUri($submissionUri); + try { + $gapicClient->createSubmission($formattedParent, $submission); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchHashesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new SearchHashesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $threatTypes = []; + $response = $gapicClient->searchHashes($threatTypes); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.webrisk.v1.WebRiskService/SearchHashes', $actualFuncCall); + $actualValue = $actualRequestObject->getThreatTypes(); + $this->assertProtobufEquals($threatTypes, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchHashesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $threatTypes = []; + try { + $gapicClient->searchHashes($threatTypes); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchUrisTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new SearchUrisResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $uri = 'uri116076'; + $threatTypes = []; + $response = $gapicClient->searchUris($uri, $threatTypes); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.webrisk.v1.WebRiskService/SearchUris', $actualFuncCall); + $actualValue = $actualRequestObject->getUri(); + $this->assertProtobufEquals($uri, $actualValue); + $actualValue = $actualRequestObject->getThreatTypes(); + $this->assertProtobufEquals($threatTypes, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchUrisExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $uri = 'uri116076'; + $threatTypes = []; + try { + $gapicClient->searchUris($uri, $threatTypes); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function submitUriTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/submitUriTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $uri = 'uri116076'; + $expectedResponse = new Submission(); + $expectedResponse->setUri($uri); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/submitUriTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $submission = new Submission(); + $submissionUri = 'submissionUri-1560297856'; + $submission->setUri($submissionUri); + $response = $gapicClient->submitUri($formattedParent, $submission); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.webrisk.v1.WebRiskService/SubmitUri', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSubmission(); + $this->assertProtobufEquals($submission, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/submitUriTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function submitUriExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/submitUriTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $submission = new Submission(); + $submissionUri = 'submissionUri-1560297856'; + $submission->setUri($submissionUri); + $response = $gapicClient->submitUri($formattedParent, $submission); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/submitUriTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/GPBMetadata/Google/Cloud/Webrisk/V1Beta1/Webrisk.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/GPBMetadata/Google/Cloud/Webrisk/V1Beta1/Webrisk.php new file mode 100644 index 0000000000000000000000000000000000000000..c9943a041180704684c2d2dad6e181ff4e99bfd2 GIT binary patch literal 4188 zcmb_f&u<$=6vj^6B+qV}Ow-ggt-6?^rd7M9;fLsk6gl=Lb=5eQ<2C|WTGs1vywu)Z zcE?Er^um=RTmT6njvNqwM}>q0w;m8eoH+6q@MdP$ani(2fn4I*W4a&@$(X%RG0UWbS1JAUmvRYYQ!xc@Fne|nH zP%m(V`ldvvKe)Nf5f%Zgju`|>_#Qq61^>KWqhni2z)Xh!F57`&J2tb;j{OnFvZS=k zPC(K2*|n{nV=>!x6mGEYSaklXA~E^e%bts|FDa2v6;20IQ7<`+`i|MD7inPmw#Qt* zf=e}Ri?Tk6{LTE;a9a*%x0HG5qozIM z-f>*cg6jmDwinYL#8HNYj!hl*d^RgK?KGEZ+uXKY|M;eT7Hc-1KQp`D;kJVP8@KI{ z>wL4>r*;LCaK29lr{)U$l!0r<&pvWNu2n^*s$r(8VWwuzg-E7nV=i-QWYT6X4SZD$Lz<~uK$1zuOEQ(St$o?IN3kAGKJw|J7pPKBR9k8O^YE|inJ>-KdLz0OP2HW*$ zI;O(qs5C zxv(-EdYG?jVGm7gocSUK$$^(74bxrokkP9#?zTlm2m;vp7<(?+U z8q5Vf&vSiLBZJG1PXitfcX|x@xG~!4(1Mea{c0R89uY|3Au1&XoJ0fhTk<|Gc)v4x zpF<8(;;7XSkh?&1m@=D9lqDWSLNLED99$l%j;!rs@=HrnfJvWr-EEY#^a+7-^VlfW z(2$&m8Her|`%`2B(Ng3AOj>PfJq&u?^rXNq4#yu#t6B)L$SpYQQ#{Bnb((mj4t>N# zR*1|@E@YxjqI;wE)ghCC$v(^}I1#kXg*V<5S(M5yLuwz(7vX$W->9sYH*}-+Zbdil zmp3YUp|n!ci_jX7;xjkipHu?7IsmB(~Tvxu8XK94b%hvk0LAU<8>@U`l2VK9Ji7 zoQ^%8(m_eKN={y6;Hoh?M9=GgA^6)U1{|82Yh{Npu z9YapbFd;eRiZg~nw{#p*Be%mVEScml$y+e%&@C*k+bCAg!%60|7{CC~e?5~FjB_qS zO+Ro#QqzZAr|g$8n3difkQQuJd~?U(*g~Z_XZ0(?NvoPWk}*<*q;Fd^GUqa$T*!^E zMuQ^lFjIFdw`n_D*{@@8X27|=Vl5#$`er*#G?67FIqL4AZzZ`N#Wy9Ki|qfUcNYN$ zKu^O&gvS#sk$oMe_V~bzm&tAf*oKOXPY|+?Vo{W{4`HTykOzX+E!z*6fkNMt)?;K2 zPKhWy)5q2sTTqb#3BH)u)?F-=J%@?1o*=W3qMTI}Ti#cvc|A*AqfsV`n)D)^tKF&U z`PyMxnS_b8{JqV5RY$p;L)ls{l=Alsy}Vi~>w2|RUY+KR#?1ZlX1-k0i^j(KN=+;u zyS4(Sd0iMN!9>BfXML@LqPtOAFCVty1dLVlo46UObhT8_r{fFXB;YLe`c<4FHmJXi zG=-A@`6C8r4=p`pgmxZk6smq^ad^HSVJo#FTlw_YKR=IWiP9fr9GU7Jvt&GBXb$B>~24M_25yKpr?Z<#sFwg=~AD`x@ z@#*@2?*aKS1}TXX>cEJ0WN>Zd=7>IMze(umE#YXI%=I0Wy480z&7Z@1v(M$s-6#3E zsNt7gHMaSIiU;&dUTrhx1zIk*v$GSD7k$i`J=T_!?G3MEvX<+2mw%2y1`Q*gBiL|` zSWbn>D`uWb>^)7^^Qf11ySXhl8jEwd(Sb?XYb=I{UgNv?_-bLZ`hEPus+f>fF(Iqr z25NXOoW37}~LLDRw&nij5ToDfaeYghUc)^$0Y4$QJg P&aq;poHrlCV}O4E;tpp} literal 0 HcmV?d00001 diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/CompressionType.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/CompressionType.php new file mode 100644 index 000000000000..82669697ca7e --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/CompressionType.php @@ -0,0 +1,61 @@ +google.cloud.webrisk.v1beta1.CompressionType + */ +class CompressionType +{ + /** + * Unknown. + * + * Generated from protobuf enum COMPRESSION_TYPE_UNSPECIFIED = 0; + */ + const COMPRESSION_TYPE_UNSPECIFIED = 0; + /** + * Raw, uncompressed data. + * + * Generated from protobuf enum RAW = 1; + */ + const RAW = 1; + /** + * Rice-Golomb encoded data. + * + * Generated from protobuf enum RICE = 2; + */ + const RICE = 2; + + private static $valueToName = [ + self::COMPRESSION_TYPE_UNSPECIFIED => 'COMPRESSION_TYPE_UNSPECIFIED', + self::RAW => 'RAW', + self::RICE => 'RICE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffRequest.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffRequest.php new file mode 100644 index 000000000000..def2b840744c --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffRequest.php @@ -0,0 +1,149 @@ +google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest + */ +class ComputeThreatListDiffRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The ThreatList to update. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.ThreatType threat_type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $threat_type = 0; + /** + * The current version token of the client for the requested list (the + * client version that was received from the last successful diff). + * + * Generated from protobuf field bytes version_token = 2; + */ + protected $version_token = ''; + /** + * Required. The constraints associated with this request. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $constraints = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $threat_type + * The ThreatList to update. + * @type string $version_token + * The current version token of the client for the requested list (the + * client version that was received from the last successful diff). + * @type \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffRequest\Constraints $constraints + * Required. The constraints associated with this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The ThreatList to update. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.ThreatType threat_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getThreatType() + { + return $this->threat_type; + } + + /** + * The ThreatList to update. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.ThreatType threat_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setThreatType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebRisk\V1beta1\ThreatType::class); + $this->threat_type = $var; + + return $this; + } + + /** + * The current version token of the client for the requested list (the + * client version that was received from the last successful diff). + * + * Generated from protobuf field bytes version_token = 2; + * @return string + */ + public function getVersionToken() + { + return $this->version_token; + } + + /** + * The current version token of the client for the requested list (the + * client version that was received from the last successful diff). + * + * Generated from protobuf field bytes version_token = 2; + * @param string $var + * @return $this + */ + public function setVersionToken($var) + { + GPBUtil::checkString($var, False); + $this->version_token = $var; + + return $this; + } + + /** + * Required. The constraints associated with this request. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffRequest\Constraints|null + */ + public function getConstraints() + { + return $this->constraints; + } + + public function hasConstraints() + { + return isset($this->constraints); + } + + public function clearConstraints() + { + unset($this->constraints); + } + + /** + * Required. The constraints associated with this request. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffRequest\Constraints $var + * @return $this + */ + public function setConstraints($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffRequest\Constraints::class); + $this->constraints = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffRequest/Constraints.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffRequest/Constraints.php new file mode 100644 index 000000000000..87f9116eea35 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffRequest/Constraints.php @@ -0,0 +1,154 @@ +google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints + */ +class Constraints extends \Google\Protobuf\Internal\Message +{ + /** + * The maximum size in number of entries. The diff will not contain more + * entries than this value. This should be a power of 2 between 2**10 and + * 2**20. If zero, no diff size limit is set. + * + * Generated from protobuf field int32 max_diff_entries = 1; + */ + protected $max_diff_entries = 0; + /** + * Sets the maximum number of entries that the client is willing to have + * in the local database. This should be a power of 2 between 2**10 and + * 2**20. If zero, no database size limit is set. + * + * Generated from protobuf field int32 max_database_entries = 2; + */ + protected $max_database_entries = 0; + /** + * The compression types supported by the client. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3; + */ + private $supported_compressions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $max_diff_entries + * The maximum size in number of entries. The diff will not contain more + * entries than this value. This should be a power of 2 between 2**10 and + * 2**20. If zero, no diff size limit is set. + * @type int $max_database_entries + * Sets the maximum number of entries that the client is willing to have + * in the local database. This should be a power of 2 between 2**10 and + * 2**20. If zero, no database size limit is set. + * @type array|\Google\Protobuf\Internal\RepeatedField $supported_compressions + * The compression types supported by the client. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The maximum size in number of entries. The diff will not contain more + * entries than this value. This should be a power of 2 between 2**10 and + * 2**20. If zero, no diff size limit is set. + * + * Generated from protobuf field int32 max_diff_entries = 1; + * @return int + */ + public function getMaxDiffEntries() + { + return $this->max_diff_entries; + } + + /** + * The maximum size in number of entries. The diff will not contain more + * entries than this value. This should be a power of 2 between 2**10 and + * 2**20. If zero, no diff size limit is set. + * + * Generated from protobuf field int32 max_diff_entries = 1; + * @param int $var + * @return $this + */ + public function setMaxDiffEntries($var) + { + GPBUtil::checkInt32($var); + $this->max_diff_entries = $var; + + return $this; + } + + /** + * Sets the maximum number of entries that the client is willing to have + * in the local database. This should be a power of 2 between 2**10 and + * 2**20. If zero, no database size limit is set. + * + * Generated from protobuf field int32 max_database_entries = 2; + * @return int + */ + public function getMaxDatabaseEntries() + { + return $this->max_database_entries; + } + + /** + * Sets the maximum number of entries that the client is willing to have + * in the local database. This should be a power of 2 between 2**10 and + * 2**20. If zero, no database size limit is set. + * + * Generated from protobuf field int32 max_database_entries = 2; + * @param int $var + * @return $this + */ + public function setMaxDatabaseEntries($var) + { + GPBUtil::checkInt32($var); + $this->max_database_entries = $var; + + return $this; + } + + /** + * The compression types supported by the client. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSupportedCompressions() + { + return $this->supported_compressions; + } + + /** + * The compression types supported by the client. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSupportedCompressions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1beta1\CompressionType::class); + $this->supported_compressions = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Constraints::class, \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffRequest_Constraints::class); + diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse.php new file mode 100644 index 000000000000..b713743b9439 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse.php @@ -0,0 +1,307 @@ +google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse + */ +class ComputeThreatListDiffResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The type of response. This may indicate that an action must be taken by the + * client when the response is received. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType response_type = 4; + */ + protected $response_type = 0; + /** + * A set of entries to add to a local threat type's list. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.ThreatEntryAdditions additions = 5; + */ + protected $additions = null; + /** + * A set of entries to remove from a local threat type's list. + * This field may be empty. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.ThreatEntryRemovals removals = 6; + */ + protected $removals = null; + /** + * The new opaque client version token. + * + * Generated from protobuf field bytes new_version_token = 7; + */ + protected $new_version_token = ''; + /** + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * disregard this diff and retry later. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum = 8; + */ + protected $checksum = null; + /** + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + * + * Generated from protobuf field .google.protobuf.Timestamp recommended_next_diff = 2; + */ + protected $recommended_next_diff = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $response_type + * The type of response. This may indicate that an action must be taken by the + * client when the response is received. + * @type \Google\Cloud\WebRisk\V1beta1\ThreatEntryAdditions $additions + * A set of entries to add to a local threat type's list. + * @type \Google\Cloud\WebRisk\V1beta1\ThreatEntryRemovals $removals + * A set of entries to remove from a local threat type's list. + * This field may be empty. + * @type string $new_version_token + * The new opaque client version token. + * @type \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffResponse\Checksum $checksum + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * disregard this diff and retry later. + * @type \Google\Protobuf\Timestamp $recommended_next_diff + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The type of response. This may indicate that an action must be taken by the + * client when the response is received. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType response_type = 4; + * @return int + */ + public function getResponseType() + { + return $this->response_type; + } + + /** + * The type of response. This may indicate that an action must be taken by the + * client when the response is received. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType response_type = 4; + * @param int $var + * @return $this + */ + public function setResponseType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffResponse\ResponseType::class); + $this->response_type = $var; + + return $this; + } + + /** + * A set of entries to add to a local threat type's list. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.ThreatEntryAdditions additions = 5; + * @return \Google\Cloud\WebRisk\V1beta1\ThreatEntryAdditions|null + */ + public function getAdditions() + { + return $this->additions; + } + + public function hasAdditions() + { + return isset($this->additions); + } + + public function clearAdditions() + { + unset($this->additions); + } + + /** + * A set of entries to add to a local threat type's list. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.ThreatEntryAdditions additions = 5; + * @param \Google\Cloud\WebRisk\V1beta1\ThreatEntryAdditions $var + * @return $this + */ + public function setAdditions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\ThreatEntryAdditions::class); + $this->additions = $var; + + return $this; + } + + /** + * A set of entries to remove from a local threat type's list. + * This field may be empty. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.ThreatEntryRemovals removals = 6; + * @return \Google\Cloud\WebRisk\V1beta1\ThreatEntryRemovals|null + */ + public function getRemovals() + { + return $this->removals; + } + + public function hasRemovals() + { + return isset($this->removals); + } + + public function clearRemovals() + { + unset($this->removals); + } + + /** + * A set of entries to remove from a local threat type's list. + * This field may be empty. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.ThreatEntryRemovals removals = 6; + * @param \Google\Cloud\WebRisk\V1beta1\ThreatEntryRemovals $var + * @return $this + */ + public function setRemovals($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\ThreatEntryRemovals::class); + $this->removals = $var; + + return $this; + } + + /** + * The new opaque client version token. + * + * Generated from protobuf field bytes new_version_token = 7; + * @return string + */ + public function getNewVersionToken() + { + return $this->new_version_token; + } + + /** + * The new opaque client version token. + * + * Generated from protobuf field bytes new_version_token = 7; + * @param string $var + * @return $this + */ + public function setNewVersionToken($var) + { + GPBUtil::checkString($var, False); + $this->new_version_token = $var; + + return $this; + } + + /** + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * disregard this diff and retry later. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum = 8; + * @return \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffResponse\Checksum|null + */ + public function getChecksum() + { + return $this->checksum; + } + + public function hasChecksum() + { + return isset($this->checksum); + } + + public function clearChecksum() + { + unset($this->checksum); + } + + /** + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * disregard this diff and retry later. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum = 8; + * @param \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffResponse\Checksum $var + * @return $this + */ + public function setChecksum($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffResponse\Checksum::class); + $this->checksum = $var; + + return $this; + } + + /** + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + * + * Generated from protobuf field .google.protobuf.Timestamp recommended_next_diff = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRecommendedNextDiff() + { + return $this->recommended_next_diff; + } + + public function hasRecommendedNextDiff() + { + return isset($this->recommended_next_diff); + } + + public function clearRecommendedNextDiff() + { + unset($this->recommended_next_diff); + } + + /** + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + * + * Generated from protobuf field .google.protobuf.Timestamp recommended_next_diff = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRecommendedNextDiff($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->recommended_next_diff = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse/Checksum.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse/Checksum.php new file mode 100644 index 000000000000..f9c2d57899a7 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse/Checksum.php @@ -0,0 +1,74 @@ +google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum + */ +class Checksum extends \Google\Protobuf\Internal\Message +{ + /** + * The SHA256 hash of the client state; that is, of the sorted list of all + * hashes present in the database. + * + * Generated from protobuf field bytes sha256 = 1; + */ + protected $sha256 = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $sha256 + * The SHA256 hash of the client state; that is, of the sorted list of all + * hashes present in the database. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The SHA256 hash of the client state; that is, of the sorted list of all + * hashes present in the database. + * + * Generated from protobuf field bytes sha256 = 1; + * @return string + */ + public function getSha256() + { + return $this->sha256; + } + + /** + * The SHA256 hash of the client state; that is, of the sorted list of all + * hashes present in the database. + * + * Generated from protobuf field bytes sha256 = 1; + * @param string $var + * @return $this + */ + public function setSha256($var) + { + GPBUtil::checkString($var, False); + $this->sha256 = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Checksum::class, \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffResponse_Checksum::class); + diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse/ResponseType.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse/ResponseType.php new file mode 100644 index 000000000000..a6a5478ca08e --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse/ResponseType.php @@ -0,0 +1,66 @@ +google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType + */ +class ResponseType +{ + /** + * Unknown. + * + * Generated from protobuf enum RESPONSE_TYPE_UNSPECIFIED = 0; + */ + const RESPONSE_TYPE_UNSPECIFIED = 0; + /** + * Partial updates are applied to the client's existing local database. + * + * Generated from protobuf enum DIFF = 1; + */ + const DIFF = 1; + /** + * Full updates resets the client's entire local database. This means + * that either the client had no state, was seriously out-of-date, + * or the client is believed to be corrupt. + * + * Generated from protobuf enum RESET = 2; + */ + const RESET = 2; + + private static $valueToName = [ + self::RESPONSE_TYPE_UNSPECIFIED => 'RESPONSE_TYPE_UNSPECIFIED', + self::DIFF => 'DIFF', + self::RESET => 'RESET', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ResponseType::class, \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffResponse_ResponseType::class); + diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RawHashes.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RawHashes.php new file mode 100644 index 000000000000..da27e509ba21 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RawHashes.php @@ -0,0 +1,119 @@ +google.cloud.webrisk.v1beta1.RawHashes + */ +class RawHashes extends \Google\Protobuf\Internal\Message +{ + /** + * The number of bytes for each prefix encoded below. This field can be + * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). + * + * Generated from protobuf field int32 prefix_size = 1; + */ + protected $prefix_size = 0; + /** + * The hashes, in binary format, concatenated into one long string. Hashes are + * sorted in lexicographic order. For JSON API users, hashes are + * base64-encoded. + * + * Generated from protobuf field bytes raw_hashes = 2; + */ + protected $raw_hashes = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $prefix_size + * The number of bytes for each prefix encoded below. This field can be + * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). + * @type string $raw_hashes + * The hashes, in binary format, concatenated into one long string. Hashes are + * sorted in lexicographic order. For JSON API users, hashes are + * base64-encoded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The number of bytes for each prefix encoded below. This field can be + * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). + * + * Generated from protobuf field int32 prefix_size = 1; + * @return int + */ + public function getPrefixSize() + { + return $this->prefix_size; + } + + /** + * The number of bytes for each prefix encoded below. This field can be + * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). + * + * Generated from protobuf field int32 prefix_size = 1; + * @param int $var + * @return $this + */ + public function setPrefixSize($var) + { + GPBUtil::checkInt32($var); + $this->prefix_size = $var; + + return $this; + } + + /** + * The hashes, in binary format, concatenated into one long string. Hashes are + * sorted in lexicographic order. For JSON API users, hashes are + * base64-encoded. + * + * Generated from protobuf field bytes raw_hashes = 2; + * @return string + */ + public function getRawHashes() + { + return $this->raw_hashes; + } + + /** + * The hashes, in binary format, concatenated into one long string. Hashes are + * sorted in lexicographic order. For JSON API users, hashes are + * base64-encoded. + * + * Generated from protobuf field bytes raw_hashes = 2; + * @param string $var + * @return $this + */ + public function setRawHashes($var) + { + GPBUtil::checkString($var, False); + $this->raw_hashes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RawIndices.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RawIndices.php new file mode 100644 index 000000000000..c88490960635 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RawIndices.php @@ -0,0 +1,67 @@ +google.cloud.webrisk.v1beta1.RawIndices + */ +class RawIndices extends \Google\Protobuf\Internal\Message +{ + /** + * The indices to remove from a lexicographically-sorted local list. + * + * Generated from protobuf field repeated int32 indices = 1; + */ + private $indices; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $indices + * The indices to remove from a lexicographically-sorted local list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The indices to remove from a lexicographically-sorted local list. + * + * Generated from protobuf field repeated int32 indices = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIndices() + { + return $this->indices; + } + + /** + * The indices to remove from a lexicographically-sorted local list. + * + * Generated from protobuf field repeated int32 indices = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIndices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->indices = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RiceDeltaEncoding.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RiceDeltaEncoding.php new file mode 100644 index 000000000000..427116c0bc30 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RiceDeltaEncoding.php @@ -0,0 +1,190 @@ +google.cloud.webrisk.v1beta1.RiceDeltaEncoding + */ +class RiceDeltaEncoding extends \Google\Protobuf\Internal\Message +{ + /** + * The offset of the first entry in the encoded data, or, if only a single + * integer was encoded, that single integer's value. If the field is empty or + * missing, assume zero. + * + * Generated from protobuf field int64 first_value = 1; + */ + protected $first_value = 0; + /** + * The Golomb-Rice parameter, which is a number between 2 and 28. This field + * is missing (that is, zero) if `num_entries` is zero. + * + * Generated from protobuf field int32 rice_parameter = 2; + */ + protected $rice_parameter = 0; + /** + * The number of entries that are delta encoded in the encoded data. If only a + * single integer was encoded, this will be zero and the single value will be + * stored in `first_value`. + * + * Generated from protobuf field int32 entry_count = 3; + */ + protected $entry_count = 0; + /** + * The encoded deltas that are encoded using the Golomb-Rice coder. + * + * Generated from protobuf field bytes encoded_data = 4; + */ + protected $encoded_data = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $first_value + * The offset of the first entry in the encoded data, or, if only a single + * integer was encoded, that single integer's value. If the field is empty or + * missing, assume zero. + * @type int $rice_parameter + * The Golomb-Rice parameter, which is a number between 2 and 28. This field + * is missing (that is, zero) if `num_entries` is zero. + * @type int $entry_count + * The number of entries that are delta encoded in the encoded data. If only a + * single integer was encoded, this will be zero and the single value will be + * stored in `first_value`. + * @type string $encoded_data + * The encoded deltas that are encoded using the Golomb-Rice coder. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The offset of the first entry in the encoded data, or, if only a single + * integer was encoded, that single integer's value. If the field is empty or + * missing, assume zero. + * + * Generated from protobuf field int64 first_value = 1; + * @return int|string + */ + public function getFirstValue() + { + return $this->first_value; + } + + /** + * The offset of the first entry in the encoded data, or, if only a single + * integer was encoded, that single integer's value. If the field is empty or + * missing, assume zero. + * + * Generated from protobuf field int64 first_value = 1; + * @param int|string $var + * @return $this + */ + public function setFirstValue($var) + { + GPBUtil::checkInt64($var); + $this->first_value = $var; + + return $this; + } + + /** + * The Golomb-Rice parameter, which is a number between 2 and 28. This field + * is missing (that is, zero) if `num_entries` is zero. + * + * Generated from protobuf field int32 rice_parameter = 2; + * @return int + */ + public function getRiceParameter() + { + return $this->rice_parameter; + } + + /** + * The Golomb-Rice parameter, which is a number between 2 and 28. This field + * is missing (that is, zero) if `num_entries` is zero. + * + * Generated from protobuf field int32 rice_parameter = 2; + * @param int $var + * @return $this + */ + public function setRiceParameter($var) + { + GPBUtil::checkInt32($var); + $this->rice_parameter = $var; + + return $this; + } + + /** + * The number of entries that are delta encoded in the encoded data. If only a + * single integer was encoded, this will be zero and the single value will be + * stored in `first_value`. + * + * Generated from protobuf field int32 entry_count = 3; + * @return int + */ + public function getEntryCount() + { + return $this->entry_count; + } + + /** + * The number of entries that are delta encoded in the encoded data. If only a + * single integer was encoded, this will be zero and the single value will be + * stored in `first_value`. + * + * Generated from protobuf field int32 entry_count = 3; + * @param int $var + * @return $this + */ + public function setEntryCount($var) + { + GPBUtil::checkInt32($var); + $this->entry_count = $var; + + return $this; + } + + /** + * The encoded deltas that are encoded using the Golomb-Rice coder. + * + * Generated from protobuf field bytes encoded_data = 4; + * @return string + */ + public function getEncodedData() + { + return $this->encoded_data; + } + + /** + * The encoded deltas that are encoded using the Golomb-Rice coder. + * + * Generated from protobuf field bytes encoded_data = 4; + * @param string $var + * @return $this + */ + public function setEncodedData($var) + { + GPBUtil::checkString($var, False); + $this->encoded_data = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesRequest.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesRequest.php new file mode 100644 index 000000000000..2b6b5be4b9e7 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesRequest.php @@ -0,0 +1,105 @@ +google.cloud.webrisk.v1beta1.SearchHashesRequest + */ +class SearchHashesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + * hash. For JSON requests, this field is base64-encoded. + * + * Generated from protobuf field bytes hash_prefix = 1; + */ + protected $hash_prefix = ''; + /** + * Required. The ThreatLists to search in. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $threat_types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $hash_prefix + * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + * hash. For JSON requests, this field is base64-encoded. + * @type array|\Google\Protobuf\Internal\RepeatedField $threat_types + * Required. The ThreatLists to search in. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + * hash. For JSON requests, this field is base64-encoded. + * + * Generated from protobuf field bytes hash_prefix = 1; + * @return string + */ + public function getHashPrefix() + { + return $this->hash_prefix; + } + + /** + * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + * hash. For JSON requests, this field is base64-encoded. + * + * Generated from protobuf field bytes hash_prefix = 1; + * @param string $var + * @return $this + */ + public function setHashPrefix($var) + { + GPBUtil::checkString($var, False); + $this->hash_prefix = $var; + + return $this; + } + + /** + * Required. The ThreatLists to search in. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getThreatTypes() + { + return $this->threat_types; + } + + /** + * Required. The ThreatLists to search in. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setThreatTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1beta1\ThreatType::class); + $this->threat_types = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesResponse.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesResponse.php new file mode 100644 index 000000000000..ed4e0619c77e --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesResponse.php @@ -0,0 +1,117 @@ +google.cloud.webrisk.v1beta1.SearchHashesResponse + */ +class SearchHashesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1; + */ + private $threats; + /** + * For requested entities that did not match the threat list, how long to + * cache the response until. + * + * Generated from protobuf field .google.protobuf.Timestamp negative_expire_time = 2; + */ + protected $negative_expire_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\WebRisk\V1beta1\SearchHashesResponse\ThreatHash>|\Google\Protobuf\Internal\RepeatedField $threats + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + * @type \Google\Protobuf\Timestamp $negative_expire_time + * For requested entities that did not match the threat list, how long to + * cache the response until. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getThreats() + { + return $this->threats; + } + + /** + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1; + * @param array<\Google\Cloud\WebRisk\V1beta1\SearchHashesResponse\ThreatHash>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setThreats($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebRisk\V1beta1\SearchHashesResponse\ThreatHash::class); + $this->threats = $arr; + + return $this; + } + + /** + * For requested entities that did not match the threat list, how long to + * cache the response until. + * + * Generated from protobuf field .google.protobuf.Timestamp negative_expire_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getNegativeExpireTime() + { + return $this->negative_expire_time; + } + + public function hasNegativeExpireTime() + { + return isset($this->negative_expire_time); + } + + public function clearNegativeExpireTime() + { + unset($this->negative_expire_time); + } + + /** + * For requested entities that did not match the threat list, how long to + * cache the response until. + * + * Generated from protobuf field .google.protobuf.Timestamp negative_expire_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setNegativeExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->negative_expire_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesResponse/ThreatHash.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesResponse/ThreatHash.php new file mode 100644 index 000000000000..e1b8fb56ba96 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesResponse/ThreatHash.php @@ -0,0 +1,160 @@ +google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + */ +class ThreatHash extends \Google\Protobuf\Internal\Message +{ + /** + * The ThreatList this threat belongs to. + * This must contain at least one entry. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1; + */ + private $threat_types; + /** + * A 32 byte SHA256 hash. This field is in binary format. For JSON + * requests, hashes are base64-encoded. + * + * Generated from protobuf field bytes hash = 2; + */ + protected $hash = ''; + /** + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3; + */ + protected $expire_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $threat_types + * The ThreatList this threat belongs to. + * This must contain at least one entry. + * @type string $hash + * A 32 byte SHA256 hash. This field is in binary format. For JSON + * requests, hashes are base64-encoded. + * @type \Google\Protobuf\Timestamp $expire_time + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The ThreatList this threat belongs to. + * This must contain at least one entry. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getThreatTypes() + { + return $this->threat_types; + } + + /** + * The ThreatList this threat belongs to. + * This must contain at least one entry. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setThreatTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1beta1\ThreatType::class); + $this->threat_types = $arr; + + return $this; + } + + /** + * A 32 byte SHA256 hash. This field is in binary format. For JSON + * requests, hashes are base64-encoded. + * + * Generated from protobuf field bytes hash = 2; + * @return string + */ + public function getHash() + { + return $this->hash; + } + + /** + * A 32 byte SHA256 hash. This field is in binary format. For JSON + * requests, hashes are base64-encoded. + * + * Generated from protobuf field bytes hash = 2; + * @param string $var + * @return $this + */ + public function setHash($var) + { + GPBUtil::checkString($var, False); + $this->hash = $var; + + return $this; + } + + /** + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ThreatHash::class, \Google\Cloud\WebRisk\V1beta1\SearchHashesResponse_ThreatHash::class); + diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisRequest.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisRequest.php new file mode 100644 index 000000000000..9b41a391e3f1 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisRequest.php @@ -0,0 +1,101 @@ +google.cloud.webrisk.v1beta1.SearchUrisRequest + */ +class SearchUrisRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The URI to be checked for matches. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + /** + * Required. The ThreatLists to search in. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $threat_types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Required. The URI to be checked for matches. + * @type array|\Google\Protobuf\Internal\RepeatedField $threat_types + * Required. The ThreatLists to search in. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * Required. The URI to be checked for matches. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. The URI to be checked for matches. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Required. The ThreatLists to search in. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getThreatTypes() + { + return $this->threat_types; + } + + /** + * Required. The ThreatLists to search in. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setThreatTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1beta1\ThreatType::class); + $this->threat_types = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisResponse.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisResponse.php new file mode 100644 index 000000000000..6b0061d4d425 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisResponse.php @@ -0,0 +1,75 @@ +google.cloud.webrisk.v1beta1.SearchUrisResponse + */ +class SearchUrisResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The threat list matches. This may be empty if the URI is on no list. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri threat = 1; + */ + protected $threat = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\WebRisk\V1beta1\SearchUrisResponse\ThreatUri $threat + * The threat list matches. This may be empty if the URI is on no list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The threat list matches. This may be empty if the URI is on no list. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri threat = 1; + * @return \Google\Cloud\WebRisk\V1beta1\SearchUrisResponse\ThreatUri|null + */ + public function getThreat() + { + return $this->threat; + } + + public function hasThreat() + { + return isset($this->threat); + } + + public function clearThreat() + { + unset($this->threat); + } + + /** + * The threat list matches. This may be empty if the URI is on no list. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri threat = 1; + * @param \Google\Cloud\WebRisk\V1beta1\SearchUrisResponse\ThreatUri $var + * @return $this + */ + public function setThreat($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\SearchUrisResponse\ThreatUri::class); + $this->threat = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisResponse/ThreatUri.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisResponse/ThreatUri.php new file mode 100644 index 000000000000..18342b1f533f --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisResponse/ThreatUri.php @@ -0,0 +1,118 @@ +google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri + */ +class ThreatUri extends \Google\Protobuf\Internal\Message +{ + /** + * The ThreatList this threat belongs to. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1; + */ + private $threat_types; + /** + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; + */ + protected $expire_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $threat_types + * The ThreatList this threat belongs to. + * @type \Google\Protobuf\Timestamp $expire_time + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The ThreatList this threat belongs to. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getThreatTypes() + { + return $this->threat_types; + } + + /** + * The ThreatList this threat belongs to. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setThreatTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1beta1\ThreatType::class); + $this->threat_types = $arr; + + return $this; + } + + /** + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ThreatUri::class, \Google\Cloud\WebRisk\V1beta1\SearchUrisResponse_ThreatUri::class); + diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatEntryAdditions.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatEntryAdditions.php new file mode 100644 index 000000000000..24b83d090bf5 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatEntryAdditions.php @@ -0,0 +1,124 @@ +google.cloud.webrisk.v1beta1.ThreatEntryAdditions + */ +class ThreatEntryAdditions extends \Google\Protobuf\Internal\Message +{ + /** + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1; + */ + private $raw_hashes; + /** + * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_hashes = 2; + */ + protected $rice_hashes = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\WebRisk\V1beta1\RawHashes>|\Google\Protobuf\Internal\RepeatedField $raw_hashes + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + * @type \Google\Cloud\WebRisk\V1beta1\RiceDeltaEncoding $rice_hashes + * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRawHashes() + { + return $this->raw_hashes; + } + + /** + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + * + * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1; + * @param array<\Google\Cloud\WebRisk\V1beta1\RawHashes>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRawHashes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebRisk\V1beta1\RawHashes::class); + $this->raw_hashes = $arr; + + return $this; + } + + /** + * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_hashes = 2; + * @return \Google\Cloud\WebRisk\V1beta1\RiceDeltaEncoding|null + */ + public function getRiceHashes() + { + return $this->rice_hashes; + } + + public function hasRiceHashes() + { + return isset($this->rice_hashes); + } + + public function clearRiceHashes() + { + unset($this->rice_hashes); + } + + /** + * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_hashes = 2; + * @param \Google\Cloud\WebRisk\V1beta1\RiceDeltaEncoding $var + * @return $this + */ + public function setRiceHashes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\RiceDeltaEncoding::class); + $this->rice_hashes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatEntryRemovals.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatEntryRemovals.php new file mode 100644 index 000000000000..f26c06dd2738 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatEntryRemovals.php @@ -0,0 +1,133 @@ +google.cloud.webrisk.v1beta1.ThreatEntryRemovals + */ +class ThreatEntryRemovals extends \Google\Protobuf\Internal\Message +{ + /** + * The raw removal indices for a local list. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.RawIndices raw_indices = 1; + */ + protected $raw_indices = null; + /** + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_indices = 2; + */ + protected $rice_indices = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\WebRisk\V1beta1\RawIndices $raw_indices + * The raw removal indices for a local list. + * @type \Google\Cloud\WebRisk\V1beta1\RiceDeltaEncoding $rice_indices + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); + parent::__construct($data); + } + + /** + * The raw removal indices for a local list. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.RawIndices raw_indices = 1; + * @return \Google\Cloud\WebRisk\V1beta1\RawIndices|null + */ + public function getRawIndices() + { + return $this->raw_indices; + } + + public function hasRawIndices() + { + return isset($this->raw_indices); + } + + public function clearRawIndices() + { + unset($this->raw_indices); + } + + /** + * The raw removal indices for a local list. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.RawIndices raw_indices = 1; + * @param \Google\Cloud\WebRisk\V1beta1\RawIndices $var + * @return $this + */ + public function setRawIndices($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\RawIndices::class); + $this->raw_indices = $var; + + return $this; + } + + /** + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_indices = 2; + * @return \Google\Cloud\WebRisk\V1beta1\RiceDeltaEncoding|null + */ + public function getRiceIndices() + { + return $this->rice_indices; + } + + public function hasRiceIndices() + { + return isset($this->rice_indices); + } + + public function clearRiceIndices() + { + unset($this->rice_indices); + } + + /** + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + * + * Generated from protobuf field .google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_indices = 2; + * @param \Google\Cloud\WebRisk\V1beta1\RiceDeltaEncoding $var + * @return $this + */ + public function setRiceIndices($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\RiceDeltaEncoding::class); + $this->rice_indices = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatType.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatType.php new file mode 100644 index 000000000000..1b7a29aaf9b3 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatType.php @@ -0,0 +1,69 @@ +google.cloud.webrisk.v1beta1.ThreatType + */ +class ThreatType +{ + /** + * Unknown. + * + * Generated from protobuf enum THREAT_TYPE_UNSPECIFIED = 0; + */ + const THREAT_TYPE_UNSPECIFIED = 0; + /** + * Malware targeting any platform. + * + * Generated from protobuf enum MALWARE = 1; + */ + const MALWARE = 1; + /** + * Social engineering targeting any platform. + * + * Generated from protobuf enum SOCIAL_ENGINEERING = 2; + */ + const SOCIAL_ENGINEERING = 2; + /** + * Unwanted software targeting any platform. + * + * Generated from protobuf enum UNWANTED_SOFTWARE = 3; + */ + const UNWANTED_SOFTWARE = 3; + + private static $valueToName = [ + self::THREAT_TYPE_UNSPECIFIED => 'THREAT_TYPE_UNSPECIFIED', + self::MALWARE => 'MALWARE', + self::SOCIAL_ENGINEERING => 'SOCIAL_ENGINEERING', + self::UNWANTED_SOFTWARE => 'UNWANTED_SOFTWARE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/WebRiskServiceV1Beta1GrpcClient.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/WebRiskServiceV1Beta1GrpcClient.php new file mode 100644 index 000000000000..ba172974b8b0 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/WebRiskServiceV1Beta1GrpcClient.php @@ -0,0 +1,86 @@ +_simpleRequest('/google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1/ComputeThreatListDiff', + $argument, + ['\Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffResponse', 'decode'], + $metadata, $options); + } + + /** + * This method is used to check whether a URI is on a given threatList. + * @param \Google\Cloud\WebRisk\V1beta1\SearchUrisRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SearchUris(\Google\Cloud\WebRisk\V1beta1\SearchUrisRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1/SearchUris', + $argument, + ['\Google\Cloud\WebRisk\V1beta1\SearchUrisResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets the full hashes that match the requested hash prefix. + * This is used after a hash prefix is looked up in a threatList + * and there is a match. The client side threatList only holds partial hashes + * so the client must query this method to determine if there is a full + * hash match of a threat. + * @param \Google\Cloud\WebRisk\V1beta1\SearchHashesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SearchHashes(\Google\Cloud\WebRisk\V1beta1\SearchHashesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1/SearchHashes', + $argument, + ['\Google\Cloud\WebRisk\V1beta1\SearchHashesResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/compute_threat_list_diff.php b/owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/compute_threat_list_diff.php new file mode 100644 index 000000000000..37a7d78c84e3 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/compute_threat_list_diff.php @@ -0,0 +1,70 @@ +computeThreatListDiff($threatType, $constraints); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $threatType = ThreatType::THREAT_TYPE_UNSPECIFIED; + + compute_threat_list_diff_sample($threatType); +} +// [END webrisk_v1beta1_generated_WebRiskServiceV1Beta1_ComputeThreatListDiff_sync] diff --git a/owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/search_hashes.php b/owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/search_hashes.php new file mode 100644 index 000000000000..829a2fa0cba5 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/search_hashes.php @@ -0,0 +1,73 @@ +searchHashes($threatTypes); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $threatTypesElement = ThreatType::THREAT_TYPE_UNSPECIFIED; + + search_hashes_sample($threatTypesElement); +} +// [END webrisk_v1beta1_generated_WebRiskServiceV1Beta1_SearchHashes_sync] diff --git a/owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/search_uris.php b/owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/search_uris.php new file mode 100644 index 000000000000..018544a71e7a --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/search_uris.php @@ -0,0 +1,71 @@ +searchUris($uri, $threatTypes); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $uri = '[URI]'; + $threatTypesElement = ThreatType::THREAT_TYPE_UNSPECIFIED; + + search_uris_sample($uri, $threatTypesElement); +} +// [END webrisk_v1beta1_generated_WebRiskServiceV1Beta1_SearchUris_sync] diff --git a/owl-bot-staging/WebRisk/v1beta1/src/V1beta1/Gapic/WebRiskServiceV1Beta1GapicClient.php b/owl-bot-staging/WebRisk/v1beta1/src/V1beta1/Gapic/WebRiskServiceV1Beta1GapicClient.php new file mode 100644 index 000000000000..bb955e735802 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/src/V1beta1/Gapic/WebRiskServiceV1Beta1GapicClient.php @@ -0,0 +1,304 @@ +computeThreatListDiff($threatType, $constraints); + * } finally { + * $webRiskServiceV1Beta1Client->close(); + * } + * ``` + * + * @experimental + */ +class WebRiskServiceV1Beta1GapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'webrisk.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/web_risk_service_v1_beta1_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/web_risk_service_v1_beta1_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/web_risk_service_v1_beta1_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/web_risk_service_v1_beta1_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'webrisk.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Gets the most recent threat list diffs. + * + * Sample code: + * ``` + * $webRiskServiceV1Beta1Client = new WebRiskServiceV1Beta1Client(); + * try { + * $threatType = ThreatType::THREAT_TYPE_UNSPECIFIED; + * $constraints = new Constraints(); + * $response = $webRiskServiceV1Beta1Client->computeThreatListDiff($threatType, $constraints); + * } finally { + * $webRiskServiceV1Beta1Client->close(); + * } + * ``` + * + * @param int $threatType The ThreatList to update. + * For allowed values, use constants defined on {@see \Google\Cloud\WebRisk\V1beta1\ThreatType} + * @param Constraints $constraints Required. The constraints associated with this request. + * @param array $optionalArgs { + * Optional. + * + * @type string $versionToken + * The current version token of the client for the requested list (the + * client version that was received from the last successful diff). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function computeThreatListDiff($threatType, $constraints, array $optionalArgs = []) + { + $request = new ComputeThreatListDiffRequest(); + $request->setThreatType($threatType); + $request->setConstraints($constraints); + if (isset($optionalArgs['versionToken'])) { + $request->setVersionToken($optionalArgs['versionToken']); + } + + return $this->startCall('ComputeThreatListDiff', ComputeThreatListDiffResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the full hashes that match the requested hash prefix. + * This is used after a hash prefix is looked up in a threatList + * and there is a match. The client side threatList only holds partial hashes + * so the client must query this method to determine if there is a full + * hash match of a threat. + * + * Sample code: + * ``` + * $webRiskServiceV1Beta1Client = new WebRiskServiceV1Beta1Client(); + * try { + * $threatTypes = []; + * $response = $webRiskServiceV1Beta1Client->searchHashes($threatTypes); + * } finally { + * $webRiskServiceV1Beta1Client->close(); + * } + * ``` + * + * @param int[] $threatTypes Required. The ThreatLists to search in. + * For allowed values, use constants defined on {@see \Google\Cloud\WebRisk\V1beta1\ThreatType} + * @param array $optionalArgs { + * Optional. + * + * @type string $hashPrefix + * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + * hash. For JSON requests, this field is base64-encoded. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\WebRisk\V1beta1\SearchHashesResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function searchHashes($threatTypes, array $optionalArgs = []) + { + $request = new SearchHashesRequest(); + $request->setThreatTypes($threatTypes); + if (isset($optionalArgs['hashPrefix'])) { + $request->setHashPrefix($optionalArgs['hashPrefix']); + } + + return $this->startCall('SearchHashes', SearchHashesResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * This method is used to check whether a URI is on a given threatList. + * + * Sample code: + * ``` + * $webRiskServiceV1Beta1Client = new WebRiskServiceV1Beta1Client(); + * try { + * $uri = 'uri'; + * $threatTypes = []; + * $response = $webRiskServiceV1Beta1Client->searchUris($uri, $threatTypes); + * } finally { + * $webRiskServiceV1Beta1Client->close(); + * } + * ``` + * + * @param string $uri Required. The URI to be checked for matches. + * @param int[] $threatTypes Required. The ThreatLists to search in. + * For allowed values, use constants defined on {@see \Google\Cloud\WebRisk\V1beta1\ThreatType} + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\WebRisk\V1beta1\SearchUrisResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function searchUris($uri, $threatTypes, array $optionalArgs = []) + { + $request = new SearchUrisRequest(); + $request->setUri($uri); + $request->setThreatTypes($threatTypes); + return $this->startCall('SearchUris', SearchUrisResponse::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/WebRisk/v1beta1/src/V1beta1/WebRiskServiceV1Beta1Client.php b/owl-bot-staging/WebRisk/v1beta1/src/V1beta1/WebRiskServiceV1Beta1Client.php new file mode 100644 index 000000000000..2f6f5d574e56 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/src/V1beta1/WebRiskServiceV1Beta1Client.php @@ -0,0 +1,36 @@ + [ + 'google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1' => [], + ], +]; diff --git a/owl-bot-staging/WebRisk/v1beta1/src/V1beta1/resources/web_risk_service_v1_beta1_rest_client_config.php b/owl-bot-staging/WebRisk/v1beta1/src/V1beta1/resources/web_risk_service_v1_beta1_rest_client_config.php new file mode 100644 index 000000000000..d7ca5b4f9931 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/src/V1beta1/resources/web_risk_service_v1_beta1_rest_client_config.php @@ -0,0 +1,21 @@ + [ + 'google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1' => [ + 'ComputeThreatListDiff' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/threatLists:computeDiff', + ], + 'SearchHashes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/hashes:search', + ], + 'SearchUris' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/uris:search', + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/WebRisk/v1beta1/tests/Unit/V1beta1/WebRiskServiceV1Beta1ClientTest.php b/owl-bot-staging/WebRisk/v1beta1/tests/Unit/V1beta1/WebRiskServiceV1Beta1ClientTest.php new file mode 100644 index 000000000000..4addbf982c47 --- /dev/null +++ b/owl-bot-staging/WebRisk/v1beta1/tests/Unit/V1beta1/WebRiskServiceV1Beta1ClientTest.php @@ -0,0 +1,249 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return WebRiskServiceV1Beta1Client */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new WebRiskServiceV1Beta1Client($options); + } + + /** @test */ + public function computeThreatListDiffTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $newVersionToken = '115'; + $expectedResponse = new ComputeThreatListDiffResponse(); + $expectedResponse->setNewVersionToken($newVersionToken); + $transport->addResponse($expectedResponse); + // Mock request + $threatType = ThreatType::THREAT_TYPE_UNSPECIFIED; + $constraints = new Constraints(); + $response = $gapicClient->computeThreatListDiff($threatType, $constraints); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1/ComputeThreatListDiff', $actualFuncCall); + $actualValue = $actualRequestObject->getThreatType(); + $this->assertProtobufEquals($threatType, $actualValue); + $actualValue = $actualRequestObject->getConstraints(); + $this->assertProtobufEquals($constraints, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function computeThreatListDiffExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $threatType = ThreatType::THREAT_TYPE_UNSPECIFIED; + $constraints = new Constraints(); + try { + $gapicClient->computeThreatListDiff($threatType, $constraints); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchHashesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new SearchHashesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $threatTypes = []; + $response = $gapicClient->searchHashes($threatTypes); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1/SearchHashes', $actualFuncCall); + $actualValue = $actualRequestObject->getThreatTypes(); + $this->assertProtobufEquals($threatTypes, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchHashesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $threatTypes = []; + try { + $gapicClient->searchHashes($threatTypes); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchUrisTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new SearchUrisResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $uri = 'uri116076'; + $threatTypes = []; + $response = $gapicClient->searchUris($uri, $threatTypes); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1/SearchUris', $actualFuncCall); + $actualValue = $actualRequestObject->getUri(); + $this->assertProtobufEquals($uri, $actualValue); + $actualValue = $actualRequestObject->getThreatTypes(); + $this->assertProtobufEquals($threatTypes, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchUrisExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $uri = 'uri116076'; + $threatTypes = []; + try { + $gapicClient->searchUris($uri, $threatTypes); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/CrawledUrl.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/CrawledUrl.php new file mode 100644 index 000000000000..7abf286dcd09 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/CrawledUrl.php @@ -0,0 +1,32 @@ +internalAddGeneratedFile( + ' +� +4google/cloud/websecurityscanner/v1/crawled_url.proto"google.cloud.websecurityscanner.v1"< + +CrawledUrl + http_method (  +url (  +body ( B� +&com.google.cloud.websecurityscanner.v1BCrawledUrlProtoPZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb�"Google.Cloud.WebSecurityScanner.V1�"Google\\Cloud\\WebSecurityScanner\\V1�%Google::Cloud::WebSecurityScanner::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/Finding.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/Finding.php new file mode 100644 index 0000000000000000000000000000000000000000..18c485bde73d915abddce1c1d038af5086614687 GIT binary patch literal 2209 zcmb7FZExFD6ecgU>1`RA8IswjOBpnkz#-e1z@?xhP19)Yk~Lil$dcuk>*Rv#Yh7Q5 zW>X}D_$z$jr|>KIJn&T=6Ru%=)W=Wy7r1lOyZ8{G5sSG)bUbEk?323Vv)HZwOzem_ zF{fe{IaUDV^=YH-(ZHp_Sd-)k1=babLdzkzJ7}E|VY!yDjIQJ{+6j+wxx{0P8V3kD zz7<9IIORhx5Qa|}+dg%0BrE}6_h@9&fC_5)^f~l(h&{`X2w<0Uy*O|LWdTkA{lFo$ zeVlS8x%WZ_b2!9#WrJiiFcza12*Lx)H;zc;a2g862au}kV zsOw8b9%8{`^7`o*b0T6M9LTy8g8AZ?v0`q`kQ&F7_->0#tSMz&*I#w@isVhubCSK! zwNd}^qM#7@!kezkg4K1%;ePfF%|;2Ci^(0szSS1JCY|r0-?!1{H(fMkH$`Z2HMQl{ z)TWKQA7rdnNb5YCLAs}RAFY3&X(gSexZS@u(PlOPWe1g$ZC4ApP}@@Opq)$#rkI69 zEz0O)REfxxB$`ogL*&-|huZ&Fu4PAP!wlOh{nacf@1gC95TSWR#DuwONuHn}1YY_87lXtMIgazqVGVkguGfDvJf&6wrlFZEo?Ix-B^#ti#dI zu%{_hd5RPei4Ru>6qmnvbw?6@u@2!VN9W3sl(C=Or?yYb39($lBlX=IP%h9XDOkBg z?@t#&GqjSK!`&09??~1!*D7>DFj(M~hp2QNMd~d{W9+TN^Ia4vUjgizsLD-X*F@+tl2JPz_OkAr#cWf04xJa7G4M4!MRYYefqlNBPpWKj5Fl-^Cb+@aDj zTV9r7pP_xQD)>inw=3;blee^XN$g=}%fr-`wNc~GJjuvRH*wv6r5RwmFN+_i qWV$ZdbbUEb*GCO|14b&?gT2Mw{b}lIubJQ*4NzvLHZ@0cg#H1&hTGu) literal 0 HcmV?d00001 diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/FindingAddon.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/FindingAddon.php new file mode 100644 index 0000000000000000000000000000000000000000..c02f052dabd61c43afdb4c1484e2bccf9bd9f9c0 GIT binary patch literal 2062 zcmbtV-EQMV6eel6Khv~vO&7XIpdswCSp*I(h>LVfl_pL$G>NmelP)OIXyQy#3&*x* zoYI1N&9lH8@Ct}G;D&3Sf-|-gb;%;C-P~j{Ip;fPzHiQaPfx;&5PgIj%x9cNY=no` zIJ#gs?fVGGg7cKwm-PY4~20$+J4g4INS}RfOjFZT%NFK z!L8gWK1s_;ICqSTNss07Qj^Cx;xl%;I>wwuGwvV7eM^9w#VYRXv#;H>4GdNS+RCmzY*k#^G z>}T;xakKCo<&9YcqO(!U9dgRA)jgE+k|mM1BTdYs^-IPDhy$4t>0Olf809{h2An|! zPwcP6kSA!j?*<--?@vsYTu=$>1VE1;k?1;{gTgLPBP2qCTqvQv{>+mjG4xoMa%ckd z6|!PD{}s0;pf`DlzcNsAk@1YtkqmF6^^0T~hix4`)&8G6Z3#z9@YEj4PhBD81kGV3 zg>MM^-XpY@7RaI1TYPV$dzaLkv6PcPSJ27}AtaA*XPxg!#9?St0@V9xn{gg+0>dom zBu!G!&^C?Y=u76nP=G+0;?Cihci{nwX_Yv+ALptcpmzjduo1Zuf(XXq$3&{OD(^$# zw=BxNl<+=!P_gYw^^ElOs%@C0*Ri^KwOMcKHRUaJ7j3tUYNbUi_^;B?m5ll}%3Hc+ zHI2?!zh_$f%y#B6Vn@t#@o?Q|>&o+bvQx+VKvO zoyADE61QX{UDL3Qs?kz%vJrU_y+&SGma;ATwx9?x%x0t6QFhb^=zh=AO+f9~rqOCu zPFp&G%1XZQO9s@vVp7MDUV8x@kwpAtXum?g~NASz!5R^=RF-*JT+?HDw)%tv*=^+qdOEn-MwuN@oU}9eAiE& zuK6ei)6yh(m1EJ+1=Cu7;lkn3t2Tel78internalAddGeneratedFile( + ' +� +;google/cloud/websecurityscanner/v1/finding_type_stats.proto"google.cloud.websecurityscanner.v1"? +FindingTypeStats + finding_type (  + finding_count (B� +&com.google.cloud.websecurityscanner.v1BFindingTypeStatsProtoPZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb�"Google.Cloud.WebSecurityScanner.V1�"Google\\Cloud\\WebSecurityScanner\\V1�%Google::Cloud::WebSecurityScanner::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanConfig.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanConfig.php new file mode 100644 index 0000000000000000000000000000000000000000..c76e4b19e970382089a7b06918028e2dc8275b2c GIT binary patch literal 2823 zcmb_e&2Jk;6tA78Nv5&mt{~c4Dr`e(Q;BZmf>g9^K>pYyt2(x2J83~i!+3Y>jJn=k zW@pm|)FW5^5dIEM9Jz4i%wNEfH?#hTlTb)YE{@0V{oeQQy(eErM-lqS*rfsGL{QJ@ zpBUnZ8W9gg=!U-0PX+_Z4L2M`%%|Kmj9SxZG`ogfbGo-dH4YQ*Qp*^I;n1gBt{*1e z)=S!tshe;nPGXk?0KRox+LHfbHw*@BXet8;1!P3yh`7|)ZB_QEARZBytP(I)GVKkmv_wz+aT~edZdmAOb$_uo$y|2}XSOJ%qPy42U07P(Lp_ zNCH=|FfgP-GjQqVeIvz`vUj2o(y?t!oNLJpL3VmhASe%r->cEsYw!X9{R0-K6{%U(Kb>o zQ+1YkzO&5ZQt`tvvg#@*%9fb;o;KRXFFAx}t)i`>tFrU-jFH(~(cVL=9*ZNNoM82u zRj+GkX+&P(@1j^=fQLoxeUyWAaKVBhPPiZISB(YGK0tYrz{~{DZ_smLpf7^>^@rQ$ zzdLTud@{>(AX*)vB&HmbAt3A505bpZ^GiY=06ed50GSuAiwglySZUs3@$ zXgPL|sF(OuUskR^x}=@XSY3OGZqrv$$ORT5o-hE6{Aff154+$AdYL+6}bgheH;~iB~+ZQv54} za&t~;KV{G@8M*+zgtq6$%%ziD!}=M7ao6TWr9UMDp-E`tNcAV*bn^B;fK z?xLGOW3ZhtNjyej(P7tzPl1`2GGb-nk8-wh1FgxRX7!9Kg|l2&{01#gr@sUQIc5SZ z33wcJaT4`}oz3ZH(LO-yYJnURAA1R$Ai$s4BPX${+v3KzXyr7CtsivkHZJeljV?ZD zbXs=R*>UVz;R@7pwYt}C?%TNTG!C8@GMa|+y&rOZ3jE8y=KEM zENnbME3?5bqV=}Zd5Y`yp?0ikP+W_!O}2ka%ZP;WjfWH(0W)|-i`gdW(>Tg`SC zcbm9lR}b1w_bXg&?(c(FxC((lK=YwoM@x32T&Y7`8Q4_IHK&t)%T|8OqPxJRlZ3uu zC05pEt3_?}R_5!&R6eC06L7YM;YFt!i5OgK=QnNCe|*v7&)JQ1AWe0!nQ*X8NLu;; z$Desv`gJ1I8=rOZt~(>vgTwC6?8hmXWhpevIxlBgho$~C)lHw?o1Ph;q({@K8!Kh& Q3+^i=nO;G!(QAbM2Knuq)c^nh literal 0 HcmV?d00001 diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanConfigError.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanConfigError.php new file mode 100644 index 0000000000000000000000000000000000000000..b7027109c6ef634b5bcdf6241982472aba67ed87 GIT binary patch literal 2476 zcmbVO+iu%N5Utf9Z8oj5*tm(~+%}FA%ehE(^Uy+RTCB*G%!b-!c~Ou;z=EbIhkzmq z6qO<^@&o;peoFtMkL@4yt+Ui6wB@8h^&(>T%$eCUvpe(c_v061bep#0QJjT&+^2`H zY5pRn<1Ee7C>_$n>0l6NG)iBNlVP0IC^aP&(x=?C{99l;NvBy9H|SBC9u4DqG)$-c z`p@yS zYZr_?Lo@cCtuXew`;QTdhT&vFJzzEpVy=17uZY5LJUtvH5uM~=4u3nzL?xpnPr_mH z3!L-`9fZS43>>T2!E_YmNjjq1K#rogx<_Z68oM)2L769X5uu~S0-<`=D37yIIP976 zB+8O;o@Nd}8;zqlUrMZ3s(W*{nl2g8>MX`aV=e5n(Zu=jE&J>#)2piJmDiEH-4Xb5w z6Msa`qKbS9{{*dD!so7Fw&JcUUA#taqN~htxM*8~E9O|L$&9C5m~%jdP;~7$0PcZe zhQU40YT6usOt#UDw+NHBSYZ3=KzhFFSO5}je1_aY*9|7LY2b0yma=VgWyp?Zl7aB? zS#k|+mLT$(;O=tw6LKA00k{+Rr$zZGxq-II+b3c?N4`dnjKK53p)KL4DsXLOO71C* zY;s$Qw(_Mi0@vljSB@)x;D(P;L44A%!|axHJD}}(@(9&eh&x&iQ}YQalq&O;;i_Ju7G34fH$P@ zEYFAI;w`d?Hj1E`?Q&*5S8gDLF8Zt5$4p14vBl~&Qb+ea4*VZjg4f96Ty(D&8YEpiuaA48VtO0{)cKM}g3Ezo~{;fsq0 zI<~BK0BYkMt-UXc)IKlr>ft-uE)d1#fu!p!*j>K3oREi>#CLVH@Z1HCBV8Y4ZQAgF z*^nLOFke4*O5auH!KW@%6XmiucGCx>VlPdGm||4tL|;Rt2v$f2*Lo zFe-e&i{9Kg@uU|`)LHwfJL@Kko{+w*AEl?w6X7_4kz%#!j1M25w)lHxyIsr^wPK#A z!93y3ClnnBOenSP{vQiaZ$5SCvEu}+2Xn{Yl{+)CMx$VBG*)qqMtA@4Y%$i+NS`~`B>lC-;oorp literal 0 HcmV?d00001 diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanRun.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanRun.php new file mode 100644 index 0000000000000000000000000000000000000000..26b7e2bce31eb6bc9ccbd2ef69de2bee472e3101 GIT binary patch literal 1981 zcmbW2-)`GB6vh{)Nt5Fs%d{IU9Z=5eRu^bxI7Kl)X;vhT;%Q55&$82X5FpSp?GR8T zfufRjLvHpKdxbs9uJ#;ziXG~YlhwvL*Eg2L!ygYneuwAzi}*Z-FG-t)Oi;d|y9U!C^EQzVlNV|9Rl1VzIlDh2-gA^Zvie{nhrxK9#ECH_6&iN`}OISu$PxUmB=p+UlM?tJVd4SmU@kf;gW z&}a2WBxkDF2XTZ#9FQ`zp3(+&aqUnt5z@dtW{EF&EF;mwP}7_;Ia5@9sXr=~RX9E& z^*l$@oJ;b6NRhJJs}mxaOhve#<*fkMvnO{s-P}SiONdAe1PX7OH#@#r-~+L*s0evD zT@pM~bHLFJl3v7%lgduv$+x`F{BS&;NqmCNtj|PI5T^MEEWuMsA@y0T-agXLLGN46 z@N}>cT1B@GTP@3Rkh%$LR=?lvBN7+;!9G1zz@y(P@HO_3|DoK`R$e3r{x z`a8O4Oru2&hQ=Iw%zVwpqy0r6|ESd3S*J0wPGexFaf+6u5KBV;_BS)%&U|m)CFcp)hFugR;!`w+qf1E75ljfC zIKUAcWs?aaFu=1Uj1Z9_?3mCn9jJA5=Q+EY;*11Hfm4j95o!bx&c=<8Xq2KLBO$#^ z13zZ)#znKiKRuGg9wG!2j}kvXvd9EL?9Wh|umjlbADtrVkA3R9T>*7f4t388P~KaFM2s_WcqsOkveGu#n&Ff(-fV_r@0`+P zz6+w@B}QJU{V0KDk$nSHRI{Ub1He1ISc*%NufHX&&16Ir;4%-qDDTNE#aS(H3%{=5!y=bpn& y=T4Z*T<2H$MGjLGK~t1soT3byqg7#V2fK^)c$Kg6tinternalAddGeneratedFile( + ' +� +5google/cloud/websecurityscanner/v1/scan_run_log.proto"google.cloud.websecurityscanner.v1=google/cloud/websecurityscanner/v1/scan_run_error_trace.proto"� + +ScanRunLog +summary (  +name ( S +execution_state (2:.google.cloud.websecurityscanner.v1.ScanRun.ExecutionStateM + result_state (27.google.cloud.websecurityscanner.v1.ScanRun.ResultState +urls_crawled_count ( +urls_tested_count ( + has_findings (J + error_trace ( 25.google.cloud.websecurityscanner.v1.ScanRunErrorTraceB� +&com.google.cloud.websecurityscanner.v1BScanRunLogProtoPZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb�"Google.Cloud.WebSecurityScanner.V1�"Google\\Cloud\\WebSecurityScanner\\V1�%Google::Cloud::WebSecurityScanner::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanRunWarningTrace.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanRunWarningTrace.php new file mode 100644 index 0000000000000000000000000000000000000000..186f828d82cecc124030d23dd0820ff311cb362d GIT binary patch literal 1256 zcmbu9(QeZ)6ozTpxbVePWeBESAXCQHAxPD6mu*aG(pF(zQZ;F(O_8EBbvsL$9XZaX zf%XdA!9#GzYw##M1$NR^(^>=)xkxPg_jiuZ@t=dEss%vJZ-BaZ1JtWV^=lcdFKLtV5v)XXj5bQJR9o9SQ2&lnmta&wFseUF zU_}m;r=VguW-A!jZm(rnZL4Kg9w{%tre(W>cH1(nmhA;bUq9^z{gylEdTynpY=UQ= z;{+$VefD6jtUL$n^R@Qi{5pGRur(->^jDA%M6-lfu;83z?# zJHepe4cgAYHpROy@p?z7T|>7ktIaQEuq`b159e-fEID|7?|P;4VNv_L>e0*klrHmP zm|$VY#TF%_{biHi%hgV9Lp8UdDs1S^+%1z4?pBA5pLZgEW>)Fe2QpvS^;h|I0n@ac lrfG{hO&c~wPxAl5`internalAddGeneratedFile( + ' +�$ +=google/cloud/websecurityscanner/v1/web_security_scanner.proto"google.cloud.websecurityscanner.v1google/api/client.proto4google/cloud/websecurityscanner/v1/crawled_url.proto0google/cloud/websecurityscanner/v1/finding.proto;google/cloud/websecurityscanner/v1/finding_type_stats.proto4google/cloud/websecurityscanner/v1/scan_config.proto1google/cloud/websecurityscanner/v1/scan_run.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"n +CreateScanConfigRequest +parent ( C + scan_config ( 2..google.cloud.websecurityscanner.v1.ScanConfig"\' +DeleteScanConfigRequest +name ( "$ +GetScanConfigRequest +name ( "O +ListScanConfigsRequest +parent (  + +page_token (  + page_size ("� +UpdateScanConfigRequestC + scan_config ( 2..google.cloud.websecurityscanner.v1.ScanConfig/ + update_mask ( 2.google.protobuf.FieldMask"x +ListScanConfigsResponseD + scan_configs ( 2..google.cloud.websecurityscanner.v1.ScanConfig +next_page_token ( "# +StartScanRunRequest +name ( "! +GetScanRunRequest +name ( "L +ListScanRunsRequest +parent (  + +page_token (  + page_size ("o +ListScanRunsResponse> + scan_runs ( 2+.google.cloud.websecurityscanner.v1.ScanRun +next_page_token ( "" +StopScanRunRequest +name ( "O +ListCrawledUrlsRequest +parent (  + +page_token (  + page_size ("x +ListCrawledUrlsResponseD + crawled_urls ( 2..google.cloud.websecurityscanner.v1.CrawledUrl +next_page_token ( "! +GetFindingRequest +name ( "\\ +ListFindingsRequest +parent (  +filter (  + +page_token (  + page_size ("n +ListFindingsResponse= +findings ( 2+.google.cloud.websecurityscanner.v1.Finding +next_page_token ( "- +ListFindingTypeStatsRequest +parent ( "p +ListFindingTypeStatsResponseP +finding_type_stats ( 24.google.cloud.websecurityscanner.v1.FindingTypeStats2� +WebSecurityScanner� +CreateScanConfig;.google.cloud.websecurityscanner.v1.CreateScanConfigRequest..google.cloud.websecurityscanner.v1.ScanConfig"8���2"#/v1/{parent=projects/*}/scanConfigs: scan_config� +DeleteScanConfig;.google.cloud.websecurityscanner.v1.DeleteScanConfigRequest.google.protobuf.Empty"+���%*#/v1/{name=projects/*/scanConfigs/*}� + GetScanConfig8.google.cloud.websecurityscanner.v1.GetScanConfigRequest..google.cloud.websecurityscanner.v1.ScanConfig"+���%#/v1/{name=projects/*/scanConfigs/*}� +ListScanConfigs:.google.cloud.websecurityscanner.v1.ListScanConfigsRequest;.google.cloud.websecurityscanner.v1.ListScanConfigsResponse"+���%#/v1/{parent=projects/*}/scanConfigs� +UpdateScanConfig;.google.cloud.websecurityscanner.v1.UpdateScanConfigRequest..google.cloud.websecurityscanner.v1.ScanConfig"D���>2//v1/{scan_config.name=projects/*/scanConfigs/*}: scan_config� + StartScanRun7.google.cloud.websecurityscanner.v1.StartScanRunRequest+.google.cloud.websecurityscanner.v1.ScanRun"4���.")/v1/{name=projects/*/scanConfigs/*}:start:*� + +GetScanRun5.google.cloud.websecurityscanner.v1.GetScanRunRequest+.google.cloud.websecurityscanner.v1.ScanRun"6���0./v1/{name=projects/*/scanConfigs/*/scanRuns/*}� + ListScanRuns7.google.cloud.websecurityscanner.v1.ListScanRunsRequest8.google.cloud.websecurityscanner.v1.ListScanRunsResponse"6���0./v1/{parent=projects/*/scanConfigs/*}/scanRuns� + StopScanRun6.google.cloud.websecurityscanner.v1.StopScanRunRequest+.google.cloud.websecurityscanner.v1.ScanRun">���8"3/v1/{name=projects/*/scanConfigs/*/scanRuns/*}:stop:*� +ListCrawledUrls:.google.cloud.websecurityscanner.v1.ListCrawledUrlsRequest;.google.cloud.websecurityscanner.v1.ListCrawledUrlsResponse"D���>google.cloud.websecurityscanner.v1.CrawledUrl + */ +class CrawledUrl extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The http method of the request that was used to visit the URL, in + * uppercase. + * + * Generated from protobuf field string http_method = 1; + */ + protected $http_method = ''; + /** + * Output only. The URL that was crawled. + * + * Generated from protobuf field string url = 2; + */ + protected $url = ''; + /** + * Output only. The body of the request that was used to visit the URL. + * + * Generated from protobuf field string body = 3; + */ + protected $body = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $http_method + * Output only. The http method of the request that was used to visit the URL, in + * uppercase. + * @type string $url + * Output only. The URL that was crawled. + * @type string $body + * Output only. The body of the request that was used to visit the URL. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\CrawledUrl::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The http method of the request that was used to visit the URL, in + * uppercase. + * + * Generated from protobuf field string http_method = 1; + * @return string + */ + public function getHttpMethod() + { + return $this->http_method; + } + + /** + * Output only. The http method of the request that was used to visit the URL, in + * uppercase. + * + * Generated from protobuf field string http_method = 1; + * @param string $var + * @return $this + */ + public function setHttpMethod($var) + { + GPBUtil::checkString($var, True); + $this->http_method = $var; + + return $this; + } + + /** + * Output only. The URL that was crawled. + * + * Generated from protobuf field string url = 2; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Output only. The URL that was crawled. + * + * Generated from protobuf field string url = 2; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + + /** + * Output only. The body of the request that was used to visit the URL. + * + * Generated from protobuf field string body = 3; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * Output only. The body of the request that was used to visit the URL. + * + * Generated from protobuf field string body = 3; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, True); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/CreateScanConfigRequest.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/CreateScanConfigRequest.php new file mode 100644 index 000000000000..fff8861ade4f --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/CreateScanConfigRequest.php @@ -0,0 +1,115 @@ +google.cloud.websecurityscanner.v1.CreateScanConfigRequest + */ +class CreateScanConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name where the scan is created, which should be a + * project resource name in the format 'projects/{projectId}'. + * + * Generated from protobuf field string parent = 1; + */ + protected $parent = ''; + /** + * Required. The ScanConfig to be created. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig scan_config = 2; + */ + protected $scan_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name where the scan is created, which should be a + * project resource name in the format 'projects/{projectId}'. + * @type \Google\Cloud\WebSecurityScanner\V1\ScanConfig $scan_config + * Required. The ScanConfig to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name where the scan is created, which should be a + * project resource name in the format 'projects/{projectId}'. + * + * Generated from protobuf field string parent = 1; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name where the scan is created, which should be a + * project resource name in the format 'projects/{projectId}'. + * + * Generated from protobuf field string parent = 1; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ScanConfig to be created. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig scan_config = 2; + * @return \Google\Cloud\WebSecurityScanner\V1\ScanConfig|null + */ + public function getScanConfig() + { + return $this->scan_config; + } + + public function hasScanConfig() + { + return isset($this->scan_config); + } + + public function clearScanConfig() + { + unset($this->scan_config); + } + + /** + * Required. The ScanConfig to be created. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig scan_config = 2; + * @param \Google\Cloud\WebSecurityScanner\V1\ScanConfig $var + * @return $this + */ + public function setScanConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1\ScanConfig::class); + $this->scan_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/DeleteScanConfigRequest.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/DeleteScanConfigRequest.php new file mode 100644 index 000000000000..c425beafce9d --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/DeleteScanConfigRequest.php @@ -0,0 +1,71 @@ +google.cloud.websecurityscanner.v1.DeleteScanConfigRequest + */ +class DeleteScanConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the ScanConfig to be deleted. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the ScanConfig to be deleted. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the ScanConfig to be deleted. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the ScanConfig to be deleted. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Finding.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Finding.php new file mode 100644 index 000000000000..4bc03c3293b3 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Finding.php @@ -0,0 +1,764 @@ +google.cloud.websecurityscanner.v1.Finding + */ +class Finding extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the Finding. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'. + * The finding IDs are generated by the system. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The type of the Finding. + * Detailed and up-to-date information on findings can be found here: + * https://cloud.google.com/security-command-center/docs/how-to-remediate-web-security-scanner-findings + * + * Generated from protobuf field string finding_type = 2; + */ + protected $finding_type = ''; + /** + * Output only. The severity level of the reported vulnerability. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.Finding.Severity severity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $severity = 0; + /** + * Output only. The http method of the request that triggered the vulnerability, in + * uppercase. + * + * Generated from protobuf field string http_method = 3; + */ + protected $http_method = ''; + /** + * Output only. The URL produced by the server-side fuzzer and used in the request that + * triggered the vulnerability. + * + * Generated from protobuf field string fuzzed_url = 4; + */ + protected $fuzzed_url = ''; + /** + * Output only. The body of the request that triggered the vulnerability. + * + * Generated from protobuf field string body = 5; + */ + protected $body = ''; + /** + * Output only. The description of the vulnerability. + * + * Generated from protobuf field string description = 6; + */ + protected $description = ''; + /** + * Output only. The URL containing human-readable payload that user can leverage to + * reproduce the vulnerability. + * + * Generated from protobuf field string reproduction_url = 7; + */ + protected $reproduction_url = ''; + /** + * Output only. If the vulnerability was originated from nested IFrame, the immediate + * parent IFrame is reported. + * + * Generated from protobuf field string frame_url = 8; + */ + protected $frame_url = ''; + /** + * Output only. The URL where the browser lands when the vulnerability is detected. + * + * Generated from protobuf field string final_url = 9; + */ + protected $final_url = ''; + /** + * Output only. The tracking ID uniquely identifies a vulnerability instance across + * multiple ScanRuns. + * + * Generated from protobuf field string tracking_id = 10; + */ + protected $tracking_id = ''; + /** + * Output only. An addon containing information reported for a vulnerability with an HTML + * form, if any. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.Form form = 16; + */ + protected $form = null; + /** + * Output only. An addon containing information about outdated libraries. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.OutdatedLibrary outdated_library = 11; + */ + protected $outdated_library = null; + /** + * Output only. An addon containing detailed information regarding any resource causing the + * vulnerability such as JavaScript sources, image, audio files, etc. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ViolatingResource violating_resource = 12; + */ + protected $violating_resource = null; + /** + * Output only. An addon containing information about vulnerable or missing HTTP headers. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.VulnerableHeaders vulnerable_headers = 15; + */ + protected $vulnerable_headers = null; + /** + * Output only. An addon containing information about request parameters which were found + * to be vulnerable. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.VulnerableParameters vulnerable_parameters = 13; + */ + protected $vulnerable_parameters = null; + /** + * Output only. An addon containing information reported for an XSS, if any. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.Xss xss = 14; + */ + protected $xss = null; + /** + * Output only. An addon containing information reported for an XXE, if any. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.Xxe xxe = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $xxe = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the Finding. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'. + * The finding IDs are generated by the system. + * @type string $finding_type + * Output only. The type of the Finding. + * Detailed and up-to-date information on findings can be found here: + * https://cloud.google.com/security-command-center/docs/how-to-remediate-web-security-scanner-findings + * @type int $severity + * Output only. The severity level of the reported vulnerability. + * @type string $http_method + * Output only. The http method of the request that triggered the vulnerability, in + * uppercase. + * @type string $fuzzed_url + * Output only. The URL produced by the server-side fuzzer and used in the request that + * triggered the vulnerability. + * @type string $body + * Output only. The body of the request that triggered the vulnerability. + * @type string $description + * Output only. The description of the vulnerability. + * @type string $reproduction_url + * Output only. The URL containing human-readable payload that user can leverage to + * reproduce the vulnerability. + * @type string $frame_url + * Output only. If the vulnerability was originated from nested IFrame, the immediate + * parent IFrame is reported. + * @type string $final_url + * Output only. The URL where the browser lands when the vulnerability is detected. + * @type string $tracking_id + * Output only. The tracking ID uniquely identifies a vulnerability instance across + * multiple ScanRuns. + * @type \Google\Cloud\WebSecurityScanner\V1\Form $form + * Output only. An addon containing information reported for a vulnerability with an HTML + * form, if any. + * @type \Google\Cloud\WebSecurityScanner\V1\OutdatedLibrary $outdated_library + * Output only. An addon containing information about outdated libraries. + * @type \Google\Cloud\WebSecurityScanner\V1\ViolatingResource $violating_resource + * Output only. An addon containing detailed information regarding any resource causing the + * vulnerability such as JavaScript sources, image, audio files, etc. + * @type \Google\Cloud\WebSecurityScanner\V1\VulnerableHeaders $vulnerable_headers + * Output only. An addon containing information about vulnerable or missing HTTP headers. + * @type \Google\Cloud\WebSecurityScanner\V1\VulnerableParameters $vulnerable_parameters + * Output only. An addon containing information about request parameters which were found + * to be vulnerable. + * @type \Google\Cloud\WebSecurityScanner\V1\Xss $xss + * Output only. An addon containing information reported for an XSS, if any. + * @type \Google\Cloud\WebSecurityScanner\V1\Xxe $xxe + * Output only. An addon containing information reported for an XXE, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\Finding::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the Finding. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'. + * The finding IDs are generated by the system. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the Finding. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'. + * The finding IDs are generated by the system. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The type of the Finding. + * Detailed and up-to-date information on findings can be found here: + * https://cloud.google.com/security-command-center/docs/how-to-remediate-web-security-scanner-findings + * + * Generated from protobuf field string finding_type = 2; + * @return string + */ + public function getFindingType() + { + return $this->finding_type; + } + + /** + * Output only. The type of the Finding. + * Detailed and up-to-date information on findings can be found here: + * https://cloud.google.com/security-command-center/docs/how-to-remediate-web-security-scanner-findings + * + * Generated from protobuf field string finding_type = 2; + * @param string $var + * @return $this + */ + public function setFindingType($var) + { + GPBUtil::checkString($var, True); + $this->finding_type = $var; + + return $this; + } + + /** + * Output only. The severity level of the reported vulnerability. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.Finding.Severity severity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * Output only. The severity level of the reported vulnerability. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.Finding.Severity severity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1\Finding\Severity::class); + $this->severity = $var; + + return $this; + } + + /** + * Output only. The http method of the request that triggered the vulnerability, in + * uppercase. + * + * Generated from protobuf field string http_method = 3; + * @return string + */ + public function getHttpMethod() + { + return $this->http_method; + } + + /** + * Output only. The http method of the request that triggered the vulnerability, in + * uppercase. + * + * Generated from protobuf field string http_method = 3; + * @param string $var + * @return $this + */ + public function setHttpMethod($var) + { + GPBUtil::checkString($var, True); + $this->http_method = $var; + + return $this; + } + + /** + * Output only. The URL produced by the server-side fuzzer and used in the request that + * triggered the vulnerability. + * + * Generated from protobuf field string fuzzed_url = 4; + * @return string + */ + public function getFuzzedUrl() + { + return $this->fuzzed_url; + } + + /** + * Output only. The URL produced by the server-side fuzzer and used in the request that + * triggered the vulnerability. + * + * Generated from protobuf field string fuzzed_url = 4; + * @param string $var + * @return $this + */ + public function setFuzzedUrl($var) + { + GPBUtil::checkString($var, True); + $this->fuzzed_url = $var; + + return $this; + } + + /** + * Output only. The body of the request that triggered the vulnerability. + * + * Generated from protobuf field string body = 5; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * Output only. The body of the request that triggered the vulnerability. + * + * Generated from protobuf field string body = 5; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, True); + $this->body = $var; + + return $this; + } + + /** + * Output only. The description of the vulnerability. + * + * Generated from protobuf field string description = 6; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Output only. The description of the vulnerability. + * + * Generated from protobuf field string description = 6; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The URL containing human-readable payload that user can leverage to + * reproduce the vulnerability. + * + * Generated from protobuf field string reproduction_url = 7; + * @return string + */ + public function getReproductionUrl() + { + return $this->reproduction_url; + } + + /** + * Output only. The URL containing human-readable payload that user can leverage to + * reproduce the vulnerability. + * + * Generated from protobuf field string reproduction_url = 7; + * @param string $var + * @return $this + */ + public function setReproductionUrl($var) + { + GPBUtil::checkString($var, True); + $this->reproduction_url = $var; + + return $this; + } + + /** + * Output only. If the vulnerability was originated from nested IFrame, the immediate + * parent IFrame is reported. + * + * Generated from protobuf field string frame_url = 8; + * @return string + */ + public function getFrameUrl() + { + return $this->frame_url; + } + + /** + * Output only. If the vulnerability was originated from nested IFrame, the immediate + * parent IFrame is reported. + * + * Generated from protobuf field string frame_url = 8; + * @param string $var + * @return $this + */ + public function setFrameUrl($var) + { + GPBUtil::checkString($var, True); + $this->frame_url = $var; + + return $this; + } + + /** + * Output only. The URL where the browser lands when the vulnerability is detected. + * + * Generated from protobuf field string final_url = 9; + * @return string + */ + public function getFinalUrl() + { + return $this->final_url; + } + + /** + * Output only. The URL where the browser lands when the vulnerability is detected. + * + * Generated from protobuf field string final_url = 9; + * @param string $var + * @return $this + */ + public function setFinalUrl($var) + { + GPBUtil::checkString($var, True); + $this->final_url = $var; + + return $this; + } + + /** + * Output only. The tracking ID uniquely identifies a vulnerability instance across + * multiple ScanRuns. + * + * Generated from protobuf field string tracking_id = 10; + * @return string + */ + public function getTrackingId() + { + return $this->tracking_id; + } + + /** + * Output only. The tracking ID uniquely identifies a vulnerability instance across + * multiple ScanRuns. + * + * Generated from protobuf field string tracking_id = 10; + * @param string $var + * @return $this + */ + public function setTrackingId($var) + { + GPBUtil::checkString($var, True); + $this->tracking_id = $var; + + return $this; + } + + /** + * Output only. An addon containing information reported for a vulnerability with an HTML + * form, if any. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.Form form = 16; + * @return \Google\Cloud\WebSecurityScanner\V1\Form|null + */ + public function getForm() + { + return $this->form; + } + + public function hasForm() + { + return isset($this->form); + } + + public function clearForm() + { + unset($this->form); + } + + /** + * Output only. An addon containing information reported for a vulnerability with an HTML + * form, if any. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.Form form = 16; + * @param \Google\Cloud\WebSecurityScanner\V1\Form $var + * @return $this + */ + public function setForm($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1\Form::class); + $this->form = $var; + + return $this; + } + + /** + * Output only. An addon containing information about outdated libraries. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.OutdatedLibrary outdated_library = 11; + * @return \Google\Cloud\WebSecurityScanner\V1\OutdatedLibrary|null + */ + public function getOutdatedLibrary() + { + return $this->outdated_library; + } + + public function hasOutdatedLibrary() + { + return isset($this->outdated_library); + } + + public function clearOutdatedLibrary() + { + unset($this->outdated_library); + } + + /** + * Output only. An addon containing information about outdated libraries. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.OutdatedLibrary outdated_library = 11; + * @param \Google\Cloud\WebSecurityScanner\V1\OutdatedLibrary $var + * @return $this + */ + public function setOutdatedLibrary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1\OutdatedLibrary::class); + $this->outdated_library = $var; + + return $this; + } + + /** + * Output only. An addon containing detailed information regarding any resource causing the + * vulnerability such as JavaScript sources, image, audio files, etc. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ViolatingResource violating_resource = 12; + * @return \Google\Cloud\WebSecurityScanner\V1\ViolatingResource|null + */ + public function getViolatingResource() + { + return $this->violating_resource; + } + + public function hasViolatingResource() + { + return isset($this->violating_resource); + } + + public function clearViolatingResource() + { + unset($this->violating_resource); + } + + /** + * Output only. An addon containing detailed information regarding any resource causing the + * vulnerability such as JavaScript sources, image, audio files, etc. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ViolatingResource violating_resource = 12; + * @param \Google\Cloud\WebSecurityScanner\V1\ViolatingResource $var + * @return $this + */ + public function setViolatingResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1\ViolatingResource::class); + $this->violating_resource = $var; + + return $this; + } + + /** + * Output only. An addon containing information about vulnerable or missing HTTP headers. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.VulnerableHeaders vulnerable_headers = 15; + * @return \Google\Cloud\WebSecurityScanner\V1\VulnerableHeaders|null + */ + public function getVulnerableHeaders() + { + return $this->vulnerable_headers; + } + + public function hasVulnerableHeaders() + { + return isset($this->vulnerable_headers); + } + + public function clearVulnerableHeaders() + { + unset($this->vulnerable_headers); + } + + /** + * Output only. An addon containing information about vulnerable or missing HTTP headers. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.VulnerableHeaders vulnerable_headers = 15; + * @param \Google\Cloud\WebSecurityScanner\V1\VulnerableHeaders $var + * @return $this + */ + public function setVulnerableHeaders($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1\VulnerableHeaders::class); + $this->vulnerable_headers = $var; + + return $this; + } + + /** + * Output only. An addon containing information about request parameters which were found + * to be vulnerable. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.VulnerableParameters vulnerable_parameters = 13; + * @return \Google\Cloud\WebSecurityScanner\V1\VulnerableParameters|null + */ + public function getVulnerableParameters() + { + return $this->vulnerable_parameters; + } + + public function hasVulnerableParameters() + { + return isset($this->vulnerable_parameters); + } + + public function clearVulnerableParameters() + { + unset($this->vulnerable_parameters); + } + + /** + * Output only. An addon containing information about request parameters which were found + * to be vulnerable. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.VulnerableParameters vulnerable_parameters = 13; + * @param \Google\Cloud\WebSecurityScanner\V1\VulnerableParameters $var + * @return $this + */ + public function setVulnerableParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1\VulnerableParameters::class); + $this->vulnerable_parameters = $var; + + return $this; + } + + /** + * Output only. An addon containing information reported for an XSS, if any. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.Xss xss = 14; + * @return \Google\Cloud\WebSecurityScanner\V1\Xss|null + */ + public function getXss() + { + return $this->xss; + } + + public function hasXss() + { + return isset($this->xss); + } + + public function clearXss() + { + unset($this->xss); + } + + /** + * Output only. An addon containing information reported for an XSS, if any. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.Xss xss = 14; + * @param \Google\Cloud\WebSecurityScanner\V1\Xss $var + * @return $this + */ + public function setXss($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1\Xss::class); + $this->xss = $var; + + return $this; + } + + /** + * Output only. An addon containing information reported for an XXE, if any. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.Xxe xxe = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\WebSecurityScanner\V1\Xxe|null + */ + public function getXxe() + { + return $this->xxe; + } + + public function hasXxe() + { + return isset($this->xxe); + } + + public function clearXxe() + { + unset($this->xxe); + } + + /** + * Output only. An addon containing information reported for an XXE, if any. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.Xxe xxe = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\WebSecurityScanner\V1\Xxe $var + * @return $this + */ + public function setXxe($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1\Xxe::class); + $this->xxe = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Finding/Severity.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Finding/Severity.php new file mode 100644 index 000000000000..414c89667eba --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Finding/Severity.php @@ -0,0 +1,78 @@ +google.cloud.websecurityscanner.v1.Finding.Severity + */ +class Severity +{ + /** + * No severity specified. The default value. + * + * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; + */ + const SEVERITY_UNSPECIFIED = 0; + /** + * Critical severity. + * + * Generated from protobuf enum CRITICAL = 1; + */ + const CRITICAL = 1; + /** + * High severity. + * + * Generated from protobuf enum HIGH = 2; + */ + const HIGH = 2; + /** + * Medium severity. + * + * Generated from protobuf enum MEDIUM = 3; + */ + const MEDIUM = 3; + /** + * Low severity. + * + * Generated from protobuf enum LOW = 4; + */ + const LOW = 4; + + private static $valueToName = [ + self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', + self::CRITICAL => 'CRITICAL', + self::HIGH => 'HIGH', + self::MEDIUM => 'MEDIUM', + self::LOW => 'LOW', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Severity::class, \Google\Cloud\WebSecurityScanner\V1\Finding_Severity::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/FindingTypeStats.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/FindingTypeStats.php new file mode 100644 index 000000000000..52c1f5d58553 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/FindingTypeStats.php @@ -0,0 +1,102 @@ +google.cloud.websecurityscanner.v1.FindingTypeStats + */ +class FindingTypeStats extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The finding type associated with the stats. + * + * Generated from protobuf field string finding_type = 1; + */ + protected $finding_type = ''; + /** + * Output only. The count of findings belonging to this finding type. + * + * Generated from protobuf field int32 finding_count = 2; + */ + protected $finding_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $finding_type + * Output only. The finding type associated with the stats. + * @type int $finding_count + * Output only. The count of findings belonging to this finding type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\FindingTypeStats::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The finding type associated with the stats. + * + * Generated from protobuf field string finding_type = 1; + * @return string + */ + public function getFindingType() + { + return $this->finding_type; + } + + /** + * Output only. The finding type associated with the stats. + * + * Generated from protobuf field string finding_type = 1; + * @param string $var + * @return $this + */ + public function setFindingType($var) + { + GPBUtil::checkString($var, True); + $this->finding_type = $var; + + return $this; + } + + /** + * Output only. The count of findings belonging to this finding type. + * + * Generated from protobuf field int32 finding_count = 2; + * @return int + */ + public function getFindingCount() + { + return $this->finding_count; + } + + /** + * Output only. The count of findings belonging to this finding type. + * + * Generated from protobuf field int32 finding_count = 2; + * @param int $var + * @return $this + */ + public function setFindingCount($var) + { + GPBUtil::checkInt32($var); + $this->finding_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Form.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Form.php new file mode 100644 index 000000000000..d7c8fa1b4d63 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Form.php @@ -0,0 +1,101 @@ +google.cloud.websecurityscanner.v1.Form + */ +class Form extends \Google\Protobuf\Internal\Message +{ + /** + * ! The URI where to send the form when it's submitted. + * + * Generated from protobuf field string action_uri = 1; + */ + protected $action_uri = ''; + /** + * ! The names of form fields related to the vulnerability. + * + * Generated from protobuf field repeated string fields = 2; + */ + private $fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $action_uri + * ! The URI where to send the form when it's submitted. + * @type array|\Google\Protobuf\Internal\RepeatedField $fields + * ! The names of form fields related to the vulnerability. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\FindingAddon::initOnce(); + parent::__construct($data); + } + + /** + * ! The URI where to send the form when it's submitted. + * + * Generated from protobuf field string action_uri = 1; + * @return string + */ + public function getActionUri() + { + return $this->action_uri; + } + + /** + * ! The URI where to send the form when it's submitted. + * + * Generated from protobuf field string action_uri = 1; + * @param string $var + * @return $this + */ + public function setActionUri($var) + { + GPBUtil::checkString($var, True); + $this->action_uri = $var; + + return $this; + } + + /** + * ! The names of form fields related to the vulnerability. + * + * Generated from protobuf field repeated string fields = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFields() + { + return $this->fields; + } + + /** + * ! The names of form fields related to the vulnerability. + * + * Generated from protobuf field repeated string fields = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->fields = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/GetFindingRequest.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/GetFindingRequest.php new file mode 100644 index 000000000000..56613939f49b --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/GetFindingRequest.php @@ -0,0 +1,75 @@ +google.cloud.websecurityscanner.v1.GetFindingRequest + */ +class GetFindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Finding to be returned. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the Finding to be returned. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Finding to be returned. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the Finding to be returned. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/GetScanConfigRequest.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/GetScanConfigRequest.php new file mode 100644 index 000000000000..b2835242fe3b --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/GetScanConfigRequest.php @@ -0,0 +1,71 @@ +google.cloud.websecurityscanner.v1.GetScanConfigRequest + */ +class GetScanConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the ScanConfig to be returned. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the ScanConfig to be returned. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the ScanConfig to be returned. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the ScanConfig to be returned. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/GetScanRunRequest.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/GetScanRunRequest.php new file mode 100644 index 000000000000..b7d3f11f9e1e --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/GetScanRunRequest.php @@ -0,0 +1,75 @@ +google.cloud.websecurityscanner.v1.GetScanRunRequest + */ +class GetScanRunRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the ScanRun to be returned. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the ScanRun to be returned. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the ScanRun to be returned. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the ScanRun to be returned. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListCrawledUrlsRequest.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListCrawledUrlsRequest.php new file mode 100644 index 000000000000..55c61e7b7fba --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListCrawledUrlsRequest.php @@ -0,0 +1,159 @@ +google.cloud.websecurityscanner.v1.ListCrawledUrlsRequest + */ +class ListCrawledUrlsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string parent = 1; + */ + protected $parent = ''; + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + */ + protected $page_token = ''; + /** + * The maximum number of CrawledUrls to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * @type string $page_token + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * @type int $page_size + * The maximum number of CrawledUrls to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string parent = 1; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string parent = 1; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of CrawledUrls to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of CrawledUrls to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListCrawledUrlsResponse.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListCrawledUrlsResponse.php new file mode 100644 index 000000000000..2a14aca66997 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListCrawledUrlsResponse.php @@ -0,0 +1,105 @@ +google.cloud.websecurityscanner.v1.ListCrawledUrlsResponse + */ +class ListCrawledUrlsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of CrawledUrls returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.CrawledUrl crawled_urls = 1; + */ + private $crawled_urls; + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\WebSecurityScanner\V1\CrawledUrl>|\Google\Protobuf\Internal\RepeatedField $crawled_urls + * The list of CrawledUrls returned. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * The list of CrawledUrls returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.CrawledUrl crawled_urls = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCrawledUrls() + { + return $this->crawled_urls; + } + + /** + * The list of CrawledUrls returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.CrawledUrl crawled_urls = 1; + * @param array<\Google\Cloud\WebSecurityScanner\V1\CrawledUrl>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCrawledUrls($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1\CrawledUrl::class); + $this->crawled_urls = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingTypeStatsRequest.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingTypeStatsRequest.php new file mode 100644 index 000000000000..2e969337f774 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingTypeStatsRequest.php @@ -0,0 +1,75 @@ +google.cloud.websecurityscanner.v1.ListFindingTypeStatsRequest + */ +class ListFindingTypeStatsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string parent = 1; + */ + protected $parent = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string parent = 1; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string parent = 1; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingTypeStatsResponse.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingTypeStatsResponse.php new file mode 100644 index 000000000000..68c1c6ea8191 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingTypeStatsResponse.php @@ -0,0 +1,67 @@ +google.cloud.websecurityscanner.v1.ListFindingTypeStatsResponse + */ +class ListFindingTypeStatsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of FindingTypeStats returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.FindingTypeStats finding_type_stats = 1; + */ + private $finding_type_stats; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\WebSecurityScanner\V1\FindingTypeStats>|\Google\Protobuf\Internal\RepeatedField $finding_type_stats + * The list of FindingTypeStats returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * The list of FindingTypeStats returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.FindingTypeStats finding_type_stats = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFindingTypeStats() + { + return $this->finding_type_stats; + } + + /** + * The list of FindingTypeStats returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.FindingTypeStats finding_type_stats = 1; + * @param array<\Google\Cloud\WebSecurityScanner\V1\FindingTypeStats>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFindingTypeStats($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1\FindingTypeStats::class); + $this->finding_type_stats = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingsRequest.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingsRequest.php new file mode 100644 index 000000000000..44485fffb638 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingsRequest.php @@ -0,0 +1,205 @@ +google.cloud.websecurityscanner.v1.ListFindingsRequest + */ +class ListFindingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string parent = 1; + */ + protected $parent = ''; + /** + * The filter expression. The expression must be in the format: + * . + * Supported field: 'finding_type'. + * Supported operator: '='. + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The maximum number of Findings to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * @type string $filter + * The filter expression. The expression must be in the format: + * . + * Supported field: 'finding_type'. + * Supported operator: '='. + * @type string $page_token + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * @type int $page_size + * The maximum number of Findings to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string parent = 1; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string parent = 1; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The filter expression. The expression must be in the format: + * . + * Supported field: 'finding_type'. + * Supported operator: '='. + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter expression. The expression must be in the format: + * . + * Supported field: 'finding_type'. + * Supported operator: '='. + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of Findings to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of Findings to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingsResponse.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingsResponse.php new file mode 100644 index 000000000000..8adbe0f0cb91 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingsResponse.php @@ -0,0 +1,105 @@ +google.cloud.websecurityscanner.v1.ListFindingsResponse + */ +class ListFindingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Findings returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.Finding findings = 1; + */ + private $findings; + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\WebSecurityScanner\V1\Finding>|\Google\Protobuf\Internal\RepeatedField $findings + * The list of Findings returned. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * The list of Findings returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.Finding findings = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFindings() + { + return $this->findings; + } + + /** + * The list of Findings returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.Finding findings = 1; + * @param array<\Google\Cloud\WebSecurityScanner\V1\Finding>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFindings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1\Finding::class); + $this->findings = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanConfigsRequest.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanConfigsRequest.php new file mode 100644 index 000000000000..fdd69ae7994e --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanConfigsRequest.php @@ -0,0 +1,155 @@ +google.cloud.websecurityscanner.v1.ListScanConfigsRequest + */ +class ListScanConfigsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, which should be a project resource name in the + * format 'projects/{projectId}'. + * + * Generated from protobuf field string parent = 1; + */ + protected $parent = ''; + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + */ + protected $page_token = ''; + /** + * The maximum number of ScanConfigs to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, which should be a project resource name in the + * format 'projects/{projectId}'. + * @type string $page_token + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * @type int $page_size + * The maximum number of ScanConfigs to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, which should be a project resource name in the + * format 'projects/{projectId}'. + * + * Generated from protobuf field string parent = 1; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name, which should be a project resource name in the + * format 'projects/{projectId}'. + * + * Generated from protobuf field string parent = 1; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of ScanConfigs to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of ScanConfigs to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanConfigsResponse.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanConfigsResponse.php new file mode 100644 index 000000000000..4fe50cac7c9a --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanConfigsResponse.php @@ -0,0 +1,105 @@ +google.cloud.websecurityscanner.v1.ListScanConfigsResponse + */ +class ListScanConfigsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of ScanConfigs returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.ScanConfig scan_configs = 1; + */ + private $scan_configs; + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\WebSecurityScanner\V1\ScanConfig>|\Google\Protobuf\Internal\RepeatedField $scan_configs + * The list of ScanConfigs returned. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * The list of ScanConfigs returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.ScanConfig scan_configs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getScanConfigs() + { + return $this->scan_configs; + } + + /** + * The list of ScanConfigs returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.ScanConfig scan_configs = 1; + * @param array<\Google\Cloud\WebSecurityScanner\V1\ScanConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setScanConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1\ScanConfig::class); + $this->scan_configs = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanRunsRequest.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanRunsRequest.php new file mode 100644 index 000000000000..ad0f4a66754d --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanRunsRequest.php @@ -0,0 +1,155 @@ +google.cloud.websecurityscanner.v1.ListScanRunsRequest + */ +class ListScanRunsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, which should be a scan resource name in the + * format 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string parent = 1; + */ + protected $parent = ''; + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + */ + protected $page_token = ''; + /** + * The maximum number of ScanRuns to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, which should be a scan resource name in the + * format 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * @type string $page_token + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * @type int $page_size + * The maximum number of ScanRuns to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, which should be a scan resource name in the + * format 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string parent = 1; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name, which should be a scan resource name in the + * format 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string parent = 1; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of ScanRuns to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of ScanRuns to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanRunsResponse.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanRunsResponse.php new file mode 100644 index 000000000000..716f771565ec --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanRunsResponse.php @@ -0,0 +1,105 @@ +google.cloud.websecurityscanner.v1.ListScanRunsResponse + */ +class ListScanRunsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of ScanRuns returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.ScanRun scan_runs = 1; + */ + private $scan_runs; + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\WebSecurityScanner\V1\ScanRun>|\Google\Protobuf\Internal\RepeatedField $scan_runs + * The list of ScanRuns returned. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * The list of ScanRuns returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.ScanRun scan_runs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getScanRuns() + { + return $this->scan_runs; + } + + /** + * The list of ScanRuns returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.ScanRun scan_runs = 1; + * @param array<\Google\Cloud\WebSecurityScanner\V1\ScanRun>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setScanRuns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1\ScanRun::class); + $this->scan_runs = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/OutdatedLibrary.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/OutdatedLibrary.php new file mode 100644 index 000000000000..2ec473bc7eeb --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/OutdatedLibrary.php @@ -0,0 +1,135 @@ +google.cloud.websecurityscanner.v1.OutdatedLibrary + */ +class OutdatedLibrary extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the outdated library. + * + * Generated from protobuf field string library_name = 1; + */ + protected $library_name = ''; + /** + * The version number. + * + * Generated from protobuf field string version = 2; + */ + protected $version = ''; + /** + * URLs to learn more information about the vulnerabilities in the library. + * + * Generated from protobuf field repeated string learn_more_urls = 3; + */ + private $learn_more_urls; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $library_name + * The name of the outdated library. + * @type string $version + * The version number. + * @type array|\Google\Protobuf\Internal\RepeatedField $learn_more_urls + * URLs to learn more information about the vulnerabilities in the library. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\FindingAddon::initOnce(); + parent::__construct($data); + } + + /** + * The name of the outdated library. + * + * Generated from protobuf field string library_name = 1; + * @return string + */ + public function getLibraryName() + { + return $this->library_name; + } + + /** + * The name of the outdated library. + * + * Generated from protobuf field string library_name = 1; + * @param string $var + * @return $this + */ + public function setLibraryName($var) + { + GPBUtil::checkString($var, True); + $this->library_name = $var; + + return $this; + } + + /** + * The version number. + * + * Generated from protobuf field string version = 2; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * The version number. + * + * Generated from protobuf field string version = 2; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * URLs to learn more information about the vulnerabilities in the library. + * + * Generated from protobuf field repeated string learn_more_urls = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLearnMoreUrls() + { + return $this->learn_more_urls; + } + + /** + * URLs to learn more information about the vulnerabilities in the library. + * + * Generated from protobuf field repeated string learn_more_urls = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLearnMoreUrls($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->learn_more_urls = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig.php new file mode 100644 index 000000000000..2a96fcca040b --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig.php @@ -0,0 +1,535 @@ +google.cloud.websecurityscanner.v1.ScanConfig + */ +class ScanConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the ScanConfig. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are + * generated by the system. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The user provided display name of the ScanConfig. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * The maximum QPS during scanning. A valid value ranges from 5 to 20 + * inclusively. If the field is unspecified or its value is set 0, server will + * default to 15. Other values outside of [5, 20] range will be rejected with + * INVALID_ARGUMENT error. + * + * Generated from protobuf field int32 max_qps = 3; + */ + protected $max_qps = 0; + /** + * Required. The starting URLs from which the scanner finds site pages. + * + * Generated from protobuf field repeated string starting_urls = 4; + */ + private $starting_urls; + /** + * The authentication configuration. If specified, service will use the + * authentication configuration during scanning. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.Authentication authentication = 5; + */ + protected $authentication = null; + /** + * The user agent used during scanning. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.UserAgent user_agent = 6; + */ + protected $user_agent = 0; + /** + * The excluded URL patterns as described in + * https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls + * + * Generated from protobuf field repeated string blacklist_patterns = 7; + */ + private $blacklist_patterns; + /** + * The schedule of the ScanConfig. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.Schedule schedule = 8; + */ + protected $schedule = null; + /** + * Controls export of scan configurations and results to Security + * Command Center. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.ExportToSecurityCommandCenter export_to_security_command_center = 10; + */ + protected $export_to_security_command_center = 0; + /** + * The risk level selected for the scan + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.RiskLevel risk_level = 12; + */ + protected $risk_level = 0; + /** + * Whether the scan config is managed by Web Security Scanner, output + * only. + * + * Generated from protobuf field bool managed_scan = 13; + */ + protected $managed_scan = false; + /** + * Whether the scan configuration has enabled static IP address scan feature. + * If enabled, the scanner will access applications from static IP addresses. + * + * Generated from protobuf field bool static_ip_scan = 14; + */ + protected $static_ip_scan = false; + /** + * Whether to keep scanning even if most requests return HTTP error codes. + * + * Generated from protobuf field bool ignore_http_status_errors = 15; + */ + protected $ignore_http_status_errors = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the ScanConfig. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are + * generated by the system. + * @type string $display_name + * Required. The user provided display name of the ScanConfig. + * @type int $max_qps + * The maximum QPS during scanning. A valid value ranges from 5 to 20 + * inclusively. If the field is unspecified or its value is set 0, server will + * default to 15. Other values outside of [5, 20] range will be rejected with + * INVALID_ARGUMENT error. + * @type array|\Google\Protobuf\Internal\RepeatedField $starting_urls + * Required. The starting URLs from which the scanner finds site pages. + * @type \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Authentication $authentication + * The authentication configuration. If specified, service will use the + * authentication configuration during scanning. + * @type int $user_agent + * The user agent used during scanning. + * @type array|\Google\Protobuf\Internal\RepeatedField $blacklist_patterns + * The excluded URL patterns as described in + * https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls + * @type \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Schedule $schedule + * The schedule of the ScanConfig. + * @type int $export_to_security_command_center + * Controls export of scan configurations and results to Security + * Command Center. + * @type int $risk_level + * The risk level selected for the scan + * @type bool $managed_scan + * Whether the scan config is managed by Web Security Scanner, output + * only. + * @type bool $static_ip_scan + * Whether the scan configuration has enabled static IP address scan feature. + * If enabled, the scanner will access applications from static IP addresses. + * @type bool $ignore_http_status_errors + * Whether to keep scanning even if most requests return HTTP error codes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\ScanConfig::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the ScanConfig. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are + * generated by the system. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the ScanConfig. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are + * generated by the system. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The user provided display name of the ScanConfig. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The user provided display name of the ScanConfig. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The maximum QPS during scanning. A valid value ranges from 5 to 20 + * inclusively. If the field is unspecified or its value is set 0, server will + * default to 15. Other values outside of [5, 20] range will be rejected with + * INVALID_ARGUMENT error. + * + * Generated from protobuf field int32 max_qps = 3; + * @return int + */ + public function getMaxQps() + { + return $this->max_qps; + } + + /** + * The maximum QPS during scanning. A valid value ranges from 5 to 20 + * inclusively. If the field is unspecified or its value is set 0, server will + * default to 15. Other values outside of [5, 20] range will be rejected with + * INVALID_ARGUMENT error. + * + * Generated from protobuf field int32 max_qps = 3; + * @param int $var + * @return $this + */ + public function setMaxQps($var) + { + GPBUtil::checkInt32($var); + $this->max_qps = $var; + + return $this; + } + + /** + * Required. The starting URLs from which the scanner finds site pages. + * + * Generated from protobuf field repeated string starting_urls = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStartingUrls() + { + return $this->starting_urls; + } + + /** + * Required. The starting URLs from which the scanner finds site pages. + * + * Generated from protobuf field repeated string starting_urls = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStartingUrls($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->starting_urls = $arr; + + return $this; + } + + /** + * The authentication configuration. If specified, service will use the + * authentication configuration during scanning. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.Authentication authentication = 5; + * @return \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Authentication|null + */ + public function getAuthentication() + { + return $this->authentication; + } + + public function hasAuthentication() + { + return isset($this->authentication); + } + + public function clearAuthentication() + { + unset($this->authentication); + } + + /** + * The authentication configuration. If specified, service will use the + * authentication configuration during scanning. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.Authentication authentication = 5; + * @param \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Authentication $var + * @return $this + */ + public function setAuthentication($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Authentication::class); + $this->authentication = $var; + + return $this; + } + + /** + * The user agent used during scanning. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.UserAgent user_agent = 6; + * @return int + */ + public function getUserAgent() + { + return $this->user_agent; + } + + /** + * The user agent used during scanning. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.UserAgent user_agent = 6; + * @param int $var + * @return $this + */ + public function setUserAgent($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1\ScanConfig\UserAgent::class); + $this->user_agent = $var; + + return $this; + } + + /** + * The excluded URL patterns as described in + * https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls + * + * Generated from protobuf field repeated string blacklist_patterns = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBlacklistPatterns() + { + return $this->blacklist_patterns; + } + + /** + * The excluded URL patterns as described in + * https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls + * + * Generated from protobuf field repeated string blacklist_patterns = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBlacklistPatterns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->blacklist_patterns = $arr; + + return $this; + } + + /** + * The schedule of the ScanConfig. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.Schedule schedule = 8; + * @return \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Schedule|null + */ + public function getSchedule() + { + return $this->schedule; + } + + public function hasSchedule() + { + return isset($this->schedule); + } + + public function clearSchedule() + { + unset($this->schedule); + } + + /** + * The schedule of the ScanConfig. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.Schedule schedule = 8; + * @param \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Schedule $var + * @return $this + */ + public function setSchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Schedule::class); + $this->schedule = $var; + + return $this; + } + + /** + * Controls export of scan configurations and results to Security + * Command Center. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.ExportToSecurityCommandCenter export_to_security_command_center = 10; + * @return int + */ + public function getExportToSecurityCommandCenter() + { + return $this->export_to_security_command_center; + } + + /** + * Controls export of scan configurations and results to Security + * Command Center. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.ExportToSecurityCommandCenter export_to_security_command_center = 10; + * @param int $var + * @return $this + */ + public function setExportToSecurityCommandCenter($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1\ScanConfig\ExportToSecurityCommandCenter::class); + $this->export_to_security_command_center = $var; + + return $this; + } + + /** + * The risk level selected for the scan + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.RiskLevel risk_level = 12; + * @return int + */ + public function getRiskLevel() + { + return $this->risk_level; + } + + /** + * The risk level selected for the scan + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.RiskLevel risk_level = 12; + * @param int $var + * @return $this + */ + public function setRiskLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1\ScanConfig\RiskLevel::class); + $this->risk_level = $var; + + return $this; + } + + /** + * Whether the scan config is managed by Web Security Scanner, output + * only. + * + * Generated from protobuf field bool managed_scan = 13; + * @return bool + */ + public function getManagedScan() + { + return $this->managed_scan; + } + + /** + * Whether the scan config is managed by Web Security Scanner, output + * only. + * + * Generated from protobuf field bool managed_scan = 13; + * @param bool $var + * @return $this + */ + public function setManagedScan($var) + { + GPBUtil::checkBool($var); + $this->managed_scan = $var; + + return $this; + } + + /** + * Whether the scan configuration has enabled static IP address scan feature. + * If enabled, the scanner will access applications from static IP addresses. + * + * Generated from protobuf field bool static_ip_scan = 14; + * @return bool + */ + public function getStaticIpScan() + { + return $this->static_ip_scan; + } + + /** + * Whether the scan configuration has enabled static IP address scan feature. + * If enabled, the scanner will access applications from static IP addresses. + * + * Generated from protobuf field bool static_ip_scan = 14; + * @param bool $var + * @return $this + */ + public function setStaticIpScan($var) + { + GPBUtil::checkBool($var); + $this->static_ip_scan = $var; + + return $this; + } + + /** + * Whether to keep scanning even if most requests return HTTP error codes. + * + * Generated from protobuf field bool ignore_http_status_errors = 15; + * @return bool + */ + public function getIgnoreHttpStatusErrors() + { + return $this->ignore_http_status_errors; + } + + /** + * Whether to keep scanning even if most requests return HTTP error codes. + * + * Generated from protobuf field bool ignore_http_status_errors = 15; + * @param bool $var + * @return $this + */ + public function setIgnoreHttpStatusErrors($var) + { + GPBUtil::checkBool($var); + $this->ignore_http_status_errors = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication.php new file mode 100644 index 000000000000..35fe4660708d --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication.php @@ -0,0 +1,149 @@ +google.cloud.websecurityscanner.v1.ScanConfig.Authentication + */ +class Authentication extends \Google\Protobuf\Internal\Message +{ + protected $authentication; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Authentication\GoogleAccount $google_account + * Authentication using a Google account. + * @type \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Authentication\CustomAccount $custom_account + * Authentication using a custom account. + * @type \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Authentication\IapCredential $iap_credential + * Authentication using Identity-Aware-Proxy (IAP). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\ScanConfig::initOnce(); + parent::__construct($data); + } + + /** + * Authentication using a Google account. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.Authentication.GoogleAccount google_account = 1 [deprecated = true]; + * @return \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Authentication\GoogleAccount|null + * @deprecated + */ + public function getGoogleAccount() + { + @trigger_error('google_account is deprecated.', E_USER_DEPRECATED); + return $this->readOneof(1); + } + + public function hasGoogleAccount() + { + @trigger_error('google_account is deprecated.', E_USER_DEPRECATED); + return $this->hasOneof(1); + } + + /** + * Authentication using a Google account. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.Authentication.GoogleAccount google_account = 1 [deprecated = true]; + * @param \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Authentication\GoogleAccount $var + * @return $this + * @deprecated + */ + public function setGoogleAccount($var) + { + @trigger_error('google_account is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Authentication\GoogleAccount::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Authentication using a custom account. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.Authentication.CustomAccount custom_account = 2; + * @return \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Authentication\CustomAccount|null + */ + public function getCustomAccount() + { + return $this->readOneof(2); + } + + public function hasCustomAccount() + { + return $this->hasOneof(2); + } + + /** + * Authentication using a custom account. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.Authentication.CustomAccount custom_account = 2; + * @param \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Authentication\CustomAccount $var + * @return $this + */ + public function setCustomAccount($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Authentication\CustomAccount::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Authentication using Identity-Aware-Proxy (IAP). + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.Authentication.IapCredential iap_credential = 4; + * @return \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Authentication\IapCredential|null + */ + public function getIapCredential() + { + return $this->readOneof(4); + } + + public function hasIapCredential() + { + return $this->hasOneof(4); + } + + /** + * Authentication using Identity-Aware-Proxy (IAP). + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.Authentication.IapCredential iap_credential = 4; + * @param \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Authentication\IapCredential $var + * @return $this + */ + public function setIapCredential($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Authentication\IapCredential::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getAuthentication() + { + return $this->whichOneof("authentication"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Authentication::class, \Google\Cloud\WebSecurityScanner\V1\ScanConfig_Authentication::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/CustomAccount.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/CustomAccount.php new file mode 100644 index 000000000000..ab282fcb92a1 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/CustomAccount.php @@ -0,0 +1,142 @@ +google.cloud.websecurityscanner.v1.ScanConfig.Authentication.CustomAccount + */ +class CustomAccount extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The user name of the custom account. + * + * Generated from protobuf field string username = 1; + */ + protected $username = ''; + /** + * Required. Input only. The password of the custom account. The credential is stored encrypted + * and not returned in any response nor included in audit logs. + * + * Generated from protobuf field string password = 2; + */ + protected $password = ''; + /** + * Required. The login form URL of the website. + * + * Generated from protobuf field string login_url = 3; + */ + protected $login_url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $username + * Required. The user name of the custom account. + * @type string $password + * Required. Input only. The password of the custom account. The credential is stored encrypted + * and not returned in any response nor included in audit logs. + * @type string $login_url + * Required. The login form URL of the website. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\ScanConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The user name of the custom account. + * + * Generated from protobuf field string username = 1; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Required. The user name of the custom account. + * + * Generated from protobuf field string username = 1; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * Required. Input only. The password of the custom account. The credential is stored encrypted + * and not returned in any response nor included in audit logs. + * + * Generated from protobuf field string password = 2; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Required. Input only. The password of the custom account. The credential is stored encrypted + * and not returned in any response nor included in audit logs. + * + * Generated from protobuf field string password = 2; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * Required. The login form URL of the website. + * + * Generated from protobuf field string login_url = 3; + * @return string + */ + public function getLoginUrl() + { + return $this->login_url; + } + + /** + * Required. The login form URL of the website. + * + * Generated from protobuf field string login_url = 3; + * @param string $var + * @return $this + */ + public function setLoginUrl($var) + { + GPBUtil::checkString($var, True); + $this->login_url = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CustomAccount::class, \Google\Cloud\WebSecurityScanner\V1\ScanConfig_Authentication_CustomAccount::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/GoogleAccount.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/GoogleAccount.php new file mode 100644 index 000000000000..c6a369fd893e --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/GoogleAccount.php @@ -0,0 +1,109 @@ +google.cloud.websecurityscanner.v1.ScanConfig.Authentication.GoogleAccount + */ +class GoogleAccount extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The user name of the Google account. + * + * Generated from protobuf field string username = 1; + */ + protected $username = ''; + /** + * Required. Input only. The password of the Google account. The credential is stored encrypted + * and not returned in any response nor included in audit logs. + * + * Generated from protobuf field string password = 2; + */ + protected $password = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $username + * Required. The user name of the Google account. + * @type string $password + * Required. Input only. The password of the Google account. The credential is stored encrypted + * and not returned in any response nor included in audit logs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\ScanConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The user name of the Google account. + * + * Generated from protobuf field string username = 1; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Required. The user name of the Google account. + * + * Generated from protobuf field string username = 1; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * Required. Input only. The password of the Google account. The credential is stored encrypted + * and not returned in any response nor included in audit logs. + * + * Generated from protobuf field string password = 2; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Required. Input only. The password of the Google account. The credential is stored encrypted + * and not returned in any response nor included in audit logs. + * + * Generated from protobuf field string password = 2; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GoogleAccount::class, \Google\Cloud\WebSecurityScanner\V1\ScanConfig_Authentication_GoogleAccount::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/IapCredential.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/IapCredential.php new file mode 100644 index 000000000000..3d92e0c8b96e --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/IapCredential.php @@ -0,0 +1,81 @@ +google.cloud.websecurityscanner.v1.ScanConfig.Authentication.IapCredential + */ +class IapCredential extends \Google\Protobuf\Internal\Message +{ + protected $iap_credentials; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Authentication\IapCredential\IapTestServiceAccountInfo $iap_test_service_account_info + * Authentication configuration when Web-Security-Scanner service + * account is added in Identity-Aware-Proxy (IAP) access policies. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\ScanConfig::initOnce(); + parent::__construct($data); + } + + /** + * Authentication configuration when Web-Security-Scanner service + * account is added in Identity-Aware-Proxy (IAP) access policies. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.Authentication.IapCredential.IapTestServiceAccountInfo iap_test_service_account_info = 1; + * @return \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Authentication\IapCredential\IapTestServiceAccountInfo|null + */ + public function getIapTestServiceAccountInfo() + { + return $this->readOneof(1); + } + + public function hasIapTestServiceAccountInfo() + { + return $this->hasOneof(1); + } + + /** + * Authentication configuration when Web-Security-Scanner service + * account is added in Identity-Aware-Proxy (IAP) access policies. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.Authentication.IapCredential.IapTestServiceAccountInfo iap_test_service_account_info = 1; + * @param \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Authentication\IapCredential\IapTestServiceAccountInfo $var + * @return $this + */ + public function setIapTestServiceAccountInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1\ScanConfig\Authentication\IapCredential\IapTestServiceAccountInfo::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getIapCredentials() + { + return $this->whichOneof("iap_credentials"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IapCredential::class, \Google\Cloud\WebSecurityScanner\V1\ScanConfig_Authentication_IapCredential::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/IapCredential/IapTestServiceAccountInfo.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/IapCredential/IapTestServiceAccountInfo.php new file mode 100644 index 000000000000..9863073c274c --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/IapCredential/IapTestServiceAccountInfo.php @@ -0,0 +1,75 @@ +google.cloud.websecurityscanner.v1.ScanConfig.Authentication.IapCredential.IapTestServiceAccountInfo + */ +class IapTestServiceAccountInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Describes OAuth2 client id of resources protected by + * Identity-Aware-Proxy (IAP). + * + * Generated from protobuf field string target_audience_client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $target_audience_client_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $target_audience_client_id + * Required. Describes OAuth2 client id of resources protected by + * Identity-Aware-Proxy (IAP). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\ScanConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. Describes OAuth2 client id of resources protected by + * Identity-Aware-Proxy (IAP). + * + * Generated from protobuf field string target_audience_client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTargetAudienceClientId() + { + return $this->target_audience_client_id; + } + + /** + * Required. Describes OAuth2 client id of resources protected by + * Identity-Aware-Proxy (IAP). + * + * Generated from protobuf field string target_audience_client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTargetAudienceClientId($var) + { + GPBUtil::checkString($var, True); + $this->target_audience_client_id = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IapTestServiceAccountInfo::class, \Google\Cloud\WebSecurityScanner\V1\ScanConfig_Authentication_IapCredential_IapTestServiceAccountInfo::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/ExportToSecurityCommandCenter.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/ExportToSecurityCommandCenter.php new file mode 100644 index 000000000000..db64d6cda212 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/ExportToSecurityCommandCenter.php @@ -0,0 +1,65 @@ +google.cloud.websecurityscanner.v1.ScanConfig.ExportToSecurityCommandCenter + */ +class ExportToSecurityCommandCenter +{ + /** + * Use default, which is ENABLED. + * + * Generated from protobuf enum EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED = 0; + */ + const EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED = 0; + /** + * Export results of this scan to Security Command Center. + * + * Generated from protobuf enum ENABLED = 1; + */ + const ENABLED = 1; + /** + * Do not export results of this scan to Security Command Center. + * + * Generated from protobuf enum DISABLED = 2; + */ + const DISABLED = 2; + + private static $valueToName = [ + self::EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED => 'EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED', + self::ENABLED => 'ENABLED', + self::DISABLED => 'DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ExportToSecurityCommandCenter::class, \Google\Cloud\WebSecurityScanner\V1\ScanConfig_ExportToSecurityCommandCenter::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/RiskLevel.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/RiskLevel.php new file mode 100644 index 000000000000..4cc650314a1a --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/RiskLevel.php @@ -0,0 +1,66 @@ +google.cloud.websecurityscanner.v1.ScanConfig.RiskLevel + */ +class RiskLevel +{ + /** + * Use default, which is NORMAL. + * + * Generated from protobuf enum RISK_LEVEL_UNSPECIFIED = 0; + */ + const RISK_LEVEL_UNSPECIFIED = 0; + /** + * Normal scanning (Recommended) + * + * Generated from protobuf enum NORMAL = 1; + */ + const NORMAL = 1; + /** + * Lower impact scanning + * + * Generated from protobuf enum LOW = 2; + */ + const LOW = 2; + + private static $valueToName = [ + self::RISK_LEVEL_UNSPECIFIED => 'RISK_LEVEL_UNSPECIFIED', + self::NORMAL => 'NORMAL', + self::LOW => 'LOW', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RiskLevel::class, \Google\Cloud\WebSecurityScanner\V1\ScanConfig_RiskLevel::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Schedule.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Schedule.php new file mode 100644 index 000000000000..0f776ecc8718 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Schedule.php @@ -0,0 +1,126 @@ +google.cloud.websecurityscanner.v1.ScanConfig.Schedule + */ +class Schedule extends \Google\Protobuf\Internal\Message +{ + /** + * A timestamp indicates when the next run will be scheduled. The value is + * refreshed by the server after each run. If unspecified, it will default + * to current server time, which means the scan will be scheduled to start + * immediately. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; + */ + protected $schedule_time = null; + /** + * Required. The duration of time between executions in days. + * + * Generated from protobuf field int32 interval_duration_days = 2; + */ + protected $interval_duration_days = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $schedule_time + * A timestamp indicates when the next run will be scheduled. The value is + * refreshed by the server after each run. If unspecified, it will default + * to current server time, which means the scan will be scheduled to start + * immediately. + * @type int $interval_duration_days + * Required. The duration of time between executions in days. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\ScanConfig::initOnce(); + parent::__construct($data); + } + + /** + * A timestamp indicates when the next run will be scheduled. The value is + * refreshed by the server after each run. If unspecified, it will default + * to current server time, which means the scan will be scheduled to start + * immediately. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduleTime() + { + return $this->schedule_time; + } + + public function hasScheduleTime() + { + return isset($this->schedule_time); + } + + public function clearScheduleTime() + { + unset($this->schedule_time); + } + + /** + * A timestamp indicates when the next run will be scheduled. The value is + * refreshed by the server after each run. If unspecified, it will default + * to current server time, which means the scan will be scheduled to start + * immediately. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduleTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->schedule_time = $var; + + return $this; + } + + /** + * Required. The duration of time between executions in days. + * + * Generated from protobuf field int32 interval_duration_days = 2; + * @return int + */ + public function getIntervalDurationDays() + { + return $this->interval_duration_days; + } + + /** + * Required. The duration of time between executions in days. + * + * Generated from protobuf field int32 interval_duration_days = 2; + * @param int $var + * @return $this + */ + public function setIntervalDurationDays($var) + { + GPBUtil::checkInt32($var); + $this->interval_duration_days = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Schedule::class, \Google\Cloud\WebSecurityScanner\V1\ScanConfig_Schedule::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/UserAgent.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/UserAgent.php new file mode 100644 index 000000000000..46d0537dec33 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/UserAgent.php @@ -0,0 +1,71 @@ +google.cloud.websecurityscanner.v1.ScanConfig.UserAgent + */ +class UserAgent +{ + /** + * The user agent is unknown. Service will default to CHROME_LINUX. + * + * Generated from protobuf enum USER_AGENT_UNSPECIFIED = 0; + */ + const USER_AGENT_UNSPECIFIED = 0; + /** + * Chrome on Linux. This is the service default if unspecified. + * + * Generated from protobuf enum CHROME_LINUX = 1; + */ + const CHROME_LINUX = 1; + /** + * Chrome on Android. + * + * Generated from protobuf enum CHROME_ANDROID = 2; + */ + const CHROME_ANDROID = 2; + /** + * Safari on IPhone. + * + * Generated from protobuf enum SAFARI_IPHONE = 3; + */ + const SAFARI_IPHONE = 3; + + private static $valueToName = [ + self::USER_AGENT_UNSPECIFIED => 'USER_AGENT_UNSPECIFIED', + self::CHROME_LINUX => 'CHROME_LINUX', + self::CHROME_ANDROID => 'CHROME_ANDROID', + self::SAFARI_IPHONE => 'SAFARI_IPHONE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UserAgent::class, \Google\Cloud\WebSecurityScanner\V1\ScanConfig_UserAgent::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfigError.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfigError.php new file mode 100644 index 000000000000..f29dc04e6690 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfigError.php @@ -0,0 +1,116 @@ +google.cloud.websecurityscanner.v1.ScanConfigError + */ +class ScanConfigError extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Indicates the reason code for a configuration failure. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfigError.Code code = 1; + */ + protected $code = 0; + /** + * Output only. Indicates the full name of the ScanConfig field that triggers this error, + * for example "scan_config.max_qps". This field is provided for + * troubleshooting purposes only and its actual value can change in the + * future. + * + * Generated from protobuf field string field_name = 2; + */ + protected $field_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * Output only. Indicates the reason code for a configuration failure. + * @type string $field_name + * Output only. Indicates the full name of the ScanConfig field that triggers this error, + * for example "scan_config.max_qps". This field is provided for + * troubleshooting purposes only and its actual value can change in the + * future. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\ScanConfigError::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Indicates the reason code for a configuration failure. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfigError.Code code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Output only. Indicates the reason code for a configuration failure. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfigError.Code code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1\ScanConfigError\Code::class); + $this->code = $var; + + return $this; + } + + /** + * Output only. Indicates the full name of the ScanConfig field that triggers this error, + * for example "scan_config.max_qps". This field is provided for + * troubleshooting purposes only and its actual value can change in the + * future. + * + * Generated from protobuf field string field_name = 2; + * @return string + */ + public function getFieldName() + { + return $this->field_name; + } + + /** + * Output only. Indicates the full name of the ScanConfig field that triggers this error, + * for example "scan_config.max_qps". This field is provided for + * troubleshooting purposes only and its actual value can change in the + * future. + * + * Generated from protobuf field string field_name = 2; + * @param string $var + * @return $this + */ + public function setFieldName($var) + { + GPBUtil::checkString($var, True); + $this->field_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfigError/Code.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfigError/Code.php new file mode 100644 index 000000000000..1346f35f8789 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfigError/Code.php @@ -0,0 +1,355 @@ +google.cloud.websecurityscanner.v1.ScanConfigError.Code + */ +class Code +{ + /** + * There is no error. + * + * Generated from protobuf enum CODE_UNSPECIFIED = 0; + */ + const CODE_UNSPECIFIED = 0; + /** + * There is no error. + * + * Generated from protobuf enum OK = 0; + */ + const OK = 0; + /** + * Indicates an internal server error. + * Please DO NOT USE THIS ERROR CODE unless the root cause is truly unknown. + * + * Generated from protobuf enum INTERNAL_ERROR = 1; + */ + const INTERNAL_ERROR = 1; + /** + * One of the seed URLs is an App Engine URL but we cannot validate the scan + * settings due to an App Engine API backend error. + * + * Generated from protobuf enum APPENGINE_API_BACKEND_ERROR = 2; + */ + const APPENGINE_API_BACKEND_ERROR = 2; + /** + * One of the seed URLs is an App Engine URL but we cannot access the + * App Engine API to validate scan settings. + * + * Generated from protobuf enum APPENGINE_API_NOT_ACCESSIBLE = 3; + */ + const APPENGINE_API_NOT_ACCESSIBLE = 3; + /** + * One of the seed URLs is an App Engine URL but the Default Host of the + * App Engine is not set. + * + * Generated from protobuf enum APPENGINE_DEFAULT_HOST_MISSING = 4; + */ + const APPENGINE_DEFAULT_HOST_MISSING = 4; + /** + * Google corporate accounts can not be used for scanning. + * + * Generated from protobuf enum CANNOT_USE_GOOGLE_COM_ACCOUNT = 6; + */ + const CANNOT_USE_GOOGLE_COM_ACCOUNT = 6; + /** + * The account of the scan creator can not be used for scanning. + * + * Generated from protobuf enum CANNOT_USE_OWNER_ACCOUNT = 7; + */ + const CANNOT_USE_OWNER_ACCOUNT = 7; + /** + * This scan targets Compute Engine, but we cannot validate scan settings + * due to a Compute Engine API backend error. + * + * Generated from protobuf enum COMPUTE_API_BACKEND_ERROR = 8; + */ + const COMPUTE_API_BACKEND_ERROR = 8; + /** + * This scan targets Compute Engine, but we cannot access the Compute Engine + * API to validate the scan settings. + * + * Generated from protobuf enum COMPUTE_API_NOT_ACCESSIBLE = 9; + */ + const COMPUTE_API_NOT_ACCESSIBLE = 9; + /** + * The Custom Login URL does not belong to the current project. + * + * Generated from protobuf enum CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 10; + */ + const CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 10; + /** + * The Custom Login URL is malformed (can not be parsed). + * + * Generated from protobuf enum CUSTOM_LOGIN_URL_MALFORMED = 11; + */ + const CUSTOM_LOGIN_URL_MALFORMED = 11; + /** + * The Custom Login URL is mapped to a non-routable IP address in DNS. + * + * Generated from protobuf enum CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 12; + */ + const CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 12; + /** + * The Custom Login URL is mapped to an IP address which is not reserved for + * the current project. + * + * Generated from protobuf enum CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS = 13; + */ + const CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS = 13; + /** + * The Custom Login URL has a non-routable IP address. + * + * Generated from protobuf enum CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 14; + */ + const CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 14; + /** + * The Custom Login URL has an IP address which is not reserved for the + * current project. + * + * Generated from protobuf enum CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS = 15; + */ + const CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS = 15; + /** + * Another scan with the same name (case-sensitive) already exists. + * + * Generated from protobuf enum DUPLICATE_SCAN_NAME = 16; + */ + const DUPLICATE_SCAN_NAME = 16; + /** + * A field is set to an invalid value. + * + * Generated from protobuf enum INVALID_FIELD_VALUE = 18; + */ + const INVALID_FIELD_VALUE = 18; + /** + * There was an error trying to authenticate to the scan target. + * + * Generated from protobuf enum FAILED_TO_AUTHENTICATE_TO_TARGET = 19; + */ + const FAILED_TO_AUTHENTICATE_TO_TARGET = 19; + /** + * Finding type value is not specified in the list findings request. + * + * Generated from protobuf enum FINDING_TYPE_UNSPECIFIED = 20; + */ + const FINDING_TYPE_UNSPECIFIED = 20; + /** + * Scan targets Compute Engine, yet current project was not whitelisted for + * Google Compute Engine Scanning Alpha access. + * + * Generated from protobuf enum FORBIDDEN_TO_SCAN_COMPUTE = 21; + */ + const FORBIDDEN_TO_SCAN_COMPUTE = 21; + /** + * User tries to update managed scan + * + * Generated from protobuf enum FORBIDDEN_UPDATE_TO_MANAGED_SCAN = 43; + */ + const FORBIDDEN_UPDATE_TO_MANAGED_SCAN = 43; + /** + * The supplied filter is malformed. For example, it can not be parsed, does + * not have a filter type in expression, or the same filter type appears + * more than once. + * + * Generated from protobuf enum MALFORMED_FILTER = 22; + */ + const MALFORMED_FILTER = 22; + /** + * The supplied resource name is malformed (can not be parsed). + * + * Generated from protobuf enum MALFORMED_RESOURCE_NAME = 23; + */ + const MALFORMED_RESOURCE_NAME = 23; + /** + * The current project is not in an active state. + * + * Generated from protobuf enum PROJECT_INACTIVE = 24; + */ + const PROJECT_INACTIVE = 24; + /** + * A required field is not set. + * + * Generated from protobuf enum REQUIRED_FIELD = 25; + */ + const REQUIRED_FIELD = 25; + /** + * Project id, scanconfig id, scanrun id, or finding id are not consistent + * with each other in resource name. + * + * Generated from protobuf enum RESOURCE_NAME_INCONSISTENT = 26; + */ + const RESOURCE_NAME_INCONSISTENT = 26; + /** + * The scan being requested to start is already running. + * + * Generated from protobuf enum SCAN_ALREADY_RUNNING = 27; + */ + const SCAN_ALREADY_RUNNING = 27; + /** + * The scan that was requested to be stopped is not running. + * + * Generated from protobuf enum SCAN_NOT_RUNNING = 28; + */ + const SCAN_NOT_RUNNING = 28; + /** + * One of the seed URLs does not belong to the current project. + * + * Generated from protobuf enum SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 29; + */ + const SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 29; + /** + * One of the seed URLs is malformed (can not be parsed). + * + * Generated from protobuf enum SEED_URL_MALFORMED = 30; + */ + const SEED_URL_MALFORMED = 30; + /** + * One of the seed URLs is mapped to a non-routable IP address in DNS. + * + * Generated from protobuf enum SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 31; + */ + const SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 31; + /** + * One of the seed URLs is mapped to an IP address which is not reserved + * for the current project. + * + * Generated from protobuf enum SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS = 32; + */ + const SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS = 32; + /** + * One of the seed URLs has on-routable IP address. + * + * Generated from protobuf enum SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 33; + */ + const SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 33; + /** + * One of the seed URLs has an IP address that is not reserved + * for the current project. + * + * Generated from protobuf enum SEED_URL_HAS_UNRESERVED_IP_ADDRESS = 35; + */ + const SEED_URL_HAS_UNRESERVED_IP_ADDRESS = 35; + /** + * The Web Security Scanner service account is not configured under the + * project. + * + * Generated from protobuf enum SERVICE_ACCOUNT_NOT_CONFIGURED = 36; + */ + const SERVICE_ACCOUNT_NOT_CONFIGURED = 36; + /** + * A project has reached the maximum number of scans. + * + * Generated from protobuf enum TOO_MANY_SCANS = 37; + */ + const TOO_MANY_SCANS = 37; + /** + * Resolving the details of the current project fails. + * + * Generated from protobuf enum UNABLE_TO_RESOLVE_PROJECT_INFO = 38; + */ + const UNABLE_TO_RESOLVE_PROJECT_INFO = 38; + /** + * One or more blacklist patterns were in the wrong format. + * + * Generated from protobuf enum UNSUPPORTED_BLACKLIST_PATTERN_FORMAT = 39; + */ + const UNSUPPORTED_BLACKLIST_PATTERN_FORMAT = 39; + /** + * The supplied filter is not supported. + * + * Generated from protobuf enum UNSUPPORTED_FILTER = 40; + */ + const UNSUPPORTED_FILTER = 40; + /** + * The supplied finding type is not supported. For example, we do not + * provide findings of the given finding type. + * + * Generated from protobuf enum UNSUPPORTED_FINDING_TYPE = 41; + */ + const UNSUPPORTED_FINDING_TYPE = 41; + /** + * The URL scheme of one or more of the supplied URLs is not supported. + * + * Generated from protobuf enum UNSUPPORTED_URL_SCHEME = 42; + */ + const UNSUPPORTED_URL_SCHEME = 42; + + private static $valueToName = [ + self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', + self::OK => 'OK', + self::INTERNAL_ERROR => 'INTERNAL_ERROR', + self::APPENGINE_API_BACKEND_ERROR => 'APPENGINE_API_BACKEND_ERROR', + self::APPENGINE_API_NOT_ACCESSIBLE => 'APPENGINE_API_NOT_ACCESSIBLE', + self::APPENGINE_DEFAULT_HOST_MISSING => 'APPENGINE_DEFAULT_HOST_MISSING', + self::CANNOT_USE_GOOGLE_COM_ACCOUNT => 'CANNOT_USE_GOOGLE_COM_ACCOUNT', + self::CANNOT_USE_OWNER_ACCOUNT => 'CANNOT_USE_OWNER_ACCOUNT', + self::COMPUTE_API_BACKEND_ERROR => 'COMPUTE_API_BACKEND_ERROR', + self::COMPUTE_API_NOT_ACCESSIBLE => 'COMPUTE_API_NOT_ACCESSIBLE', + self::CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT => 'CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT', + self::CUSTOM_LOGIN_URL_MALFORMED => 'CUSTOM_LOGIN_URL_MALFORMED', + self::CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS => 'CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS', + self::CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS => 'CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS', + self::CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS => 'CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS', + self::CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS => 'CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS', + self::DUPLICATE_SCAN_NAME => 'DUPLICATE_SCAN_NAME', + self::INVALID_FIELD_VALUE => 'INVALID_FIELD_VALUE', + self::FAILED_TO_AUTHENTICATE_TO_TARGET => 'FAILED_TO_AUTHENTICATE_TO_TARGET', + self::FINDING_TYPE_UNSPECIFIED => 'FINDING_TYPE_UNSPECIFIED', + self::FORBIDDEN_TO_SCAN_COMPUTE => 'FORBIDDEN_TO_SCAN_COMPUTE', + self::FORBIDDEN_UPDATE_TO_MANAGED_SCAN => 'FORBIDDEN_UPDATE_TO_MANAGED_SCAN', + self::MALFORMED_FILTER => 'MALFORMED_FILTER', + self::MALFORMED_RESOURCE_NAME => 'MALFORMED_RESOURCE_NAME', + self::PROJECT_INACTIVE => 'PROJECT_INACTIVE', + self::REQUIRED_FIELD => 'REQUIRED_FIELD', + self::RESOURCE_NAME_INCONSISTENT => 'RESOURCE_NAME_INCONSISTENT', + self::SCAN_ALREADY_RUNNING => 'SCAN_ALREADY_RUNNING', + self::SCAN_NOT_RUNNING => 'SCAN_NOT_RUNNING', + self::SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT => 'SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT', + self::SEED_URL_MALFORMED => 'SEED_URL_MALFORMED', + self::SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS => 'SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS', + self::SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS => 'SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS', + self::SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS => 'SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS', + self::SEED_URL_HAS_UNRESERVED_IP_ADDRESS => 'SEED_URL_HAS_UNRESERVED_IP_ADDRESS', + self::SERVICE_ACCOUNT_NOT_CONFIGURED => 'SERVICE_ACCOUNT_NOT_CONFIGURED', + self::TOO_MANY_SCANS => 'TOO_MANY_SCANS', + self::UNABLE_TO_RESOLVE_PROJECT_INFO => 'UNABLE_TO_RESOLVE_PROJECT_INFO', + self::UNSUPPORTED_BLACKLIST_PATTERN_FORMAT => 'UNSUPPORTED_BLACKLIST_PATTERN_FORMAT', + self::UNSUPPORTED_FILTER => 'UNSUPPORTED_FILTER', + self::UNSUPPORTED_FINDING_TYPE => 'UNSUPPORTED_FINDING_TYPE', + self::UNSUPPORTED_URL_SCHEME => 'UNSUPPORTED_URL_SCHEME', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Code::class, \Google\Cloud\WebSecurityScanner\V1\ScanConfigError_Code::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRun.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRun.php new file mode 100644 index 000000000000..ff25c1ee8cb2 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRun.php @@ -0,0 +1,486 @@ +google.cloud.websecurityscanner.v1.ScanRun + */ +class ScanRun extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the ScanRun. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * The ScanRun IDs are generated by the system. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The execution state of the ScanRun. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRun.ExecutionState execution_state = 2; + */ + protected $execution_state = 0; + /** + * Output only. The result state of the ScanRun. This field is only available after the + * execution state reaches "FINISHED". + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRun.ResultState result_state = 3; + */ + protected $result_state = 0; + /** + * Output only. The time at which the ScanRun started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + */ + protected $start_time = null; + /** + * Output only. The time at which the ScanRun reached termination state - that the ScanRun + * is either finished or stopped by user. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; + */ + protected $end_time = null; + /** + * Output only. The number of URLs crawled during this ScanRun. If the scan is in progress, + * the value represents the number of URLs crawled up to now. + * + * Generated from protobuf field int64 urls_crawled_count = 6; + */ + protected $urls_crawled_count = 0; + /** + * Output only. The number of URLs tested during this ScanRun. If the scan is in progress, + * the value represents the number of URLs tested up to now. The number of + * URLs tested is usually larger than the number URLS crawled because + * typically a crawled URL is tested with multiple test payloads. + * + * Generated from protobuf field int64 urls_tested_count = 7; + */ + protected $urls_tested_count = 0; + /** + * Output only. Whether the scan run has found any vulnerabilities. + * + * Generated from protobuf field bool has_vulnerabilities = 8; + */ + protected $has_vulnerabilities = false; + /** + * Output only. The percentage of total completion ranging from 0 to 100. + * If the scan is in queue, the value is 0. + * If the scan is running, the value ranges from 0 to 100. + * If the scan is finished, the value is 100. + * + * Generated from protobuf field int32 progress_percent = 9; + */ + protected $progress_percent = 0; + /** + * Output only. If result_state is an ERROR, this field provides the primary reason for + * scan's termination and more details, if such are available. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 10; + */ + protected $error_trace = null; + /** + * Output only. A list of warnings, if such are encountered during this scan run. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.ScanRunWarningTrace warning_traces = 11; + */ + private $warning_traces; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the ScanRun. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * The ScanRun IDs are generated by the system. + * @type int $execution_state + * Output only. The execution state of the ScanRun. + * @type int $result_state + * Output only. The result state of the ScanRun. This field is only available after the + * execution state reaches "FINISHED". + * @type \Google\Protobuf\Timestamp $start_time + * Output only. The time at which the ScanRun started. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time at which the ScanRun reached termination state - that the ScanRun + * is either finished or stopped by user. + * @type int|string $urls_crawled_count + * Output only. The number of URLs crawled during this ScanRun. If the scan is in progress, + * the value represents the number of URLs crawled up to now. + * @type int|string $urls_tested_count + * Output only. The number of URLs tested during this ScanRun. If the scan is in progress, + * the value represents the number of URLs tested up to now. The number of + * URLs tested is usually larger than the number URLS crawled because + * typically a crawled URL is tested with multiple test payloads. + * @type bool $has_vulnerabilities + * Output only. Whether the scan run has found any vulnerabilities. + * @type int $progress_percent + * Output only. The percentage of total completion ranging from 0 to 100. + * If the scan is in queue, the value is 0. + * If the scan is running, the value ranges from 0 to 100. + * If the scan is finished, the value is 100. + * @type \Google\Cloud\WebSecurityScanner\V1\ScanRunErrorTrace $error_trace + * Output only. If result_state is an ERROR, this field provides the primary reason for + * scan's termination and more details, if such are available. + * @type array<\Google\Cloud\WebSecurityScanner\V1\ScanRunWarningTrace>|\Google\Protobuf\Internal\RepeatedField $warning_traces + * Output only. A list of warnings, if such are encountered during this scan run. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\ScanRun::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the ScanRun. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * The ScanRun IDs are generated by the system. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the ScanRun. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * The ScanRun IDs are generated by the system. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The execution state of the ScanRun. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRun.ExecutionState execution_state = 2; + * @return int + */ + public function getExecutionState() + { + return $this->execution_state; + } + + /** + * Output only. The execution state of the ScanRun. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRun.ExecutionState execution_state = 2; + * @param int $var + * @return $this + */ + public function setExecutionState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1\ScanRun\ExecutionState::class); + $this->execution_state = $var; + + return $this; + } + + /** + * Output only. The result state of the ScanRun. This field is only available after the + * execution state reaches "FINISHED". + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRun.ResultState result_state = 3; + * @return int + */ + public function getResultState() + { + return $this->result_state; + } + + /** + * Output only. The result state of the ScanRun. This field is only available after the + * execution state reaches "FINISHED". + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRun.ResultState result_state = 3; + * @param int $var + * @return $this + */ + public function setResultState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1\ScanRun\ResultState::class); + $this->result_state = $var; + + return $this; + } + + /** + * Output only. The time at which the ScanRun started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. The time at which the ScanRun started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. The time at which the ScanRun reached termination state - that the ScanRun + * is either finished or stopped by user. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time at which the ScanRun reached termination state - that the ScanRun + * is either finished or stopped by user. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. The number of URLs crawled during this ScanRun. If the scan is in progress, + * the value represents the number of URLs crawled up to now. + * + * Generated from protobuf field int64 urls_crawled_count = 6; + * @return int|string + */ + public function getUrlsCrawledCount() + { + return $this->urls_crawled_count; + } + + /** + * Output only. The number of URLs crawled during this ScanRun. If the scan is in progress, + * the value represents the number of URLs crawled up to now. + * + * Generated from protobuf field int64 urls_crawled_count = 6; + * @param int|string $var + * @return $this + */ + public function setUrlsCrawledCount($var) + { + GPBUtil::checkInt64($var); + $this->urls_crawled_count = $var; + + return $this; + } + + /** + * Output only. The number of URLs tested during this ScanRun. If the scan is in progress, + * the value represents the number of URLs tested up to now. The number of + * URLs tested is usually larger than the number URLS crawled because + * typically a crawled URL is tested with multiple test payloads. + * + * Generated from protobuf field int64 urls_tested_count = 7; + * @return int|string + */ + public function getUrlsTestedCount() + { + return $this->urls_tested_count; + } + + /** + * Output only. The number of URLs tested during this ScanRun. If the scan is in progress, + * the value represents the number of URLs tested up to now. The number of + * URLs tested is usually larger than the number URLS crawled because + * typically a crawled URL is tested with multiple test payloads. + * + * Generated from protobuf field int64 urls_tested_count = 7; + * @param int|string $var + * @return $this + */ + public function setUrlsTestedCount($var) + { + GPBUtil::checkInt64($var); + $this->urls_tested_count = $var; + + return $this; + } + + /** + * Output only. Whether the scan run has found any vulnerabilities. + * + * Generated from protobuf field bool has_vulnerabilities = 8; + * @return bool + */ + public function getHasVulnerabilities() + { + return $this->has_vulnerabilities; + } + + /** + * Output only. Whether the scan run has found any vulnerabilities. + * + * Generated from protobuf field bool has_vulnerabilities = 8; + * @param bool $var + * @return $this + */ + public function setHasVulnerabilities($var) + { + GPBUtil::checkBool($var); + $this->has_vulnerabilities = $var; + + return $this; + } + + /** + * Output only. The percentage of total completion ranging from 0 to 100. + * If the scan is in queue, the value is 0. + * If the scan is running, the value ranges from 0 to 100. + * If the scan is finished, the value is 100. + * + * Generated from protobuf field int32 progress_percent = 9; + * @return int + */ + public function getProgressPercent() + { + return $this->progress_percent; + } + + /** + * Output only. The percentage of total completion ranging from 0 to 100. + * If the scan is in queue, the value is 0. + * If the scan is running, the value ranges from 0 to 100. + * If the scan is finished, the value is 100. + * + * Generated from protobuf field int32 progress_percent = 9; + * @param int $var + * @return $this + */ + public function setProgressPercent($var) + { + GPBUtil::checkInt32($var); + $this->progress_percent = $var; + + return $this; + } + + /** + * Output only. If result_state is an ERROR, this field provides the primary reason for + * scan's termination and more details, if such are available. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 10; + * @return \Google\Cloud\WebSecurityScanner\V1\ScanRunErrorTrace|null + */ + public function getErrorTrace() + { + return $this->error_trace; + } + + public function hasErrorTrace() + { + return isset($this->error_trace); + } + + public function clearErrorTrace() + { + unset($this->error_trace); + } + + /** + * Output only. If result_state is an ERROR, this field provides the primary reason for + * scan's termination and more details, if such are available. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 10; + * @param \Google\Cloud\WebSecurityScanner\V1\ScanRunErrorTrace $var + * @return $this + */ + public function setErrorTrace($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1\ScanRunErrorTrace::class); + $this->error_trace = $var; + + return $this; + } + + /** + * Output only. A list of warnings, if such are encountered during this scan run. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.ScanRunWarningTrace warning_traces = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWarningTraces() + { + return $this->warning_traces; + } + + /** + * Output only. A list of warnings, if such are encountered during this scan run. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.ScanRunWarningTrace warning_traces = 11; + * @param array<\Google\Cloud\WebSecurityScanner\V1\ScanRunWarningTrace>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWarningTraces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1\ScanRunWarningTrace::class); + $this->warning_traces = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRun/ExecutionState.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRun/ExecutionState.php new file mode 100644 index 000000000000..3667287981ad --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRun/ExecutionState.php @@ -0,0 +1,72 @@ +google.cloud.websecurityscanner.v1.ScanRun.ExecutionState + */ +class ExecutionState +{ + /** + * Represents an invalid state caused by internal server error. This value + * should never be returned. + * + * Generated from protobuf enum EXECUTION_STATE_UNSPECIFIED = 0; + */ + const EXECUTION_STATE_UNSPECIFIED = 0; + /** + * The scan is waiting in the queue. + * + * Generated from protobuf enum QUEUED = 1; + */ + const QUEUED = 1; + /** + * The scan is in progress. + * + * Generated from protobuf enum SCANNING = 2; + */ + const SCANNING = 2; + /** + * The scan is either finished or stopped by user. + * + * Generated from protobuf enum FINISHED = 3; + */ + const FINISHED = 3; + + private static $valueToName = [ + self::EXECUTION_STATE_UNSPECIFIED => 'EXECUTION_STATE_UNSPECIFIED', + self::QUEUED => 'QUEUED', + self::SCANNING => 'SCANNING', + self::FINISHED => 'FINISHED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ExecutionState::class, \Google\Cloud\WebSecurityScanner\V1\ScanRun_ExecutionState::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRun/ResultState.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRun/ResultState.php new file mode 100644 index 000000000000..1d961ad419fa --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRun/ResultState.php @@ -0,0 +1,72 @@ +google.cloud.websecurityscanner.v1.ScanRun.ResultState + */ +class ResultState +{ + /** + * Default value. This value is returned when the ScanRun is not yet + * finished. + * + * Generated from protobuf enum RESULT_STATE_UNSPECIFIED = 0; + */ + const RESULT_STATE_UNSPECIFIED = 0; + /** + * The scan finished without errors. + * + * Generated from protobuf enum SUCCESS = 1; + */ + const SUCCESS = 1; + /** + * The scan finished with errors. + * + * Generated from protobuf enum ERROR = 2; + */ + const ERROR = 2; + /** + * The scan was terminated by user. + * + * Generated from protobuf enum KILLED = 3; + */ + const KILLED = 3; + + private static $valueToName = [ + self::RESULT_STATE_UNSPECIFIED => 'RESULT_STATE_UNSPECIFIED', + self::SUCCESS => 'SUCCESS', + self::ERROR => 'ERROR', + self::KILLED => 'KILLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ResultState::class, \Google\Cloud\WebSecurityScanner\V1\ScanRun_ResultState::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunErrorTrace.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunErrorTrace.php new file mode 100644 index 000000000000..688868b5b240 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunErrorTrace.php @@ -0,0 +1,162 @@ +google.cloud.websecurityscanner.v1.ScanRunErrorTrace + */ +class ScanRunErrorTrace extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Indicates the error reason code. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRunErrorTrace.Code code = 1; + */ + protected $code = 0; + /** + * Output only. If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error + * message encountered during scan configuration validation that is performed + * before each scan run. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfigError scan_config_error = 2; + */ + protected $scan_config_error = null; + /** + * Output only. If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most + * common HTTP error code, if such is available. For example, if this code is + * 404, the scan has encountered too many NOT_FOUND responses. + * + * Generated from protobuf field int32 most_common_http_error_code = 3; + */ + protected $most_common_http_error_code = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * Output only. Indicates the error reason code. + * @type \Google\Cloud\WebSecurityScanner\V1\ScanConfigError $scan_config_error + * Output only. If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error + * message encountered during scan configuration validation that is performed + * before each scan run. + * @type int $most_common_http_error_code + * Output only. If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most + * common HTTP error code, if such is available. For example, if this code is + * 404, the scan has encountered too many NOT_FOUND responses. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\ScanRunErrorTrace::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Indicates the error reason code. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRunErrorTrace.Code code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Output only. Indicates the error reason code. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRunErrorTrace.Code code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1\ScanRunErrorTrace\Code::class); + $this->code = $var; + + return $this; + } + + /** + * Output only. If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error + * message encountered during scan configuration validation that is performed + * before each scan run. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfigError scan_config_error = 2; + * @return \Google\Cloud\WebSecurityScanner\V1\ScanConfigError|null + */ + public function getScanConfigError() + { + return $this->scan_config_error; + } + + public function hasScanConfigError() + { + return isset($this->scan_config_error); + } + + public function clearScanConfigError() + { + unset($this->scan_config_error); + } + + /** + * Output only. If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error + * message encountered during scan configuration validation that is performed + * before each scan run. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfigError scan_config_error = 2; + * @param \Google\Cloud\WebSecurityScanner\V1\ScanConfigError $var + * @return $this + */ + public function setScanConfigError($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1\ScanConfigError::class); + $this->scan_config_error = $var; + + return $this; + } + + /** + * Output only. If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most + * common HTTP error code, if such is available. For example, if this code is + * 404, the scan has encountered too many NOT_FOUND responses. + * + * Generated from protobuf field int32 most_common_http_error_code = 3; + * @return int + */ + public function getMostCommonHttpErrorCode() + { + return $this->most_common_http_error_code; + } + + /** + * Output only. If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most + * common HTTP error code, if such is available. For example, if this code is + * 404, the scan has encountered too many NOT_FOUND responses. + * + * Generated from protobuf field int32 most_common_http_error_code = 3; + * @param int $var + * @return $this + */ + public function setMostCommonHttpErrorCode($var) + { + GPBUtil::checkInt32($var); + $this->most_common_http_error_code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunErrorTrace/Code.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunErrorTrace/Code.php new file mode 100644 index 000000000000..c49b3a0f42bd --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunErrorTrace/Code.php @@ -0,0 +1,99 @@ +google.cloud.websecurityscanner.v1.ScanRunErrorTrace.Code + */ +class Code +{ + /** + * Default value is never used. + * + * Generated from protobuf enum CODE_UNSPECIFIED = 0; + */ + const CODE_UNSPECIFIED = 0; + /** + * Indicates that the scan run failed due to an internal server error. + * + * Generated from protobuf enum INTERNAL_ERROR = 1; + */ + const INTERNAL_ERROR = 1; + /** + * Indicates a scan configuration error, usually due to outdated ScanConfig + * settings, such as starting_urls or the DNS configuration. + * + * Generated from protobuf enum SCAN_CONFIG_ISSUE = 2; + */ + const SCAN_CONFIG_ISSUE = 2; + /** + * Indicates an authentication error, usually due to outdated ScanConfig + * authentication settings. + * + * Generated from protobuf enum AUTHENTICATION_CONFIG_ISSUE = 3; + */ + const AUTHENTICATION_CONFIG_ISSUE = 3; + /** + * Indicates a scan operation timeout, usually caused by a very large site. + * + * Generated from protobuf enum TIMED_OUT_WHILE_SCANNING = 4; + */ + const TIMED_OUT_WHILE_SCANNING = 4; + /** + * Indicates that a scan encountered excessive redirects, either to + * authentication or some other page outside of the scan scope. + * + * Generated from protobuf enum TOO_MANY_REDIRECTS = 5; + */ + const TOO_MANY_REDIRECTS = 5; + /** + * Indicates that a scan encountered numerous errors from the web site + * pages. When available, most_common_http_error_code field indicates the + * most common HTTP error code encountered during the scan. + * + * Generated from protobuf enum TOO_MANY_HTTP_ERRORS = 6; + */ + const TOO_MANY_HTTP_ERRORS = 6; + + private static $valueToName = [ + self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', + self::INTERNAL_ERROR => 'INTERNAL_ERROR', + self::SCAN_CONFIG_ISSUE => 'SCAN_CONFIG_ISSUE', + self::AUTHENTICATION_CONFIG_ISSUE => 'AUTHENTICATION_CONFIG_ISSUE', + self::TIMED_OUT_WHILE_SCANNING => 'TIMED_OUT_WHILE_SCANNING', + self::TOO_MANY_REDIRECTS => 'TOO_MANY_REDIRECTS', + self::TOO_MANY_HTTP_ERRORS => 'TOO_MANY_HTTP_ERRORS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Code::class, \Google\Cloud\WebSecurityScanner\V1\ScanRunErrorTrace_Code::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunLog.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunLog.php new file mode 100644 index 000000000000..6b90901c9959 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunLog.php @@ -0,0 +1,291 @@ +google.cloud.websecurityscanner.v1.ScanRunLog + */ +class ScanRunLog extends \Google\Protobuf\Internal\Message +{ + /** + * Human friendly message about the event. + * + * Generated from protobuf field string summary = 1; + */ + protected $summary = ''; + /** + * The resource name of the ScanRun being logged. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + /** + * The execution state of the ScanRun. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRun.ExecutionState execution_state = 3; + */ + protected $execution_state = 0; + /** + * The result state of the ScanRun. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRun.ResultState result_state = 4; + */ + protected $result_state = 0; + /** + * Generated from protobuf field int64 urls_crawled_count = 5; + */ + protected $urls_crawled_count = 0; + /** + * Generated from protobuf field int64 urls_tested_count = 6; + */ + protected $urls_tested_count = 0; + /** + * Generated from protobuf field bool has_findings = 7; + */ + protected $has_findings = false; + /** + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 8; + */ + protected $error_trace = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $summary + * Human friendly message about the event. + * @type string $name + * The resource name of the ScanRun being logged. + * @type int $execution_state + * The execution state of the ScanRun. + * @type int $result_state + * The result state of the ScanRun. + * @type int|string $urls_crawled_count + * @type int|string $urls_tested_count + * @type bool $has_findings + * @type \Google\Cloud\WebSecurityScanner\V1\ScanRunErrorTrace $error_trace + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\ScanRunLog::initOnce(); + parent::__construct($data); + } + + /** + * Human friendly message about the event. + * + * Generated from protobuf field string summary = 1; + * @return string + */ + public function getSummary() + { + return $this->summary; + } + + /** + * Human friendly message about the event. + * + * Generated from protobuf field string summary = 1; + * @param string $var + * @return $this + */ + public function setSummary($var) + { + GPBUtil::checkString($var, True); + $this->summary = $var; + + return $this; + } + + /** + * The resource name of the ScanRun being logged. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the ScanRun being logged. + * + * Generated from protobuf field string name = 2; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The execution state of the ScanRun. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRun.ExecutionState execution_state = 3; + * @return int + */ + public function getExecutionState() + { + return $this->execution_state; + } + + /** + * The execution state of the ScanRun. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRun.ExecutionState execution_state = 3; + * @param int $var + * @return $this + */ + public function setExecutionState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1\ScanRun\ExecutionState::class); + $this->execution_state = $var; + + return $this; + } + + /** + * The result state of the ScanRun. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRun.ResultState result_state = 4; + * @return int + */ + public function getResultState() + { + return $this->result_state; + } + + /** + * The result state of the ScanRun. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRun.ResultState result_state = 4; + * @param int $var + * @return $this + */ + public function setResultState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1\ScanRun\ResultState::class); + $this->result_state = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 urls_crawled_count = 5; + * @return int|string + */ + public function getUrlsCrawledCount() + { + return $this->urls_crawled_count; + } + + /** + * Generated from protobuf field int64 urls_crawled_count = 5; + * @param int|string $var + * @return $this + */ + public function setUrlsCrawledCount($var) + { + GPBUtil::checkInt64($var); + $this->urls_crawled_count = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 urls_tested_count = 6; + * @return int|string + */ + public function getUrlsTestedCount() + { + return $this->urls_tested_count; + } + + /** + * Generated from protobuf field int64 urls_tested_count = 6; + * @param int|string $var + * @return $this + */ + public function setUrlsTestedCount($var) + { + GPBUtil::checkInt64($var); + $this->urls_tested_count = $var; + + return $this; + } + + /** + * Generated from protobuf field bool has_findings = 7; + * @return bool + */ + public function getHasFindings() + { + return $this->has_findings; + } + + /** + * Generated from protobuf field bool has_findings = 7; + * @param bool $var + * @return $this + */ + public function setHasFindings($var) + { + GPBUtil::checkBool($var); + $this->has_findings = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 8; + * @return \Google\Cloud\WebSecurityScanner\V1\ScanRunErrorTrace|null + */ + public function getErrorTrace() + { + return $this->error_trace; + } + + public function hasErrorTrace() + { + return isset($this->error_trace); + } + + public function clearErrorTrace() + { + unset($this->error_trace); + } + + /** + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 8; + * @param \Google\Cloud\WebSecurityScanner\V1\ScanRunErrorTrace $var + * @return $this + */ + public function setErrorTrace($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1\ScanRunErrorTrace::class); + $this->error_trace = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunWarningTrace.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunWarningTrace.php new file mode 100644 index 000000000000..88301882093d --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunWarningTrace.php @@ -0,0 +1,69 @@ +google.cloud.websecurityscanner.v1.ScanRunWarningTrace + */ +class ScanRunWarningTrace extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Indicates the warning code. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRunWarningTrace.Code code = 1; + */ + protected $code = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * Output only. Indicates the warning code. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\ScanRunWarningTrace::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Indicates the warning code. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRunWarningTrace.Code code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Output only. Indicates the warning code. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRunWarningTrace.Code code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1\ScanRunWarningTrace\Code::class); + $this->code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunWarningTrace/Code.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunWarningTrace/Code.php new file mode 100644 index 000000000000..cd610f6f648f --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunWarningTrace/Code.php @@ -0,0 +1,92 @@ +google.cloud.websecurityscanner.v1.ScanRunWarningTrace.Code + */ +class Code +{ + /** + * Default value is never used. + * + * Generated from protobuf enum CODE_UNSPECIFIED = 0; + */ + const CODE_UNSPECIFIED = 0; + /** + * Indicates that a scan discovered an unexpectedly low number of URLs. This + * is sometimes caused by complex navigation features or by using a single + * URL for numerous pages. + * + * Generated from protobuf enum INSUFFICIENT_CRAWL_RESULTS = 1; + */ + const INSUFFICIENT_CRAWL_RESULTS = 1; + /** + * Indicates that a scan discovered too many URLs to test, or excessive + * redundant URLs. + * + * Generated from protobuf enum TOO_MANY_CRAWL_RESULTS = 2; + */ + const TOO_MANY_CRAWL_RESULTS = 2; + /** + * Indicates that too many tests have been generated for the scan. Customer + * should try reducing the number of starting URLs, increasing the QPS rate, + * or narrowing down the scope of the scan using the excluded patterns. + * + * Generated from protobuf enum TOO_MANY_FUZZ_TASKS = 3; + */ + const TOO_MANY_FUZZ_TASKS = 3; + /** + * Indicates that a scan is blocked by IAP. + * + * Generated from protobuf enum BLOCKED_BY_IAP = 4; + */ + const BLOCKED_BY_IAP = 4; + /** + * Indicates that no seeds is found for a scan + * + * Generated from protobuf enum NO_STARTING_URL_FOUND_FOR_MANAGED_SCAN = 5; + */ + const NO_STARTING_URL_FOUND_FOR_MANAGED_SCAN = 5; + + private static $valueToName = [ + self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', + self::INSUFFICIENT_CRAWL_RESULTS => 'INSUFFICIENT_CRAWL_RESULTS', + self::TOO_MANY_CRAWL_RESULTS => 'TOO_MANY_CRAWL_RESULTS', + self::TOO_MANY_FUZZ_TASKS => 'TOO_MANY_FUZZ_TASKS', + self::BLOCKED_BY_IAP => 'BLOCKED_BY_IAP', + self::NO_STARTING_URL_FOUND_FOR_MANAGED_SCAN => 'NO_STARTING_URL_FOUND_FOR_MANAGED_SCAN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Code::class, \Google\Cloud\WebSecurityScanner\V1\ScanRunWarningTrace_Code::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/StartScanRunRequest.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/StartScanRunRequest.php new file mode 100644 index 000000000000..ac00aa43db70 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/StartScanRunRequest.php @@ -0,0 +1,71 @@ +google.cloud.websecurityscanner.v1.StartScanRunRequest + */ +class StartScanRunRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the ScanConfig to be used. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the ScanConfig to be used. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the ScanConfig to be used. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the ScanConfig to be used. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/StopScanRunRequest.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/StopScanRunRequest.php new file mode 100644 index 000000000000..cb81353bba70 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/StopScanRunRequest.php @@ -0,0 +1,75 @@ +google.cloud.websecurityscanner.v1.StopScanRunRequest + */ +class StopScanRunRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the ScanRun to be stopped. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the ScanRun to be stopped. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the ScanRun to be stopped. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the ScanRun to be stopped. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/UpdateScanConfigRequest.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/UpdateScanConfigRequest.php new file mode 100644 index 000000000000..3037cef7bbca --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/UpdateScanConfigRequest.php @@ -0,0 +1,137 @@ +google.cloud.websecurityscanner.v1.UpdateScanConfigRequest + */ +class UpdateScanConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ScanConfig to be updated. The name field must be set to identify the + * resource to be updated. The values of fields not covered by the mask + * will be ignored. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig scan_config = 2; + */ + protected $scan_config = null; + /** + * Required. The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\WebSecurityScanner\V1\ScanConfig $scan_config + * Required. The ScanConfig to be updated. The name field must be set to identify the + * resource to be updated. The values of fields not covered by the mask + * will be ignored. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ScanConfig to be updated. The name field must be set to identify the + * resource to be updated. The values of fields not covered by the mask + * will be ignored. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig scan_config = 2; + * @return \Google\Cloud\WebSecurityScanner\V1\ScanConfig|null + */ + public function getScanConfig() + { + return $this->scan_config; + } + + public function hasScanConfig() + { + return isset($this->scan_config); + } + + public function clearScanConfig() + { + unset($this->scan_config); + } + + /** + * Required. The ScanConfig to be updated. The name field must be set to identify the + * resource to be updated. The values of fields not covered by the mask + * will be ignored. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig scan_config = 2; + * @param \Google\Cloud\WebSecurityScanner\V1\ScanConfig $var + * @return $this + */ + public function setScanConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1\ScanConfig::class); + $this->scan_config = $var; + + return $this; + } + + /** + * Required. The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ViolatingResource.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ViolatingResource.php new file mode 100644 index 000000000000..a04f097a8d63 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ViolatingResource.php @@ -0,0 +1,102 @@ +google.cloud.websecurityscanner.v1.ViolatingResource + */ +class ViolatingResource extends \Google\Protobuf\Internal\Message +{ + /** + * The MIME type of this resource. + * + * Generated from protobuf field string content_type = 1; + */ + protected $content_type = ''; + /** + * URL of this violating resource. + * + * Generated from protobuf field string resource_url = 2; + */ + protected $resource_url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $content_type + * The MIME type of this resource. + * @type string $resource_url + * URL of this violating resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\FindingAddon::initOnce(); + parent::__construct($data); + } + + /** + * The MIME type of this resource. + * + * Generated from protobuf field string content_type = 1; + * @return string + */ + public function getContentType() + { + return $this->content_type; + } + + /** + * The MIME type of this resource. + * + * Generated from protobuf field string content_type = 1; + * @param string $var + * @return $this + */ + public function setContentType($var) + { + GPBUtil::checkString($var, True); + $this->content_type = $var; + + return $this; + } + + /** + * URL of this violating resource. + * + * Generated from protobuf field string resource_url = 2; + * @return string + */ + public function getResourceUrl() + { + return $this->resource_url; + } + + /** + * URL of this violating resource. + * + * Generated from protobuf field string resource_url = 2; + * @param string $var + * @return $this + */ + public function setResourceUrl($var) + { + GPBUtil::checkString($var, True); + $this->resource_url = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/VulnerableHeaders.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/VulnerableHeaders.php new file mode 100644 index 000000000000..2410d3d26d00 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/VulnerableHeaders.php @@ -0,0 +1,101 @@ +google.cloud.websecurityscanner.v1.VulnerableHeaders + */ +class VulnerableHeaders extends \Google\Protobuf\Internal\Message +{ + /** + * List of vulnerable headers. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.VulnerableHeaders.Header headers = 1; + */ + private $headers; + /** + * List of missing headers. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.VulnerableHeaders.Header missing_headers = 2; + */ + private $missing_headers; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\WebSecurityScanner\V1\VulnerableHeaders\Header>|\Google\Protobuf\Internal\RepeatedField $headers + * List of vulnerable headers. + * @type array<\Google\Cloud\WebSecurityScanner\V1\VulnerableHeaders\Header>|\Google\Protobuf\Internal\RepeatedField $missing_headers + * List of missing headers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\FindingAddon::initOnce(); + parent::__construct($data); + } + + /** + * List of vulnerable headers. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.VulnerableHeaders.Header headers = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * List of vulnerable headers. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.VulnerableHeaders.Header headers = 1; + * @param array<\Google\Cloud\WebSecurityScanner\V1\VulnerableHeaders\Header>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHeaders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1\VulnerableHeaders\Header::class); + $this->headers = $arr; + + return $this; + } + + /** + * List of missing headers. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.VulnerableHeaders.Header missing_headers = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMissingHeaders() + { + return $this->missing_headers; + } + + /** + * List of missing headers. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1.VulnerableHeaders.Header missing_headers = 2; + * @param array<\Google\Cloud\WebSecurityScanner\V1\VulnerableHeaders\Header>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMissingHeaders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1\VulnerableHeaders\Header::class); + $this->missing_headers = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/VulnerableHeaders/Header.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/VulnerableHeaders/Header.php new file mode 100644 index 000000000000..d50f7cefc519 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/VulnerableHeaders/Header.php @@ -0,0 +1,104 @@ +google.cloud.websecurityscanner.v1.VulnerableHeaders.Header + */ +class Header extends \Google\Protobuf\Internal\Message +{ + /** + * Header name. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Header value. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Header name. + * @type string $value + * Header value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\FindingAddon::initOnce(); + parent::__construct($data); + } + + /** + * Header name. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Header name. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Header value. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Header value. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Header::class, \Google\Cloud\WebSecurityScanner\V1\VulnerableHeaders_Header::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/VulnerableParameters.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/VulnerableParameters.php new file mode 100644 index 000000000000..f6f79dc863a7 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/VulnerableParameters.php @@ -0,0 +1,67 @@ +google.cloud.websecurityscanner.v1.VulnerableParameters + */ +class VulnerableParameters extends \Google\Protobuf\Internal\Message +{ + /** + * The vulnerable parameter names. + * + * Generated from protobuf field repeated string parameter_names = 1; + */ + private $parameter_names; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $parameter_names + * The vulnerable parameter names. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\FindingAddon::initOnce(); + parent::__construct($data); + } + + /** + * The vulnerable parameter names. + * + * Generated from protobuf field repeated string parameter_names = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getParameterNames() + { + return $this->parameter_names; + } + + /** + * The vulnerable parameter names. + * + * Generated from protobuf field repeated string parameter_names = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setParameterNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->parameter_names = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/WebSecurityScannerGrpcClient.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/WebSecurityScannerGrpcClient.php new file mode 100644 index 000000000000..932cde91e5cd --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/WebSecurityScannerGrpcClient.php @@ -0,0 +1,233 @@ +_simpleRequest('/google.cloud.websecurityscanner.v1.WebSecurityScanner/CreateScanConfig', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1\ScanConfig', 'decode'], + $metadata, $options); + } + + /** + * Deletes an existing ScanConfig and its child resources. + * @param \Google\Cloud\WebSecurityScanner\V1\DeleteScanConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteScanConfig(\Google\Cloud\WebSecurityScanner\V1\DeleteScanConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1.WebSecurityScanner/DeleteScanConfig', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Gets a ScanConfig. + * @param \Google\Cloud\WebSecurityScanner\V1\GetScanConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetScanConfig(\Google\Cloud\WebSecurityScanner\V1\GetScanConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1.WebSecurityScanner/GetScanConfig', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1\ScanConfig', 'decode'], + $metadata, $options); + } + + /** + * Lists ScanConfigs under a given project. + * @param \Google\Cloud\WebSecurityScanner\V1\ListScanConfigsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListScanConfigs(\Google\Cloud\WebSecurityScanner\V1\ListScanConfigsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1.WebSecurityScanner/ListScanConfigs', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1\ListScanConfigsResponse', 'decode'], + $metadata, $options); + } + + /** + * Updates a ScanConfig. This method support partial update of a ScanConfig. + * @param \Google\Cloud\WebSecurityScanner\V1\UpdateScanConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateScanConfig(\Google\Cloud\WebSecurityScanner\V1\UpdateScanConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1.WebSecurityScanner/UpdateScanConfig', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1\ScanConfig', 'decode'], + $metadata, $options); + } + + /** + * Start a ScanRun according to the given ScanConfig. + * @param \Google\Cloud\WebSecurityScanner\V1\StartScanRunRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function StartScanRun(\Google\Cloud\WebSecurityScanner\V1\StartScanRunRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1.WebSecurityScanner/StartScanRun', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1\ScanRun', 'decode'], + $metadata, $options); + } + + /** + * Gets a ScanRun. + * @param \Google\Cloud\WebSecurityScanner\V1\GetScanRunRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetScanRun(\Google\Cloud\WebSecurityScanner\V1\GetScanRunRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1.WebSecurityScanner/GetScanRun', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1\ScanRun', 'decode'], + $metadata, $options); + } + + /** + * Lists ScanRuns under a given ScanConfig, in descending order of ScanRun + * stop time. + * @param \Google\Cloud\WebSecurityScanner\V1\ListScanRunsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListScanRuns(\Google\Cloud\WebSecurityScanner\V1\ListScanRunsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1.WebSecurityScanner/ListScanRuns', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1\ListScanRunsResponse', 'decode'], + $metadata, $options); + } + + /** + * Stops a ScanRun. The stopped ScanRun is returned. + * @param \Google\Cloud\WebSecurityScanner\V1\StopScanRunRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function StopScanRun(\Google\Cloud\WebSecurityScanner\V1\StopScanRunRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1.WebSecurityScanner/StopScanRun', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1\ScanRun', 'decode'], + $metadata, $options); + } + + /** + * List CrawledUrls under a given ScanRun. + * @param \Google\Cloud\WebSecurityScanner\V1\ListCrawledUrlsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListCrawledUrls(\Google\Cloud\WebSecurityScanner\V1\ListCrawledUrlsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1.WebSecurityScanner/ListCrawledUrls', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1\ListCrawledUrlsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets a Finding. + * @param \Google\Cloud\WebSecurityScanner\V1\GetFindingRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetFinding(\Google\Cloud\WebSecurityScanner\V1\GetFindingRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1.WebSecurityScanner/GetFinding', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1\Finding', 'decode'], + $metadata, $options); + } + + /** + * List Findings under a given ScanRun. + * @param \Google\Cloud\WebSecurityScanner\V1\ListFindingsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListFindings(\Google\Cloud\WebSecurityScanner\V1\ListFindingsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1.WebSecurityScanner/ListFindings', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1\ListFindingsResponse', 'decode'], + $metadata, $options); + } + + /** + * List all FindingTypeStats under a given ScanRun. + * @param \Google\Cloud\WebSecurityScanner\V1\ListFindingTypeStatsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListFindingTypeStats(\Google\Cloud\WebSecurityScanner\V1\ListFindingTypeStatsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1.WebSecurityScanner/ListFindingTypeStats', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1\ListFindingTypeStatsResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xss.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xss.php new file mode 100644 index 000000000000..b3be341c0a1a --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xss.php @@ -0,0 +1,169 @@ +google.cloud.websecurityscanner.v1.Xss + */ +class Xss extends \Google\Protobuf\Internal\Message +{ + /** + * Stack traces leading to the point where the XSS occurred. + * + * Generated from protobuf field repeated string stack_traces = 1; + */ + private $stack_traces; + /** + * An error message generated by a javascript breakage. + * + * Generated from protobuf field string error_message = 2; + */ + protected $error_message = ''; + /** + * The attack vector of the payload triggering this XSS. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.Xss.AttackVector attack_vector = 3; + */ + protected $attack_vector = 0; + /** + * The reproduction url for the seeding POST request of a Stored XSS. + * + * Generated from protobuf field string stored_xss_seeding_url = 4; + */ + protected $stored_xss_seeding_url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $stack_traces + * Stack traces leading to the point where the XSS occurred. + * @type string $error_message + * An error message generated by a javascript breakage. + * @type int $attack_vector + * The attack vector of the payload triggering this XSS. + * @type string $stored_xss_seeding_url + * The reproduction url for the seeding POST request of a Stored XSS. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\FindingAddon::initOnce(); + parent::__construct($data); + } + + /** + * Stack traces leading to the point where the XSS occurred. + * + * Generated from protobuf field repeated string stack_traces = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStackTraces() + { + return $this->stack_traces; + } + + /** + * Stack traces leading to the point where the XSS occurred. + * + * Generated from protobuf field repeated string stack_traces = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStackTraces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->stack_traces = $arr; + + return $this; + } + + /** + * An error message generated by a javascript breakage. + * + * Generated from protobuf field string error_message = 2; + * @return string + */ + public function getErrorMessage() + { + return $this->error_message; + } + + /** + * An error message generated by a javascript breakage. + * + * Generated from protobuf field string error_message = 2; + * @param string $var + * @return $this + */ + public function setErrorMessage($var) + { + GPBUtil::checkString($var, True); + $this->error_message = $var; + + return $this; + } + + /** + * The attack vector of the payload triggering this XSS. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.Xss.AttackVector attack_vector = 3; + * @return int + */ + public function getAttackVector() + { + return $this->attack_vector; + } + + /** + * The attack vector of the payload triggering this XSS. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.Xss.AttackVector attack_vector = 3; + * @param int $var + * @return $this + */ + public function setAttackVector($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1\Xss\AttackVector::class); + $this->attack_vector = $var; + + return $this; + } + + /** + * The reproduction url for the seeding POST request of a Stored XSS. + * + * Generated from protobuf field string stored_xss_seeding_url = 4; + * @return string + */ + public function getStoredXssSeedingUrl() + { + return $this->stored_xss_seeding_url; + } + + /** + * The reproduction url for the seeding POST request of a Stored XSS. + * + * Generated from protobuf field string stored_xss_seeding_url = 4; + * @param string $var + * @return $this + */ + public function setStoredXssSeedingUrl($var) + { + GPBUtil::checkString($var, True); + $this->stored_xss_seeding_url = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xss/AttackVector.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xss/AttackVector.php new file mode 100644 index 000000000000..3f1a432eee45 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xss/AttackVector.php @@ -0,0 +1,156 @@ +google.cloud.websecurityscanner.v1.Xss.AttackVector + */ +class AttackVector +{ + /** + * Unknown attack vector. + * + * Generated from protobuf enum ATTACK_VECTOR_UNSPECIFIED = 0; + */ + const ATTACK_VECTOR_UNSPECIFIED = 0; + /** + * The attack comes from fuzzing the browser's localStorage. + * + * Generated from protobuf enum LOCAL_STORAGE = 1; + */ + const LOCAL_STORAGE = 1; + /** + * The attack comes from fuzzing the browser's sessionStorage. + * + * Generated from protobuf enum SESSION_STORAGE = 2; + */ + const SESSION_STORAGE = 2; + /** + * The attack comes from fuzzing the window's name property. + * + * Generated from protobuf enum WINDOW_NAME = 3; + */ + const WINDOW_NAME = 3; + /** + * The attack comes from fuzzing the referrer property. + * + * Generated from protobuf enum REFERRER = 4; + */ + const REFERRER = 4; + /** + * The attack comes from fuzzing an input element. + * + * Generated from protobuf enum FORM_INPUT = 5; + */ + const FORM_INPUT = 5; + /** + * The attack comes from fuzzing the browser's cookies. + * + * Generated from protobuf enum COOKIE = 6; + */ + const COOKIE = 6; + /** + * The attack comes from hijacking the post messaging mechanism. + * + * Generated from protobuf enum POST_MESSAGE = 7; + */ + const POST_MESSAGE = 7; + /** + * The attack comes from fuzzing parameters in the url. + * + * Generated from protobuf enum GET_PARAMETERS = 8; + */ + const GET_PARAMETERS = 8; + /** + * The attack comes from fuzzing the fragment in the url. + * + * Generated from protobuf enum URL_FRAGMENT = 9; + */ + const URL_FRAGMENT = 9; + /** + * The attack comes from fuzzing the HTML comments. + * + * Generated from protobuf enum HTML_COMMENT = 10; + */ + const HTML_COMMENT = 10; + /** + * The attack comes from fuzzing the POST parameters. + * + * Generated from protobuf enum POST_PARAMETERS = 11; + */ + const POST_PARAMETERS = 11; + /** + * The attack comes from fuzzing the protocol. + * + * Generated from protobuf enum PROTOCOL = 12; + */ + const PROTOCOL = 12; + /** + * The attack comes from the server side and is stored. + * + * Generated from protobuf enum STORED_XSS = 13; + */ + const STORED_XSS = 13; + /** + * The attack is a Same-Origin Method Execution attack via a GET parameter. + * + * Generated from protobuf enum SAME_ORIGIN = 14; + */ + const SAME_ORIGIN = 14; + /** + * The attack payload is received from a third-party host via a URL that is + * user-controllable + * + * Generated from protobuf enum USER_CONTROLLABLE_URL = 15; + */ + const USER_CONTROLLABLE_URL = 15; + + private static $valueToName = [ + self::ATTACK_VECTOR_UNSPECIFIED => 'ATTACK_VECTOR_UNSPECIFIED', + self::LOCAL_STORAGE => 'LOCAL_STORAGE', + self::SESSION_STORAGE => 'SESSION_STORAGE', + self::WINDOW_NAME => 'WINDOW_NAME', + self::REFERRER => 'REFERRER', + self::FORM_INPUT => 'FORM_INPUT', + self::COOKIE => 'COOKIE', + self::POST_MESSAGE => 'POST_MESSAGE', + self::GET_PARAMETERS => 'GET_PARAMETERS', + self::URL_FRAGMENT => 'URL_FRAGMENT', + self::HTML_COMMENT => 'HTML_COMMENT', + self::POST_PARAMETERS => 'POST_PARAMETERS', + self::PROTOCOL => 'PROTOCOL', + self::STORED_XSS => 'STORED_XSS', + self::SAME_ORIGIN => 'SAME_ORIGIN', + self::USER_CONTROLLABLE_URL => 'USER_CONTROLLABLE_URL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AttackVector::class, \Google\Cloud\WebSecurityScanner\V1\Xss_AttackVector::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xxe.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xxe.php new file mode 100644 index 000000000000..55b9f3fd0de0 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xxe.php @@ -0,0 +1,105 @@ +google.cloud.websecurityscanner.v1.Xxe + */ +class Xxe extends \Google\Protobuf\Internal\Message +{ + /** + * The XML string that triggered the XXE vulnerability. Non-payload values + * might be redacted. + * + * Generated from protobuf field string payload_value = 1; + */ + protected $payload_value = ''; + /** + * Location within the request where the payload was placed. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.Xxe.Location payload_location = 2; + */ + protected $payload_location = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $payload_value + * The XML string that triggered the XXE vulnerability. Non-payload values + * might be redacted. + * @type int $payload_location + * Location within the request where the payload was placed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1\FindingAddon::initOnce(); + parent::__construct($data); + } + + /** + * The XML string that triggered the XXE vulnerability. Non-payload values + * might be redacted. + * + * Generated from protobuf field string payload_value = 1; + * @return string + */ + public function getPayloadValue() + { + return $this->payload_value; + } + + /** + * The XML string that triggered the XXE vulnerability. Non-payload values + * might be redacted. + * + * Generated from protobuf field string payload_value = 1; + * @param string $var + * @return $this + */ + public function setPayloadValue($var) + { + GPBUtil::checkString($var, True); + $this->payload_value = $var; + + return $this; + } + + /** + * Location within the request where the payload was placed. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.Xxe.Location payload_location = 2; + * @return int + */ + public function getPayloadLocation() + { + return $this->payload_location; + } + + /** + * Location within the request where the payload was placed. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1.Xxe.Location payload_location = 2; + * @param int $var + * @return $this + */ + public function setPayloadLocation($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1\Xxe\Location::class); + $this->payload_location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xxe/Location.php b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xxe/Location.php new file mode 100644 index 000000000000..5ca1c459cb03 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xxe/Location.php @@ -0,0 +1,57 @@ +google.cloud.websecurityscanner.v1.Xxe.Location + */ +class Location +{ + /** + * Unknown Location. + * + * Generated from protobuf enum LOCATION_UNSPECIFIED = 0; + */ + const LOCATION_UNSPECIFIED = 0; + /** + * The XML payload replaced the complete request body. + * + * Generated from protobuf enum COMPLETE_REQUEST_BODY = 1; + */ + const COMPLETE_REQUEST_BODY = 1; + + private static $valueToName = [ + self::LOCATION_UNSPECIFIED => 'LOCATION_UNSPECIFIED', + self::COMPLETE_REQUEST_BODY => 'COMPLETE_REQUEST_BODY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Location::class, \Google\Cloud\WebSecurityScanner\V1\Xxe_Location::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/create_scan_config.php b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/create_scan_config.php new file mode 100644 index 000000000000..de6c0ec31db0 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/create_scan_config.php @@ -0,0 +1,57 @@ +createScanConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END websecurityscanner_v1_generated_WebSecurityScanner_CreateScanConfig_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/delete_scan_config.php b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/delete_scan_config.php new file mode 100644 index 000000000000..f76539ef65e2 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/delete_scan_config.php @@ -0,0 +1,55 @@ +deleteScanConfig($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END websecurityscanner_v1_generated_WebSecurityScanner_DeleteScanConfig_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/get_finding.php b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/get_finding.php new file mode 100644 index 000000000000..18cc2c9645fe --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/get_finding.php @@ -0,0 +1,57 @@ +getFinding($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END websecurityscanner_v1_generated_WebSecurityScanner_GetFinding_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/get_scan_config.php b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/get_scan_config.php new file mode 100644 index 000000000000..72439093c3b6 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/get_scan_config.php @@ -0,0 +1,57 @@ +getScanConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END websecurityscanner_v1_generated_WebSecurityScanner_GetScanConfig_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/get_scan_run.php b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/get_scan_run.php new file mode 100644 index 000000000000..b97d23c7bcfd --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/get_scan_run.php @@ -0,0 +1,57 @@ +getScanRun($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END websecurityscanner_v1_generated_WebSecurityScanner_GetScanRun_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_crawled_urls.php b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_crawled_urls.php new file mode 100644 index 000000000000..7895459f9c35 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_crawled_urls.php @@ -0,0 +1,62 @@ +listCrawledUrls($request); + + /** @var CrawledUrl $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END websecurityscanner_v1_generated_WebSecurityScanner_ListCrawledUrls_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_finding_type_stats.php b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_finding_type_stats.php new file mode 100644 index 000000000000..72c5a32679f4 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_finding_type_stats.php @@ -0,0 +1,57 @@ +listFindingTypeStats($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END websecurityscanner_v1_generated_WebSecurityScanner_ListFindingTypeStats_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_findings.php b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_findings.php new file mode 100644 index 000000000000..d632f0d11d20 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_findings.php @@ -0,0 +1,62 @@ +listFindings($request); + + /** @var Finding $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END websecurityscanner_v1_generated_WebSecurityScanner_ListFindings_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_scan_configs.php b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_scan_configs.php new file mode 100644 index 000000000000..e9f801bf1636 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_scan_configs.php @@ -0,0 +1,62 @@ +listScanConfigs($request); + + /** @var ScanConfig $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END websecurityscanner_v1_generated_WebSecurityScanner_ListScanConfigs_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_scan_runs.php b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_scan_runs.php new file mode 100644 index 000000000000..5dc4bb0a91ac --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_scan_runs.php @@ -0,0 +1,63 @@ +listScanRuns($request); + + /** @var ScanRun $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END websecurityscanner_v1_generated_WebSecurityScanner_ListScanRuns_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/start_scan_run.php b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/start_scan_run.php new file mode 100644 index 000000000000..50f53abd904b --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/start_scan_run.php @@ -0,0 +1,57 @@ +startScanRun($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END websecurityscanner_v1_generated_WebSecurityScanner_StartScanRun_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/stop_scan_run.php b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/stop_scan_run.php new file mode 100644 index 000000000000..580dfda0283b --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/stop_scan_run.php @@ -0,0 +1,57 @@ +stopScanRun($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END websecurityscanner_v1_generated_WebSecurityScanner_StopScanRun_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/update_scan_config.php b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/update_scan_config.php new file mode 100644 index 000000000000..357512c8c83b --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/update_scan_config.php @@ -0,0 +1,57 @@ +updateScanConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END websecurityscanner_v1_generated_WebSecurityScanner_UpdateScanConfig_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1/src/V1/Client/BaseClient/WebSecurityScannerBaseClient.php b/owl-bot-staging/WebSecurityScanner/v1/src/V1/Client/BaseClient/WebSecurityScannerBaseClient.php new file mode 100644 index 000000000000..b8394c87a495 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/src/V1/Client/BaseClient/WebSecurityScannerBaseClient.php @@ -0,0 +1,503 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/web_security_scanner_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/web_security_scanner_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/web_security_scanner_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/web_security_scanner_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'websecurityscanner.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new ScanConfig. + * + * The async variant is {@see self::createScanConfigAsync()} . + * + * @param CreateScanConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ScanConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function createScanConfig(CreateScanConfigRequest $request, array $callOptions = []): ScanConfig + { + return $this->startApiCall('CreateScanConfig', $request, $callOptions)->wait(); + } + + /** + * Deletes an existing ScanConfig and its child resources. + * + * The async variant is {@see self::deleteScanConfigAsync()} . + * + * @param DeleteScanConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteScanConfig(DeleteScanConfigRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteScanConfig', $request, $callOptions)->wait(); + } + + /** + * Gets a Finding. + * + * The async variant is {@see self::getFindingAsync()} . + * + * @param GetFindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Finding + * + * @throws ApiException Thrown if the API call fails. + */ + public function getFinding(GetFindingRequest $request, array $callOptions = []): Finding + { + return $this->startApiCall('GetFinding', $request, $callOptions)->wait(); + } + + /** + * Gets a ScanConfig. + * + * The async variant is {@see self::getScanConfigAsync()} . + * + * @param GetScanConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ScanConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getScanConfig(GetScanConfigRequest $request, array $callOptions = []): ScanConfig + { + return $this->startApiCall('GetScanConfig', $request, $callOptions)->wait(); + } + + /** + * Gets a ScanRun. + * + * The async variant is {@see self::getScanRunAsync()} . + * + * @param GetScanRunRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ScanRun + * + * @throws ApiException Thrown if the API call fails. + */ + public function getScanRun(GetScanRunRequest $request, array $callOptions = []): ScanRun + { + return $this->startApiCall('GetScanRun', $request, $callOptions)->wait(); + } + + /** + * List CrawledUrls under a given ScanRun. + * + * The async variant is {@see self::listCrawledUrlsAsync()} . + * + * @param ListCrawledUrlsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listCrawledUrls(ListCrawledUrlsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCrawledUrls', $request, $callOptions); + } + + /** + * List all FindingTypeStats under a given ScanRun. + * + * The async variant is {@see self::listFindingTypeStatsAsync()} . + * + * @param ListFindingTypeStatsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ListFindingTypeStatsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listFindingTypeStats(ListFindingTypeStatsRequest $request, array $callOptions = []): ListFindingTypeStatsResponse + { + return $this->startApiCall('ListFindingTypeStats', $request, $callOptions)->wait(); + } + + /** + * List Findings under a given ScanRun. + * + * The async variant is {@see self::listFindingsAsync()} . + * + * @param ListFindingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listFindings(ListFindingsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListFindings', $request, $callOptions); + } + + /** + * Lists ScanConfigs under a given project. + * + * The async variant is {@see self::listScanConfigsAsync()} . + * + * @param ListScanConfigsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listScanConfigs(ListScanConfigsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListScanConfigs', $request, $callOptions); + } + + /** + * Lists ScanRuns under a given ScanConfig, in descending order of ScanRun + * stop time. + * + * The async variant is {@see self::listScanRunsAsync()} . + * + * @param ListScanRunsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listScanRuns(ListScanRunsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListScanRuns', $request, $callOptions); + } + + /** + * Start a ScanRun according to the given ScanConfig. + * + * The async variant is {@see self::startScanRunAsync()} . + * + * @param StartScanRunRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ScanRun + * + * @throws ApiException Thrown if the API call fails. + */ + public function startScanRun(StartScanRunRequest $request, array $callOptions = []): ScanRun + { + return $this->startApiCall('StartScanRun', $request, $callOptions)->wait(); + } + + /** + * Stops a ScanRun. The stopped ScanRun is returned. + * + * The async variant is {@see self::stopScanRunAsync()} . + * + * @param StopScanRunRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ScanRun + * + * @throws ApiException Thrown if the API call fails. + */ + public function stopScanRun(StopScanRunRequest $request, array $callOptions = []): ScanRun + { + return $this->startApiCall('StopScanRun', $request, $callOptions)->wait(); + } + + /** + * Updates a ScanConfig. This method support partial update of a ScanConfig. + * + * The async variant is {@see self::updateScanConfigAsync()} . + * + * @param UpdateScanConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ScanConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateScanConfig(UpdateScanConfigRequest $request, array $callOptions = []): ScanConfig + { + return $this->startApiCall('UpdateScanConfig', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/WebSecurityScanner/v1/src/V1/Client/WebSecurityScannerClient.php b/owl-bot-staging/WebSecurityScanner/v1/src/V1/Client/WebSecurityScannerClient.php new file mode 100644 index 000000000000..1bb8668679a7 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/src/V1/Client/WebSecurityScannerClient.php @@ -0,0 +1,40 @@ + [ + 'google.cloud.websecurityscanner.v1.WebSecurityScanner' => [ + 'CreateScanConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\WebSecurityScanner\V1\ScanConfig', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteScanConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetFinding' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\WebSecurityScanner\V1\Finding', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetScanConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\WebSecurityScanner\V1\ScanConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetScanRun' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\WebSecurityScanner\V1\ScanRun', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCrawledUrls' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCrawledUrls', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\WebSecurityScanner\V1\ListCrawledUrlsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListFindingTypeStats' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\WebSecurityScanner\V1\ListFindingTypeStatsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListFindings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getFindings', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\WebSecurityScanner\V1\ListFindingsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListScanConfigs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getScanConfigs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\WebSecurityScanner\V1\ListScanConfigsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListScanRuns' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getScanRuns', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\WebSecurityScanner\V1\ListScanRunsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'StartScanRun' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\WebSecurityScanner\V1\ScanRun', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'StopScanRun' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\WebSecurityScanner\V1\ScanRun', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateScanConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\WebSecurityScanner\V1\ScanConfig', + 'headerParams' => [ + [ + 'keyName' => 'scan_config.name', + 'fieldAccessors' => [ + 'getScanConfig', + 'getName', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/WebSecurityScanner/v1/src/V1/resources/web_security_scanner_rest_client_config.php b/owl-bot-staging/WebSecurityScanner/v1/src/V1/resources/web_security_scanner_rest_client_config.php new file mode 100644 index 000000000000..c38e23bc436f --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/src/V1/resources/web_security_scanner_rest_client_config.php @@ -0,0 +1,157 @@ + [ + 'google.cloud.websecurityscanner.v1.WebSecurityScanner' => [ + 'CreateScanConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/scanConfigs', + 'body' => 'scan_config', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteScanConfig' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/scanConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetFinding' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/scanConfigs/*/scanRuns/*/findings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetScanConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/scanConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetScanRun' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/scanConfigs/*/scanRuns/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCrawledUrls' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/scanConfigs/*/scanRuns/*}/crawledUrls', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListFindingTypeStats' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/scanConfigs/*/scanRuns/*}/findingTypeStats', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListFindings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/scanConfigs/*/scanRuns/*}/findings', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListScanConfigs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/scanConfigs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListScanRuns' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/scanConfigs/*}/scanRuns', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'StartScanRun' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/scanConfigs/*}:start', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'StopScanRun' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/scanConfigs/*/scanRuns/*}:stop', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateScanConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{scan_config.name=projects/*/scanConfigs/*}', + 'body' => 'scan_config', + 'placeholders' => [ + 'scan_config.name' => [ + 'getters' => [ + 'getScanConfig', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/WebSecurityScanner/v1/tests/Unit/V1/Client/WebSecurityScannerClientTest.php b/owl-bot-staging/WebSecurityScanner/v1/tests/Unit/V1/Client/WebSecurityScannerClientTest.php new file mode 100644 index 000000000000..c9d375b48fdc --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1/tests/Unit/V1/Client/WebSecurityScannerClientTest.php @@ -0,0 +1,944 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return WebSecurityScannerClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new WebSecurityScannerClient($options); + } + + /** @test */ + public function createScanConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $maxQps = 844445913; + $managedScan = false; + $staticIpScan = true; + $ignoreHttpStatusErrors = true; + $expectedResponse = new ScanConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMaxQps($maxQps); + $expectedResponse->setManagedScan($managedScan); + $expectedResponse->setStaticIpScan($staticIpScan); + $expectedResponse->setIgnoreHttpStatusErrors($ignoreHttpStatusErrors); + $transport->addResponse($expectedResponse); + $request = new CreateScanConfigRequest(); + $response = $gapicClient->createScanConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1.WebSecurityScanner/CreateScanConfig', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createScanConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new CreateScanConfigRequest(); + try { + $gapicClient->createScanConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteScanConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + $request = new DeleteScanConfigRequest(); + $gapicClient->deleteScanConfig($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1.WebSecurityScanner/DeleteScanConfig', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteScanConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new DeleteScanConfigRequest(); + try { + $gapicClient->deleteScanConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFindingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $findingType = 'findingType274496048'; + $httpMethod = 'httpMethod820747384'; + $fuzzedUrl = 'fuzzedUrl-2120677666'; + $body = 'body3029410'; + $description = 'description-1724546052'; + $reproductionUrl = 'reproductionUrl-244934180'; + $frameUrl = 'frameUrl545464221'; + $finalUrl = 'finalUrl355601190'; + $trackingId = 'trackingId1878901667'; + $expectedResponse = new Finding(); + $expectedResponse->setName($name2); + $expectedResponse->setFindingType($findingType); + $expectedResponse->setHttpMethod($httpMethod); + $expectedResponse->setFuzzedUrl($fuzzedUrl); + $expectedResponse->setBody($body); + $expectedResponse->setDescription($description); + $expectedResponse->setReproductionUrl($reproductionUrl); + $expectedResponse->setFrameUrl($frameUrl); + $expectedResponse->setFinalUrl($finalUrl); + $expectedResponse->setTrackingId($trackingId); + $transport->addResponse($expectedResponse); + $request = new GetFindingRequest(); + $response = $gapicClient->getFinding($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1.WebSecurityScanner/GetFinding', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFindingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetFindingRequest(); + try { + $gapicClient->getFinding($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getScanConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $maxQps = 844445913; + $managedScan = false; + $staticIpScan = true; + $ignoreHttpStatusErrors = true; + $expectedResponse = new ScanConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMaxQps($maxQps); + $expectedResponse->setManagedScan($managedScan); + $expectedResponse->setStaticIpScan($staticIpScan); + $expectedResponse->setIgnoreHttpStatusErrors($ignoreHttpStatusErrors); + $transport->addResponse($expectedResponse); + $request = new GetScanConfigRequest(); + $response = $gapicClient->getScanConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1.WebSecurityScanner/GetScanConfig', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getScanConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetScanConfigRequest(); + try { + $gapicClient->getScanConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getScanRunTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $urlsCrawledCount = 1749797253; + $urlsTestedCount = 1498664068; + $hasVulnerabilities = false; + $progressPercent = 2137894861; + $expectedResponse = new ScanRun(); + $expectedResponse->setName($name2); + $expectedResponse->setUrlsCrawledCount($urlsCrawledCount); + $expectedResponse->setUrlsTestedCount($urlsTestedCount); + $expectedResponse->setHasVulnerabilities($hasVulnerabilities); + $expectedResponse->setProgressPercent($progressPercent); + $transport->addResponse($expectedResponse); + $request = new GetScanRunRequest(); + $response = $gapicClient->getScanRun($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1.WebSecurityScanner/GetScanRun', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getScanRunExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetScanRunRequest(); + try { + $gapicClient->getScanRun($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCrawledUrlsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $crawledUrlsElement = new CrawledUrl(); + $crawledUrls = [ + $crawledUrlsElement, + ]; + $expectedResponse = new ListCrawledUrlsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCrawledUrls($crawledUrls); + $transport->addResponse($expectedResponse); + $request = new ListCrawledUrlsRequest(); + $response = $gapicClient->listCrawledUrls($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCrawledUrls()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1.WebSecurityScanner/ListCrawledUrls', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCrawledUrlsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListCrawledUrlsRequest(); + try { + $gapicClient->listCrawledUrls($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFindingTypeStatsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListFindingTypeStatsResponse(); + $transport->addResponse($expectedResponse); + $request = new ListFindingTypeStatsRequest(); + $response = $gapicClient->listFindingTypeStats($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1.WebSecurityScanner/ListFindingTypeStats', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFindingTypeStatsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListFindingTypeStatsRequest(); + try { + $gapicClient->listFindingTypeStats($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFindingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $findingsElement = new Finding(); + $findings = [ + $findingsElement, + ]; + $expectedResponse = new ListFindingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFindings($findings); + $transport->addResponse($expectedResponse); + $request = new ListFindingsRequest(); + $response = $gapicClient->listFindings($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFindings()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1.WebSecurityScanner/ListFindings', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFindingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListFindingsRequest(); + try { + $gapicClient->listFindings($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listScanConfigsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $scanConfigsElement = new ScanConfig(); + $scanConfigs = [ + $scanConfigsElement, + ]; + $expectedResponse = new ListScanConfigsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setScanConfigs($scanConfigs); + $transport->addResponse($expectedResponse); + $request = new ListScanConfigsRequest(); + $response = $gapicClient->listScanConfigs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getScanConfigs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1.WebSecurityScanner/ListScanConfigs', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listScanConfigsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListScanConfigsRequest(); + try { + $gapicClient->listScanConfigs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listScanRunsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $scanRunsElement = new ScanRun(); + $scanRuns = [ + $scanRunsElement, + ]; + $expectedResponse = new ListScanRunsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setScanRuns($scanRuns); + $transport->addResponse($expectedResponse); + $request = new ListScanRunsRequest(); + $response = $gapicClient->listScanRuns($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getScanRuns()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1.WebSecurityScanner/ListScanRuns', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listScanRunsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListScanRunsRequest(); + try { + $gapicClient->listScanRuns($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startScanRunTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $urlsCrawledCount = 1749797253; + $urlsTestedCount = 1498664068; + $hasVulnerabilities = false; + $progressPercent = 2137894861; + $expectedResponse = new ScanRun(); + $expectedResponse->setName($name2); + $expectedResponse->setUrlsCrawledCount($urlsCrawledCount); + $expectedResponse->setUrlsTestedCount($urlsTestedCount); + $expectedResponse->setHasVulnerabilities($hasVulnerabilities); + $expectedResponse->setProgressPercent($progressPercent); + $transport->addResponse($expectedResponse); + $request = new StartScanRunRequest(); + $response = $gapicClient->startScanRun($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1.WebSecurityScanner/StartScanRun', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startScanRunExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new StartScanRunRequest(); + try { + $gapicClient->startScanRun($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function stopScanRunTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $urlsCrawledCount = 1749797253; + $urlsTestedCount = 1498664068; + $hasVulnerabilities = false; + $progressPercent = 2137894861; + $expectedResponse = new ScanRun(); + $expectedResponse->setName($name2); + $expectedResponse->setUrlsCrawledCount($urlsCrawledCount); + $expectedResponse->setUrlsTestedCount($urlsTestedCount); + $expectedResponse->setHasVulnerabilities($hasVulnerabilities); + $expectedResponse->setProgressPercent($progressPercent); + $transport->addResponse($expectedResponse); + $request = new StopScanRunRequest(); + $response = $gapicClient->stopScanRun($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1.WebSecurityScanner/StopScanRun', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function stopScanRunExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new StopScanRunRequest(); + try { + $gapicClient->stopScanRun($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateScanConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $maxQps = 844445913; + $managedScan = false; + $staticIpScan = true; + $ignoreHttpStatusErrors = true; + $expectedResponse = new ScanConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMaxQps($maxQps); + $expectedResponse->setManagedScan($managedScan); + $expectedResponse->setStaticIpScan($staticIpScan); + $expectedResponse->setIgnoreHttpStatusErrors($ignoreHttpStatusErrors); + $transport->addResponse($expectedResponse); + $request = new UpdateScanConfigRequest(); + $response = $gapicClient->updateScanConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1.WebSecurityScanner/UpdateScanConfig', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateScanConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new UpdateScanConfigRequest(); + try { + $gapicClient->updateScanConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createScanConfigAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $maxQps = 844445913; + $managedScan = false; + $staticIpScan = true; + $ignoreHttpStatusErrors = true; + $expectedResponse = new ScanConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMaxQps($maxQps); + $expectedResponse->setManagedScan($managedScan); + $expectedResponse->setStaticIpScan($staticIpScan); + $expectedResponse->setIgnoreHttpStatusErrors($ignoreHttpStatusErrors); + $transport->addResponse($expectedResponse); + $request = new CreateScanConfigRequest(); + $response = $gapicClient->createScanConfigAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1.WebSecurityScanner/CreateScanConfig', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/CrawledUrl.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/CrawledUrl.php new file mode 100644 index 000000000000..f650ca23bfb8 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/CrawledUrl.php @@ -0,0 +1,32 @@ +internalAddGeneratedFile( + ' +� +8google/cloud/websecurityscanner/v1beta/crawled_url.proto&google.cloud.websecurityscanner.v1beta"< + +CrawledUrl + http_method (  +url (  +body ( B� +*com.google.cloud.websecurityscanner.v1betaBCrawledUrlProtoPZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb�&Google.Cloud.WebSecurityScanner.V1Beta�&Google\\Cloud\\WebSecurityScanner\\V1beta�)Google::Cloud::WebSecurityScanner::V1betabproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/Finding.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/Finding.php new file mode 100644 index 000000000000..02abec885ac1 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/Finding.php @@ -0,0 +1,49 @@ +internalAddGeneratedFile( + ' +� +4google/cloud/websecurityscanner/v1beta/finding.proto&google.cloud.websecurityscanner.v1beta:google/cloud/websecurityscanner/v1beta/finding_addon.proto"� +Finding +name (  + finding_type (  + http_method (  + +fuzzed_url (  +body (  + description (  +reproduction_url (  + frame_url (  + final_url (  + tracking_id + ( : +form ( 2,.google.cloud.websecurityscanner.v1beta.FormQ +outdated_library ( 27.google.cloud.websecurityscanner.v1beta.OutdatedLibraryU +violating_resource ( 29.google.cloud.websecurityscanner.v1beta.ViolatingResourceU +vulnerable_headers ( 29.google.cloud.websecurityscanner.v1beta.VulnerableHeaders[ +vulnerable_parameters ( 2<.google.cloud.websecurityscanner.v1beta.VulnerableParameters8 +xss ( 2+.google.cloud.websecurityscanner.v1beta.Xss:��A� +)websecurityscanner.googleapis.com/FindingSprojects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding}B� +*com.google.cloud.websecurityscanner.v1betaB FindingProtoPZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb�&Google.Cloud.WebSecurityScanner.V1Beta�&Google\\Cloud\\WebSecurityScanner\\V1beta�)Google::Cloud::WebSecurityScanner::V1betabproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/FindingAddon.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/FindingAddon.php new file mode 100644 index 000000000000..9ea7f4fed763 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/FindingAddon.php @@ -0,0 +1,49 @@ +internalAddGeneratedFile( + ' +� +:google/cloud/websecurityscanner/v1beta/finding_addon.proto&google.cloud.websecurityscanner.v1beta"* +Form + +action_uri (  +fields ( "Q +OutdatedLibrary + library_name (  +version (  +learn_more_urls ( "? +ViolatingResource + content_type (  + resource_url ( "/ +VulnerableParameters +parameter_names ( "� +VulnerableHeadersQ +headers ( 2@.google.cloud.websecurityscanner.v1beta.VulnerableHeaders.HeaderY +missing_headers ( 2@.google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header% +Header +name (  +value ( "2 +Xss + stack_traces (  + error_message ( B� +*com.google.cloud.websecurityscanner.v1betaBFindingAddonProtoPZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb�&Google.Cloud.WebSecurityScanner.V1Beta�&Google\\Cloud\\WebSecurityScanner\\V1beta�)Google::Cloud::WebSecurityScanner::V1betabproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/FindingTypeStats.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/FindingTypeStats.php new file mode 100644 index 000000000000..48755bc15453 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/FindingTypeStats.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + ' +� +?google/cloud/websecurityscanner/v1beta/finding_type_stats.proto&google.cloud.websecurityscanner.v1beta"? +FindingTypeStats + finding_type (  + finding_count (B� +*com.google.cloud.websecurityscanner.v1betaBFindingTypeStatsProtoPZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb�&Google.Cloud.WebSecurityScanner.V1Beta�&Google\\Cloud\\WebSecurityScanner\\V1beta�)Google::Cloud::WebSecurityScanner::V1betabproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/ScanConfig.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/ScanConfig.php new file mode 100644 index 0000000000000000000000000000000000000000..af447db1fe59ee2841c3eabcd2a133fb47b9658e GIT binary patch literal 3047 zcmb_e+iu%N5RK);m$9uV1ZprUiZD))*hNCYDGC&H(w35FS*R=#5*<4!fh|R?WHuDZ z^5Vn|{1<)cYaja1Pw7|WIbYG)B_-LibFopqNLtLCnK?UWcAowa90qVts!@-IR!nSo zmK#xYKX2PlJUe!LPht)&&!+1eQi{oJ?*~58@=O{fs57RJCA03uH1sUjtkTF1ognr@ z9ZeNwK;tpL>|}i-3(Me~zOd?v+VLQhARq>#o*=xy=58NkW-mw5qwYT%gL z4t0BFdT1RveyAvuswN;Ga&6P>dOzFi6Zd7Zduk`%=ch5|*Kn{+Vrv*&?91=v@%K)4 z3u>=7CVd+_cYRC~Bkdvlbql_`YRd`_QcsyTyL`Uc<+Rz0x3dUV;FQ9Q%Czf?-(Dto zn0T4noy?6(2fMBmk61|!*8W}rm}o&*hU-jT;*2!2z9`&=<(?A-u60cKX^x$iXWywg z;U>%vtvBSiAQETs^oCG`6=XY%9dAIA(2d0F((K6i1>~&+$ApK{LV5X~cmsWwo~ZKY z5hG7Bl+`mpf)0>GG$hsl(ZxB0%|Cg11=u|VQ5gmnB6MBLe&sq*Oad!rDviW>R*kR= z3z2s z_Q`0v;wT*sEw4vxER}{LaKiK}6rpi!!|!BsyOIJ|IId6uz&ucY1bb0j;#8F`69qNT z?lyFySHz`9)D@Sne79``X)ui9AG463Y9I&lX%iC5w*3T~i1q%`lh$RjO<$6!-jr+n zNm5hToofPyvXdzGhvQI8Q2$G)3dbFXD*gy7XQB&Vzyj0BMBJ&2MOX;%IehJhJuy}H z9IE@BdcAl6D`!A2jUcSTqU#SFkBtL9B+}7QE=*5@Viy+1n%KlSlIer6VU=A+adaJ{ zNhXiyyKoOy`4~U4T+&N$FTn{zde(8oOS-`;UHb(VPiuU2ucNhzTGN^a*=u%mty15v zYt_Ovp#aO3opx(iBaM1<@1QUv2$0WC)MmBas#gm+;TEiP)NQq0Cv|c zN$?JQX{ha*W)Quh8r!Y*?o_NifU4_6Yu4%rF(WL&e5JLk?-^PlxAqhk$DNB)X|-MN z{6resbFDFj0x;J^Y_)+1^Dx_J?W6Y)zWTUCH{r2%ptsrvFu%dN6kfcbTiLB8*eprY8Xz7i~6+p zj%IHoI!==;36ml1O$UQ0rD1Y1j)zfNqtp zIE#Z}{0r>(865<}Ndz3r*uiuZW^pp2DnN|FsCqyPPKDhaC!o+XI?vKpqJdytbCgBt zC>VB)XcDIJI7?C+ppC|Hlr5xIBh`c1vWhMq&}xxmqp_6aGn%E-sJuF*X_QUV(UUxH zMeu&{E6?oV^LUnr*6%NtZGnx|1yF_Uqu;Ke=l{>N%)p6T!s2BlWif|7L&T@ zC??@^4__cR&}IoDUUB9uX1^de(KUeEzIR@hUy@sBt2})s$BX29^jP;@4;HipY*qS> zB@Mw`sgO-(3Eq~Tkh5xSy+j_P`Vw(R$zdoyF1U1r z?`fcv)C|J`)$mv35qkKMAfE$_IY&S-5BZvWiykb69BL~6(h8=%h`3B@=-#;zCHfNn z3fVwc4d1p*T?36>utIXJ!!TA8CO^_F(~wY5mLcJ{&oCjoh_*D-Dz>Wm-XTa=gu~W7 z&1o|aUsb-gOm09ONbj|Mx;EF8ub^eqGz`X-V)?=|EAcn^5{qfyHdJna>S$bR!@3HM z?-MBdg(r}s1vQS>$#t~xVH6}4zN52ZQyVH|X0kN7rhDcQ!<*`aIP6E?bbveGE54>G z;8ZZ+b-`WJ^_r_e5^(>)clt-&Juw&kqlnu3WH=*!*yU4=sWBRJL&4`L-<_ z4`gjxaDiFijI;)hbD$ AIcRUkS(-co>jiN`XPg}ac`@F zSDL?9&^>4$KJiv>uARBo^GDTQdGn@tS>|s;a#BA|&g(ORaXf1^mLH*U@5y>o zK}pOb8TnB_yks<@ocPgY%mT`FLQXoQ-RTqaq}BftLq(KupBiKwMdN_h{2)q(wJYig z>L;AZ*TQ#01h2h%>{02~)Y9QesHZ0YgzhC3vFlUP>>mG&9z$2Ub~6RD8w$)mp98ah zd3=nnhX8)y3PCIc?Ij_+0fN6c@dD-(Azg`o_nB~5$Ru+E_6J_@h>YAoP>h}T9VMYJ zSrif#&vg<02kRQ7hO3FhwuurJ)Ig4e)yXa~dV=AZ2s-5b7 zeyoCHBT~(BG>o|=I>z;duHzR)-N3k= zGi`Dn@jl108UHu*xywTqj+X?V)}qg_pQL*kFHS72;Wy7%Ua|UcI4#gA_IGtksUr9x z{0s2iM>V$gAPdvedC=$QLC@x4x4tC2LlyOoRNQAXwA)w~;wq!~9gurDNII6-)HPWU znVqut&pO=BtFLXrEj7256|z#@)Xw2k`a4d$njA-UG_91-uzm1M|1c8t99K6B7)zmO z&tZ#GkpwbFT}@FBmqo=XK#UAh2fz%ubky}Kw-B&=uv-8Ych{#)q&wHv*6 zK}&cb9G|;a0UbJil!UUfj&ZBn9r!G@No>!l>2_+m3!h)O!g-Yh>J|1_fUgx5l?^m* zXcgGOyv9g`aAJy2Eh28BWld{Cd8QdEfScumC&guMXuN{+>q*uu*nX!oM5Rnt5pr3= zXD4{?H`so!s`uco`K#F&^jn>_WA*EO(;2j_uGwgvw#<{APc(q_=L2(q-z(T@8&;#< zZnxUaoswFew%RT0N3^Z(b)Y<3+ApBeGp)f{e<5fYyLZrNn3jd8o3Li~dYv9Z;$c6v z&dwB|5x=cp!v2C;&Dz+Fnb1)PYsDD+fQ5NUeJN^h@~=s%Z;dD%u`%unC3b$g$}A{S z#Wrf->uDZ|vp(IV}|%yapjzg+AcF53L7^q`rF zu%1eSeoj3rS9FyGHmaV9@ZW`_oy)b->-Su36l|sbZ%g|bs9~h2hB5DJ7@4oPj-1Nq d+lSL9`BA2cGZLyE8|E*N&(t$hx(Q4G{sUc#0(JlZ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/ScanRunErrorTrace.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/ScanRunErrorTrace.php new file mode 100644 index 0000000000000000000000000000000000000000..451259ff5342ba68e4c1d0cde0f85892ed355c4c GIT binary patch literal 1501 zcmbu9UrXCi7{=H7=i&?`hD{0%cBZ0rY$>{nL7a{>jWwW2Nz=(B5R&w?2GX2xau>8TL{3DR$0DtzsM~>rI=(li&NkPv7&rd!L$Z*ibz1w5QZ0!o+FqM zOmT!07#5=uA~3>}EKU$nAne%CvR!C&O!ozQHOB>skP62bj}z325?l;hpHY~js30-D z$fF=-@YbiD5YeE;AAM4!J|YAYpOPR#il_!a8ca~0u>;ucwNIFO7|_7$3b3bhuycRdqz1>koDRMM$Ua#SCUFFF8c_DN5$ArK#xxF+_zN3*AC7_~ zM~qU{j*2v*F-{?W!A>L8+=eBSYd12?Y}$ucefGF>%r(zUDI#f*cpa2SB+e)%JtkGv zF`_fS`AKtoT9)JD5p0${s%oXleMm`xZdQkoAX<=gPxQ?Jm$P5q!(H^adpb@>@mLtB zs@F4Lmk=YrK8U9SYQy1do4 zARmMI2oF)C25Zfw-2>%*Fr@-gbViXKu$=Qfj)YU?DmUs3{do87L(n&zme;}R1m~17 zClj3d=agpCJ0cpNWAuf!Uo|iCv!0Pu5-8?jnj`T>D!IEjYhGS{RzTr5w zBh}=m%nn_%eBHJV&8~0u`vXI&%g@28HgJy&%Qbb)HSJr1Ir$lAxaNt`@$G@@pB|aV zhR->cX?3M}c?HO>ZTlyh_0e}&6gYH}WU6w4|yX){reX}dlMiFVFu(atUlKlSYrs;Yvjs#UG3mfCPpMB$sQ*%f+KUiljd@y~P+%JP<8 If=dAY0wQ_zKmY&$ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/ScanRunWarningTrace.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/ScanRunWarningTrace.php new file mode 100644 index 0000000000000000000000000000000000000000..775ada9cd20ffefa61fc1057d0f47776edacacbb GIT binary patch literal 1252 zcmb`HL2uJA6vt^99DJCn48gPmGGp301gSP|DFfOxt)gvBwWLg|B1Mktc9t?bavY|C zcI3jx;K)beqag7eu#>Ku)*|gdE^+L?|L^(v{qpWZdY*!putyjXNRly(ub@09Fcn;K z%o7;rlL-+J^NW-wM3@kEJlOXF=ycrRh1#0&Twr3sDd*FKG;qT6apRK28Ns=r@+!lK zDf7nXy_iVU(4UdWS#*g6qih;UfiN+PcmObTL9$d$z}}#Jtn_0fQP?Z2Lt9&irwi8M zr@gk4HUYp1$};Gy5GOf1EdvDFAAAK+J!u{%6vIp+sa{(&izuU#qJ(}?M?ZiQlw?Ht zENUk?!;*3a^#+e&Qs0H8r`B$zT$Sno-efw^)l-!VT_%ZOC-BC|K|=`4@dcsvi=Rrgt+ z3-z`g@cj|6|HDNZ+og$Fbc4Cr4QAO5n|~@`ZOL^ReXxT0n5wFky?u;KRoVYlnruG0@9`=oVx6rDK!@F?(W z6=MTD4LmP8ZuQUZtW}L?U~RtE9gap((DD!c+C#$ttL-DtK6E-!`z&%>gW5{_M-{wM zDBbfs?e!%GDtc>B8I8)?-c*KPG^TtRcPOPZ^cJrnjho9Re^$491#)JAoT-rWXEf`C z6wPLd+^-v9ID=Euc}E&5JT>{htGlJCWfiWLwWzhMQX4-m{s(V&=I!~q?D|`f{1cEu LS+Z~qt^xQ9hq9yU literal 0 HcmV?d00001 diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/WebSecurityScanner.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/WebSecurityScanner.php new file mode 100644 index 000000000000..b15772b1430f --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/WebSecurityScanner.php @@ -0,0 +1,121 @@ +internalAddGeneratedFile( + ' +�- +Agoogle/cloud/websecurityscanner/v1beta/web_security_scanner.proto&google.cloud.websecurityscanner.v1betagoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto8google/cloud/websecurityscanner/v1beta/crawled_url.proto4google/cloud/websecurityscanner/v1beta/finding.proto?google/cloud/websecurityscanner/v1beta/finding_type_stats.proto8google/cloud/websecurityscanner/v1beta/scan_config.proto5google/cloud/websecurityscanner/v1beta/scan_run.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"� +CreateScanConfigRequestC +parent ( B3�A�A- ++cloudresourcemanager.googleapis.com/ProjectL + scan_config ( 22.google.cloud.websecurityscanner.v1beta.ScanConfigB�A"] +DeleteScanConfigRequestB +name ( B4�A�A. +,websecurityscanner.googleapis.com/ScanConfig"Z +GetScanConfigRequestB +name ( B4�A�A. +,websecurityscanner.googleapis.com/ScanConfig"� +ListScanConfigsRequestC +parent ( B3�A�A- ++cloudresourcemanager.googleapis.com/Project + +page_token (  + page_size ("� +UpdateScanConfigRequestL + scan_config ( 22.google.cloud.websecurityscanner.v1beta.ScanConfigB�A4 + update_mask ( 2.google.protobuf.FieldMaskB�A"| +ListScanConfigsResponseH + scan_configs ( 22.google.cloud.websecurityscanner.v1beta.ScanConfig +next_page_token ( "Y +StartScanRunRequestB +name ( B4�A�A. +,websecurityscanner.googleapis.com/ScanConfig"T +GetScanRunRequest? +name ( B1�A�A+ +)websecurityscanner.googleapis.com/ScanRun"� +ListScanRunsRequestD +parent ( B4�A�A. +,websecurityscanner.googleapis.com/ScanConfig + +page_token (  + page_size ("s +ListScanRunsResponseB + scan_runs ( 2/.google.cloud.websecurityscanner.v1beta.ScanRun +next_page_token ( "U +StopScanRunRequest? +name ( B1�A�A+ +)websecurityscanner.googleapis.com/ScanRun"� +ListCrawledUrlsRequestA +parent ( B1�A�A+ +)websecurityscanner.googleapis.com/ScanRun + +page_token (  + page_size ("| +ListCrawledUrlsResponseH + crawled_urls ( 22.google.cloud.websecurityscanner.v1beta.CrawledUrl +next_page_token ( "T +GetFindingRequest? +name ( B1�A�A+ +)websecurityscanner.googleapis.com/Finding"� +ListFindingsRequestA +parent ( B1�A�A+ +)websecurityscanner.googleapis.com/ScanRun +filter ( B�A + +page_token (  + page_size ("r +ListFindingsResponseA +findings ( 2/.google.cloud.websecurityscanner.v1beta.Finding +next_page_token ( "` +ListFindingTypeStatsRequestA +parent ( B1�A�A+ +)websecurityscanner.googleapis.com/ScanRun"t +ListFindingTypeStatsResponseT +finding_type_stats ( 28.google.cloud.websecurityscanner.v1beta.FindingTypeStats2� +WebSecurityScanner� +CreateScanConfig?.google.cloud.websecurityscanner.v1beta.CreateScanConfigRequest2.google.cloud.websecurityscanner.v1beta.ScanConfig"Q���6"\'/v1beta/{parent=projects/*}/scanConfigs: scan_config�Aparent,scan_config� +DeleteScanConfig?.google.cloud.websecurityscanner.v1beta.DeleteScanConfigRequest.google.protobuf.Empty"6���)*\'/v1beta/{name=projects/*/scanConfigs/*}�Aname� + GetScanConfig<.google.cloud.websecurityscanner.v1beta.GetScanConfigRequest2.google.cloud.websecurityscanner.v1beta.ScanConfig"6���)\'/v1beta/{name=projects/*/scanConfigs/*}�Aname� +ListScanConfigs>.google.cloud.websecurityscanner.v1beta.ListScanConfigsRequest?.google.cloud.websecurityscanner.v1beta.ListScanConfigsResponse"8���)\'/v1beta/{parent=projects/*}/scanConfigs�Aparent� +UpdateScanConfig?.google.cloud.websecurityscanner.v1beta.UpdateScanConfigRequest2.google.cloud.websecurityscanner.v1beta.ScanConfig"b���B23/v1beta/{scan_config.name=projects/*/scanConfigs/*}: scan_config�Ascan_config,update_mask� + StartScanRun;.google.cloud.websecurityscanner.v1beta.StartScanRunRequest/.google.cloud.websecurityscanner.v1beta.ScanRun"?���2"-/v1beta/{name=projects/*/scanConfigs/*}:start:*�Aname� + +GetScanRun9.google.cloud.websecurityscanner.v1beta.GetScanRunRequest/.google.cloud.websecurityscanner.v1beta.ScanRun"A���42/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*}�Aname� + ListScanRuns;.google.cloud.websecurityscanner.v1beta.ListScanRunsRequest<.google.cloud.websecurityscanner.v1beta.ListScanRunsResponse"C���42/v1beta/{parent=projects/*/scanConfigs/*}/scanRuns�Aparent� + StopScanRun:.google.cloud.websecurityscanner.v1beta.StopScanRunRequest/.google.cloud.websecurityscanner.v1beta.ScanRun"I���<"7/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*}:stop:*�Aname� +ListCrawledUrls>.google.cloud.websecurityscanner.v1beta.ListCrawledUrlsRequest?.google.cloud.websecurityscanner.v1beta.ListCrawledUrlsResponse"Q���B@/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/crawledUrls�Aparent� + +GetFinding9.google.cloud.websecurityscanner.v1beta.GetFindingRequest/.google.cloud.websecurityscanner.v1beta.Finding"L���?=/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*/findings/*}�Aname� + ListFindings;.google.cloud.websecurityscanner.v1beta.ListFindingsRequest<.google.cloud.websecurityscanner.v1beta.ListFindingsResponse"U���?=/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/findings�A parent,filter� +ListFindingTypeStatsC.google.cloud.websecurityscanner.v1beta.ListFindingTypeStatsRequestD.google.cloud.websecurityscanner.v1beta.ListFindingTypeStatsResponse"V���GE/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/findingTypeStats�AparentU�A!websecurityscanner.googleapis.com�A.https://www.googleapis.com/auth/cloud-platformB� +*com.google.cloud.websecurityscanner.v1betaBWebSecurityScannerProtoPZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb�&Google.Cloud.WebSecurityScanner.V1Beta�&Google\\Cloud\\WebSecurityScanner\\V1beta�)Google::Cloud::WebSecurityScanner::V1betabproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/CrawledUrl.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/CrawledUrl.php new file mode 100644 index 000000000000..2e349723d4e8 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/CrawledUrl.php @@ -0,0 +1,141 @@ +google.cloud.websecurityscanner.v1beta.CrawledUrl + */ +class CrawledUrl extends \Google\Protobuf\Internal\Message +{ + /** + * The http method of the request that was used to visit the URL, in + * uppercase. + * + * Generated from protobuf field string http_method = 1; + */ + protected $http_method = ''; + /** + * The URL that was crawled. + * + * Generated from protobuf field string url = 2; + */ + protected $url = ''; + /** + * The body of the request that was used to visit the URL. + * + * Generated from protobuf field string body = 3; + */ + protected $body = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $http_method + * The http method of the request that was used to visit the URL, in + * uppercase. + * @type string $url + * The URL that was crawled. + * @type string $body + * The body of the request that was used to visit the URL. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\CrawledUrl::initOnce(); + parent::__construct($data); + } + + /** + * The http method of the request that was used to visit the URL, in + * uppercase. + * + * Generated from protobuf field string http_method = 1; + * @return string + */ + public function getHttpMethod() + { + return $this->http_method; + } + + /** + * The http method of the request that was used to visit the URL, in + * uppercase. + * + * Generated from protobuf field string http_method = 1; + * @param string $var + * @return $this + */ + public function setHttpMethod($var) + { + GPBUtil::checkString($var, True); + $this->http_method = $var; + + return $this; + } + + /** + * The URL that was crawled. + * + * Generated from protobuf field string url = 2; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * The URL that was crawled. + * + * Generated from protobuf field string url = 2; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + + /** + * The body of the request that was used to visit the URL. + * + * Generated from protobuf field string body = 3; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * The body of the request that was used to visit the URL. + * + * Generated from protobuf field string body = 3; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, True); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/CreateScanConfigRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/CreateScanConfigRequest.php new file mode 100644 index 000000000000..ead5d80e4378 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/CreateScanConfigRequest.php @@ -0,0 +1,115 @@ +google.cloud.websecurityscanner.v1beta.CreateScanConfigRequest + */ +class CreateScanConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name where the scan is created, which should be a + * project resource name in the format 'projects/{projectId}'. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ScanConfig to be created. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig scan_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scan_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name where the scan is created, which should be a + * project resource name in the format 'projects/{projectId}'. + * @type \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig $scan_config + * Required. The ScanConfig to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name where the scan is created, which should be a + * project resource name in the format 'projects/{projectId}'. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name where the scan is created, which should be a + * project resource name in the format 'projects/{projectId}'. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ScanConfig to be created. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig scan_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig|null + */ + public function getScanConfig() + { + return $this->scan_config; + } + + public function hasScanConfig() + { + return isset($this->scan_config); + } + + public function clearScanConfig() + { + unset($this->scan_config); + } + + /** + * Required. The ScanConfig to be created. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig scan_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig $var + * @return $this + */ + public function setScanConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig::class); + $this->scan_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/DeleteScanConfigRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/DeleteScanConfigRequest.php new file mode 100644 index 000000000000..141b3ec43c8b --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/DeleteScanConfigRequest.php @@ -0,0 +1,71 @@ +google.cloud.websecurityscanner.v1beta.DeleteScanConfigRequest + */ +class DeleteScanConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the ScanConfig to be deleted. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the ScanConfig to be deleted. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the ScanConfig to be deleted. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the ScanConfig to be deleted. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Finding.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Finding.php new file mode 100644 index 000000000000..a2d13bd51546 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Finding.php @@ -0,0 +1,686 @@ +google.cloud.websecurityscanner.v1beta.Finding + */ +class Finding extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the Finding. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'. + * The finding IDs are generated by the system. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The type of the Finding. + * Detailed and up-to-date information on findings can be found here: + * https://cloud.google.com/security-scanner/docs/scan-result-details + * + * Generated from protobuf field string finding_type = 2; + */ + protected $finding_type = ''; + /** + * The http method of the request that triggered the vulnerability, in + * uppercase. + * + * Generated from protobuf field string http_method = 3; + */ + protected $http_method = ''; + /** + * The URL produced by the server-side fuzzer and used in the request that + * triggered the vulnerability. + * + * Generated from protobuf field string fuzzed_url = 4; + */ + protected $fuzzed_url = ''; + /** + * The body of the request that triggered the vulnerability. + * + * Generated from protobuf field string body = 5; + */ + protected $body = ''; + /** + * The description of the vulnerability. + * + * Generated from protobuf field string description = 6; + */ + protected $description = ''; + /** + * The URL containing human-readable payload that user can leverage to + * reproduce the vulnerability. + * + * Generated from protobuf field string reproduction_url = 7; + */ + protected $reproduction_url = ''; + /** + * If the vulnerability was originated from nested IFrame, the immediate + * parent IFrame is reported. + * + * Generated from protobuf field string frame_url = 8; + */ + protected $frame_url = ''; + /** + * The URL where the browser lands when the vulnerability is detected. + * + * Generated from protobuf field string final_url = 9; + */ + protected $final_url = ''; + /** + * The tracking ID uniquely identifies a vulnerability instance across + * multiple ScanRuns. + * + * Generated from protobuf field string tracking_id = 10; + */ + protected $tracking_id = ''; + /** + * An addon containing information reported for a vulnerability with an HTML + * form, if any. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.Form form = 16; + */ + protected $form = null; + /** + * An addon containing information about outdated libraries. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.OutdatedLibrary outdated_library = 11; + */ + protected $outdated_library = null; + /** + * An addon containing detailed information regarding any resource causing the + * vulnerability such as JavaScript sources, image, audio files, etc. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ViolatingResource violating_resource = 12; + */ + protected $violating_resource = null; + /** + * An addon containing information about vulnerable or missing HTTP headers. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.VulnerableHeaders vulnerable_headers = 15; + */ + protected $vulnerable_headers = null; + /** + * An addon containing information about request parameters which were found + * to be vulnerable. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.VulnerableParameters vulnerable_parameters = 13; + */ + protected $vulnerable_parameters = null; + /** + * An addon containing information reported for an XSS, if any. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.Xss xss = 14; + */ + protected $xss = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the Finding. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'. + * The finding IDs are generated by the system. + * @type string $finding_type + * The type of the Finding. + * Detailed and up-to-date information on findings can be found here: + * https://cloud.google.com/security-scanner/docs/scan-result-details + * @type string $http_method + * The http method of the request that triggered the vulnerability, in + * uppercase. + * @type string $fuzzed_url + * The URL produced by the server-side fuzzer and used in the request that + * triggered the vulnerability. + * @type string $body + * The body of the request that triggered the vulnerability. + * @type string $description + * The description of the vulnerability. + * @type string $reproduction_url + * The URL containing human-readable payload that user can leverage to + * reproduce the vulnerability. + * @type string $frame_url + * If the vulnerability was originated from nested IFrame, the immediate + * parent IFrame is reported. + * @type string $final_url + * The URL where the browser lands when the vulnerability is detected. + * @type string $tracking_id + * The tracking ID uniquely identifies a vulnerability instance across + * multiple ScanRuns. + * @type \Google\Cloud\WebSecurityScanner\V1beta\Form $form + * An addon containing information reported for a vulnerability with an HTML + * form, if any. + * @type \Google\Cloud\WebSecurityScanner\V1beta\OutdatedLibrary $outdated_library + * An addon containing information about outdated libraries. + * @type \Google\Cloud\WebSecurityScanner\V1beta\ViolatingResource $violating_resource + * An addon containing detailed information regarding any resource causing the + * vulnerability such as JavaScript sources, image, audio files, etc. + * @type \Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders $vulnerable_headers + * An addon containing information about vulnerable or missing HTTP headers. + * @type \Google\Cloud\WebSecurityScanner\V1beta\VulnerableParameters $vulnerable_parameters + * An addon containing information about request parameters which were found + * to be vulnerable. + * @type \Google\Cloud\WebSecurityScanner\V1beta\Xss $xss + * An addon containing information reported for an XSS, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\Finding::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the Finding. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'. + * The finding IDs are generated by the system. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the Finding. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'. + * The finding IDs are generated by the system. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The type of the Finding. + * Detailed and up-to-date information on findings can be found here: + * https://cloud.google.com/security-scanner/docs/scan-result-details + * + * Generated from protobuf field string finding_type = 2; + * @return string + */ + public function getFindingType() + { + return $this->finding_type; + } + + /** + * The type of the Finding. + * Detailed and up-to-date information on findings can be found here: + * https://cloud.google.com/security-scanner/docs/scan-result-details + * + * Generated from protobuf field string finding_type = 2; + * @param string $var + * @return $this + */ + public function setFindingType($var) + { + GPBUtil::checkString($var, True); + $this->finding_type = $var; + + return $this; + } + + /** + * The http method of the request that triggered the vulnerability, in + * uppercase. + * + * Generated from protobuf field string http_method = 3; + * @return string + */ + public function getHttpMethod() + { + return $this->http_method; + } + + /** + * The http method of the request that triggered the vulnerability, in + * uppercase. + * + * Generated from protobuf field string http_method = 3; + * @param string $var + * @return $this + */ + public function setHttpMethod($var) + { + GPBUtil::checkString($var, True); + $this->http_method = $var; + + return $this; + } + + /** + * The URL produced by the server-side fuzzer and used in the request that + * triggered the vulnerability. + * + * Generated from protobuf field string fuzzed_url = 4; + * @return string + */ + public function getFuzzedUrl() + { + return $this->fuzzed_url; + } + + /** + * The URL produced by the server-side fuzzer and used in the request that + * triggered the vulnerability. + * + * Generated from protobuf field string fuzzed_url = 4; + * @param string $var + * @return $this + */ + public function setFuzzedUrl($var) + { + GPBUtil::checkString($var, True); + $this->fuzzed_url = $var; + + return $this; + } + + /** + * The body of the request that triggered the vulnerability. + * + * Generated from protobuf field string body = 5; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * The body of the request that triggered the vulnerability. + * + * Generated from protobuf field string body = 5; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, True); + $this->body = $var; + + return $this; + } + + /** + * The description of the vulnerability. + * + * Generated from protobuf field string description = 6; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the vulnerability. + * + * Generated from protobuf field string description = 6; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The URL containing human-readable payload that user can leverage to + * reproduce the vulnerability. + * + * Generated from protobuf field string reproduction_url = 7; + * @return string + */ + public function getReproductionUrl() + { + return $this->reproduction_url; + } + + /** + * The URL containing human-readable payload that user can leverage to + * reproduce the vulnerability. + * + * Generated from protobuf field string reproduction_url = 7; + * @param string $var + * @return $this + */ + public function setReproductionUrl($var) + { + GPBUtil::checkString($var, True); + $this->reproduction_url = $var; + + return $this; + } + + /** + * If the vulnerability was originated from nested IFrame, the immediate + * parent IFrame is reported. + * + * Generated from protobuf field string frame_url = 8; + * @return string + */ + public function getFrameUrl() + { + return $this->frame_url; + } + + /** + * If the vulnerability was originated from nested IFrame, the immediate + * parent IFrame is reported. + * + * Generated from protobuf field string frame_url = 8; + * @param string $var + * @return $this + */ + public function setFrameUrl($var) + { + GPBUtil::checkString($var, True); + $this->frame_url = $var; + + return $this; + } + + /** + * The URL where the browser lands when the vulnerability is detected. + * + * Generated from protobuf field string final_url = 9; + * @return string + */ + public function getFinalUrl() + { + return $this->final_url; + } + + /** + * The URL where the browser lands when the vulnerability is detected. + * + * Generated from protobuf field string final_url = 9; + * @param string $var + * @return $this + */ + public function setFinalUrl($var) + { + GPBUtil::checkString($var, True); + $this->final_url = $var; + + return $this; + } + + /** + * The tracking ID uniquely identifies a vulnerability instance across + * multiple ScanRuns. + * + * Generated from protobuf field string tracking_id = 10; + * @return string + */ + public function getTrackingId() + { + return $this->tracking_id; + } + + /** + * The tracking ID uniquely identifies a vulnerability instance across + * multiple ScanRuns. + * + * Generated from protobuf field string tracking_id = 10; + * @param string $var + * @return $this + */ + public function setTrackingId($var) + { + GPBUtil::checkString($var, True); + $this->tracking_id = $var; + + return $this; + } + + /** + * An addon containing information reported for a vulnerability with an HTML + * form, if any. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.Form form = 16; + * @return \Google\Cloud\WebSecurityScanner\V1beta\Form|null + */ + public function getForm() + { + return $this->form; + } + + public function hasForm() + { + return isset($this->form); + } + + public function clearForm() + { + unset($this->form); + } + + /** + * An addon containing information reported for a vulnerability with an HTML + * form, if any. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.Form form = 16; + * @param \Google\Cloud\WebSecurityScanner\V1beta\Form $var + * @return $this + */ + public function setForm($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\Form::class); + $this->form = $var; + + return $this; + } + + /** + * An addon containing information about outdated libraries. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.OutdatedLibrary outdated_library = 11; + * @return \Google\Cloud\WebSecurityScanner\V1beta\OutdatedLibrary|null + */ + public function getOutdatedLibrary() + { + return $this->outdated_library; + } + + public function hasOutdatedLibrary() + { + return isset($this->outdated_library); + } + + public function clearOutdatedLibrary() + { + unset($this->outdated_library); + } + + /** + * An addon containing information about outdated libraries. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.OutdatedLibrary outdated_library = 11; + * @param \Google\Cloud\WebSecurityScanner\V1beta\OutdatedLibrary $var + * @return $this + */ + public function setOutdatedLibrary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\OutdatedLibrary::class); + $this->outdated_library = $var; + + return $this; + } + + /** + * An addon containing detailed information regarding any resource causing the + * vulnerability such as JavaScript sources, image, audio files, etc. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ViolatingResource violating_resource = 12; + * @return \Google\Cloud\WebSecurityScanner\V1beta\ViolatingResource|null + */ + public function getViolatingResource() + { + return $this->violating_resource; + } + + public function hasViolatingResource() + { + return isset($this->violating_resource); + } + + public function clearViolatingResource() + { + unset($this->violating_resource); + } + + /** + * An addon containing detailed information regarding any resource causing the + * vulnerability such as JavaScript sources, image, audio files, etc. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ViolatingResource violating_resource = 12; + * @param \Google\Cloud\WebSecurityScanner\V1beta\ViolatingResource $var + * @return $this + */ + public function setViolatingResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\ViolatingResource::class); + $this->violating_resource = $var; + + return $this; + } + + /** + * An addon containing information about vulnerable or missing HTTP headers. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.VulnerableHeaders vulnerable_headers = 15; + * @return \Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders|null + */ + public function getVulnerableHeaders() + { + return $this->vulnerable_headers; + } + + public function hasVulnerableHeaders() + { + return isset($this->vulnerable_headers); + } + + public function clearVulnerableHeaders() + { + unset($this->vulnerable_headers); + } + + /** + * An addon containing information about vulnerable or missing HTTP headers. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.VulnerableHeaders vulnerable_headers = 15; + * @param \Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders $var + * @return $this + */ + public function setVulnerableHeaders($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders::class); + $this->vulnerable_headers = $var; + + return $this; + } + + /** + * An addon containing information about request parameters which were found + * to be vulnerable. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.VulnerableParameters vulnerable_parameters = 13; + * @return \Google\Cloud\WebSecurityScanner\V1beta\VulnerableParameters|null + */ + public function getVulnerableParameters() + { + return $this->vulnerable_parameters; + } + + public function hasVulnerableParameters() + { + return isset($this->vulnerable_parameters); + } + + public function clearVulnerableParameters() + { + unset($this->vulnerable_parameters); + } + + /** + * An addon containing information about request parameters which were found + * to be vulnerable. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.VulnerableParameters vulnerable_parameters = 13; + * @param \Google\Cloud\WebSecurityScanner\V1beta\VulnerableParameters $var + * @return $this + */ + public function setVulnerableParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\VulnerableParameters::class); + $this->vulnerable_parameters = $var; + + return $this; + } + + /** + * An addon containing information reported for an XSS, if any. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.Xss xss = 14; + * @return \Google\Cloud\WebSecurityScanner\V1beta\Xss|null + */ + public function getXss() + { + return $this->xss; + } + + public function hasXss() + { + return isset($this->xss); + } + + public function clearXss() + { + unset($this->xss); + } + + /** + * An addon containing information reported for an XSS, if any. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.Xss xss = 14; + * @param \Google\Cloud\WebSecurityScanner\V1beta\Xss $var + * @return $this + */ + public function setXss($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\Xss::class); + $this->xss = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/FindingTypeStats.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/FindingTypeStats.php new file mode 100644 index 000000000000..7dcea1dd7c4a --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/FindingTypeStats.php @@ -0,0 +1,102 @@ +google.cloud.websecurityscanner.v1beta.FindingTypeStats + */ +class FindingTypeStats extends \Google\Protobuf\Internal\Message +{ + /** + * The finding type associated with the stats. + * + * Generated from protobuf field string finding_type = 1; + */ + protected $finding_type = ''; + /** + * The count of findings belonging to this finding type. + * + * Generated from protobuf field int32 finding_count = 2; + */ + protected $finding_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $finding_type + * The finding type associated with the stats. + * @type int $finding_count + * The count of findings belonging to this finding type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\FindingTypeStats::initOnce(); + parent::__construct($data); + } + + /** + * The finding type associated with the stats. + * + * Generated from protobuf field string finding_type = 1; + * @return string + */ + public function getFindingType() + { + return $this->finding_type; + } + + /** + * The finding type associated with the stats. + * + * Generated from protobuf field string finding_type = 1; + * @param string $var + * @return $this + */ + public function setFindingType($var) + { + GPBUtil::checkString($var, True); + $this->finding_type = $var; + + return $this; + } + + /** + * The count of findings belonging to this finding type. + * + * Generated from protobuf field int32 finding_count = 2; + * @return int + */ + public function getFindingCount() + { + return $this->finding_count; + } + + /** + * The count of findings belonging to this finding type. + * + * Generated from protobuf field int32 finding_count = 2; + * @param int $var + * @return $this + */ + public function setFindingCount($var) + { + GPBUtil::checkInt32($var); + $this->finding_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Form.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Form.php new file mode 100644 index 000000000000..14784f2922c2 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Form.php @@ -0,0 +1,101 @@ +google.cloud.websecurityscanner.v1beta.Form + */ +class Form extends \Google\Protobuf\Internal\Message +{ + /** + * ! The URI where to send the form when it's submitted. + * + * Generated from protobuf field string action_uri = 1; + */ + protected $action_uri = ''; + /** + * ! The names of form fields related to the vulnerability. + * + * Generated from protobuf field repeated string fields = 2; + */ + private $fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $action_uri + * ! The URI where to send the form when it's submitted. + * @type array|\Google\Protobuf\Internal\RepeatedField $fields + * ! The names of form fields related to the vulnerability. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\FindingAddon::initOnce(); + parent::__construct($data); + } + + /** + * ! The URI where to send the form when it's submitted. + * + * Generated from protobuf field string action_uri = 1; + * @return string + */ + public function getActionUri() + { + return $this->action_uri; + } + + /** + * ! The URI where to send the form when it's submitted. + * + * Generated from protobuf field string action_uri = 1; + * @param string $var + * @return $this + */ + public function setActionUri($var) + { + GPBUtil::checkString($var, True); + $this->action_uri = $var; + + return $this; + } + + /** + * ! The names of form fields related to the vulnerability. + * + * Generated from protobuf field repeated string fields = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFields() + { + return $this->fields; + } + + /** + * ! The names of form fields related to the vulnerability. + * + * Generated from protobuf field repeated string fields = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->fields = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetFindingRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetFindingRequest.php new file mode 100644 index 000000000000..ed61d3a9a99e --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetFindingRequest.php @@ -0,0 +1,75 @@ +google.cloud.websecurityscanner.v1beta.GetFindingRequest + */ +class GetFindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Finding to be returned. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the Finding to be returned. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Finding to be returned. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the Finding to be returned. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetScanConfigRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetScanConfigRequest.php new file mode 100644 index 000000000000..dac9b6f54469 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetScanConfigRequest.php @@ -0,0 +1,71 @@ +google.cloud.websecurityscanner.v1beta.GetScanConfigRequest + */ +class GetScanConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the ScanConfig to be returned. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the ScanConfig to be returned. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the ScanConfig to be returned. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the ScanConfig to be returned. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetScanRunRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetScanRunRequest.php new file mode 100644 index 000000000000..65ae02b47d21 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetScanRunRequest.php @@ -0,0 +1,75 @@ +google.cloud.websecurityscanner.v1beta.GetScanRunRequest + */ +class GetScanRunRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the ScanRun to be returned. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the ScanRun to be returned. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the ScanRun to be returned. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the ScanRun to be returned. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListCrawledUrlsRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListCrawledUrlsRequest.php new file mode 100644 index 000000000000..7f5942a653f1 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListCrawledUrlsRequest.php @@ -0,0 +1,159 @@ +google.cloud.websecurityscanner.v1beta.ListCrawledUrlsRequest + */ +class ListCrawledUrlsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + */ + protected $page_token = ''; + /** + * The maximum number of CrawledUrls to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * @type string $page_token + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * @type int $page_size + * The maximum number of CrawledUrls to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of CrawledUrls to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of CrawledUrls to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListCrawledUrlsResponse.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListCrawledUrlsResponse.php new file mode 100644 index 000000000000..bfa730976b39 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListCrawledUrlsResponse.php @@ -0,0 +1,105 @@ +google.cloud.websecurityscanner.v1beta.ListCrawledUrlsResponse + */ +class ListCrawledUrlsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of CrawledUrls returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.CrawledUrl crawled_urls = 1; + */ + private $crawled_urls; + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\WebSecurityScanner\V1beta\CrawledUrl>|\Google\Protobuf\Internal\RepeatedField $crawled_urls + * The list of CrawledUrls returned. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * The list of CrawledUrls returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.CrawledUrl crawled_urls = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCrawledUrls() + { + return $this->crawled_urls; + } + + /** + * The list of CrawledUrls returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.CrawledUrl crawled_urls = 1; + * @param array<\Google\Cloud\WebSecurityScanner\V1beta\CrawledUrl>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCrawledUrls($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1beta\CrawledUrl::class); + $this->crawled_urls = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingTypeStatsRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingTypeStatsRequest.php new file mode 100644 index 000000000000..66ff86bbad79 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingTypeStatsRequest.php @@ -0,0 +1,75 @@ +google.cloud.websecurityscanner.v1beta.ListFindingTypeStatsRequest + */ +class ListFindingTypeStatsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingTypeStatsResponse.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingTypeStatsResponse.php new file mode 100644 index 000000000000..ae47be432e3d --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingTypeStatsResponse.php @@ -0,0 +1,67 @@ +google.cloud.websecurityscanner.v1beta.ListFindingTypeStatsResponse + */ +class ListFindingTypeStatsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of FindingTypeStats returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.FindingTypeStats finding_type_stats = 1; + */ + private $finding_type_stats; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\WebSecurityScanner\V1beta\FindingTypeStats>|\Google\Protobuf\Internal\RepeatedField $finding_type_stats + * The list of FindingTypeStats returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * The list of FindingTypeStats returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.FindingTypeStats finding_type_stats = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFindingTypeStats() + { + return $this->finding_type_stats; + } + + /** + * The list of FindingTypeStats returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.FindingTypeStats finding_type_stats = 1; + * @param array<\Google\Cloud\WebSecurityScanner\V1beta\FindingTypeStats>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFindingTypeStats($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1beta\FindingTypeStats::class); + $this->finding_type_stats = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingsRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingsRequest.php new file mode 100644 index 000000000000..12068b4439f0 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingsRequest.php @@ -0,0 +1,205 @@ +google.cloud.websecurityscanner.v1beta.ListFindingsRequest + */ +class ListFindingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The filter expression. The expression must be in the format: + * . + * Supported field: 'finding_type'. + * Supported operator: '='. + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $filter = ''; + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The maximum number of Findings to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * @type string $filter + * Required. The filter expression. The expression must be in the format: + * . + * Supported field: 'finding_type'. + * Supported operator: '='. + * @type string $page_token + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * @type int $page_size + * The maximum number of Findings to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The filter expression. The expression must be in the format: + * . + * Supported field: 'finding_type'. + * Supported operator: '='. + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Required. The filter expression. The expression must be in the format: + * . + * Supported field: 'finding_type'. + * Supported operator: '='. + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of Findings to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of Findings to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingsResponse.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingsResponse.php new file mode 100644 index 000000000000..890a376588d8 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingsResponse.php @@ -0,0 +1,105 @@ +google.cloud.websecurityscanner.v1beta.ListFindingsResponse + */ +class ListFindingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Findings returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.Finding findings = 1; + */ + private $findings; + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\WebSecurityScanner\V1beta\Finding>|\Google\Protobuf\Internal\RepeatedField $findings + * The list of Findings returned. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * The list of Findings returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.Finding findings = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFindings() + { + return $this->findings; + } + + /** + * The list of Findings returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.Finding findings = 1; + * @param array<\Google\Cloud\WebSecurityScanner\V1beta\Finding>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFindings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1beta\Finding::class); + $this->findings = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanConfigsRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanConfigsRequest.php new file mode 100644 index 000000000000..936da9a0f584 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanConfigsRequest.php @@ -0,0 +1,155 @@ +google.cloud.websecurityscanner.v1beta.ListScanConfigsRequest + */ +class ListScanConfigsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, which should be a project resource name in the + * format 'projects/{projectId}'. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + */ + protected $page_token = ''; + /** + * The maximum number of ScanConfigs to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, which should be a project resource name in the + * format 'projects/{projectId}'. + * @type string $page_token + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * @type int $page_size + * The maximum number of ScanConfigs to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, which should be a project resource name in the + * format 'projects/{projectId}'. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name, which should be a project resource name in the + * format 'projects/{projectId}'. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of ScanConfigs to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of ScanConfigs to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanConfigsResponse.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanConfigsResponse.php new file mode 100644 index 000000000000..1bc3d4de4e9c --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanConfigsResponse.php @@ -0,0 +1,105 @@ +google.cloud.websecurityscanner.v1beta.ListScanConfigsResponse + */ +class ListScanConfigsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of ScanConfigs returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanConfig scan_configs = 1; + */ + private $scan_configs; + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\WebSecurityScanner\V1beta\ScanConfig>|\Google\Protobuf\Internal\RepeatedField $scan_configs + * The list of ScanConfigs returned. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * The list of ScanConfigs returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanConfig scan_configs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getScanConfigs() + { + return $this->scan_configs; + } + + /** + * The list of ScanConfigs returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanConfig scan_configs = 1; + * @param array<\Google\Cloud\WebSecurityScanner\V1beta\ScanConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setScanConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig::class); + $this->scan_configs = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanRunsRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanRunsRequest.php new file mode 100644 index 000000000000..feb7ff339644 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanRunsRequest.php @@ -0,0 +1,155 @@ +google.cloud.websecurityscanner.v1beta.ListScanRunsRequest + */ +class ListScanRunsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, which should be a scan resource name in the + * format 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + */ + protected $page_token = ''; + /** + * The maximum number of ScanRuns to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, which should be a scan resource name in the + * format 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * @type string $page_token + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * @type int $page_size + * The maximum number of ScanRuns to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, which should be a scan resource name in the + * format 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name, which should be a scan resource name in the + * format 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results to be returned. This should be a + * `next_page_token` value returned from a previous List request. + * If unspecified, the first page of results is returned. + * + * Generated from protobuf field string page_token = 2; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of ScanRuns to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of ScanRuns to return, can be limited by server. + * If not specified or not positive, the implementation will select a + * reasonable value. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanRunsResponse.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanRunsResponse.php new file mode 100644 index 000000000000..dba8c5beef27 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanRunsResponse.php @@ -0,0 +1,105 @@ +google.cloud.websecurityscanner.v1beta.ListScanRunsResponse + */ +class ListScanRunsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of ScanRuns returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanRun scan_runs = 1; + */ + private $scan_runs; + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\WebSecurityScanner\V1beta\ScanRun>|\Google\Protobuf\Internal\RepeatedField $scan_runs + * The list of ScanRuns returned. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * The list of ScanRuns returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanRun scan_runs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getScanRuns() + { + return $this->scan_runs; + } + + /** + * The list of ScanRuns returned. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanRun scan_runs = 1; + * @param array<\Google\Cloud\WebSecurityScanner\V1beta\ScanRun>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setScanRuns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1beta\ScanRun::class); + $this->scan_runs = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/OutdatedLibrary.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/OutdatedLibrary.php new file mode 100644 index 000000000000..bc116a0e5333 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/OutdatedLibrary.php @@ -0,0 +1,135 @@ +google.cloud.websecurityscanner.v1beta.OutdatedLibrary + */ +class OutdatedLibrary extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the outdated library. + * + * Generated from protobuf field string library_name = 1; + */ + protected $library_name = ''; + /** + * The version number. + * + * Generated from protobuf field string version = 2; + */ + protected $version = ''; + /** + * URLs to learn more information about the vulnerabilities in the library. + * + * Generated from protobuf field repeated string learn_more_urls = 3; + */ + private $learn_more_urls; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $library_name + * The name of the outdated library. + * @type string $version + * The version number. + * @type array|\Google\Protobuf\Internal\RepeatedField $learn_more_urls + * URLs to learn more information about the vulnerabilities in the library. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\FindingAddon::initOnce(); + parent::__construct($data); + } + + /** + * The name of the outdated library. + * + * Generated from protobuf field string library_name = 1; + * @return string + */ + public function getLibraryName() + { + return $this->library_name; + } + + /** + * The name of the outdated library. + * + * Generated from protobuf field string library_name = 1; + * @param string $var + * @return $this + */ + public function setLibraryName($var) + { + GPBUtil::checkString($var, True); + $this->library_name = $var; + + return $this; + } + + /** + * The version number. + * + * Generated from protobuf field string version = 2; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * The version number. + * + * Generated from protobuf field string version = 2; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * URLs to learn more information about the vulnerabilities in the library. + * + * Generated from protobuf field repeated string learn_more_urls = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLearnMoreUrls() + { + return $this->learn_more_urls; + } + + /** + * URLs to learn more information about the vulnerabilities in the library. + * + * Generated from protobuf field repeated string learn_more_urls = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLearnMoreUrls($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->learn_more_urls = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig.php new file mode 100644 index 000000000000..1bbe2c13e6a4 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig.php @@ -0,0 +1,507 @@ +google.cloud.websecurityscanner.v1beta.ScanConfig + */ +class ScanConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the ScanConfig. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are + * generated by the system. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The user provided display name of the ScanConfig. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * The maximum QPS during scanning. A valid value ranges from 5 to 20 + * inclusively. If the field is unspecified or its value is set 0, server will + * default to 15. Other values outside of [5, 20] range will be rejected with + * INVALID_ARGUMENT error. + * + * Generated from protobuf field int32 max_qps = 3; + */ + protected $max_qps = 0; + /** + * Required. The starting URLs from which the scanner finds site pages. + * + * Generated from protobuf field repeated string starting_urls = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + private $starting_urls; + /** + * The authentication configuration. If specified, service will use the + * authentication configuration during scanning. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication authentication = 5; + */ + protected $authentication = null; + /** + * The user agent used during scanning. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.UserAgent user_agent = 6; + */ + protected $user_agent = 0; + /** + * The blacklist URL patterns as described in + * https://cloud.google.com/security-scanner/docs/excluded-urls + * + * Generated from protobuf field repeated string blacklist_patterns = 7; + */ + private $blacklist_patterns; + /** + * The schedule of the ScanConfig. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.Schedule schedule = 8; + */ + protected $schedule = null; + /** + * Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be + * used as a default. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanConfig.TargetPlatform target_platforms = 9; + */ + private $target_platforms; + /** + * Controls export of scan configurations and results to Cloud Security + * Command Center. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.ExportToSecurityCommandCenter export_to_security_command_center = 10; + */ + protected $export_to_security_command_center = 0; + /** + * Latest ScanRun if available. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRun latest_run = 11; + */ + protected $latest_run = null; + /** + * The risk level selected for the scan + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.RiskLevel risk_level = 12; + */ + protected $risk_level = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the ScanConfig. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are + * generated by the system. + * @type string $display_name + * Required. The user provided display name of the ScanConfig. + * @type int $max_qps + * The maximum QPS during scanning. A valid value ranges from 5 to 20 + * inclusively. If the field is unspecified or its value is set 0, server will + * default to 15. Other values outside of [5, 20] range will be rejected with + * INVALID_ARGUMENT error. + * @type array|\Google\Protobuf\Internal\RepeatedField $starting_urls + * Required. The starting URLs from which the scanner finds site pages. + * @type \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication $authentication + * The authentication configuration. If specified, service will use the + * authentication configuration during scanning. + * @type int $user_agent + * The user agent used during scanning. + * @type array|\Google\Protobuf\Internal\RepeatedField $blacklist_patterns + * The blacklist URL patterns as described in + * https://cloud.google.com/security-scanner/docs/excluded-urls + * @type \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Schedule $schedule + * The schedule of the ScanConfig. + * @type array|\Google\Protobuf\Internal\RepeatedField $target_platforms + * Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be + * used as a default. + * @type int $export_to_security_command_center + * Controls export of scan configurations and results to Cloud Security + * Command Center. + * @type \Google\Cloud\WebSecurityScanner\V1beta\ScanRun $latest_run + * Latest ScanRun if available. + * @type int $risk_level + * The risk level selected for the scan + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\ScanConfig::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the ScanConfig. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are + * generated by the system. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the ScanConfig. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are + * generated by the system. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The user provided display name of the ScanConfig. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The user provided display name of the ScanConfig. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The maximum QPS during scanning. A valid value ranges from 5 to 20 + * inclusively. If the field is unspecified or its value is set 0, server will + * default to 15. Other values outside of [5, 20] range will be rejected with + * INVALID_ARGUMENT error. + * + * Generated from protobuf field int32 max_qps = 3; + * @return int + */ + public function getMaxQps() + { + return $this->max_qps; + } + + /** + * The maximum QPS during scanning. A valid value ranges from 5 to 20 + * inclusively. If the field is unspecified or its value is set 0, server will + * default to 15. Other values outside of [5, 20] range will be rejected with + * INVALID_ARGUMENT error. + * + * Generated from protobuf field int32 max_qps = 3; + * @param int $var + * @return $this + */ + public function setMaxQps($var) + { + GPBUtil::checkInt32($var); + $this->max_qps = $var; + + return $this; + } + + /** + * Required. The starting URLs from which the scanner finds site pages. + * + * Generated from protobuf field repeated string starting_urls = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStartingUrls() + { + return $this->starting_urls; + } + + /** + * Required. The starting URLs from which the scanner finds site pages. + * + * Generated from protobuf field repeated string starting_urls = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStartingUrls($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->starting_urls = $arr; + + return $this; + } + + /** + * The authentication configuration. If specified, service will use the + * authentication configuration during scanning. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication authentication = 5; + * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication|null + */ + public function getAuthentication() + { + return $this->authentication; + } + + public function hasAuthentication() + { + return isset($this->authentication); + } + + public function clearAuthentication() + { + unset($this->authentication); + } + + /** + * The authentication configuration. If specified, service will use the + * authentication configuration during scanning. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication authentication = 5; + * @param \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication $var + * @return $this + */ + public function setAuthentication($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication::class); + $this->authentication = $var; + + return $this; + } + + /** + * The user agent used during scanning. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.UserAgent user_agent = 6; + * @return int + */ + public function getUserAgent() + { + return $this->user_agent; + } + + /** + * The user agent used during scanning. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.UserAgent user_agent = 6; + * @param int $var + * @return $this + */ + public function setUserAgent($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\UserAgent::class); + $this->user_agent = $var; + + return $this; + } + + /** + * The blacklist URL patterns as described in + * https://cloud.google.com/security-scanner/docs/excluded-urls + * + * Generated from protobuf field repeated string blacklist_patterns = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBlacklistPatterns() + { + return $this->blacklist_patterns; + } + + /** + * The blacklist URL patterns as described in + * https://cloud.google.com/security-scanner/docs/excluded-urls + * + * Generated from protobuf field repeated string blacklist_patterns = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBlacklistPatterns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->blacklist_patterns = $arr; + + return $this; + } + + /** + * The schedule of the ScanConfig. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.Schedule schedule = 8; + * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Schedule|null + */ + public function getSchedule() + { + return $this->schedule; + } + + public function hasSchedule() + { + return isset($this->schedule); + } + + public function clearSchedule() + { + unset($this->schedule); + } + + /** + * The schedule of the ScanConfig. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.Schedule schedule = 8; + * @param \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Schedule $var + * @return $this + */ + public function setSchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Schedule::class); + $this->schedule = $var; + + return $this; + } + + /** + * Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be + * used as a default. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanConfig.TargetPlatform target_platforms = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetPlatforms() + { + return $this->target_platforms; + } + + /** + * Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be + * used as a default. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanConfig.TargetPlatform target_platforms = 9; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetPlatforms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\TargetPlatform::class); + $this->target_platforms = $arr; + + return $this; + } + + /** + * Controls export of scan configurations and results to Cloud Security + * Command Center. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.ExportToSecurityCommandCenter export_to_security_command_center = 10; + * @return int + */ + public function getExportToSecurityCommandCenter() + { + return $this->export_to_security_command_center; + } + + /** + * Controls export of scan configurations and results to Cloud Security + * Command Center. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.ExportToSecurityCommandCenter export_to_security_command_center = 10; + * @param int $var + * @return $this + */ + public function setExportToSecurityCommandCenter($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\ExportToSecurityCommandCenter::class); + $this->export_to_security_command_center = $var; + + return $this; + } + + /** + * Latest ScanRun if available. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRun latest_run = 11; + * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanRun|null + */ + public function getLatestRun() + { + return $this->latest_run; + } + + public function hasLatestRun() + { + return isset($this->latest_run); + } + + public function clearLatestRun() + { + unset($this->latest_run); + } + + /** + * Latest ScanRun if available. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRun latest_run = 11; + * @param \Google\Cloud\WebSecurityScanner\V1beta\ScanRun $var + * @return $this + */ + public function setLatestRun($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanRun::class); + $this->latest_run = $var; + + return $this; + } + + /** + * The risk level selected for the scan + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.RiskLevel risk_level = 12; + * @return int + */ + public function getRiskLevel() + { + return $this->risk_level; + } + + /** + * The risk level selected for the scan + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.RiskLevel risk_level = 12; + * @param int $var + * @return $this + */ + public function setRiskLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\RiskLevel::class); + $this->risk_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication.php new file mode 100644 index 000000000000..03ff0126000c --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication.php @@ -0,0 +1,111 @@ +google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication + */ +class Authentication extends \Google\Protobuf\Internal\Message +{ + protected $authentication; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication\GoogleAccount $google_account + * Authentication using a Google account. + * @type \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication\CustomAccount $custom_account + * Authentication using a custom account. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\ScanConfig::initOnce(); + parent::__construct($data); + } + + /** + * Authentication using a Google account. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.GoogleAccount google_account = 1; + * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication\GoogleAccount|null + */ + public function getGoogleAccount() + { + return $this->readOneof(1); + } + + public function hasGoogleAccount() + { + return $this->hasOneof(1); + } + + /** + * Authentication using a Google account. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.GoogleAccount google_account = 1; + * @param \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication\GoogleAccount $var + * @return $this + */ + public function setGoogleAccount($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication\GoogleAccount::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Authentication using a custom account. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.CustomAccount custom_account = 2; + * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication\CustomAccount|null + */ + public function getCustomAccount() + { + return $this->readOneof(2); + } + + public function hasCustomAccount() + { + return $this->hasOneof(2); + } + + /** + * Authentication using a custom account. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.CustomAccount custom_account = 2; + * @param \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication\CustomAccount $var + * @return $this + */ + public function setCustomAccount($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication\CustomAccount::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getAuthentication() + { + return $this->whichOneof("authentication"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Authentication::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig_Authentication::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication/CustomAccount.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication/CustomAccount.php new file mode 100644 index 000000000000..8230fd5942e2 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication/CustomAccount.php @@ -0,0 +1,142 @@ +google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.CustomAccount + */ +class CustomAccount extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The user name of the custom account. + * + * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $username = ''; + /** + * Required. Input only. The password of the custom account. The credential is stored encrypted + * and not returned in any response nor included in audit logs. + * + * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $password = ''; + /** + * Required. The login form URL of the website. + * + * Generated from protobuf field string login_url = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $login_url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $username + * Required. The user name of the custom account. + * @type string $password + * Required. Input only. The password of the custom account. The credential is stored encrypted + * and not returned in any response nor included in audit logs. + * @type string $login_url + * Required. The login form URL of the website. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\ScanConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The user name of the custom account. + * + * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Required. The user name of the custom account. + * + * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * Required. Input only. The password of the custom account. The credential is stored encrypted + * and not returned in any response nor included in audit logs. + * + * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Required. Input only. The password of the custom account. The credential is stored encrypted + * and not returned in any response nor included in audit logs. + * + * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * Required. The login form URL of the website. + * + * Generated from protobuf field string login_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLoginUrl() + { + return $this->login_url; + } + + /** + * Required. The login form URL of the website. + * + * Generated from protobuf field string login_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLoginUrl($var) + { + GPBUtil::checkString($var, True); + $this->login_url = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CustomAccount::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig_Authentication_CustomAccount::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication/GoogleAccount.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication/GoogleAccount.php new file mode 100644 index 000000000000..7f20c4a18b4d --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication/GoogleAccount.php @@ -0,0 +1,108 @@ +google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.GoogleAccount + */ +class GoogleAccount extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The user name of the Google account. + * + * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $username = ''; + /** + * Required. Input only. The password of the Google account. The credential is stored encrypted + * and not returned in any response nor included in audit logs. + * + * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $password = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $username + * Required. The user name of the Google account. + * @type string $password + * Required. Input only. The password of the Google account. The credential is stored encrypted + * and not returned in any response nor included in audit logs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\ScanConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The user name of the Google account. + * + * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Required. The user name of the Google account. + * + * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * Required. Input only. The password of the Google account. The credential is stored encrypted + * and not returned in any response nor included in audit logs. + * + * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Required. Input only. The password of the Google account. The credential is stored encrypted + * and not returned in any response nor included in audit logs. + * + * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GoogleAccount::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig_Authentication_GoogleAccount::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/ExportToSecurityCommandCenter.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/ExportToSecurityCommandCenter.php new file mode 100644 index 000000000000..40b463f03644 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/ExportToSecurityCommandCenter.php @@ -0,0 +1,65 @@ +google.cloud.websecurityscanner.v1beta.ScanConfig.ExportToSecurityCommandCenter + */ +class ExportToSecurityCommandCenter +{ + /** + * Use default, which is ENABLED. + * + * Generated from protobuf enum EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED = 0; + */ + const EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED = 0; + /** + * Export results of this scan to Cloud Security Command Center. + * + * Generated from protobuf enum ENABLED = 1; + */ + const ENABLED = 1; + /** + * Do not export results of this scan to Cloud Security Command Center. + * + * Generated from protobuf enum DISABLED = 2; + */ + const DISABLED = 2; + + private static $valueToName = [ + self::EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED => 'EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED', + self::ENABLED => 'ENABLED', + self::DISABLED => 'DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ExportToSecurityCommandCenter::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig_ExportToSecurityCommandCenter::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/RiskLevel.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/RiskLevel.php new file mode 100644 index 000000000000..5c916d63b631 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/RiskLevel.php @@ -0,0 +1,66 @@ +google.cloud.websecurityscanner.v1beta.ScanConfig.RiskLevel + */ +class RiskLevel +{ + /** + * Use default, which is NORMAL. + * + * Generated from protobuf enum RISK_LEVEL_UNSPECIFIED = 0; + */ + const RISK_LEVEL_UNSPECIFIED = 0; + /** + * Normal scanning (Recommended) + * + * Generated from protobuf enum NORMAL = 1; + */ + const NORMAL = 1; + /** + * Lower impact scanning + * + * Generated from protobuf enum LOW = 2; + */ + const LOW = 2; + + private static $valueToName = [ + self::RISK_LEVEL_UNSPECIFIED => 'RISK_LEVEL_UNSPECIFIED', + self::NORMAL => 'NORMAL', + self::LOW => 'LOW', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RiskLevel::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig_RiskLevel::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Schedule.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Schedule.php new file mode 100644 index 000000000000..aaadac26c269 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Schedule.php @@ -0,0 +1,126 @@ +google.cloud.websecurityscanner.v1beta.ScanConfig.Schedule + */ +class Schedule extends \Google\Protobuf\Internal\Message +{ + /** + * A timestamp indicates when the next run will be scheduled. The value is + * refreshed by the server after each run. If unspecified, it will default + * to current server time, which means the scan will be scheduled to start + * immediately. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; + */ + protected $schedule_time = null; + /** + * Required. The duration of time between executions in days. + * + * Generated from protobuf field int32 interval_duration_days = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $interval_duration_days = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $schedule_time + * A timestamp indicates when the next run will be scheduled. The value is + * refreshed by the server after each run. If unspecified, it will default + * to current server time, which means the scan will be scheduled to start + * immediately. + * @type int $interval_duration_days + * Required. The duration of time between executions in days. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\ScanConfig::initOnce(); + parent::__construct($data); + } + + /** + * A timestamp indicates when the next run will be scheduled. The value is + * refreshed by the server after each run. If unspecified, it will default + * to current server time, which means the scan will be scheduled to start + * immediately. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduleTime() + { + return $this->schedule_time; + } + + public function hasScheduleTime() + { + return isset($this->schedule_time); + } + + public function clearScheduleTime() + { + unset($this->schedule_time); + } + + /** + * A timestamp indicates when the next run will be scheduled. The value is + * refreshed by the server after each run. If unspecified, it will default + * to current server time, which means the scan will be scheduled to start + * immediately. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduleTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->schedule_time = $var; + + return $this; + } + + /** + * Required. The duration of time between executions in days. + * + * Generated from protobuf field int32 interval_duration_days = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getIntervalDurationDays() + { + return $this->interval_duration_days; + } + + /** + * Required. The duration of time between executions in days. + * + * Generated from protobuf field int32 interval_duration_days = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setIntervalDurationDays($var) + { + GPBUtil::checkInt32($var); + $this->interval_duration_days = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Schedule::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig_Schedule::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/TargetPlatform.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/TargetPlatform.php new file mode 100644 index 000000000000..30d0f1f2c73f --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/TargetPlatform.php @@ -0,0 +1,65 @@ +google.cloud.websecurityscanner.v1beta.ScanConfig.TargetPlatform + */ +class TargetPlatform +{ + /** + * The target platform is unknown. Requests with this enum value will be + * rejected with INVALID_ARGUMENT error. + * + * Generated from protobuf enum TARGET_PLATFORM_UNSPECIFIED = 0; + */ + const TARGET_PLATFORM_UNSPECIFIED = 0; + /** + * Google App Engine service. + * + * Generated from protobuf enum APP_ENGINE = 1; + */ + const APP_ENGINE = 1; + /** + * Google Compute Engine service. + * + * Generated from protobuf enum COMPUTE = 2; + */ + const COMPUTE = 2; + + private static $valueToName = [ + self::TARGET_PLATFORM_UNSPECIFIED => 'TARGET_PLATFORM_UNSPECIFIED', + self::APP_ENGINE => 'APP_ENGINE', + self::COMPUTE => 'COMPUTE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TargetPlatform::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig_TargetPlatform::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/UserAgent.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/UserAgent.php new file mode 100644 index 000000000000..9cd064a73aec --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/UserAgent.php @@ -0,0 +1,71 @@ +google.cloud.websecurityscanner.v1beta.ScanConfig.UserAgent + */ +class UserAgent +{ + /** + * The user agent is unknown. Service will default to CHROME_LINUX. + * + * Generated from protobuf enum USER_AGENT_UNSPECIFIED = 0; + */ + const USER_AGENT_UNSPECIFIED = 0; + /** + * Chrome on Linux. This is the service default if unspecified. + * + * Generated from protobuf enum CHROME_LINUX = 1; + */ + const CHROME_LINUX = 1; + /** + * Chrome on Android. + * + * Generated from protobuf enum CHROME_ANDROID = 2; + */ + const CHROME_ANDROID = 2; + /** + * Safari on IPhone. + * + * Generated from protobuf enum SAFARI_IPHONE = 3; + */ + const SAFARI_IPHONE = 3; + + private static $valueToName = [ + self::USER_AGENT_UNSPECIFIED => 'USER_AGENT_UNSPECIFIED', + self::CHROME_LINUX => 'CHROME_LINUX', + self::CHROME_ANDROID => 'CHROME_ANDROID', + self::SAFARI_IPHONE => 'SAFARI_IPHONE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UserAgent::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig_UserAgent::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfigError.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfigError.php new file mode 100644 index 000000000000..7cfb778f8c6f --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfigError.php @@ -0,0 +1,116 @@ +google.cloud.websecurityscanner.v1beta.ScanConfigError + */ +class ScanConfigError extends \Google\Protobuf\Internal\Message +{ + /** + * Indicates the reason code for a configuration failure. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfigError.Code code = 1; + */ + protected $code = 0; + /** + * Indicates the full name of the ScanConfig field that triggers this error, + * for example "scan_config.max_qps". This field is provided for + * troubleshooting purposes only and its actual value can change in the + * future. + * + * Generated from protobuf field string field_name = 2; + */ + protected $field_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * Indicates the reason code for a configuration failure. + * @type string $field_name + * Indicates the full name of the ScanConfig field that triggers this error, + * for example "scan_config.max_qps". This field is provided for + * troubleshooting purposes only and its actual value can change in the + * future. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\ScanConfigError::initOnce(); + parent::__construct($data); + } + + /** + * Indicates the reason code for a configuration failure. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfigError.Code code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Indicates the reason code for a configuration failure. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfigError.Code code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfigError\Code::class); + $this->code = $var; + + return $this; + } + + /** + * Indicates the full name of the ScanConfig field that triggers this error, + * for example "scan_config.max_qps". This field is provided for + * troubleshooting purposes only and its actual value can change in the + * future. + * + * Generated from protobuf field string field_name = 2; + * @return string + */ + public function getFieldName() + { + return $this->field_name; + } + + /** + * Indicates the full name of the ScanConfig field that triggers this error, + * for example "scan_config.max_qps". This field is provided for + * troubleshooting purposes only and its actual value can change in the + * future. + * + * Generated from protobuf field string field_name = 2; + * @param string $var + * @return $this + */ + public function setFieldName($var) + { + GPBUtil::checkString($var, True); + $this->field_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfigError/Code.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfigError/Code.php new file mode 100644 index 000000000000..784be1b6cbc9 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfigError/Code.php @@ -0,0 +1,355 @@ +google.cloud.websecurityscanner.v1beta.ScanConfigError.Code + */ +class Code +{ + /** + * There is no error. + * + * Generated from protobuf enum CODE_UNSPECIFIED = 0; + */ + const CODE_UNSPECIFIED = 0; + /** + * There is no error. + * + * Generated from protobuf enum OK = 0; + */ + const OK = 0; + /** + * Indicates an internal server error. + * Please DO NOT USE THIS ERROR CODE unless the root cause is truly unknown. + * + * Generated from protobuf enum INTERNAL_ERROR = 1; + */ + const INTERNAL_ERROR = 1; + /** + * One of the seed URLs is an App Engine URL but we cannot validate the scan + * settings due to an App Engine API backend error. + * + * Generated from protobuf enum APPENGINE_API_BACKEND_ERROR = 2; + */ + const APPENGINE_API_BACKEND_ERROR = 2; + /** + * One of the seed URLs is an App Engine URL but we cannot access the + * App Engine API to validate scan settings. + * + * Generated from protobuf enum APPENGINE_API_NOT_ACCESSIBLE = 3; + */ + const APPENGINE_API_NOT_ACCESSIBLE = 3; + /** + * One of the seed URLs is an App Engine URL but the Default Host of the + * App Engine is not set. + * + * Generated from protobuf enum APPENGINE_DEFAULT_HOST_MISSING = 4; + */ + const APPENGINE_DEFAULT_HOST_MISSING = 4; + /** + * Google corporate accounts can not be used for scanning. + * + * Generated from protobuf enum CANNOT_USE_GOOGLE_COM_ACCOUNT = 6; + */ + const CANNOT_USE_GOOGLE_COM_ACCOUNT = 6; + /** + * The account of the scan creator can not be used for scanning. + * + * Generated from protobuf enum CANNOT_USE_OWNER_ACCOUNT = 7; + */ + const CANNOT_USE_OWNER_ACCOUNT = 7; + /** + * This scan targets Compute Engine, but we cannot validate scan settings + * due to a Compute Engine API backend error. + * + * Generated from protobuf enum COMPUTE_API_BACKEND_ERROR = 8; + */ + const COMPUTE_API_BACKEND_ERROR = 8; + /** + * This scan targets Compute Engine, but we cannot access the Compute Engine + * API to validate the scan settings. + * + * Generated from protobuf enum COMPUTE_API_NOT_ACCESSIBLE = 9; + */ + const COMPUTE_API_NOT_ACCESSIBLE = 9; + /** + * The Custom Login URL does not belong to the current project. + * + * Generated from protobuf enum CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 10; + */ + const CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 10; + /** + * The Custom Login URL is malformed (can not be parsed). + * + * Generated from protobuf enum CUSTOM_LOGIN_URL_MALFORMED = 11; + */ + const CUSTOM_LOGIN_URL_MALFORMED = 11; + /** + * The Custom Login URL is mapped to a non-routable IP address in DNS. + * + * Generated from protobuf enum CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 12; + */ + const CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 12; + /** + * The Custom Login URL is mapped to an IP address which is not reserved for + * the current project. + * + * Generated from protobuf enum CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS = 13; + */ + const CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS = 13; + /** + * The Custom Login URL has a non-routable IP address. + * + * Generated from protobuf enum CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 14; + */ + const CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 14; + /** + * The Custom Login URL has an IP address which is not reserved for the + * current project. + * + * Generated from protobuf enum CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS = 15; + */ + const CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS = 15; + /** + * Another scan with the same name (case-sensitive) already exists. + * + * Generated from protobuf enum DUPLICATE_SCAN_NAME = 16; + */ + const DUPLICATE_SCAN_NAME = 16; + /** + * A field is set to an invalid value. + * + * Generated from protobuf enum INVALID_FIELD_VALUE = 18; + */ + const INVALID_FIELD_VALUE = 18; + /** + * There was an error trying to authenticate to the scan target. + * + * Generated from protobuf enum FAILED_TO_AUTHENTICATE_TO_TARGET = 19; + */ + const FAILED_TO_AUTHENTICATE_TO_TARGET = 19; + /** + * Finding type value is not specified in the list findings request. + * + * Generated from protobuf enum FINDING_TYPE_UNSPECIFIED = 20; + */ + const FINDING_TYPE_UNSPECIFIED = 20; + /** + * Scan targets Compute Engine, yet current project was not whitelisted for + * Google Compute Engine Scanning Alpha access. + * + * Generated from protobuf enum FORBIDDEN_TO_SCAN_COMPUTE = 21; + */ + const FORBIDDEN_TO_SCAN_COMPUTE = 21; + /** + * User tries to update managed scan + * + * Generated from protobuf enum FORBIDDEN_UPDATE_TO_MANAGED_SCAN = 43; + */ + const FORBIDDEN_UPDATE_TO_MANAGED_SCAN = 43; + /** + * The supplied filter is malformed. For example, it can not be parsed, does + * not have a filter type in expression, or the same filter type appears + * more than once. + * + * Generated from protobuf enum MALFORMED_FILTER = 22; + */ + const MALFORMED_FILTER = 22; + /** + * The supplied resource name is malformed (can not be parsed). + * + * Generated from protobuf enum MALFORMED_RESOURCE_NAME = 23; + */ + const MALFORMED_RESOURCE_NAME = 23; + /** + * The current project is not in an active state. + * + * Generated from protobuf enum PROJECT_INACTIVE = 24; + */ + const PROJECT_INACTIVE = 24; + /** + * A required field is not set. + * + * Generated from protobuf enum REQUIRED_FIELD = 25; + */ + const REQUIRED_FIELD = 25; + /** + * Project id, scanconfig id, scanrun id, or finding id are not consistent + * with each other in resource name. + * + * Generated from protobuf enum RESOURCE_NAME_INCONSISTENT = 26; + */ + const RESOURCE_NAME_INCONSISTENT = 26; + /** + * The scan being requested to start is already running. + * + * Generated from protobuf enum SCAN_ALREADY_RUNNING = 27; + */ + const SCAN_ALREADY_RUNNING = 27; + /** + * The scan that was requested to be stopped is not running. + * + * Generated from protobuf enum SCAN_NOT_RUNNING = 28; + */ + const SCAN_NOT_RUNNING = 28; + /** + * One of the seed URLs does not belong to the current project. + * + * Generated from protobuf enum SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 29; + */ + const SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 29; + /** + * One of the seed URLs is malformed (can not be parsed). + * + * Generated from protobuf enum SEED_URL_MALFORMED = 30; + */ + const SEED_URL_MALFORMED = 30; + /** + * One of the seed URLs is mapped to a non-routable IP address in DNS. + * + * Generated from protobuf enum SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 31; + */ + const SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 31; + /** + * One of the seed URLs is mapped to an IP address which is not reserved + * for the current project. + * + * Generated from protobuf enum SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS = 32; + */ + const SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS = 32; + /** + * One of the seed URLs has on-routable IP address. + * + * Generated from protobuf enum SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 33; + */ + const SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 33; + /** + * One of the seed URLs has an IP address that is not reserved + * for the current project. + * + * Generated from protobuf enum SEED_URL_HAS_UNRESERVED_IP_ADDRESS = 35; + */ + const SEED_URL_HAS_UNRESERVED_IP_ADDRESS = 35; + /** + * The Cloud Security Scanner service account is not configured under the + * project. + * + * Generated from protobuf enum SERVICE_ACCOUNT_NOT_CONFIGURED = 36; + */ + const SERVICE_ACCOUNT_NOT_CONFIGURED = 36; + /** + * A project has reached the maximum number of scans. + * + * Generated from protobuf enum TOO_MANY_SCANS = 37; + */ + const TOO_MANY_SCANS = 37; + /** + * Resolving the details of the current project fails. + * + * Generated from protobuf enum UNABLE_TO_RESOLVE_PROJECT_INFO = 38; + */ + const UNABLE_TO_RESOLVE_PROJECT_INFO = 38; + /** + * One or more blacklist patterns were in the wrong format. + * + * Generated from protobuf enum UNSUPPORTED_BLACKLIST_PATTERN_FORMAT = 39; + */ + const UNSUPPORTED_BLACKLIST_PATTERN_FORMAT = 39; + /** + * The supplied filter is not supported. + * + * Generated from protobuf enum UNSUPPORTED_FILTER = 40; + */ + const UNSUPPORTED_FILTER = 40; + /** + * The supplied finding type is not supported. For example, we do not + * provide findings of the given finding type. + * + * Generated from protobuf enum UNSUPPORTED_FINDING_TYPE = 41; + */ + const UNSUPPORTED_FINDING_TYPE = 41; + /** + * The URL scheme of one or more of the supplied URLs is not supported. + * + * Generated from protobuf enum UNSUPPORTED_URL_SCHEME = 42; + */ + const UNSUPPORTED_URL_SCHEME = 42; + + private static $valueToName = [ + self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', + self::OK => 'OK', + self::INTERNAL_ERROR => 'INTERNAL_ERROR', + self::APPENGINE_API_BACKEND_ERROR => 'APPENGINE_API_BACKEND_ERROR', + self::APPENGINE_API_NOT_ACCESSIBLE => 'APPENGINE_API_NOT_ACCESSIBLE', + self::APPENGINE_DEFAULT_HOST_MISSING => 'APPENGINE_DEFAULT_HOST_MISSING', + self::CANNOT_USE_GOOGLE_COM_ACCOUNT => 'CANNOT_USE_GOOGLE_COM_ACCOUNT', + self::CANNOT_USE_OWNER_ACCOUNT => 'CANNOT_USE_OWNER_ACCOUNT', + self::COMPUTE_API_BACKEND_ERROR => 'COMPUTE_API_BACKEND_ERROR', + self::COMPUTE_API_NOT_ACCESSIBLE => 'COMPUTE_API_NOT_ACCESSIBLE', + self::CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT => 'CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT', + self::CUSTOM_LOGIN_URL_MALFORMED => 'CUSTOM_LOGIN_URL_MALFORMED', + self::CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS => 'CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS', + self::CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS => 'CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS', + self::CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS => 'CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS', + self::CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS => 'CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS', + self::DUPLICATE_SCAN_NAME => 'DUPLICATE_SCAN_NAME', + self::INVALID_FIELD_VALUE => 'INVALID_FIELD_VALUE', + self::FAILED_TO_AUTHENTICATE_TO_TARGET => 'FAILED_TO_AUTHENTICATE_TO_TARGET', + self::FINDING_TYPE_UNSPECIFIED => 'FINDING_TYPE_UNSPECIFIED', + self::FORBIDDEN_TO_SCAN_COMPUTE => 'FORBIDDEN_TO_SCAN_COMPUTE', + self::FORBIDDEN_UPDATE_TO_MANAGED_SCAN => 'FORBIDDEN_UPDATE_TO_MANAGED_SCAN', + self::MALFORMED_FILTER => 'MALFORMED_FILTER', + self::MALFORMED_RESOURCE_NAME => 'MALFORMED_RESOURCE_NAME', + self::PROJECT_INACTIVE => 'PROJECT_INACTIVE', + self::REQUIRED_FIELD => 'REQUIRED_FIELD', + self::RESOURCE_NAME_INCONSISTENT => 'RESOURCE_NAME_INCONSISTENT', + self::SCAN_ALREADY_RUNNING => 'SCAN_ALREADY_RUNNING', + self::SCAN_NOT_RUNNING => 'SCAN_NOT_RUNNING', + self::SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT => 'SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT', + self::SEED_URL_MALFORMED => 'SEED_URL_MALFORMED', + self::SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS => 'SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS', + self::SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS => 'SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS', + self::SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS => 'SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS', + self::SEED_URL_HAS_UNRESERVED_IP_ADDRESS => 'SEED_URL_HAS_UNRESERVED_IP_ADDRESS', + self::SERVICE_ACCOUNT_NOT_CONFIGURED => 'SERVICE_ACCOUNT_NOT_CONFIGURED', + self::TOO_MANY_SCANS => 'TOO_MANY_SCANS', + self::UNABLE_TO_RESOLVE_PROJECT_INFO => 'UNABLE_TO_RESOLVE_PROJECT_INFO', + self::UNSUPPORTED_BLACKLIST_PATTERN_FORMAT => 'UNSUPPORTED_BLACKLIST_PATTERN_FORMAT', + self::UNSUPPORTED_FILTER => 'UNSUPPORTED_FILTER', + self::UNSUPPORTED_FINDING_TYPE => 'UNSUPPORTED_FINDING_TYPE', + self::UNSUPPORTED_URL_SCHEME => 'UNSUPPORTED_URL_SCHEME', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Code::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfigError_Code::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun.php new file mode 100644 index 000000000000..9509062c159d --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun.php @@ -0,0 +1,486 @@ +google.cloud.websecurityscanner.v1beta.ScanRun + */ +class ScanRun extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the ScanRun. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * The ScanRun IDs are generated by the system. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The execution state of the ScanRun. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRun.ExecutionState execution_state = 2; + */ + protected $execution_state = 0; + /** + * The result state of the ScanRun. This field is only available after the + * execution state reaches "FINISHED". + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRun.ResultState result_state = 3; + */ + protected $result_state = 0; + /** + * The time at which the ScanRun started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + */ + protected $start_time = null; + /** + * The time at which the ScanRun reached termination state - that the ScanRun + * is either finished or stopped by user. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; + */ + protected $end_time = null; + /** + * The number of URLs crawled during this ScanRun. If the scan is in progress, + * the value represents the number of URLs crawled up to now. + * + * Generated from protobuf field int64 urls_crawled_count = 6; + */ + protected $urls_crawled_count = 0; + /** + * The number of URLs tested during this ScanRun. If the scan is in progress, + * the value represents the number of URLs tested up to now. The number of + * URLs tested is usually larger than the number URLS crawled because + * typically a crawled URL is tested with multiple test payloads. + * + * Generated from protobuf field int64 urls_tested_count = 7; + */ + protected $urls_tested_count = 0; + /** + * Whether the scan run has found any vulnerabilities. + * + * Generated from protobuf field bool has_vulnerabilities = 8; + */ + protected $has_vulnerabilities = false; + /** + * The percentage of total completion ranging from 0 to 100. + * If the scan is in queue, the value is 0. + * If the scan is running, the value ranges from 0 to 100. + * If the scan is finished, the value is 100. + * + * Generated from protobuf field int32 progress_percent = 9; + */ + protected $progress_percent = 0; + /** + * If result_state is an ERROR, this field provides the primary reason for + * scan's termination and more details, if such are available. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace error_trace = 10; + */ + protected $error_trace = null; + /** + * A list of warnings, if such are encountered during this scan run. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace warning_traces = 11; + */ + private $warning_traces; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the ScanRun. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * The ScanRun IDs are generated by the system. + * @type int $execution_state + * The execution state of the ScanRun. + * @type int $result_state + * The result state of the ScanRun. This field is only available after the + * execution state reaches "FINISHED". + * @type \Google\Protobuf\Timestamp $start_time + * The time at which the ScanRun started. + * @type \Google\Protobuf\Timestamp $end_time + * The time at which the ScanRun reached termination state - that the ScanRun + * is either finished or stopped by user. + * @type int|string $urls_crawled_count + * The number of URLs crawled during this ScanRun. If the scan is in progress, + * the value represents the number of URLs crawled up to now. + * @type int|string $urls_tested_count + * The number of URLs tested during this ScanRun. If the scan is in progress, + * the value represents the number of URLs tested up to now. The number of + * URLs tested is usually larger than the number URLS crawled because + * typically a crawled URL is tested with multiple test payloads. + * @type bool $has_vulnerabilities + * Whether the scan run has found any vulnerabilities. + * @type int $progress_percent + * The percentage of total completion ranging from 0 to 100. + * If the scan is in queue, the value is 0. + * If the scan is running, the value ranges from 0 to 100. + * If the scan is finished, the value is 100. + * @type \Google\Cloud\WebSecurityScanner\V1beta\ScanRunErrorTrace $error_trace + * If result_state is an ERROR, this field provides the primary reason for + * scan's termination and more details, if such are available. + * @type array<\Google\Cloud\WebSecurityScanner\V1beta\ScanRunWarningTrace>|\Google\Protobuf\Internal\RepeatedField $warning_traces + * A list of warnings, if such are encountered during this scan run. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\ScanRun::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the ScanRun. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * The ScanRun IDs are generated by the system. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the ScanRun. The name follows the format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * The ScanRun IDs are generated by the system. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The execution state of the ScanRun. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRun.ExecutionState execution_state = 2; + * @return int + */ + public function getExecutionState() + { + return $this->execution_state; + } + + /** + * The execution state of the ScanRun. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRun.ExecutionState execution_state = 2; + * @param int $var + * @return $this + */ + public function setExecutionState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanRun\ExecutionState::class); + $this->execution_state = $var; + + return $this; + } + + /** + * The result state of the ScanRun. This field is only available after the + * execution state reaches "FINISHED". + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRun.ResultState result_state = 3; + * @return int + */ + public function getResultState() + { + return $this->result_state; + } + + /** + * The result state of the ScanRun. This field is only available after the + * execution state reaches "FINISHED". + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRun.ResultState result_state = 3; + * @param int $var + * @return $this + */ + public function setResultState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanRun\ResultState::class); + $this->result_state = $var; + + return $this; + } + + /** + * The time at which the ScanRun started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The time at which the ScanRun started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time at which the ScanRun reached termination state - that the ScanRun + * is either finished or stopped by user. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time at which the ScanRun reached termination state - that the ScanRun + * is either finished or stopped by user. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * The number of URLs crawled during this ScanRun. If the scan is in progress, + * the value represents the number of URLs crawled up to now. + * + * Generated from protobuf field int64 urls_crawled_count = 6; + * @return int|string + */ + public function getUrlsCrawledCount() + { + return $this->urls_crawled_count; + } + + /** + * The number of URLs crawled during this ScanRun. If the scan is in progress, + * the value represents the number of URLs crawled up to now. + * + * Generated from protobuf field int64 urls_crawled_count = 6; + * @param int|string $var + * @return $this + */ + public function setUrlsCrawledCount($var) + { + GPBUtil::checkInt64($var); + $this->urls_crawled_count = $var; + + return $this; + } + + /** + * The number of URLs tested during this ScanRun. If the scan is in progress, + * the value represents the number of URLs tested up to now. The number of + * URLs tested is usually larger than the number URLS crawled because + * typically a crawled URL is tested with multiple test payloads. + * + * Generated from protobuf field int64 urls_tested_count = 7; + * @return int|string + */ + public function getUrlsTestedCount() + { + return $this->urls_tested_count; + } + + /** + * The number of URLs tested during this ScanRun. If the scan is in progress, + * the value represents the number of URLs tested up to now. The number of + * URLs tested is usually larger than the number URLS crawled because + * typically a crawled URL is tested with multiple test payloads. + * + * Generated from protobuf field int64 urls_tested_count = 7; + * @param int|string $var + * @return $this + */ + public function setUrlsTestedCount($var) + { + GPBUtil::checkInt64($var); + $this->urls_tested_count = $var; + + return $this; + } + + /** + * Whether the scan run has found any vulnerabilities. + * + * Generated from protobuf field bool has_vulnerabilities = 8; + * @return bool + */ + public function getHasVulnerabilities() + { + return $this->has_vulnerabilities; + } + + /** + * Whether the scan run has found any vulnerabilities. + * + * Generated from protobuf field bool has_vulnerabilities = 8; + * @param bool $var + * @return $this + */ + public function setHasVulnerabilities($var) + { + GPBUtil::checkBool($var); + $this->has_vulnerabilities = $var; + + return $this; + } + + /** + * The percentage of total completion ranging from 0 to 100. + * If the scan is in queue, the value is 0. + * If the scan is running, the value ranges from 0 to 100. + * If the scan is finished, the value is 100. + * + * Generated from protobuf field int32 progress_percent = 9; + * @return int + */ + public function getProgressPercent() + { + return $this->progress_percent; + } + + /** + * The percentage of total completion ranging from 0 to 100. + * If the scan is in queue, the value is 0. + * If the scan is running, the value ranges from 0 to 100. + * If the scan is finished, the value is 100. + * + * Generated from protobuf field int32 progress_percent = 9; + * @param int $var + * @return $this + */ + public function setProgressPercent($var) + { + GPBUtil::checkInt32($var); + $this->progress_percent = $var; + + return $this; + } + + /** + * If result_state is an ERROR, this field provides the primary reason for + * scan's termination and more details, if such are available. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace error_trace = 10; + * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanRunErrorTrace|null + */ + public function getErrorTrace() + { + return $this->error_trace; + } + + public function hasErrorTrace() + { + return isset($this->error_trace); + } + + public function clearErrorTrace() + { + unset($this->error_trace); + } + + /** + * If result_state is an ERROR, this field provides the primary reason for + * scan's termination and more details, if such are available. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace error_trace = 10; + * @param \Google\Cloud\WebSecurityScanner\V1beta\ScanRunErrorTrace $var + * @return $this + */ + public function setErrorTrace($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanRunErrorTrace::class); + $this->error_trace = $var; + + return $this; + } + + /** + * A list of warnings, if such are encountered during this scan run. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace warning_traces = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWarningTraces() + { + return $this->warning_traces; + } + + /** + * A list of warnings, if such are encountered during this scan run. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace warning_traces = 11; + * @param array<\Google\Cloud\WebSecurityScanner\V1beta\ScanRunWarningTrace>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWarningTraces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1beta\ScanRunWarningTrace::class); + $this->warning_traces = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun/ExecutionState.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun/ExecutionState.php new file mode 100644 index 000000000000..b2d9504fcff5 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun/ExecutionState.php @@ -0,0 +1,72 @@ +google.cloud.websecurityscanner.v1beta.ScanRun.ExecutionState + */ +class ExecutionState +{ + /** + * Represents an invalid state caused by internal server error. This value + * should never be returned. + * + * Generated from protobuf enum EXECUTION_STATE_UNSPECIFIED = 0; + */ + const EXECUTION_STATE_UNSPECIFIED = 0; + /** + * The scan is waiting in the queue. + * + * Generated from protobuf enum QUEUED = 1; + */ + const QUEUED = 1; + /** + * The scan is in progress. + * + * Generated from protobuf enum SCANNING = 2; + */ + const SCANNING = 2; + /** + * The scan is either finished or stopped by user. + * + * Generated from protobuf enum FINISHED = 3; + */ + const FINISHED = 3; + + private static $valueToName = [ + self::EXECUTION_STATE_UNSPECIFIED => 'EXECUTION_STATE_UNSPECIFIED', + self::QUEUED => 'QUEUED', + self::SCANNING => 'SCANNING', + self::FINISHED => 'FINISHED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ExecutionState::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanRun_ExecutionState::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun/ResultState.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun/ResultState.php new file mode 100644 index 000000000000..4b8395346de5 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun/ResultState.php @@ -0,0 +1,72 @@ +google.cloud.websecurityscanner.v1beta.ScanRun.ResultState + */ +class ResultState +{ + /** + * Default value. This value is returned when the ScanRun is not yet + * finished. + * + * Generated from protobuf enum RESULT_STATE_UNSPECIFIED = 0; + */ + const RESULT_STATE_UNSPECIFIED = 0; + /** + * The scan finished without errors. + * + * Generated from protobuf enum SUCCESS = 1; + */ + const SUCCESS = 1; + /** + * The scan finished with errors. + * + * Generated from protobuf enum ERROR = 2; + */ + const ERROR = 2; + /** + * The scan was terminated by user. + * + * Generated from protobuf enum KILLED = 3; + */ + const KILLED = 3; + + private static $valueToName = [ + self::RESULT_STATE_UNSPECIFIED => 'RESULT_STATE_UNSPECIFIED', + self::SUCCESS => 'SUCCESS', + self::ERROR => 'ERROR', + self::KILLED => 'KILLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ResultState::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanRun_ResultState::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunErrorTrace.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunErrorTrace.php new file mode 100644 index 000000000000..7d229134c53e --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunErrorTrace.php @@ -0,0 +1,162 @@ +google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace + */ +class ScanRunErrorTrace extends \Google\Protobuf\Internal\Message +{ + /** + * Indicates the error reason code. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace.Code code = 1; + */ + protected $code = 0; + /** + * If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error + * message encountered during scan configuration validation that is performed + * before each scan run. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfigError scan_config_error = 2; + */ + protected $scan_config_error = null; + /** + * If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most + * common HTTP error code, if such is available. For example, if this code is + * 404, the scan has encountered too many NOT_FOUND responses. + * + * Generated from protobuf field int32 most_common_http_error_code = 3; + */ + protected $most_common_http_error_code = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * Indicates the error reason code. + * @type \Google\Cloud\WebSecurityScanner\V1beta\ScanConfigError $scan_config_error + * If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error + * message encountered during scan configuration validation that is performed + * before each scan run. + * @type int $most_common_http_error_code + * If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most + * common HTTP error code, if such is available. For example, if this code is + * 404, the scan has encountered too many NOT_FOUND responses. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\ScanRunErrorTrace::initOnce(); + parent::__construct($data); + } + + /** + * Indicates the error reason code. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace.Code code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Indicates the error reason code. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace.Code code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanRunErrorTrace\Code::class); + $this->code = $var; + + return $this; + } + + /** + * If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error + * message encountered during scan configuration validation that is performed + * before each scan run. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfigError scan_config_error = 2; + * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanConfigError|null + */ + public function getScanConfigError() + { + return $this->scan_config_error; + } + + public function hasScanConfigError() + { + return isset($this->scan_config_error); + } + + public function clearScanConfigError() + { + unset($this->scan_config_error); + } + + /** + * If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error + * message encountered during scan configuration validation that is performed + * before each scan run. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfigError scan_config_error = 2; + * @param \Google\Cloud\WebSecurityScanner\V1beta\ScanConfigError $var + * @return $this + */ + public function setScanConfigError($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfigError::class); + $this->scan_config_error = $var; + + return $this; + } + + /** + * If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most + * common HTTP error code, if such is available. For example, if this code is + * 404, the scan has encountered too many NOT_FOUND responses. + * + * Generated from protobuf field int32 most_common_http_error_code = 3; + * @return int + */ + public function getMostCommonHttpErrorCode() + { + return $this->most_common_http_error_code; + } + + /** + * If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most + * common HTTP error code, if such is available. For example, if this code is + * 404, the scan has encountered too many NOT_FOUND responses. + * + * Generated from protobuf field int32 most_common_http_error_code = 3; + * @param int $var + * @return $this + */ + public function setMostCommonHttpErrorCode($var) + { + GPBUtil::checkInt32($var); + $this->most_common_http_error_code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunErrorTrace/Code.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunErrorTrace/Code.php new file mode 100644 index 000000000000..f4290adb07be --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunErrorTrace/Code.php @@ -0,0 +1,99 @@ +google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace.Code + */ +class Code +{ + /** + * Default value is never used. + * + * Generated from protobuf enum CODE_UNSPECIFIED = 0; + */ + const CODE_UNSPECIFIED = 0; + /** + * Indicates that the scan run failed due to an internal server error. + * + * Generated from protobuf enum INTERNAL_ERROR = 1; + */ + const INTERNAL_ERROR = 1; + /** + * Indicates a scan configuration error, usually due to outdated ScanConfig + * settings, such as starting_urls or the DNS configuration. + * + * Generated from protobuf enum SCAN_CONFIG_ISSUE = 2; + */ + const SCAN_CONFIG_ISSUE = 2; + /** + * Indicates an authentication error, usually due to outdated ScanConfig + * authentication settings. + * + * Generated from protobuf enum AUTHENTICATION_CONFIG_ISSUE = 3; + */ + const AUTHENTICATION_CONFIG_ISSUE = 3; + /** + * Indicates a scan operation timeout, usually caused by a very large site. + * + * Generated from protobuf enum TIMED_OUT_WHILE_SCANNING = 4; + */ + const TIMED_OUT_WHILE_SCANNING = 4; + /** + * Indicates that a scan encountered excessive redirects, either to + * authentication or some other page outside of the scan scope. + * + * Generated from protobuf enum TOO_MANY_REDIRECTS = 5; + */ + const TOO_MANY_REDIRECTS = 5; + /** + * Indicates that a scan encountered numerous errors from the web site + * pages. When available, most_common_http_error_code field indicates the + * most common HTTP error code encountered during the scan. + * + * Generated from protobuf enum TOO_MANY_HTTP_ERRORS = 6; + */ + const TOO_MANY_HTTP_ERRORS = 6; + + private static $valueToName = [ + self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', + self::INTERNAL_ERROR => 'INTERNAL_ERROR', + self::SCAN_CONFIG_ISSUE => 'SCAN_CONFIG_ISSUE', + self::AUTHENTICATION_CONFIG_ISSUE => 'AUTHENTICATION_CONFIG_ISSUE', + self::TIMED_OUT_WHILE_SCANNING => 'TIMED_OUT_WHILE_SCANNING', + self::TOO_MANY_REDIRECTS => 'TOO_MANY_REDIRECTS', + self::TOO_MANY_HTTP_ERRORS => 'TOO_MANY_HTTP_ERRORS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Code::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanRunErrorTrace_Code::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunWarningTrace.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunWarningTrace.php new file mode 100644 index 000000000000..35402b245a0c --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunWarningTrace.php @@ -0,0 +1,69 @@ +google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace + */ +class ScanRunWarningTrace extends \Google\Protobuf\Internal\Message +{ + /** + * Indicates the warning code. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace.Code code = 1; + */ + protected $code = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * Indicates the warning code. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\ScanRunWarningTrace::initOnce(); + parent::__construct($data); + } + + /** + * Indicates the warning code. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace.Code code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Indicates the warning code. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace.Code code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanRunWarningTrace\Code::class); + $this->code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunWarningTrace/Code.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunWarningTrace/Code.php new file mode 100644 index 000000000000..91ec840d3170 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunWarningTrace/Code.php @@ -0,0 +1,85 @@ +google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace.Code + */ +class Code +{ + /** + * Default value is never used. + * + * Generated from protobuf enum CODE_UNSPECIFIED = 0; + */ + const CODE_UNSPECIFIED = 0; + /** + * Indicates that a scan discovered an unexpectedly low number of URLs. This + * is sometimes caused by complex navigation features or by using a single + * URL for numerous pages. + * + * Generated from protobuf enum INSUFFICIENT_CRAWL_RESULTS = 1; + */ + const INSUFFICIENT_CRAWL_RESULTS = 1; + /** + * Indicates that a scan discovered too many URLs to test, or excessive + * redundant URLs. + * + * Generated from protobuf enum TOO_MANY_CRAWL_RESULTS = 2; + */ + const TOO_MANY_CRAWL_RESULTS = 2; + /** + * Indicates that too many tests have been generated for the scan. Customer + * should try reducing the number of starting URLs, increasing the QPS rate, + * or narrowing down the scope of the scan using the excluded patterns. + * + * Generated from protobuf enum TOO_MANY_FUZZ_TASKS = 3; + */ + const TOO_MANY_FUZZ_TASKS = 3; + /** + * Indicates that a scan is blocked by IAP. + * + * Generated from protobuf enum BLOCKED_BY_IAP = 4; + */ + const BLOCKED_BY_IAP = 4; + + private static $valueToName = [ + self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', + self::INSUFFICIENT_CRAWL_RESULTS => 'INSUFFICIENT_CRAWL_RESULTS', + self::TOO_MANY_CRAWL_RESULTS => 'TOO_MANY_CRAWL_RESULTS', + self::TOO_MANY_FUZZ_TASKS => 'TOO_MANY_FUZZ_TASKS', + self::BLOCKED_BY_IAP => 'BLOCKED_BY_IAP', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Code::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanRunWarningTrace_Code::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/StartScanRunRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/StartScanRunRequest.php new file mode 100644 index 000000000000..ba7617eae7ce --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/StartScanRunRequest.php @@ -0,0 +1,71 @@ +google.cloud.websecurityscanner.v1beta.StartScanRunRequest + */ +class StartScanRunRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the ScanConfig to be used. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the ScanConfig to be used. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the ScanConfig to be used. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the ScanConfig to be used. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/StopScanRunRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/StopScanRunRequest.php new file mode 100644 index 000000000000..04ad4e12c5ff --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/StopScanRunRequest.php @@ -0,0 +1,75 @@ +google.cloud.websecurityscanner.v1beta.StopScanRunRequest + */ +class StopScanRunRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the ScanRun to be stopped. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the ScanRun to be stopped. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the ScanRun to be stopped. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the ScanRun to be stopped. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/UpdateScanConfigRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/UpdateScanConfigRequest.php new file mode 100644 index 000000000000..6446f709c20e --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/UpdateScanConfigRequest.php @@ -0,0 +1,137 @@ +google.cloud.websecurityscanner.v1beta.UpdateScanConfigRequest + */ +class UpdateScanConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ScanConfig to be updated. The name field must be set to identify the + * resource to be updated. The values of fields not covered by the mask + * will be ignored. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig scan_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scan_config = null; + /** + * Required. The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig $scan_config + * Required. The ScanConfig to be updated. The name field must be set to identify the + * resource to be updated. The values of fields not covered by the mask + * will be ignored. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ScanConfig to be updated. The name field must be set to identify the + * resource to be updated. The values of fields not covered by the mask + * will be ignored. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig scan_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig|null + */ + public function getScanConfig() + { + return $this->scan_config; + } + + public function hasScanConfig() + { + return isset($this->scan_config); + } + + public function clearScanConfig() + { + unset($this->scan_config); + } + + /** + * Required. The ScanConfig to be updated. The name field must be set to identify the + * resource to be updated. The values of fields not covered by the mask + * will be ignored. + * + * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig scan_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig $var + * @return $this + */ + public function setScanConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig::class); + $this->scan_config = $var; + + return $this; + } + + /** + * Required. The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ViolatingResource.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ViolatingResource.php new file mode 100644 index 000000000000..e1e3a3cd0c1c --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ViolatingResource.php @@ -0,0 +1,102 @@ +google.cloud.websecurityscanner.v1beta.ViolatingResource + */ +class ViolatingResource extends \Google\Protobuf\Internal\Message +{ + /** + * The MIME type of this resource. + * + * Generated from protobuf field string content_type = 1; + */ + protected $content_type = ''; + /** + * URL of this violating resource. + * + * Generated from protobuf field string resource_url = 2; + */ + protected $resource_url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $content_type + * The MIME type of this resource. + * @type string $resource_url + * URL of this violating resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\FindingAddon::initOnce(); + parent::__construct($data); + } + + /** + * The MIME type of this resource. + * + * Generated from protobuf field string content_type = 1; + * @return string + */ + public function getContentType() + { + return $this->content_type; + } + + /** + * The MIME type of this resource. + * + * Generated from protobuf field string content_type = 1; + * @param string $var + * @return $this + */ + public function setContentType($var) + { + GPBUtil::checkString($var, True); + $this->content_type = $var; + + return $this; + } + + /** + * URL of this violating resource. + * + * Generated from protobuf field string resource_url = 2; + * @return string + */ + public function getResourceUrl() + { + return $this->resource_url; + } + + /** + * URL of this violating resource. + * + * Generated from protobuf field string resource_url = 2; + * @param string $var + * @return $this + */ + public function setResourceUrl($var) + { + GPBUtil::checkString($var, True); + $this->resource_url = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableHeaders.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableHeaders.php new file mode 100644 index 000000000000..9f1a8f040533 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableHeaders.php @@ -0,0 +1,101 @@ +google.cloud.websecurityscanner.v1beta.VulnerableHeaders + */ +class VulnerableHeaders extends \Google\Protobuf\Internal\Message +{ + /** + * List of vulnerable headers. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header headers = 1; + */ + private $headers; + /** + * List of missing headers. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header missing_headers = 2; + */ + private $missing_headers; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders\Header>|\Google\Protobuf\Internal\RepeatedField $headers + * List of vulnerable headers. + * @type array<\Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders\Header>|\Google\Protobuf\Internal\RepeatedField $missing_headers + * List of missing headers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\FindingAddon::initOnce(); + parent::__construct($data); + } + + /** + * List of vulnerable headers. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header headers = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * List of vulnerable headers. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header headers = 1; + * @param array<\Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders\Header>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHeaders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders\Header::class); + $this->headers = $arr; + + return $this; + } + + /** + * List of missing headers. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header missing_headers = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMissingHeaders() + { + return $this->missing_headers; + } + + /** + * List of missing headers. + * + * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header missing_headers = 2; + * @param array<\Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders\Header>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMissingHeaders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders\Header::class); + $this->missing_headers = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableHeaders/Header.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableHeaders/Header.php new file mode 100644 index 000000000000..5a1aa140705a --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableHeaders/Header.php @@ -0,0 +1,104 @@ +google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header + */ +class Header extends \Google\Protobuf\Internal\Message +{ + /** + * Header name. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Header value. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Header name. + * @type string $value + * Header value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\FindingAddon::initOnce(); + parent::__construct($data); + } + + /** + * Header name. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Header name. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Header value. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Header value. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Header::class, \Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders_Header::class); + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableParameters.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableParameters.php new file mode 100644 index 000000000000..97f40daec8ea --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableParameters.php @@ -0,0 +1,67 @@ +google.cloud.websecurityscanner.v1beta.VulnerableParameters + */ +class VulnerableParameters extends \Google\Protobuf\Internal\Message +{ + /** + * The vulnerable parameter names. + * + * Generated from protobuf field repeated string parameter_names = 1; + */ + private $parameter_names; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $parameter_names + * The vulnerable parameter names. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\FindingAddon::initOnce(); + parent::__construct($data); + } + + /** + * The vulnerable parameter names. + * + * Generated from protobuf field repeated string parameter_names = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getParameterNames() + { + return $this->parameter_names; + } + + /** + * The vulnerable parameter names. + * + * Generated from protobuf field repeated string parameter_names = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setParameterNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->parameter_names = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/WebSecurityScannerGrpcClient.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/WebSecurityScannerGrpcClient.php new file mode 100644 index 000000000000..2f4e3d914cd6 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/WebSecurityScannerGrpcClient.php @@ -0,0 +1,234 @@ +_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/CreateScanConfig', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1beta\ScanConfig', 'decode'], + $metadata, $options); + } + + /** + * Deletes an existing ScanConfig and its child resources. + * @param \Google\Cloud\WebSecurityScanner\V1beta\DeleteScanConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteScanConfig(\Google\Cloud\WebSecurityScanner\V1beta\DeleteScanConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/DeleteScanConfig', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Gets a ScanConfig. + * @param \Google\Cloud\WebSecurityScanner\V1beta\GetScanConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetScanConfig(\Google\Cloud\WebSecurityScanner\V1beta\GetScanConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/GetScanConfig', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1beta\ScanConfig', 'decode'], + $metadata, $options); + } + + /** + * Lists ScanConfigs under a given project. + * @param \Google\Cloud\WebSecurityScanner\V1beta\ListScanConfigsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListScanConfigs(\Google\Cloud\WebSecurityScanner\V1beta\ListScanConfigsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListScanConfigs', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1beta\ListScanConfigsResponse', 'decode'], + $metadata, $options); + } + + /** + * Updates a ScanConfig. This method support partial update of a ScanConfig. + * @param \Google\Cloud\WebSecurityScanner\V1beta\UpdateScanConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateScanConfig(\Google\Cloud\WebSecurityScanner\V1beta\UpdateScanConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/UpdateScanConfig', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1beta\ScanConfig', 'decode'], + $metadata, $options); + } + + /** + * Start a ScanRun according to the given ScanConfig. + * @param \Google\Cloud\WebSecurityScanner\V1beta\StartScanRunRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function StartScanRun(\Google\Cloud\WebSecurityScanner\V1beta\StartScanRunRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/StartScanRun', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1beta\ScanRun', 'decode'], + $metadata, $options); + } + + /** + * Gets a ScanRun. + * @param \Google\Cloud\WebSecurityScanner\V1beta\GetScanRunRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetScanRun(\Google\Cloud\WebSecurityScanner\V1beta\GetScanRunRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/GetScanRun', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1beta\ScanRun', 'decode'], + $metadata, $options); + } + + /** + * Lists ScanRuns under a given ScanConfig, in descending order of ScanRun + * stop time. + * @param \Google\Cloud\WebSecurityScanner\V1beta\ListScanRunsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListScanRuns(\Google\Cloud\WebSecurityScanner\V1beta\ListScanRunsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListScanRuns', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1beta\ListScanRunsResponse', 'decode'], + $metadata, $options); + } + + /** + * Stops a ScanRun. The stopped ScanRun is returned. + * @param \Google\Cloud\WebSecurityScanner\V1beta\StopScanRunRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function StopScanRun(\Google\Cloud\WebSecurityScanner\V1beta\StopScanRunRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/StopScanRun', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1beta\ScanRun', 'decode'], + $metadata, $options); + } + + /** + * List CrawledUrls under a given ScanRun. + * @param \Google\Cloud\WebSecurityScanner\V1beta\ListCrawledUrlsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListCrawledUrls(\Google\Cloud\WebSecurityScanner\V1beta\ListCrawledUrlsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListCrawledUrls', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1beta\ListCrawledUrlsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets a Finding. + * @param \Google\Cloud\WebSecurityScanner\V1beta\GetFindingRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetFinding(\Google\Cloud\WebSecurityScanner\V1beta\GetFindingRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/GetFinding', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1beta\Finding', 'decode'], + $metadata, $options); + } + + /** + * List Findings under a given ScanRun. + * @param \Google\Cloud\WebSecurityScanner\V1beta\ListFindingsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListFindings(\Google\Cloud\WebSecurityScanner\V1beta\ListFindingsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListFindings', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1beta\ListFindingsResponse', 'decode'], + $metadata, $options); + } + + /** + * List all FindingTypeStats under a given ScanRun. + * @param \Google\Cloud\WebSecurityScanner\V1beta\ListFindingTypeStatsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListFindingTypeStats(\Google\Cloud\WebSecurityScanner\V1beta\ListFindingTypeStatsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListFindingTypeStats', + $argument, + ['\Google\Cloud\WebSecurityScanner\V1beta\ListFindingTypeStatsResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Xss.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Xss.php new file mode 100644 index 000000000000..c3a460821dfc --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Xss.php @@ -0,0 +1,101 @@ +google.cloud.websecurityscanner.v1beta.Xss + */ +class Xss extends \Google\Protobuf\Internal\Message +{ + /** + * Stack traces leading to the point where the XSS occurred. + * + * Generated from protobuf field repeated string stack_traces = 1; + */ + private $stack_traces; + /** + * An error message generated by a javascript breakage. + * + * Generated from protobuf field string error_message = 2; + */ + protected $error_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $stack_traces + * Stack traces leading to the point where the XSS occurred. + * @type string $error_message + * An error message generated by a javascript breakage. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\FindingAddon::initOnce(); + parent::__construct($data); + } + + /** + * Stack traces leading to the point where the XSS occurred. + * + * Generated from protobuf field repeated string stack_traces = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStackTraces() + { + return $this->stack_traces; + } + + /** + * Stack traces leading to the point where the XSS occurred. + * + * Generated from protobuf field repeated string stack_traces = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStackTraces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->stack_traces = $arr; + + return $this; + } + + /** + * An error message generated by a javascript breakage. + * + * Generated from protobuf field string error_message = 2; + * @return string + */ + public function getErrorMessage() + { + return $this->error_message; + } + + /** + * An error message generated by a javascript breakage. + * + * Generated from protobuf field string error_message = 2; + * @param string $var + * @return $this + */ + public function setErrorMessage($var) + { + GPBUtil::checkString($var, True); + $this->error_message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/create_scan_config.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/create_scan_config.php new file mode 100644 index 000000000000..e48d877c2456 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/create_scan_config.php @@ -0,0 +1,80 @@ +setDisplayName($scanConfigDisplayName) + ->setStartingUrls($scanConfigStartingUrls); + + // Call the API and handle any network failures. + try { + /** @var ScanConfig $response */ + $response = $webSecurityScannerClient->createScanConfig($formattedParent, $scanConfig); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = WebSecurityScannerClient::projectName('[PROJECT]'); + $scanConfigDisplayName = '[DISPLAY_NAME]'; + $scanConfigStartingUrlsElement = '[STARTING_URLS]'; + + create_scan_config_sample($formattedParent, $scanConfigDisplayName, $scanConfigStartingUrlsElement); +} +// [END websecurityscanner_v1beta_generated_WebSecurityScanner_CreateScanConfig_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/delete_scan_config.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/delete_scan_config.php new file mode 100644 index 000000000000..24ace5752324 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/delete_scan_config.php @@ -0,0 +1,65 @@ +deleteScanConfig($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WebSecurityScannerClient::scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); + + delete_scan_config_sample($formattedName); +} +// [END websecurityscanner_v1beta_generated_WebSecurityScanner_DeleteScanConfig_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_finding.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_finding.php new file mode 100644 index 000000000000..5169cc720cd1 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_finding.php @@ -0,0 +1,73 @@ +getFinding($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WebSecurityScannerClient::findingName( + '[PROJECT]', + '[SCAN_CONFIG]', + '[SCAN_RUN]', + '[FINDING]' + ); + + get_finding_sample($formattedName); +} +// [END websecurityscanner_v1beta_generated_WebSecurityScanner_GetFinding_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_scan_config.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_scan_config.php new file mode 100644 index 000000000000..4b190f910d42 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_scan_config.php @@ -0,0 +1,67 @@ +getScanConfig($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WebSecurityScannerClient::scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); + + get_scan_config_sample($formattedName); +} +// [END websecurityscanner_v1beta_generated_WebSecurityScanner_GetScanConfig_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_scan_run.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_scan_run.php new file mode 100644 index 000000000000..85d39822d547 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_scan_run.php @@ -0,0 +1,68 @@ +getScanRun($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WebSecurityScannerClient::scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); + + get_scan_run_sample($formattedName); +} +// [END websecurityscanner_v1beta_generated_WebSecurityScanner_GetScanRun_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_crawled_urls.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_crawled_urls.php new file mode 100644 index 000000000000..681f51deea18 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_crawled_urls.php @@ -0,0 +1,77 @@ +listCrawledUrls($formattedParent); + + /** @var CrawledUrl $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = WebSecurityScannerClient::scanRunName( + '[PROJECT]', + '[SCAN_CONFIG]', + '[SCAN_RUN]' + ); + + list_crawled_urls_sample($formattedParent); +} +// [END websecurityscanner_v1beta_generated_WebSecurityScanner_ListCrawledUrls_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_finding_type_stats.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_finding_type_stats.php new file mode 100644 index 000000000000..075d9817bf03 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_finding_type_stats.php @@ -0,0 +1,72 @@ +listFindingTypeStats($formattedParent); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = WebSecurityScannerClient::scanRunName( + '[PROJECT]', + '[SCAN_CONFIG]', + '[SCAN_RUN]' + ); + + list_finding_type_stats_sample($formattedParent); +} +// [END websecurityscanner_v1beta_generated_WebSecurityScanner_ListFindingTypeStats_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_findings.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_findings.php new file mode 100644 index 000000000000..3fc481532b76 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_findings.php @@ -0,0 +1,82 @@ + + * . + * Supported field: 'finding_type'. + * Supported operator: '='. + */ +function list_findings_sample(string $formattedParent, string $filter): void +{ + // Create a client. + $webSecurityScannerClient = new WebSecurityScannerClient(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $webSecurityScannerClient->listFindings($formattedParent, $filter); + + /** @var Finding $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = WebSecurityScannerClient::scanRunName( + '[PROJECT]', + '[SCAN_CONFIG]', + '[SCAN_RUN]' + ); + $filter = '[FILTER]'; + + list_findings_sample($formattedParent, $filter); +} +// [END websecurityscanner_v1beta_generated_WebSecurityScanner_ListFindings_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_scan_configs.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_scan_configs.php new file mode 100644 index 000000000000..b5585263b8ca --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_scan_configs.php @@ -0,0 +1,72 @@ +listScanConfigs($formattedParent); + + /** @var ScanConfig $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = WebSecurityScannerClient::projectName('[PROJECT]'); + + list_scan_configs_sample($formattedParent); +} +// [END websecurityscanner_v1beta_generated_WebSecurityScanner_ListScanConfigs_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_scan_runs.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_scan_runs.php new file mode 100644 index 000000000000..f7c608510ee5 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_scan_runs.php @@ -0,0 +1,73 @@ +listScanRuns($formattedParent); + + /** @var ScanRun $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = WebSecurityScannerClient::scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); + + list_scan_runs_sample($formattedParent); +} +// [END websecurityscanner_v1beta_generated_WebSecurityScanner_ListScanRuns_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/start_scan_run.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/start_scan_run.php new file mode 100644 index 000000000000..3598bce690f9 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/start_scan_run.php @@ -0,0 +1,67 @@ +startScanRun($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WebSecurityScannerClient::scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); + + start_scan_run_sample($formattedName); +} +// [END websecurityscanner_v1beta_generated_WebSecurityScanner_StartScanRun_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/stop_scan_run.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/stop_scan_run.php new file mode 100644 index 000000000000..4e5c25833c7f --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/stop_scan_run.php @@ -0,0 +1,68 @@ +stopScanRun($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WebSecurityScannerClient::scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); + + stop_scan_run_sample($formattedName); +} +// [END websecurityscanner_v1beta_generated_WebSecurityScanner_StopScanRun_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/update_scan_config.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/update_scan_config.php new file mode 100644 index 000000000000..91e0cd43e367 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/update_scan_config.php @@ -0,0 +1,77 @@ +setDisplayName($scanConfigDisplayName) + ->setStartingUrls($scanConfigStartingUrls); + $updateMask = new FieldMask(); + + // Call the API and handle any network failures. + try { + /** @var ScanConfig $response */ + $response = $webSecurityScannerClient->updateScanConfig($scanConfig, $updateMask); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $scanConfigDisplayName = '[DISPLAY_NAME]'; + $scanConfigStartingUrlsElement = '[STARTING_URLS]'; + + update_scan_config_sample($scanConfigDisplayName, $scanConfigStartingUrlsElement); +} +// [END websecurityscanner_v1beta_generated_WebSecurityScanner_UpdateScanConfig_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/Gapic/WebSecurityScannerGapicClient.php b/owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/Gapic/WebSecurityScannerGapicClient.php new file mode 100644 index 000000000000..951f4aca3e54 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/Gapic/WebSecurityScannerGapicClient.php @@ -0,0 +1,1057 @@ +projectName('[PROJECT]'); + * $scanConfig = new ScanConfig(); + * $response = $webSecurityScannerClient->createScanConfig($formattedParent, $scanConfig); + * } finally { + * $webSecurityScannerClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @experimental + */ +class WebSecurityScannerGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.websecurityscanner.v1beta.WebSecurityScanner'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'websecurityscanner.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $findingNameTemplate; + + private static $projectNameTemplate; + + private static $scanConfigNameTemplate; + + private static $scanRunNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/web_security_scanner_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/web_security_scanner_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/web_security_scanner_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/web_security_scanner_rest_client_config.php', + ], + ], + ]; + } + + private static function getFindingNameTemplate() + { + if (self::$findingNameTemplate == null) { + self::$findingNameTemplate = new PathTemplate('projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding}'); + } + + return self::$findingNameTemplate; + } + + private static function getProjectNameTemplate() + { + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$projectNameTemplate; + } + + private static function getScanConfigNameTemplate() + { + if (self::$scanConfigNameTemplate == null) { + self::$scanConfigNameTemplate = new PathTemplate('projects/{project}/scanConfigs/{scan_config}'); + } + + return self::$scanConfigNameTemplate; + } + + private static function getScanRunNameTemplate() + { + if (self::$scanRunNameTemplate == null) { + self::$scanRunNameTemplate = new PathTemplate('projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}'); + } + + return self::$scanRunNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'finding' => self::getFindingNameTemplate(), + 'project' => self::getProjectNameTemplate(), + 'scanConfig' => self::getScanConfigNameTemplate(), + 'scanRun' => self::getScanRunNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a finding + * resource. + * + * @param string $project + * @param string $scanConfig + * @param string $scanRun + * @param string $finding + * + * @return string The formatted finding resource. + * + * @experimental + */ + public static function findingName($project, $scanConfig, $scanRun, $finding) + { + return self::getFindingNameTemplate()->render([ + 'project' => $project, + 'scan_config' => $scanConfig, + 'scan_run' => $scanRun, + 'finding' => $finding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + * + * @experimental + */ + public static function projectName($project) + { + return self::getProjectNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a scan_config + * resource. + * + * @param string $project + * @param string $scanConfig + * + * @return string The formatted scan_config resource. + * + * @experimental + */ + public static function scanConfigName($project, $scanConfig) + { + return self::getScanConfigNameTemplate()->render([ + 'project' => $project, + 'scan_config' => $scanConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a scan_run + * resource. + * + * @param string $project + * @param string $scanConfig + * @param string $scanRun + * + * @return string The formatted scan_run resource. + * + * @experimental + */ + public static function scanRunName($project, $scanConfig, $scanRun) + { + return self::getScanRunNameTemplate()->render([ + 'project' => $project, + 'scan_config' => $scanConfig, + 'scan_run' => $scanRun, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - finding: projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding} + * - project: projects/{project} + * - scanConfig: projects/{project}/scanConfigs/{scan_config} + * - scanRun: projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * + * @experimental + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'websecurityscanner.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Creates a new ScanConfig. + * + * Sample code: + * ``` + * $webSecurityScannerClient = new WebSecurityScannerClient(); + * try { + * $formattedParent = $webSecurityScannerClient->projectName('[PROJECT]'); + * $scanConfig = new ScanConfig(); + * $response = $webSecurityScannerClient->createScanConfig($formattedParent, $scanConfig); + * } finally { + * $webSecurityScannerClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name where the scan is created, which should be a + * project resource name in the format 'projects/{projectId}'. + * @param ScanConfig $scanConfig Required. The ScanConfig to be created. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function createScanConfig($parent, $scanConfig, array $optionalArgs = []) + { + $request = new CreateScanConfigRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setScanConfig($scanConfig); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateScanConfig', ScanConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes an existing ScanConfig and its child resources. + * + * Sample code: + * ``` + * $webSecurityScannerClient = new WebSecurityScannerClient(); + * try { + * $formattedName = $webSecurityScannerClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); + * $webSecurityScannerClient->deleteScanConfig($formattedName); + * } finally { + * $webSecurityScannerClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the ScanConfig to be deleted. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function deleteScanConfig($name, array $optionalArgs = []) + { + $request = new DeleteScanConfigRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteScanConfig', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a Finding. + * + * Sample code: + * ``` + * $webSecurityScannerClient = new WebSecurityScannerClient(); + * try { + * $formattedName = $webSecurityScannerClient->findingName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]', '[FINDING]'); + * $response = $webSecurityScannerClient->getFinding($formattedName); + * } finally { + * $webSecurityScannerClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the Finding to be returned. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\WebSecurityScanner\V1beta\Finding + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getFinding($name, array $optionalArgs = []) + { + $request = new GetFindingRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetFinding', Finding::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a ScanConfig. + * + * Sample code: + * ``` + * $webSecurityScannerClient = new WebSecurityScannerClient(); + * try { + * $formattedName = $webSecurityScannerClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); + * $response = $webSecurityScannerClient->getScanConfig($formattedName); + * } finally { + * $webSecurityScannerClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the ScanConfig to be returned. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getScanConfig($name, array $optionalArgs = []) + { + $request = new GetScanConfigRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetScanConfig', ScanConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a ScanRun. + * + * Sample code: + * ``` + * $webSecurityScannerClient = new WebSecurityScannerClient(); + * try { + * $formattedName = $webSecurityScannerClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); + * $response = $webSecurityScannerClient->getScanRun($formattedName); + * } finally { + * $webSecurityScannerClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the ScanRun to be returned. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanRun + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getScanRun($name, array $optionalArgs = []) + { + $request = new GetScanRunRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetScanRun', ScanRun::class, $optionalArgs, $request)->wait(); + } + + /** + * List CrawledUrls under a given ScanRun. + * + * Sample code: + * ``` + * $webSecurityScannerClient = new WebSecurityScannerClient(); + * try { + * $formattedParent = $webSecurityScannerClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); + * // Iterate over pages of elements + * $pagedResponse = $webSecurityScannerClient->listCrawledUrls($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $webSecurityScannerClient->listCrawledUrls($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $webSecurityScannerClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * @param array $optionalArgs { + * Optional. + * + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function listCrawledUrls($parent, array $optionalArgs = []) + { + $request = new ListCrawledUrlsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListCrawledUrls', $optionalArgs, ListCrawledUrlsResponse::class, $request); + } + + /** + * List all FindingTypeStats under a given ScanRun. + * + * Sample code: + * ``` + * $webSecurityScannerClient = new WebSecurityScannerClient(); + * try { + * $formattedParent = $webSecurityScannerClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); + * $response = $webSecurityScannerClient->listFindingTypeStats($formattedParent); + * } finally { + * $webSecurityScannerClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\WebSecurityScanner\V1beta\ListFindingTypeStatsResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function listFindingTypeStats($parent, array $optionalArgs = []) + { + $request = new ListFindingTypeStatsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ListFindingTypeStats', ListFindingTypeStatsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * List Findings under a given ScanRun. + * + * Sample code: + * ``` + * $webSecurityScannerClient = new WebSecurityScannerClient(); + * try { + * $formattedParent = $webSecurityScannerClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); + * $filter = 'filter'; + * // Iterate over pages of elements + * $pagedResponse = $webSecurityScannerClient->listFindings($formattedParent, $filter); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $webSecurityScannerClient->listFindings($formattedParent, $filter); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $webSecurityScannerClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name, which should be a scan run resource name in the + * format + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * @param string $filter Required. The filter expression. The expression must be in the format: + * . + * Supported field: 'finding_type'. + * Supported operator: '='. + * @param array $optionalArgs { + * Optional. + * + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function listFindings($parent, $filter, array $optionalArgs = []) + { + $request = new ListFindingsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setFilter($filter); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListFindings', $optionalArgs, ListFindingsResponse::class, $request); + } + + /** + * Lists ScanConfigs under a given project. + * + * Sample code: + * ``` + * $webSecurityScannerClient = new WebSecurityScannerClient(); + * try { + * $formattedParent = $webSecurityScannerClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $webSecurityScannerClient->listScanConfigs($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $webSecurityScannerClient->listScanConfigs($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $webSecurityScannerClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name, which should be a project resource name in the + * format 'projects/{projectId}'. + * @param array $optionalArgs { + * Optional. + * + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function listScanConfigs($parent, array $optionalArgs = []) + { + $request = new ListScanConfigsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListScanConfigs', $optionalArgs, ListScanConfigsResponse::class, $request); + } + + /** + * Lists ScanRuns under a given ScanConfig, in descending order of ScanRun + * stop time. + * + * Sample code: + * ``` + * $webSecurityScannerClient = new WebSecurityScannerClient(); + * try { + * $formattedParent = $webSecurityScannerClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); + * // Iterate over pages of elements + * $pagedResponse = $webSecurityScannerClient->listScanRuns($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $webSecurityScannerClient->listScanRuns($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $webSecurityScannerClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name, which should be a scan resource name in the + * format 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * @param array $optionalArgs { + * Optional. + * + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function listScanRuns($parent, array $optionalArgs = []) + { + $request = new ListScanRunsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListScanRuns', $optionalArgs, ListScanRunsResponse::class, $request); + } + + /** + * Start a ScanRun according to the given ScanConfig. + * + * Sample code: + * ``` + * $webSecurityScannerClient = new WebSecurityScannerClient(); + * try { + * $formattedName = $webSecurityScannerClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); + * $response = $webSecurityScannerClient->startScanRun($formattedName); + * } finally { + * $webSecurityScannerClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the ScanConfig to be used. The name follows the + * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanRun + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function startScanRun($name, array $optionalArgs = []) + { + $request = new StartScanRunRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('StartScanRun', ScanRun::class, $optionalArgs, $request)->wait(); + } + + /** + * Stops a ScanRun. The stopped ScanRun is returned. + * + * Sample code: + * ``` + * $webSecurityScannerClient = new WebSecurityScannerClient(); + * try { + * $formattedName = $webSecurityScannerClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); + * $response = $webSecurityScannerClient->stopScanRun($formattedName); + * } finally { + * $webSecurityScannerClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the ScanRun to be stopped. The name follows the + * format of + * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanRun + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function stopScanRun($name, array $optionalArgs = []) + { + $request = new StopScanRunRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('StopScanRun', ScanRun::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a ScanConfig. This method support partial update of a ScanConfig. + * + * Sample code: + * ``` + * $webSecurityScannerClient = new WebSecurityScannerClient(); + * try { + * $scanConfig = new ScanConfig(); + * $updateMask = new FieldMask(); + * $response = $webSecurityScannerClient->updateScanConfig($scanConfig, $updateMask); + * } finally { + * $webSecurityScannerClient->close(); + * } + * ``` + * + * @param ScanConfig $scanConfig Required. The ScanConfig to be updated. The name field must be set to identify the + * resource to be updated. The values of fields not covered by the mask + * will be ignored. + * @param FieldMask $updateMask Required. The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function updateScanConfig($scanConfig, $updateMask, array $optionalArgs = []) + { + $request = new UpdateScanConfigRequest(); + $requestParamHeaders = []; + $request->setScanConfig($scanConfig); + $request->setUpdateMask($updateMask); + $requestParamHeaders['scan_config.name'] = $scanConfig->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateScanConfig', ScanConfig::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/WebSecurityScannerClient.php b/owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/WebSecurityScannerClient.php new file mode 100644 index 000000000000..4db8a8ac330b --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/WebSecurityScannerClient.php @@ -0,0 +1,36 @@ + [ + 'google.cloud.websecurityscanner.v1beta.WebSecurityScanner' => [ + 'ListCrawledUrls' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCrawledUrls', + ], + ], + 'ListFindings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getFindings', + ], + ], + 'ListScanConfigs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getScanConfigs', + ], + ], + 'ListScanRuns' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getScanRuns', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/resources/web_security_scanner_rest_client_config.php b/owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/resources/web_security_scanner_rest_client_config.php new file mode 100644 index 000000000000..e3cc5c7648f0 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/resources/web_security_scanner_rest_client_config.php @@ -0,0 +1,163 @@ + [ + 'google.cloud.websecurityscanner.v1beta.WebSecurityScanner' => [ + 'CreateScanConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{parent=projects/*}/scanConfigs', + 'body' => 'scan_config', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteScanConfig' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta/{name=projects/*/scanConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetFinding' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*/findings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetScanConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/scanConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetScanRun' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCrawledUrls' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/crawledUrls', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListFindingTypeStats' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/findingTypeStats', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListFindings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/findings', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'filter', + ], + ], + 'ListScanConfigs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{parent=projects/*}/scanConfigs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListScanRuns' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{parent=projects/*/scanConfigs/*}/scanRuns', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'StartScanRun' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{name=projects/*/scanConfigs/*}:start', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'StopScanRun' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*}:stop', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateScanConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1beta/{scan_config.name=projects/*/scanConfigs/*}', + 'body' => 'scan_config', + 'placeholders' => [ + 'scan_config.name' => [ + 'getters' => [ + 'getScanConfig', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/tests/Unit/V1beta/WebSecurityScannerClientTest.php b/owl-bot-staging/WebSecurityScanner/v1beta/tests/Unit/V1beta/WebSecurityScannerClientTest.php new file mode 100644 index 000000000000..16620a2ae074 --- /dev/null +++ b/owl-bot-staging/WebSecurityScanner/v1beta/tests/Unit/V1beta/WebSecurityScannerClientTest.php @@ -0,0 +1,960 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return WebSecurityScannerClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new WebSecurityScannerClient($options); + } + + /** @test */ + public function createScanConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $maxQps = 844445913; + $expectedResponse = new ScanConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMaxQps($maxQps); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $scanConfig = new ScanConfig(); + $scanConfigDisplayName = 'scanConfigDisplayName-609132338'; + $scanConfig->setDisplayName($scanConfigDisplayName); + $scanConfigStartingUrls = []; + $scanConfig->setStartingUrls($scanConfigStartingUrls); + $response = $gapicClient->createScanConfig($formattedParent, $scanConfig); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/CreateScanConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getScanConfig(); + $this->assertProtobufEquals($scanConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createScanConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $scanConfig = new ScanConfig(); + $scanConfigDisplayName = 'scanConfigDisplayName-609132338'; + $scanConfig->setDisplayName($scanConfigDisplayName); + $scanConfigStartingUrls = []; + $scanConfig->setStartingUrls($scanConfigStartingUrls); + try { + $gapicClient->createScanConfig($formattedParent, $scanConfig); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteScanConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); + $gapicClient->deleteScanConfig($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/DeleteScanConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteScanConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); + try { + $gapicClient->deleteScanConfig($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFindingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $findingType = 'findingType274496048'; + $httpMethod = 'httpMethod820747384'; + $fuzzedUrl = 'fuzzedUrl-2120677666'; + $body = 'body3029410'; + $description = 'description-1724546052'; + $reproductionUrl = 'reproductionUrl-244934180'; + $frameUrl = 'frameUrl545464221'; + $finalUrl = 'finalUrl355601190'; + $trackingId = 'trackingId1878901667'; + $expectedResponse = new Finding(); + $expectedResponse->setName($name2); + $expectedResponse->setFindingType($findingType); + $expectedResponse->setHttpMethod($httpMethod); + $expectedResponse->setFuzzedUrl($fuzzedUrl); + $expectedResponse->setBody($body); + $expectedResponse->setDescription($description); + $expectedResponse->setReproductionUrl($reproductionUrl); + $expectedResponse->setFrameUrl($frameUrl); + $expectedResponse->setFinalUrl($finalUrl); + $expectedResponse->setTrackingId($trackingId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->findingName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]', '[FINDING]'); + $response = $gapicClient->getFinding($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/GetFinding', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFindingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->findingName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]', '[FINDING]'); + try { + $gapicClient->getFinding($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getScanConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $maxQps = 844445913; + $expectedResponse = new ScanConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMaxQps($maxQps); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); + $response = $gapicClient->getScanConfig($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/GetScanConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getScanConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); + try { + $gapicClient->getScanConfig($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getScanRunTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $urlsCrawledCount = 1749797253; + $urlsTestedCount = 1498664068; + $hasVulnerabilities = false; + $progressPercent = 2137894861; + $expectedResponse = new ScanRun(); + $expectedResponse->setName($name2); + $expectedResponse->setUrlsCrawledCount($urlsCrawledCount); + $expectedResponse->setUrlsTestedCount($urlsTestedCount); + $expectedResponse->setHasVulnerabilities($hasVulnerabilities); + $expectedResponse->setProgressPercent($progressPercent); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); + $response = $gapicClient->getScanRun($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/GetScanRun', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getScanRunExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); + try { + $gapicClient->getScanRun($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCrawledUrlsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $crawledUrlsElement = new CrawledUrl(); + $crawledUrls = [ + $crawledUrlsElement, + ]; + $expectedResponse = new ListCrawledUrlsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCrawledUrls($crawledUrls); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); + $response = $gapicClient->listCrawledUrls($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCrawledUrls()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListCrawledUrls', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCrawledUrlsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); + try { + $gapicClient->listCrawledUrls($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFindingTypeStatsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListFindingTypeStatsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); + $response = $gapicClient->listFindingTypeStats($formattedParent); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListFindingTypeStats', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFindingTypeStatsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); + try { + $gapicClient->listFindingTypeStats($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFindingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $findingsElement = new Finding(); + $findings = [ + $findingsElement, + ]; + $expectedResponse = new ListFindingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFindings($findings); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); + $filter = 'filter-1274492040'; + $response = $gapicClient->listFindings($formattedParent, $filter); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFindings()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListFindings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getFilter(); + $this->assertProtobufEquals($filter, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFindingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); + $filter = 'filter-1274492040'; + try { + $gapicClient->listFindings($formattedParent, $filter); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listScanConfigsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $scanConfigsElement = new ScanConfig(); + $scanConfigs = [ + $scanConfigsElement, + ]; + $expectedResponse = new ListScanConfigsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setScanConfigs($scanConfigs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->listScanConfigs($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getScanConfigs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListScanConfigs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listScanConfigsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + try { + $gapicClient->listScanConfigs($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listScanRunsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $scanRunsElement = new ScanRun(); + $scanRuns = [ + $scanRunsElement, + ]; + $expectedResponse = new ListScanRunsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setScanRuns($scanRuns); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); + $response = $gapicClient->listScanRuns($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getScanRuns()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListScanRuns', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listScanRunsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); + try { + $gapicClient->listScanRuns($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startScanRunTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $urlsCrawledCount = 1749797253; + $urlsTestedCount = 1498664068; + $hasVulnerabilities = false; + $progressPercent = 2137894861; + $expectedResponse = new ScanRun(); + $expectedResponse->setName($name2); + $expectedResponse->setUrlsCrawledCount($urlsCrawledCount); + $expectedResponse->setUrlsTestedCount($urlsTestedCount); + $expectedResponse->setHasVulnerabilities($hasVulnerabilities); + $expectedResponse->setProgressPercent($progressPercent); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); + $response = $gapicClient->startScanRun($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/StartScanRun', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startScanRunExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); + try { + $gapicClient->startScanRun($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function stopScanRunTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $urlsCrawledCount = 1749797253; + $urlsTestedCount = 1498664068; + $hasVulnerabilities = false; + $progressPercent = 2137894861; + $expectedResponse = new ScanRun(); + $expectedResponse->setName($name2); + $expectedResponse->setUrlsCrawledCount($urlsCrawledCount); + $expectedResponse->setUrlsTestedCount($urlsTestedCount); + $expectedResponse->setHasVulnerabilities($hasVulnerabilities); + $expectedResponse->setProgressPercent($progressPercent); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); + $response = $gapicClient->stopScanRun($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/StopScanRun', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function stopScanRunExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); + try { + $gapicClient->stopScanRun($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateScanConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $maxQps = 844445913; + $expectedResponse = new ScanConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMaxQps($maxQps); + $transport->addResponse($expectedResponse); + // Mock request + $scanConfig = new ScanConfig(); + $scanConfigDisplayName = 'scanConfigDisplayName-609132338'; + $scanConfig->setDisplayName($scanConfigDisplayName); + $scanConfigStartingUrls = []; + $scanConfig->setStartingUrls($scanConfigStartingUrls); + $updateMask = new FieldMask(); + $response = $gapicClient->updateScanConfig($scanConfig, $updateMask); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/UpdateScanConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getScanConfig(); + $this->assertProtobufEquals($scanConfig, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateScanConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $scanConfig = new ScanConfig(); + $scanConfigDisplayName = 'scanConfigDisplayName-609132338'; + $scanConfig->setDisplayName($scanConfigDisplayName); + $scanConfigStartingUrls = []; + $scanConfig->setStartingUrls($scanConfigStartingUrls); + $updateMask = new FieldMask(); + try { + $gapicClient->updateScanConfig($scanConfig, $updateMask); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/GPBMetadata/Google/Cloud/Workflows/Executions/V1/Executions.php b/owl-bot-staging/Workflows/Executions/v1/proto/src/GPBMetadata/Google/Cloud/Workflows/Executions/V1/Executions.php new file mode 100644 index 0000000000000000000000000000000000000000..1cbda3d791d5167dff8612f3deba3a3f20c371e6 GIT binary patch literal 4267 zcmb_f-EZ4e6vs*1HD_Dfd29=L056-gu57W|Y7%o>kn1`n5Spk-J3b;A$GJ((Twi0~ zq}!^z?16uPS0wmX5aMNzASAS>3Gp=k1D?3oUvbibl8n5>_Pyupch2vedpAFDjvTll z>>?YvIzcU=`B)%FNN`+Cuz@Y1*=@IxD;W6LF)id41YxHl>{aT5x>KrOr=lM2x(1Sj z4#ph|iH3!{E%5}q58D<#@kI0p8C_yx+Y@`MiMN7p0l?Oek>}_J5_YTGpCF>QbfPzQ zePs=WDQi54lr_{?S>teZ1HiC!&l3h;;S>b=bGl8-Gz5?6g#O($JOg1}=8@eBMAGAllwg)sJj%|{{R?aNA`|}! zS|N75P-DV@^(C0s-A?zILYSRpk?@ycjsnxQNOq3B2ivGc*y=VIDu?I3*_zR`er2Ya;dVLKb7=c7rzIAgR>4K?Q8 zgZb#0d15ictf12T0?g6D(LJ{PI`ZEwWOvAs??pPN0}S-?HCjYLKpvG()4G#i+soV& znDz6w>m<&vN!6V{(m*FdL-eb^egkc*3B~9-_z7DfAJc9TuG--9Yu4)H+ zwW_L=iY0Yt=?xxWPFCurLv@McFG8kvpeU-kLzhx)sVJAq^f}Fz6nRfk%j|U~e+Uf%3k@irIhpy_fme! z!MjmmC%RR@e%h$K0-gS1OhUd!8^Tw}Af9*{KJ`Tl8^M?nPou|v;uLTi>F+0w0ODzE zt)KsqgDYjzBe5B8AAQ}Wot?iAbB^vZng@SQTd}JT!UF^CbQwqQ zAkCwL-_Q3fPeJxS5&RGZyvXoHnCY45By39S6DI$Vin0d5<$G{-Gz8C~qZjcCKpbmS z=i-ER_-n9e)56sf{?w6Z;&Fgh^dyu%z-oaBz7S4Kf?~ zCJ)V_bw90lCo9D$a}0-twdphW1qD#2$35!|fUoc5$_`wN)v{t?O=}FRMAL=?~BB(gmL8#p2_imiL*93X?~FlM}#<@B#I{| zCt(8PF{F3NQE(r=>sUHzWA}LbFAkRJG#x9~+lvFfSJ_pw%6u^aDq_- zPetm+(1qJ+ZVXnP=1W;0XM%3VB%Wf{H|MA{!Rxo;OV*v>R-3p4)590Nq`%?google.cloud.workflows.executions.v1.CancelExecutionRequest + */ +class CancelExecutionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the execution to be cancelled. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the execution to be cancelled. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * Please see {@see ExecutionsClient::executionName()} for help formatting this field. + * + * @return \Google\Cloud\Workflows\Executions\V1\CancelExecutionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the execution to be cancelled. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\Executions\V1\Executions::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the execution to be cancelled. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the execution to be cancelled. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/CreateExecutionRequest.php b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/CreateExecutionRequest.php new file mode 100644 index 000000000000..01da8af0af3b --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/CreateExecutionRequest.php @@ -0,0 +1,139 @@ +google.cloud.workflows.executions.v1.CreateExecutionRequest + */ +class CreateExecutionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the workflow for which an execution should be created. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * The latest revision of the workflow will be used. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Execution to be created. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution execution = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $execution = null; + + /** + * @param string $parent Required. Name of the workflow for which an execution should be created. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * The latest revision of the workflow will be used. Please see + * {@see ExecutionsClient::workflowName()} for help formatting this field. + * @param \Google\Cloud\Workflows\Executions\V1\Execution $execution Required. Execution to be created. + * + * @return \Google\Cloud\Workflows\Executions\V1\CreateExecutionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Workflows\Executions\V1\Execution $execution): self + { + return (new self()) + ->setParent($parent) + ->setExecution($execution); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the workflow for which an execution should be created. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * The latest revision of the workflow will be used. + * @type \Google\Cloud\Workflows\Executions\V1\Execution $execution + * Required. Execution to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\Executions\V1\Executions::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the workflow for which an execution should be created. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * The latest revision of the workflow will be used. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of the workflow for which an execution should be created. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * The latest revision of the workflow will be used. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Execution to be created. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution execution = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Workflows\Executions\V1\Execution|null + */ + public function getExecution() + { + return $this->execution; + } + + public function hasExecution() + { + return isset($this->execution); + } + + public function clearExecution() + { + unset($this->execution); + } + + /** + * Required. Execution to be created. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution execution = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Workflows\Executions\V1\Execution $var + * @return $this + */ + public function setExecution($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Workflows\Executions\V1\Execution::class); + $this->execution = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution.php b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution.php new file mode 100644 index 000000000000..7780a3cb8ebc --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution.php @@ -0,0 +1,406 @@ +google.cloud.workflows.executions.v1.Execution + */ +class Execution extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the execution. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Marks the beginning of execution. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. Marks the end of execution, successful or not. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Current state of the execution. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Input parameters of the execution represented as a JSON string. + * The size limit is 32KB. + * *Note*: If you are using the REST API directly to run your workflow, you + * must escape any JSON string value of `argument`. Example: + * `'{"argument":"{\"firstName\":\"FIRST\",\"lastName\":\"LAST\"}"}'` + * + * Generated from protobuf field string argument = 5; + */ + protected $argument = ''; + /** + * Output only. Output of the execution represented as a JSON string. The + * value can only be present if the execution's state is `SUCCEEDED`. + * + * Generated from protobuf field string result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $result = ''; + /** + * Output only. The error which caused the execution to finish prematurely. + * The value is only present if the execution's state is `FAILED` + * or `CANCELLED`. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution.Error error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * Output only. Revision of the workflow this execution is using. + * + * Generated from protobuf field string workflow_revision_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $workflow_revision_id = ''; + /** + * The call logging level associated to this execution. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution.CallLogLevel call_log_level = 9; + */ + protected $call_log_level = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the execution. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * @type \Google\Protobuf\Timestamp $start_time + * Output only. Marks the beginning of execution. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. Marks the end of execution, successful or not. + * @type int $state + * Output only. Current state of the execution. + * @type string $argument + * Input parameters of the execution represented as a JSON string. + * The size limit is 32KB. + * *Note*: If you are using the REST API directly to run your workflow, you + * must escape any JSON string value of `argument`. Example: + * `'{"argument":"{\"firstName\":\"FIRST\",\"lastName\":\"LAST\"}"}'` + * @type string $result + * Output only. Output of the execution represented as a JSON string. The + * value can only be present if the execution's state is `SUCCEEDED`. + * @type \Google\Cloud\Workflows\Executions\V1\Execution\Error $error + * Output only. The error which caused the execution to finish prematurely. + * The value is only present if the execution's state is `FAILED` + * or `CANCELLED`. + * @type string $workflow_revision_id + * Output only. Revision of the workflow this execution is using. + * @type int $call_log_level + * The call logging level associated to this execution. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\Executions\V1\Executions::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the execution. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the execution. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Marks the beginning of execution. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. Marks the beginning of execution. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. Marks the end of execution, successful or not. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. Marks the end of execution, successful or not. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Current state of the execution. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the execution. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Workflows\Executions\V1\Execution\State::class); + $this->state = $var; + + return $this; + } + + /** + * Input parameters of the execution represented as a JSON string. + * The size limit is 32KB. + * *Note*: If you are using the REST API directly to run your workflow, you + * must escape any JSON string value of `argument`. Example: + * `'{"argument":"{\"firstName\":\"FIRST\",\"lastName\":\"LAST\"}"}'` + * + * Generated from protobuf field string argument = 5; + * @return string + */ + public function getArgument() + { + return $this->argument; + } + + /** + * Input parameters of the execution represented as a JSON string. + * The size limit is 32KB. + * *Note*: If you are using the REST API directly to run your workflow, you + * must escape any JSON string value of `argument`. Example: + * `'{"argument":"{\"firstName\":\"FIRST\",\"lastName\":\"LAST\"}"}'` + * + * Generated from protobuf field string argument = 5; + * @param string $var + * @return $this + */ + public function setArgument($var) + { + GPBUtil::checkString($var, True); + $this->argument = $var; + + return $this; + } + + /** + * Output only. Output of the execution represented as a JSON string. The + * value can only be present if the execution's state is `SUCCEEDED`. + * + * Generated from protobuf field string result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getResult() + { + return $this->result; + } + + /** + * Output only. Output of the execution represented as a JSON string. The + * value can only be present if the execution's state is `SUCCEEDED`. + * + * Generated from protobuf field string result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkString($var, True); + $this->result = $var; + + return $this; + } + + /** + * Output only. The error which caused the execution to finish prematurely. + * The value is only present if the execution's state is `FAILED` + * or `CANCELLED`. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution.Error error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Workflows\Executions\V1\Execution\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. The error which caused the execution to finish prematurely. + * The value is only present if the execution's state is `FAILED` + * or `CANCELLED`. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution.Error error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Workflows\Executions\V1\Execution\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Workflows\Executions\V1\Execution\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Output only. Revision of the workflow this execution is using. + * + * Generated from protobuf field string workflow_revision_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getWorkflowRevisionId() + { + return $this->workflow_revision_id; + } + + /** + * Output only. Revision of the workflow this execution is using. + * + * Generated from protobuf field string workflow_revision_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setWorkflowRevisionId($var) + { + GPBUtil::checkString($var, True); + $this->workflow_revision_id = $var; + + return $this; + } + + /** + * The call logging level associated to this execution. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution.CallLogLevel call_log_level = 9; + * @return int + */ + public function getCallLogLevel() + { + return $this->call_log_level; + } + + /** + * The call logging level associated to this execution. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution.CallLogLevel call_log_level = 9; + * @param int $var + * @return $this + */ + public function setCallLogLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Workflows\Executions\V1\Execution\CallLogLevel::class); + $this->call_log_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/CallLogLevel.php b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/CallLogLevel.php new file mode 100644 index 000000000000..dbc2fd0a6d5e --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/CallLogLevel.php @@ -0,0 +1,66 @@ +google.cloud.workflows.executions.v1.Execution.CallLogLevel + */ +class CallLogLevel +{ + /** + * No call logging specified. + * + * Generated from protobuf enum CALL_LOG_LEVEL_UNSPECIFIED = 0; + */ + const CALL_LOG_LEVEL_UNSPECIFIED = 0; + /** + * Log all call steps within workflows, all call returns, and all exceptions + * raised. + * + * Generated from protobuf enum LOG_ALL_CALLS = 1; + */ + const LOG_ALL_CALLS = 1; + /** + * Log only exceptions that are raised from call steps within workflows. + * + * Generated from protobuf enum LOG_ERRORS_ONLY = 2; + */ + const LOG_ERRORS_ONLY = 2; + + private static $valueToName = [ + self::CALL_LOG_LEVEL_UNSPECIFIED => 'CALL_LOG_LEVEL_UNSPECIFIED', + self::LOG_ALL_CALLS => 'LOG_ALL_CALLS', + self::LOG_ERRORS_ONLY => 'LOG_ERRORS_ONLY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CallLogLevel::class, \Google\Cloud\Workflows\Executions\V1\Execution_CallLogLevel::class); + diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/Error.php b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/Error.php new file mode 100644 index 000000000000..33cfcd89b58e --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/Error.php @@ -0,0 +1,148 @@ +google.cloud.workflows.executions.v1.Execution.Error + */ +class Error extends \Google\Protobuf\Internal\Message +{ + /** + * Error message and data returned represented as a JSON string. + * + * Generated from protobuf field string payload = 1; + */ + protected $payload = ''; + /** + * Human-readable stack trace string. + * + * Generated from protobuf field string context = 2; + */ + protected $context = ''; + /** + * Stack trace with detailed information of where error was generated. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution.StackTrace stack_trace = 3; + */ + protected $stack_trace = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $payload + * Error message and data returned represented as a JSON string. + * @type string $context + * Human-readable stack trace string. + * @type \Google\Cloud\Workflows\Executions\V1\Execution\StackTrace $stack_trace + * Stack trace with detailed information of where error was generated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\Executions\V1\Executions::initOnce(); + parent::__construct($data); + } + + /** + * Error message and data returned represented as a JSON string. + * + * Generated from protobuf field string payload = 1; + * @return string + */ + public function getPayload() + { + return $this->payload; + } + + /** + * Error message and data returned represented as a JSON string. + * + * Generated from protobuf field string payload = 1; + * @param string $var + * @return $this + */ + public function setPayload($var) + { + GPBUtil::checkString($var, True); + $this->payload = $var; + + return $this; + } + + /** + * Human-readable stack trace string. + * + * Generated from protobuf field string context = 2; + * @return string + */ + public function getContext() + { + return $this->context; + } + + /** + * Human-readable stack trace string. + * + * Generated from protobuf field string context = 2; + * @param string $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkString($var, True); + $this->context = $var; + + return $this; + } + + /** + * Stack trace with detailed information of where error was generated. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution.StackTrace stack_trace = 3; + * @return \Google\Cloud\Workflows\Executions\V1\Execution\StackTrace|null + */ + public function getStackTrace() + { + return $this->stack_trace; + } + + public function hasStackTrace() + { + return isset($this->stack_trace); + } + + public function clearStackTrace() + { + unset($this->stack_trace); + } + + /** + * Stack trace with detailed information of where error was generated. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution.StackTrace stack_trace = 3; + * @param \Google\Cloud\Workflows\Executions\V1\Execution\StackTrace $var + * @return $this + */ + public function setStackTrace($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Workflows\Executions\V1\Execution\StackTrace::class); + $this->stack_trace = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Error::class, \Google\Cloud\Workflows\Executions\V1\Execution_Error::class); + diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/StackTrace.php b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/StackTrace.php new file mode 100644 index 000000000000..ba74ffea90a7 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/StackTrace.php @@ -0,0 +1,70 @@ +google.cloud.workflows.executions.v1.Execution.StackTrace + */ +class StackTrace extends \Google\Protobuf\Internal\Message +{ + /** + * An array of stack elements. + * + * Generated from protobuf field repeated .google.cloud.workflows.executions.v1.Execution.StackTraceElement elements = 1; + */ + private $elements; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Workflows\Executions\V1\Execution\StackTraceElement>|\Google\Protobuf\Internal\RepeatedField $elements + * An array of stack elements. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\Executions\V1\Executions::initOnce(); + parent::__construct($data); + } + + /** + * An array of stack elements. + * + * Generated from protobuf field repeated .google.cloud.workflows.executions.v1.Execution.StackTraceElement elements = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getElements() + { + return $this->elements; + } + + /** + * An array of stack elements. + * + * Generated from protobuf field repeated .google.cloud.workflows.executions.v1.Execution.StackTraceElement elements = 1; + * @param array<\Google\Cloud\Workflows\Executions\V1\Execution\StackTraceElement>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setElements($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Workflows\Executions\V1\Execution\StackTraceElement::class); + $this->elements = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StackTrace::class, \Google\Cloud\Workflows\Executions\V1\Execution_StackTrace::class); + diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/StackTraceElement.php b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/StackTraceElement.php new file mode 100644 index 000000000000..54ffcdb61d1a --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/StackTraceElement.php @@ -0,0 +1,148 @@ +google.cloud.workflows.executions.v1.Execution.StackTraceElement + */ +class StackTraceElement extends \Google\Protobuf\Internal\Message +{ + /** + * The step the error occurred at. + * + * Generated from protobuf field string step = 1; + */ + protected $step = ''; + /** + * The routine where the error occurred. + * + * Generated from protobuf field string routine = 2; + */ + protected $routine = ''; + /** + * The source position information of the stack trace element. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution.StackTraceElement.Position position = 3; + */ + protected $position = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $step + * The step the error occurred at. + * @type string $routine + * The routine where the error occurred. + * @type \Google\Cloud\Workflows\Executions\V1\Execution\StackTraceElement\Position $position + * The source position information of the stack trace element. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\Executions\V1\Executions::initOnce(); + parent::__construct($data); + } + + /** + * The step the error occurred at. + * + * Generated from protobuf field string step = 1; + * @return string + */ + public function getStep() + { + return $this->step; + } + + /** + * The step the error occurred at. + * + * Generated from protobuf field string step = 1; + * @param string $var + * @return $this + */ + public function setStep($var) + { + GPBUtil::checkString($var, True); + $this->step = $var; + + return $this; + } + + /** + * The routine where the error occurred. + * + * Generated from protobuf field string routine = 2; + * @return string + */ + public function getRoutine() + { + return $this->routine; + } + + /** + * The routine where the error occurred. + * + * Generated from protobuf field string routine = 2; + * @param string $var + * @return $this + */ + public function setRoutine($var) + { + GPBUtil::checkString($var, True); + $this->routine = $var; + + return $this; + } + + /** + * The source position information of the stack trace element. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution.StackTraceElement.Position position = 3; + * @return \Google\Cloud\Workflows\Executions\V1\Execution\StackTraceElement\Position|null + */ + public function getPosition() + { + return $this->position; + } + + public function hasPosition() + { + return isset($this->position); + } + + public function clearPosition() + { + unset($this->position); + } + + /** + * The source position information of the stack trace element. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution.StackTraceElement.Position position = 3; + * @param \Google\Cloud\Workflows\Executions\V1\Execution\StackTraceElement\Position $var + * @return $this + */ + public function setPosition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Workflows\Executions\V1\Execution\StackTraceElement\Position::class); + $this->position = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StackTraceElement::class, \Google\Cloud\Workflows\Executions\V1\Execution_StackTraceElement::class); + diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/StackTraceElement/Position.php b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/StackTraceElement/Position.php new file mode 100644 index 000000000000..61107a127090 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/StackTraceElement/Position.php @@ -0,0 +1,144 @@ +google.cloud.workflows.executions.v1.Execution.StackTraceElement.Position + */ +class Position extends \Google\Protobuf\Internal\Message +{ + /** + * The source code line number the current instruction was generated from. + * + * Generated from protobuf field int64 line = 1; + */ + protected $line = 0; + /** + * The source code column position (of the line) the current instruction + * was generated from. + * + * Generated from protobuf field int64 column = 2; + */ + protected $column = 0; + /** + * The number of bytes of source code making up this stack trace element. + * + * Generated from protobuf field int64 length = 3; + */ + protected $length = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $line + * The source code line number the current instruction was generated from. + * @type int|string $column + * The source code column position (of the line) the current instruction + * was generated from. + * @type int|string $length + * The number of bytes of source code making up this stack trace element. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\Executions\V1\Executions::initOnce(); + parent::__construct($data); + } + + /** + * The source code line number the current instruction was generated from. + * + * Generated from protobuf field int64 line = 1; + * @return int|string + */ + public function getLine() + { + return $this->line; + } + + /** + * The source code line number the current instruction was generated from. + * + * Generated from protobuf field int64 line = 1; + * @param int|string $var + * @return $this + */ + public function setLine($var) + { + GPBUtil::checkInt64($var); + $this->line = $var; + + return $this; + } + + /** + * The source code column position (of the line) the current instruction + * was generated from. + * + * Generated from protobuf field int64 column = 2; + * @return int|string + */ + public function getColumn() + { + return $this->column; + } + + /** + * The source code column position (of the line) the current instruction + * was generated from. + * + * Generated from protobuf field int64 column = 2; + * @param int|string $var + * @return $this + */ + public function setColumn($var) + { + GPBUtil::checkInt64($var); + $this->column = $var; + + return $this; + } + + /** + * The number of bytes of source code making up this stack trace element. + * + * Generated from protobuf field int64 length = 3; + * @return int|string + */ + public function getLength() + { + return $this->length; + } + + /** + * The number of bytes of source code making up this stack trace element. + * + * Generated from protobuf field int64 length = 3; + * @param int|string $var + * @return $this + */ + public function setLength($var) + { + GPBUtil::checkInt64($var); + $this->length = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Position::class, \Google\Cloud\Workflows\Executions\V1\Execution_StackTraceElement_Position::class); + diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/State.php b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/State.php new file mode 100644 index 000000000000..5b5702c3bb32 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/State.php @@ -0,0 +1,79 @@ +google.cloud.workflows.executions.v1.Execution.State + */ +class State +{ + /** + * Invalid state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The execution is in progress. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The execution finished successfully. + * + * Generated from protobuf enum SUCCEEDED = 2; + */ + const SUCCEEDED = 2; + /** + * The execution failed with an error. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + /** + * The execution was stopped intentionally. + * + * Generated from protobuf enum CANCELLED = 4; + */ + const CANCELLED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::CANCELLED => 'CANCELLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Workflows\Executions\V1\Execution_State::class); + diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ExecutionView.php b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ExecutionView.php new file mode 100644 index 000000000000..589d3628b918 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ExecutionView.php @@ -0,0 +1,63 @@ +google.cloud.workflows.executions.v1.ExecutionView + */ +class ExecutionView +{ + /** + * The default / unset value. + * + * Generated from protobuf enum EXECUTION_VIEW_UNSPECIFIED = 0; + */ + const EXECUTION_VIEW_UNSPECIFIED = 0; + /** + * Includes only basic metadata about the execution. + * Following fields are returned: name, start_time, end_time, state + * and workflow_revision_id. + * + * Generated from protobuf enum BASIC = 1; + */ + const BASIC = 1; + /** + * Includes all data. + * + * Generated from protobuf enum FULL = 2; + */ + const FULL = 2; + + private static $valueToName = [ + self::EXECUTION_VIEW_UNSPECIFIED => 'EXECUTION_VIEW_UNSPECIFIED', + self::BASIC => 'BASIC', + self::FULL => 'FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ExecutionsGrpcClient.php b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ExecutionsGrpcClient.php new file mode 100644 index 000000000000..98da211b4d82 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ExecutionsGrpcClient.php @@ -0,0 +1,99 @@ +_simpleRequest('/google.cloud.workflows.executions.v1.Executions/ListExecutions', + $argument, + ['\Google\Cloud\Workflows\Executions\V1\ListExecutionsResponse', 'decode'], + $metadata, $options); + } + + /** + * Creates a new execution using the latest revision of the given workflow. + * @param \Google\Cloud\Workflows\Executions\V1\CreateExecutionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateExecution(\Google\Cloud\Workflows\Executions\V1\CreateExecutionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.workflows.executions.v1.Executions/CreateExecution', + $argument, + ['\Google\Cloud\Workflows\Executions\V1\Execution', 'decode'], + $metadata, $options); + } + + /** + * Returns an execution of the given name. + * @param \Google\Cloud\Workflows\Executions\V1\GetExecutionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetExecution(\Google\Cloud\Workflows\Executions\V1\GetExecutionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.workflows.executions.v1.Executions/GetExecution', + $argument, + ['\Google\Cloud\Workflows\Executions\V1\Execution', 'decode'], + $metadata, $options); + } + + /** + * Cancels an execution of the given name. + * @param \Google\Cloud\Workflows\Executions\V1\CancelExecutionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CancelExecution(\Google\Cloud\Workflows\Executions\V1\CancelExecutionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.workflows.executions.v1.Executions/CancelExecution', + $argument, + ['\Google\Cloud\Workflows\Executions\V1\Execution', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/GetExecutionRequest.php b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/GetExecutionRequest.php new file mode 100644 index 000000000000..53cbf37cff5a --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/GetExecutionRequest.php @@ -0,0 +1,131 @@ +google.cloud.workflows.executions.v1.GetExecutionRequest + */ +class GetExecutionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the execution to be retrieved. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A view defining which fields should be filled in the returned execution. + * The API will default to the FULL view. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.ExecutionView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $name Required. Name of the execution to be retrieved. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * Please see {@see ExecutionsClient::executionName()} for help formatting this field. + * + * @return \Google\Cloud\Workflows\Executions\V1\GetExecutionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the execution to be retrieved. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * @type int $view + * Optional. A view defining which fields should be filled in the returned execution. + * The API will default to the FULL view. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\Executions\V1\Executions::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the execution to be retrieved. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the execution to be retrieved. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A view defining which fields should be filled in the returned execution. + * The API will default to the FULL view. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.ExecutionView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. A view defining which fields should be filled in the returned execution. + * The API will default to the FULL view. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.ExecutionView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Workflows\Executions\V1\ExecutionView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ListExecutionsRequest.php b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ListExecutionsRequest.php new file mode 100644 index 000000000000..e2cd4dfd4c73 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ListExecutionsRequest.php @@ -0,0 +1,222 @@ +google.cloud.workflows.executions.v1.ListExecutionsRequest + */ +class ListExecutionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the workflow for which the executions should be listed. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of executions to return per call. + * Max supported value depends on the selected Execution view: it's 10000 for + * BASIC and 100 for FULL. The default value used if the field is not + * specified is 100, regardless of the selected view. Values greater than + * the max value will be coerced down to it. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListExecutions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListExecutions` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Optional. A view defining which fields should be filled in the returned executions. + * The API will default to the BASIC view. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.ExecutionView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $parent Required. Name of the workflow for which the executions should be listed. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * Please see {@see ExecutionsClient::workflowName()} for help formatting this field. + * + * @return \Google\Cloud\Workflows\Executions\V1\ListExecutionsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the workflow for which the executions should be listed. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * @type int $page_size + * Maximum number of executions to return per call. + * Max supported value depends on the selected Execution view: it's 10000 for + * BASIC and 100 for FULL. The default value used if the field is not + * specified is 100, regardless of the selected view. Values greater than + * the max value will be coerced down to it. + * @type string $page_token + * A page token, received from a previous `ListExecutions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListExecutions` must + * match the call that provided the page token. + * @type int $view + * Optional. A view defining which fields should be filled in the returned executions. + * The API will default to the BASIC view. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\Executions\V1\Executions::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the workflow for which the executions should be listed. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of the workflow for which the executions should be listed. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of executions to return per call. + * Max supported value depends on the selected Execution view: it's 10000 for + * BASIC and 100 for FULL. The default value used if the field is not + * specified is 100, regardless of the selected view. Values greater than + * the max value will be coerced down to it. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of executions to return per call. + * Max supported value depends on the selected Execution view: it's 10000 for + * BASIC and 100 for FULL. The default value used if the field is not + * specified is 100, regardless of the selected view. Values greater than + * the max value will be coerced down to it. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListExecutions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListExecutions` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListExecutions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListExecutions` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. A view defining which fields should be filled in the returned executions. + * The API will default to the BASIC view. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.ExecutionView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. A view defining which fields should be filled in the returned executions. + * The API will default to the BASIC view. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1.ExecutionView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Workflows\Executions\V1\ExecutionView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ListExecutionsResponse.php b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ListExecutionsResponse.php new file mode 100644 index 000000000000..6f950c9185b5 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ListExecutionsResponse.php @@ -0,0 +1,107 @@ +google.cloud.workflows.executions.v1.ListExecutionsResponse + */ +class ListExecutionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The executions which match the request. + * + * Generated from protobuf field repeated .google.cloud.workflows.executions.v1.Execution executions = 1; + */ + private $executions; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Workflows\Executions\V1\Execution>|\Google\Protobuf\Internal\RepeatedField $executions + * The executions which match the request. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\Executions\V1\Executions::initOnce(); + parent::__construct($data); + } + + /** + * The executions which match the request. + * + * Generated from protobuf field repeated .google.cloud.workflows.executions.v1.Execution executions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExecutions() + { + return $this->executions; + } + + /** + * The executions which match the request. + * + * Generated from protobuf field repeated .google.cloud.workflows.executions.v1.Execution executions = 1; + * @param array<\Google\Cloud\Workflows\Executions\V1\Execution>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExecutions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Workflows\Executions\V1\Execution::class); + $this->executions = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/cancel_execution.php b/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/cancel_execution.php new file mode 100644 index 000000000000..cdb9e9234478 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/cancel_execution.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Execution $response */ + $response = $executionsClient->cancelExecution($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ExecutionsClient::executionName( + '[PROJECT]', + '[LOCATION]', + '[WORKFLOW]', + '[EXECUTION]' + ); + + cancel_execution_sample($formattedName); +} +// [END workflowexecutions_v1_generated_Executions_CancelExecution_sync] diff --git a/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/create_execution.php b/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/create_execution.php new file mode 100644 index 000000000000..0b317eb189cc --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/create_execution.php @@ -0,0 +1,75 @@ +setParent($formattedParent) + ->setExecution($execution); + + // Call the API and handle any network failures. + try { + /** @var Execution $response */ + $response = $executionsClient->createExecution($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ExecutionsClient::workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + + create_execution_sample($formattedParent); +} +// [END workflowexecutions_v1_generated_Executions_CreateExecution_sync] diff --git a/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/get_execution.php b/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/get_execution.php new file mode 100644 index 000000000000..c13b2df91460 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/get_execution.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Execution $response */ + $response = $executionsClient->getExecution($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ExecutionsClient::executionName( + '[PROJECT]', + '[LOCATION]', + '[WORKFLOW]', + '[EXECUTION]' + ); + + get_execution_sample($formattedName); +} +// [END workflowexecutions_v1_generated_Executions_GetExecution_sync] diff --git a/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/list_executions.php b/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/list_executions.php new file mode 100644 index 000000000000..2a9f644e779e --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/list_executions.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $executionsClient->listExecutions($request); + + /** @var Execution $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ExecutionsClient::workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + + list_executions_sample($formattedParent); +} +// [END workflowexecutions_v1_generated_Executions_ListExecutions_sync] diff --git a/owl-bot-staging/Workflows/Executions/v1/src/V1/Client/BaseClient/ExecutionsBaseClient.php b/owl-bot-staging/Workflows/Executions/v1/src/V1/Client/BaseClient/ExecutionsBaseClient.php new file mode 100644 index 000000000000..c7466cbd2e53 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1/src/V1/Client/BaseClient/ExecutionsBaseClient.php @@ -0,0 +1,341 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/executions_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/executions_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/executions_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/executions_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a execution + * resource. + * + * @param string $project + * @param string $location + * @param string $workflow + * @param string $execution + * + * @return string The formatted execution resource. + */ + public static function executionName(string $project, string $location, string $workflow, string $execution): string + { + return self::getPathTemplate('execution')->render([ + 'project' => $project, + 'location' => $location, + 'workflow' => $workflow, + 'execution' => $execution, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a workflow + * resource. + * + * @param string $project + * @param string $location + * @param string $workflow + * + * @return string The formatted workflow resource. + */ + public static function workflowName(string $project, string $location, string $workflow): string + { + return self::getPathTemplate('workflow')->render([ + 'project' => $project, + 'location' => $location, + 'workflow' => $workflow, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - execution: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * - workflow: projects/{project}/locations/{location}/workflows/{workflow} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'workflowexecutions.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Cancels an execution of the given name. + * + * The async variant is {@see self::cancelExecutionAsync()} . + * + * @param CancelExecutionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Execution + * + * @throws ApiException Thrown if the API call fails. + */ + public function cancelExecution(CancelExecutionRequest $request, array $callOptions = []): Execution + { + return $this->startApiCall('CancelExecution', $request, $callOptions)->wait(); + } + + /** + * Creates a new execution using the latest revision of the given workflow. + * + * The async variant is {@see self::createExecutionAsync()} . + * + * @param CreateExecutionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Execution + * + * @throws ApiException Thrown if the API call fails. + */ + public function createExecution(CreateExecutionRequest $request, array $callOptions = []): Execution + { + return $this->startApiCall('CreateExecution', $request, $callOptions)->wait(); + } + + /** + * Returns an execution of the given name. + * + * The async variant is {@see self::getExecutionAsync()} . + * + * @param GetExecutionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Execution + * + * @throws ApiException Thrown if the API call fails. + */ + public function getExecution(GetExecutionRequest $request, array $callOptions = []): Execution + { + return $this->startApiCall('GetExecution', $request, $callOptions)->wait(); + } + + /** + * Returns a list of executions which belong to the workflow with + * the given name. The method returns executions of all workflow + * revisions. Returned executions are ordered by their start time (newest + * first). + * + * The async variant is {@see self::listExecutionsAsync()} . + * + * @param ListExecutionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listExecutions(ListExecutionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListExecutions', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Workflows/Executions/v1/src/V1/Client/ExecutionsClient.php b/owl-bot-staging/Workflows/Executions/v1/src/V1/Client/ExecutionsClient.php new file mode 100644 index 000000000000..2ff8b03b6b80 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1/src/V1/Client/ExecutionsClient.php @@ -0,0 +1,40 @@ + [ + 'google.cloud.workflows.executions.v1.Executions' => [ + 'CancelExecution' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Workflows\Executions\V1\Execution', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateExecution' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Workflows\Executions\V1\Execution', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetExecution' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Workflows\Executions\V1\Execution', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListExecutions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getExecutions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Workflows\Executions\V1\ListExecutionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'execution' => 'projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}', + 'workflow' => 'projects/{project}/locations/{location}/workflows/{workflow}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Workflows/Executions/v1/src/V1/resources/executions_rest_client_config.php b/owl-bot-staging/Workflows/Executions/v1/src/V1/resources/executions_rest_client_config.php new file mode 100644 index 000000000000..09d749a4004f --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1/src/V1/resources/executions_rest_client_config.php @@ -0,0 +1,54 @@ + [ + 'google.cloud.workflows.executions.v1.Executions' => [ + 'CancelExecution' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/workflows/*/executions/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateExecution' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/workflows/*}/executions', + 'body' => 'execution', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetExecution' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/workflows/*/executions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListExecutions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/workflows/*}/executions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Workflows/Executions/v1/tests/Unit/V1/Client/ExecutionsClientTest.php b/owl-bot-staging/Workflows/Executions/v1/tests/Unit/V1/Client/ExecutionsClientTest.php new file mode 100644 index 000000000000..81326ab26aab --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1/tests/Unit/V1/Client/ExecutionsClientTest.php @@ -0,0 +1,389 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ExecutionsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ExecutionsClient($options); + } + + /** @test */ + public function cancelExecutionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $argument = 'argument-1589682499'; + $result = 'result-934426595'; + $workflowRevisionId = 'workflowRevisionId-1453295745'; + $expectedResponse = new Execution(); + $expectedResponse->setName($name2); + $expectedResponse->setArgument($argument); + $expectedResponse->setResult($result); + $expectedResponse->setWorkflowRevisionId($workflowRevisionId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[EXECUTION]'); + $request = (new CancelExecutionRequest()) + ->setName($formattedName); + $response = $gapicClient->cancelExecution($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.workflows.executions.v1.Executions/CancelExecution', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cancelExecutionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[EXECUTION]'); + $request = (new CancelExecutionRequest()) + ->setName($formattedName); + try { + $gapicClient->cancelExecution($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createExecutionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $argument = 'argument-1589682499'; + $result = 'result-934426595'; + $workflowRevisionId = 'workflowRevisionId-1453295745'; + $expectedResponse = new Execution(); + $expectedResponse->setName($name); + $expectedResponse->setArgument($argument); + $expectedResponse->setResult($result); + $expectedResponse->setWorkflowRevisionId($workflowRevisionId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + $execution = new Execution(); + $request = (new CreateExecutionRequest()) + ->setParent($formattedParent) + ->setExecution($execution); + $response = $gapicClient->createExecution($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.workflows.executions.v1.Executions/CreateExecution', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getExecution(); + $this->assertProtobufEquals($execution, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createExecutionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + $execution = new Execution(); + $request = (new CreateExecutionRequest()) + ->setParent($formattedParent) + ->setExecution($execution); + try { + $gapicClient->createExecution($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExecutionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $argument = 'argument-1589682499'; + $result = 'result-934426595'; + $workflowRevisionId = 'workflowRevisionId-1453295745'; + $expectedResponse = new Execution(); + $expectedResponse->setName($name2); + $expectedResponse->setArgument($argument); + $expectedResponse->setResult($result); + $expectedResponse->setWorkflowRevisionId($workflowRevisionId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[EXECUTION]'); + $request = (new GetExecutionRequest()) + ->setName($formattedName); + $response = $gapicClient->getExecution($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.workflows.executions.v1.Executions/GetExecution', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExecutionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[EXECUTION]'); + $request = (new GetExecutionRequest()) + ->setName($formattedName); + try { + $gapicClient->getExecution($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExecutionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $executionsElement = new Execution(); + $executions = [ + $executionsElement, + ]; + $expectedResponse = new ListExecutionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setExecutions($executions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + $request = (new ListExecutionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listExecutions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getExecutions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.workflows.executions.v1.Executions/ListExecutions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExecutionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + $request = (new ListExecutionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listExecutions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cancelExecutionAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $argument = 'argument-1589682499'; + $result = 'result-934426595'; + $workflowRevisionId = 'workflowRevisionId-1453295745'; + $expectedResponse = new Execution(); + $expectedResponse->setName($name2); + $expectedResponse->setArgument($argument); + $expectedResponse->setResult($result); + $expectedResponse->setWorkflowRevisionId($workflowRevisionId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[EXECUTION]'); + $request = (new CancelExecutionRequest()) + ->setName($formattedName); + $response = $gapicClient->cancelExecutionAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.workflows.executions.v1.Executions/CancelExecution', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/GPBMetadata/Google/Cloud/Workflows/Executions/V1Beta/Executions.php b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/GPBMetadata/Google/Cloud/Workflows/Executions/V1Beta/Executions.php new file mode 100644 index 0000000000000000000000000000000000000000..9e6db986aa75114b43d2ce37a731288f062dd1cd GIT binary patch literal 3803 zcmb_fO;g)O7_N*B_-zA3X^87XE1b;4xL^%%=wLz;*%piw1D@DGr}d0Sme)p&kW^_6 zNj$#f&_B>W&_n-9FTJ(BaY|=$%AuEBI_;&q`dAA?r^b{Evb68l^FGhJyAK{&M;6=_ zwvmBs1*4YGd@0}~Bv`hIP1V$eX1Co&wxF8FmZl>+D+t9sVRx@4$i-4^ftWgG*H%$Z z=$K|lN202m-IjQ2+Rxj%dFqJh1yZ|MGYv;PS!p7ygx+M`C;*0Xj2uf*k+5CK?~pYu z1uOM!*I~Ut9o7#6hjp1btRJl8$>I$FRaYEG7<_>q2;|S|Hg!!E9IRmS@1Eu~G(*Fh zqHC{6rJF)q(H%t0FRpEO4V5M>P=h@~Md?Ms^GVmLmjs+fej+ z5jm=@S=h8IWN9wfL6|{I-=r7)u+*K_7Sdjhx!i>$HwA2WQ8>CF*a&xRW5dmxI_R^f z`XvBLmR6Sx!=xyXHso@Hng%ZZ&9I#+0u~S%A+IYL^JKHnLa~4okmWQVPDe- ziLi2PT^`Zx+44ip?~v4Lv4(6BVy78|6wv$d_dKkR&1gRDnPy!vWSJPU12JShF(mK! zK@>|P(xF&;qDX!g`p~9;Hkv-7{(?_J3v3^@AzN2ogqI=?u<;h8{)|GLsfE7@QL4ZM zCvfR_e&UTZ!LI=jEN$GNmWc@Y@ZoAQ>sJ-H%`(V6qZOD&M$0pq7|mn{VwCwP5hd$q zR@Z|N{|Q`{rJt=*2VMqqFs;~~?lFNe5u?@cw_uWh)75celK%FVk*LVFO*=8=W;s?= znL6;?Ex^Y?iyJmN(HtVPhSo|h`9#*EKFI-OWjmj9^CYWY7$buz%I=3R1IQo zMf`2JS*=Mmxv{@nt;mJaR!J_-eZT`uN`+eKK%V3H8xXJV7YedmB%dPm)0R{!ljjNg zsUYnZZaFs3uBBYV7RZa`5YMuO2;_=1fnMzI`zr+#TaBeAm+5`TdEjLitnKb9Yv&00)|H8pXVZrd5qc+HSxUZwJJMwD|?cX89~RYET_6T<+zMrV{-pziEU7< zo5MTRuTu61W6Q~j;_2zB-&nSdDP4Tz-J6yzUBPYBKF+`AV2SL;BXb}>JD3p_dL5~7 zUzNR6lz(cYdwa(WDQ}RiNK(0QIkTD@gB4cuourJi6F*>rALGo>oFvxRT)WQ><4fM{ XCv;h&$3;!O}G+ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/CancelExecutionRequest.php b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/CancelExecutionRequest.php new file mode 100644 index 000000000000..28c9ab2611dc --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/CancelExecutionRequest.php @@ -0,0 +1,77 @@ +google.cloud.workflows.executions.v1beta.CancelExecutionRequest + */ +class CancelExecutionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the execution to be cancelled. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the execution to be cancelled. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\Executions\V1Beta\Executions::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the execution to be cancelled. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the execution to be cancelled. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/CreateExecutionRequest.php b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/CreateExecutionRequest.php new file mode 100644 index 000000000000..0ce4e08aa9b5 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/CreateExecutionRequest.php @@ -0,0 +1,121 @@ +google.cloud.workflows.executions.v1beta.CreateExecutionRequest + */ +class CreateExecutionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the workflow for which an execution should be created. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * The latest revision of the workflow will be used. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Execution to be created. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1beta.Execution execution = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $execution = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the workflow for which an execution should be created. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * The latest revision of the workflow will be used. + * @type \Google\Cloud\Workflows\Executions\V1beta\Execution $execution + * Required. Execution to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\Executions\V1Beta\Executions::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the workflow for which an execution should be created. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * The latest revision of the workflow will be used. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of the workflow for which an execution should be created. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * The latest revision of the workflow will be used. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Execution to be created. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1beta.Execution execution = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Workflows\Executions\V1beta\Execution|null + */ + public function getExecution() + { + return $this->execution; + } + + public function hasExecution() + { + return isset($this->execution); + } + + public function clearExecution() + { + unset($this->execution); + } + + /** + * Required. Execution to be created. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1beta.Execution execution = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Workflows\Executions\V1beta\Execution $var + * @return $this + */ + public function setExecution($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Workflows\Executions\V1beta\Execution::class); + $this->execution = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution.php b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution.php new file mode 100644 index 000000000000..a7c7ff753389 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution.php @@ -0,0 +1,359 @@ +google.cloud.workflows.executions.v1beta.Execution + */ +class Execution extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the execution. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Marks the beginning of execution. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. Marks the end of execution, successful or not. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Current state of the execution. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1beta.Execution.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Input parameters of the execution represented as a JSON string. + * The size limit is 32KB. + * + * Generated from protobuf field string argument = 5; + */ + protected $argument = ''; + /** + * Output only. Output of the execution represented as a JSON string. The + * value can only be present if the execution's state is `SUCCEEDED`. + * + * Generated from protobuf field string result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $result = ''; + /** + * Output only. The error which caused the execution to finish prematurely. + * The value is only present if the execution's state is `FAILED` + * or `CANCELLED`. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1beta.Execution.Error error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * Output only. Revision of the workflow this execution is using. + * + * Generated from protobuf field string workflow_revision_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $workflow_revision_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the execution. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * @type \Google\Protobuf\Timestamp $start_time + * Output only. Marks the beginning of execution. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. Marks the end of execution, successful or not. + * @type int $state + * Output only. Current state of the execution. + * @type string $argument + * Input parameters of the execution represented as a JSON string. + * The size limit is 32KB. + * @type string $result + * Output only. Output of the execution represented as a JSON string. The + * value can only be present if the execution's state is `SUCCEEDED`. + * @type \Google\Cloud\Workflows\Executions\V1beta\Execution\Error $error + * Output only. The error which caused the execution to finish prematurely. + * The value is only present if the execution's state is `FAILED` + * or `CANCELLED`. + * @type string $workflow_revision_id + * Output only. Revision of the workflow this execution is using. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\Executions\V1Beta\Executions::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the execution. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the execution. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Marks the beginning of execution. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. Marks the beginning of execution. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. Marks the end of execution, successful or not. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. Marks the end of execution, successful or not. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Current state of the execution. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1beta.Execution.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the execution. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1beta.Execution.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Workflows\Executions\V1beta\Execution\State::class); + $this->state = $var; + + return $this; + } + + /** + * Input parameters of the execution represented as a JSON string. + * The size limit is 32KB. + * + * Generated from protobuf field string argument = 5; + * @return string + */ + public function getArgument() + { + return $this->argument; + } + + /** + * Input parameters of the execution represented as a JSON string. + * The size limit is 32KB. + * + * Generated from protobuf field string argument = 5; + * @param string $var + * @return $this + */ + public function setArgument($var) + { + GPBUtil::checkString($var, True); + $this->argument = $var; + + return $this; + } + + /** + * Output only. Output of the execution represented as a JSON string. The + * value can only be present if the execution's state is `SUCCEEDED`. + * + * Generated from protobuf field string result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getResult() + { + return $this->result; + } + + /** + * Output only. Output of the execution represented as a JSON string. The + * value can only be present if the execution's state is `SUCCEEDED`. + * + * Generated from protobuf field string result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkString($var, True); + $this->result = $var; + + return $this; + } + + /** + * Output only. The error which caused the execution to finish prematurely. + * The value is only present if the execution's state is `FAILED` + * or `CANCELLED`. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1beta.Execution.Error error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Workflows\Executions\V1beta\Execution\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. The error which caused the execution to finish prematurely. + * The value is only present if the execution's state is `FAILED` + * or `CANCELLED`. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1beta.Execution.Error error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Workflows\Executions\V1beta\Execution\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Workflows\Executions\V1beta\Execution\Error::class); + $this->error = $var; + + return $this; + } + + /** + * Output only. Revision of the workflow this execution is using. + * + * Generated from protobuf field string workflow_revision_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getWorkflowRevisionId() + { + return $this->workflow_revision_id; + } + + /** + * Output only. Revision of the workflow this execution is using. + * + * Generated from protobuf field string workflow_revision_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setWorkflowRevisionId($var) + { + GPBUtil::checkString($var, True); + $this->workflow_revision_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution/Error.php b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution/Error.php new file mode 100644 index 000000000000..c8f9da2bfc7f --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution/Error.php @@ -0,0 +1,104 @@ +google.cloud.workflows.executions.v1beta.Execution.Error + */ +class Error extends \Google\Protobuf\Internal\Message +{ + /** + * Error payload returned by the execution, represented as a JSON string. + * + * Generated from protobuf field string payload = 1; + */ + protected $payload = ''; + /** + * Human readable error context, helpful for debugging purposes. + * + * Generated from protobuf field string context = 2; + */ + protected $context = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $payload + * Error payload returned by the execution, represented as a JSON string. + * @type string $context + * Human readable error context, helpful for debugging purposes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\Executions\V1Beta\Executions::initOnce(); + parent::__construct($data); + } + + /** + * Error payload returned by the execution, represented as a JSON string. + * + * Generated from protobuf field string payload = 1; + * @return string + */ + public function getPayload() + { + return $this->payload; + } + + /** + * Error payload returned by the execution, represented as a JSON string. + * + * Generated from protobuf field string payload = 1; + * @param string $var + * @return $this + */ + public function setPayload($var) + { + GPBUtil::checkString($var, True); + $this->payload = $var; + + return $this; + } + + /** + * Human readable error context, helpful for debugging purposes. + * + * Generated from protobuf field string context = 2; + * @return string + */ + public function getContext() + { + return $this->context; + } + + /** + * Human readable error context, helpful for debugging purposes. + * + * Generated from protobuf field string context = 2; + * @param string $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkString($var, True); + $this->context = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Error::class, \Google\Cloud\Workflows\Executions\V1beta\Execution_Error::class); + diff --git a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution/State.php b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution/State.php new file mode 100644 index 000000000000..cb9bfc9bd8b8 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution/State.php @@ -0,0 +1,79 @@ +google.cloud.workflows.executions.v1beta.Execution.State + */ +class State +{ + /** + * Invalid state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The execution is in progress. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The execution finished successfully. + * + * Generated from protobuf enum SUCCEEDED = 2; + */ + const SUCCEEDED = 2; + /** + * The execution failed with an error. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + /** + * The execution was stopped intentionally. + * + * Generated from protobuf enum CANCELLED = 4; + */ + const CANCELLED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::CANCELLED => 'CANCELLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Workflows\Executions\V1beta\Execution_State::class); + diff --git a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ExecutionView.php b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ExecutionView.php new file mode 100644 index 000000000000..22912dec5990 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ExecutionView.php @@ -0,0 +1,63 @@ +google.cloud.workflows.executions.v1beta.ExecutionView + */ +class ExecutionView +{ + /** + * The default / unset value. + * + * Generated from protobuf enum EXECUTION_VIEW_UNSPECIFIED = 0; + */ + const EXECUTION_VIEW_UNSPECIFIED = 0; + /** + * Includes only basic metadata about the execution. + * Following fields are returned: name, start_time, end_time, state + * and workflow_revision_id. + * + * Generated from protobuf enum BASIC = 1; + */ + const BASIC = 1; + /** + * Includes all data. + * + * Generated from protobuf enum FULL = 2; + */ + const FULL = 2; + + private static $valueToName = [ + self::EXECUTION_VIEW_UNSPECIFIED => 'EXECUTION_VIEW_UNSPECIFIED', + self::BASIC => 'BASIC', + self::FULL => 'FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ExecutionsGrpcClient.php b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ExecutionsGrpcClient.php new file mode 100644 index 000000000000..99ea0d911ef1 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ExecutionsGrpcClient.php @@ -0,0 +1,99 @@ +_simpleRequest('/google.cloud.workflows.executions.v1beta.Executions/ListExecutions', + $argument, + ['\Google\Cloud\Workflows\Executions\V1beta\ListExecutionsResponse', 'decode'], + $metadata, $options); + } + + /** + * Creates a new execution using the latest revision of the given workflow. + * @param \Google\Cloud\Workflows\Executions\V1beta\CreateExecutionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateExecution(\Google\Cloud\Workflows\Executions\V1beta\CreateExecutionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.workflows.executions.v1beta.Executions/CreateExecution', + $argument, + ['\Google\Cloud\Workflows\Executions\V1beta\Execution', 'decode'], + $metadata, $options); + } + + /** + * Returns an execution of the given name. + * @param \Google\Cloud\Workflows\Executions\V1beta\GetExecutionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetExecution(\Google\Cloud\Workflows\Executions\V1beta\GetExecutionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.workflows.executions.v1beta.Executions/GetExecution', + $argument, + ['\Google\Cloud\Workflows\Executions\V1beta\Execution', 'decode'], + $metadata, $options); + } + + /** + * Cancels an execution of the given name. + * @param \Google\Cloud\Workflows\Executions\V1beta\CancelExecutionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CancelExecution(\Google\Cloud\Workflows\Executions\V1beta\CancelExecutionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.workflows.executions.v1beta.Executions/CancelExecution', + $argument, + ['\Google\Cloud\Workflows\Executions\V1beta\Execution', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/GetExecutionRequest.php b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/GetExecutionRequest.php new file mode 100644 index 000000000000..7f1b36d86bbf --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/GetExecutionRequest.php @@ -0,0 +1,115 @@ +google.cloud.workflows.executions.v1beta.GetExecutionRequest + */ +class GetExecutionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the execution to be retrieved. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A view defining which fields should be filled in the returned execution. + * The API will default to the FULL view. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1beta.ExecutionView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the execution to be retrieved. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * @type int $view + * Optional. A view defining which fields should be filled in the returned execution. + * The API will default to the FULL view. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\Executions\V1Beta\Executions::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the execution to be retrieved. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the execution to be retrieved. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A view defining which fields should be filled in the returned execution. + * The API will default to the FULL view. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1beta.ExecutionView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. A view defining which fields should be filled in the returned execution. + * The API will default to the FULL view. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1beta.ExecutionView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Workflows\Executions\V1beta\ExecutionView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ListExecutionsRequest.php b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ListExecutionsRequest.php new file mode 100644 index 000000000000..077109024a4b --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ListExecutionsRequest.php @@ -0,0 +1,207 @@ +google.cloud.workflows.executions.v1beta.ListExecutionsRequest + */ +class ListExecutionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the workflow for which the executions should be listed. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of executions to return per call. + * Max supported value depends on the selected Execution view: it's 10000 for + * BASIC and 100 for FULL. The default value used if the field is not + * specified is 100, regardless of the selected view. Values greater than + * the max value will be coerced down to it. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListExecutions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListExecutions` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Optional. A view defining which fields should be filled in the returned executions. + * The API will default to the BASIC view. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1beta.ExecutionView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the workflow for which the executions should be listed. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * @type int $page_size + * Maximum number of executions to return per call. + * Max supported value depends on the selected Execution view: it's 10000 for + * BASIC and 100 for FULL. The default value used if the field is not + * specified is 100, regardless of the selected view. Values greater than + * the max value will be coerced down to it. + * @type string $page_token + * A page token, received from a previous `ListExecutions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListExecutions` must + * match the call that provided the page token. + * @type int $view + * Optional. A view defining which fields should be filled in the returned executions. + * The API will default to the BASIC view. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\Executions\V1Beta\Executions::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the workflow for which the executions should be listed. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of the workflow for which the executions should be listed. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of executions to return per call. + * Max supported value depends on the selected Execution view: it's 10000 for + * BASIC and 100 for FULL. The default value used if the field is not + * specified is 100, regardless of the selected view. Values greater than + * the max value will be coerced down to it. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of executions to return per call. + * Max supported value depends on the selected Execution view: it's 10000 for + * BASIC and 100 for FULL. The default value used if the field is not + * specified is 100, regardless of the selected view. Values greater than + * the max value will be coerced down to it. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListExecutions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListExecutions` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListExecutions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListExecutions` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. A view defining which fields should be filled in the returned executions. + * The API will default to the BASIC view. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1beta.ExecutionView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. A view defining which fields should be filled in the returned executions. + * The API will default to the BASIC view. + * + * Generated from protobuf field .google.cloud.workflows.executions.v1beta.ExecutionView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Workflows\Executions\V1beta\ExecutionView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ListExecutionsResponse.php b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ListExecutionsResponse.php new file mode 100644 index 000000000000..9858451191f4 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ListExecutionsResponse.php @@ -0,0 +1,107 @@ +google.cloud.workflows.executions.v1beta.ListExecutionsResponse + */ +class ListExecutionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The executions which match the request. + * + * Generated from protobuf field repeated .google.cloud.workflows.executions.v1beta.Execution executions = 1; + */ + private $executions; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Workflows\Executions\V1beta\Execution>|\Google\Protobuf\Internal\RepeatedField $executions + * The executions which match the request. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\Executions\V1Beta\Executions::initOnce(); + parent::__construct($data); + } + + /** + * The executions which match the request. + * + * Generated from protobuf field repeated .google.cloud.workflows.executions.v1beta.Execution executions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExecutions() + { + return $this->executions; + } + + /** + * The executions which match the request. + * + * Generated from protobuf field repeated .google.cloud.workflows.executions.v1beta.Execution executions = 1; + * @param array<\Google\Cloud\Workflows\Executions\V1beta\Execution>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExecutions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Workflows\Executions\V1beta\Execution::class); + $this->executions = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/cancel_execution.php b/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/cancel_execution.php new file mode 100644 index 000000000000..716b3a2daf1d --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/cancel_execution.php @@ -0,0 +1,73 @@ +cancelExecution($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ExecutionsClient::executionName( + '[PROJECT]', + '[LOCATION]', + '[WORKFLOW]', + '[EXECUTION]' + ); + + cancel_execution_sample($formattedName); +} +// [END workflowexecutions_v1beta_generated_Executions_CancelExecution_sync] diff --git a/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/create_execution.php b/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/create_execution.php new file mode 100644 index 000000000000..9f65c09d2b2e --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/create_execution.php @@ -0,0 +1,71 @@ +createExecution($formattedParent, $execution); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ExecutionsClient::workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + + create_execution_sample($formattedParent); +} +// [END workflowexecutions_v1beta_generated_Executions_CreateExecution_sync] diff --git a/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/get_execution.php b/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/get_execution.php new file mode 100644 index 000000000000..1ff13e38f564 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/get_execution.php @@ -0,0 +1,73 @@ +getExecution($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ExecutionsClient::executionName( + '[PROJECT]', + '[LOCATION]', + '[WORKFLOW]', + '[EXECUTION]' + ); + + get_execution_sample($formattedName); +} +// [END workflowexecutions_v1beta_generated_Executions_GetExecution_sync] diff --git a/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/list_executions.php b/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/list_executions.php new file mode 100644 index 000000000000..f6ac20c7208c --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/list_executions.php @@ -0,0 +1,75 @@ +listExecutions($formattedParent); + + /** @var Execution $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ExecutionsClient::workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + + list_executions_sample($formattedParent); +} +// [END workflowexecutions_v1beta_generated_Executions_ListExecutions_sync] diff --git a/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/ExecutionsClient.php b/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/ExecutionsClient.php new file mode 100644 index 000000000000..1e4a13ee7b14 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/ExecutionsClient.php @@ -0,0 +1,36 @@ +executionName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[EXECUTION]'); + * $response = $executionsClient->cancelExecution($formattedName); + * } finally { + * $executionsClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @experimental + */ +class ExecutionsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.workflows.executions.v1beta.Executions'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'workflowexecutions.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $executionNameTemplate; + + private static $workflowNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/executions_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/executions_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/executions_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/executions_rest_client_config.php', + ], + ], + ]; + } + + private static function getExecutionNameTemplate() + { + if (self::$executionNameTemplate == null) { + self::$executionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}'); + } + + return self::$executionNameTemplate; + } + + private static function getWorkflowNameTemplate() + { + if (self::$workflowNameTemplate == null) { + self::$workflowNameTemplate = new PathTemplate('projects/{project}/locations/{location}/workflows/{workflow}'); + } + + return self::$workflowNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'execution' => self::getExecutionNameTemplate(), + 'workflow' => self::getWorkflowNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a execution + * resource. + * + * @param string $project + * @param string $location + * @param string $workflow + * @param string $execution + * + * @return string The formatted execution resource. + * + * @experimental + */ + public static function executionName($project, $location, $workflow, $execution) + { + return self::getExecutionNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'workflow' => $workflow, + 'execution' => $execution, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a workflow + * resource. + * + * @param string $project + * @param string $location + * @param string $workflow + * + * @return string The formatted workflow resource. + * + * @experimental + */ + public static function workflowName($project, $location, $workflow) + { + return self::getWorkflowNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'workflow' => $workflow, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - execution: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * - workflow: projects/{project}/locations/{location}/workflows/{workflow} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * + * @experimental + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'workflowexecutions.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Cancels an execution of the given name. + * + * Sample code: + * ``` + * $executionsClient = new ExecutionsClient(); + * try { + * $formattedName = $executionsClient->executionName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[EXECUTION]'); + * $response = $executionsClient->cancelExecution($formattedName); + * } finally { + * $executionsClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the execution to be cancelled. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Workflows\Executions\V1beta\Execution + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function cancelExecution($name, array $optionalArgs = []) + { + $request = new CancelExecutionRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CancelExecution', Execution::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a new execution using the latest revision of the given workflow. + * + * Sample code: + * ``` + * $executionsClient = new ExecutionsClient(); + * try { + * $formattedParent = $executionsClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + * $execution = new Execution(); + * $response = $executionsClient->createExecution($formattedParent, $execution); + * } finally { + * $executionsClient->close(); + * } + * ``` + * + * @param string $parent Required. Name of the workflow for which an execution should be created. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * The latest revision of the workflow will be used. + * @param Execution $execution Required. Execution to be created. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Workflows\Executions\V1beta\Execution + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function createExecution($parent, $execution, array $optionalArgs = []) + { + $request = new CreateExecutionRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setExecution($execution); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateExecution', Execution::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns an execution of the given name. + * + * Sample code: + * ``` + * $executionsClient = new ExecutionsClient(); + * try { + * $formattedName = $executionsClient->executionName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[EXECUTION]'); + * $response = $executionsClient->getExecution($formattedName); + * } finally { + * $executionsClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the execution to be retrieved. + * Format: + * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} + * @param array $optionalArgs { + * Optional. + * + * @type int $view + * Optional. A view defining which fields should be filled in the returned execution. + * The API will default to the FULL view. + * For allowed values, use constants defined on {@see \Google\Cloud\Workflows\Executions\V1beta\ExecutionView} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Workflows\Executions\V1beta\Execution + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getExecution($name, array $optionalArgs = []) + { + $request = new GetExecutionRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['view'])) { + $request->setView($optionalArgs['view']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetExecution', Execution::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns a list of executions which belong to the workflow with + * the given name. The method returns executions of all workflow + * revisions. Returned executions are ordered by their start time (newest + * first). + * + * Sample code: + * ``` + * $executionsClient = new ExecutionsClient(); + * try { + * $formattedParent = $executionsClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + * // Iterate over pages of elements + * $pagedResponse = $executionsClient->listExecutions($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $executionsClient->listExecutions($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $executionsClient->close(); + * } + * ``` + * + * @param string $parent Required. Name of the workflow for which the executions should be listed. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type int $view + * Optional. A view defining which fields should be filled in the returned executions. + * The API will default to the BASIC view. + * For allowed values, use constants defined on {@see \Google\Cloud\Workflows\Executions\V1beta\ExecutionView} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function listExecutions($parent, array $optionalArgs = []) + { + $request = new ListExecutionsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['view'])) { + $request->setView($optionalArgs['view']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListExecutions', $optionalArgs, ListExecutionsResponse::class, $request); + } +} diff --git a/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/gapic_metadata.json b/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/gapic_metadata.json new file mode 100644 index 000000000000..81c967306926 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/gapic_metadata.json @@ -0,0 +1,38 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.workflows.executions.v1beta", + "libraryPackage": "Google\\Cloud\\Workflows\\Executions\\V1beta", + "services": { + "Executions": { + "clients": { + "grpc": { + "libraryClient": "ExecutionsGapicClient", + "rpcs": { + "CancelExecution": { + "methods": [ + "cancelExecution" + ] + }, + "CreateExecution": { + "methods": [ + "createExecution" + ] + }, + "GetExecution": { + "methods": [ + "getExecution" + ] + }, + "ListExecutions": { + "methods": [ + "listExecutions" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_client_config.json b/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_client_config.json new file mode 100644 index 000000000000..a3c456bd2230 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_client_config.json @@ -0,0 +1,46 @@ +{ + "interfaces": { + "google.cloud.workflows.executions.v1beta.Executions": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CancelExecution": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateExecution": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetExecution": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListExecutions": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_descriptor_config.php b/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_descriptor_config.php new file mode 100644 index 000000000000..0836e4ff2d47 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_descriptor_config.php @@ -0,0 +1,18 @@ + [ + 'google.cloud.workflows.executions.v1beta.Executions' => [ + 'ListExecutions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getExecutions', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_rest_client_config.php b/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_rest_client_config.php new file mode 100644 index 000000000000..1a24fec7f007 --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_rest_client_config.php @@ -0,0 +1,54 @@ + [ + 'google.cloud.workflows.executions.v1beta.Executions' => [ + 'CancelExecution' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/workflows/*/executions/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateExecution' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/workflows/*}/executions', + 'body' => 'execution', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetExecution' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/workflows/*/executions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListExecutions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/workflows/*}/executions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Workflows/Executions/v1beta/tests/Unit/V1beta/ExecutionsClientTest.php b/owl-bot-staging/Workflows/Executions/v1beta/tests/Unit/V1beta/ExecutionsClientTest.php new file mode 100644 index 000000000000..9db7bf3fc1ab --- /dev/null +++ b/owl-bot-staging/Workflows/Executions/v1beta/tests/Unit/V1beta/ExecutionsClientTest.php @@ -0,0 +1,332 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ExecutionsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ExecutionsClient($options); + } + + /** @test */ + public function cancelExecutionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $argument = 'argument-1589682499'; + $result = 'result-934426595'; + $workflowRevisionId = 'workflowRevisionId-1453295745'; + $expectedResponse = new Execution(); + $expectedResponse->setName($name2); + $expectedResponse->setArgument($argument); + $expectedResponse->setResult($result); + $expectedResponse->setWorkflowRevisionId($workflowRevisionId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[EXECUTION]'); + $response = $gapicClient->cancelExecution($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.workflows.executions.v1beta.Executions/CancelExecution', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cancelExecutionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[EXECUTION]'); + try { + $gapicClient->cancelExecution($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createExecutionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $argument = 'argument-1589682499'; + $result = 'result-934426595'; + $workflowRevisionId = 'workflowRevisionId-1453295745'; + $expectedResponse = new Execution(); + $expectedResponse->setName($name); + $expectedResponse->setArgument($argument); + $expectedResponse->setResult($result); + $expectedResponse->setWorkflowRevisionId($workflowRevisionId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + $execution = new Execution(); + $response = $gapicClient->createExecution($formattedParent, $execution); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.workflows.executions.v1beta.Executions/CreateExecution', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getExecution(); + $this->assertProtobufEquals($execution, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createExecutionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + $execution = new Execution(); + try { + $gapicClient->createExecution($formattedParent, $execution); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExecutionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $argument = 'argument-1589682499'; + $result = 'result-934426595'; + $workflowRevisionId = 'workflowRevisionId-1453295745'; + $expectedResponse = new Execution(); + $expectedResponse->setName($name2); + $expectedResponse->setArgument($argument); + $expectedResponse->setResult($result); + $expectedResponse->setWorkflowRevisionId($workflowRevisionId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[EXECUTION]'); + $response = $gapicClient->getExecution($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.workflows.executions.v1beta.Executions/GetExecution', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExecutionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[EXECUTION]'); + try { + $gapicClient->getExecution($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExecutionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $executionsElement = new Execution(); + $executions = [ + $executionsElement, + ]; + $expectedResponse = new ListExecutionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setExecutions($executions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + $response = $gapicClient->listExecutions($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getExecutions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.workflows.executions.v1beta.Executions/ListExecutions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExecutionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + try { + $gapicClient->listExecutions($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Workflows/v1/proto/src/GPBMetadata/Google/Cloud/Workflows/V1/Workflows.php b/owl-bot-staging/Workflows/v1/proto/src/GPBMetadata/Google/Cloud/Workflows/V1/Workflows.php new file mode 100644 index 0000000000000000000000000000000000000000..1b7c9b31db7d349b767a6d475455e4e266dece89 GIT binary patch literal 3985 zcmbtXL2nyH6t0sd#LqOeL!-Ju5nHEHlPKAx0Tt>bt=5SfBBhPhrmci5S?l%KS+bd3 zc4r+zWFaB`0XHt3kT~-vkSb0fE;&_*6F-0hCuVkb#%m`r4&;*c?0awD``-J$nOS}4 z@A)vRZDN80i{ge>Kho$P*8ISup6$6>J!&>_pxNGm@3=V7HEm-@d$O~ul{dC_Z!y=< zivk-LwU+0#Tx{5`7d4DSFW7Io-eG98?{8#BHYai{7EdL)rqLk6>91>AfN2zvl{jx6prf9uX8>mUPSqsD<0yC} zEEc;pbwixzxb8Zb(2Myzae71HavX`Jvf@ZVFR9 zCYG*-KEUkb{CN(_ZT;jhauAqkD%gv(qM@)<2Nmql+wu8|OoH9J2NFRsBD zClSt%vY(U7^ZL2C=rXMSj60M@Uz?*S54ixhosb2rIgR{f9#g#e0CIMKnPH8mm>*+r za?8^)yv$!$GoZX8pXpZOH9nlz8eCUdq(Az`aPALb+_mc14f7M)D9h52S)Lw_E(qJP zN14#z2;G3ULL9Um8`mt`_98;_S&js{$zH@lUb8(m#)O7>;4ePDG`$45bch^`?&G7R zQ&(WDZMhK^Jt~fTlqoF0SPVOwf@{xq&E0bC`IBdr^7_`Jt@6gzO9)`xT;JV#QNEff zHvTj%xYeC$(NZ>)q0TlOL-rA^vMzjzZ5kTK$y3L0JzHpjaV#G@-L1wrmQg#UE09yQ zHE`kE3|!xKLMo$&Pw{6Fqc^$_I~m zTF7>u7>hB)3XPYjw~t9Yv{^I><4wn9dx)4nbQLDNpn-#0{V1NhY@q{FeYu4`6LpO4 zK~`22vix}WXNTxM?>NDq(^@JQ!6!zth_Jc0_pG|hSv5MBEj$Lai4`&um=DwJ?82h* z>4!xkTlgUZQ|mFe&sg#2<0^>9FN){bx$kiJ|6xRk^yFjA<%)CP7j#r>K7 z=i~D=(hw5K2WX%~@x z6n)UrfDBT0GT~wPTv+YNk#CykWSG*zh0ci?@2}`}1}1w6i3Y*cYbx`ck!7Wh2)Y`v zLMP7fe&J#$78R*a%y$Izi;}A9fpPYgIg>g!oH5xyvl4rmJg~%G(;-WAL=zT7i5G0b zD{}#+lEaHSU6c=edW6m>=XX|4uZj#Tr`L4Ia=whqDJ|cN=U$?&4_jBdb=Rf$VoIg{ zt!LBQugtu3?B8U6G4(x4{jg{lhlhv#Ta6XbJ#pt;@?DEIz2KlkV1}I@sVg8qxjOb4 O*T2|OT+=$x0r&?%v_Q}R literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/CreateWorkflowRequest.php b/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/CreateWorkflowRequest.php new file mode 100644 index 000000000000..6a782e25355d --- /dev/null +++ b/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/CreateWorkflowRequest.php @@ -0,0 +1,201 @@ +google.cloud.workflows.v1.CreateWorkflowRequest + */ +class CreateWorkflowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Project and location in which the workflow should be created. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Workflow to be created. + * + * Generated from protobuf field .google.cloud.workflows.v1.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $workflow = null; + /** + * Required. The ID of the workflow to be created. It has to fulfill the + * following requirements: + * * Must contain only letters, numbers, underscores and hyphens. + * * Must start with a letter. + * * Must be between 1-64 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project and location. + * + * Generated from protobuf field string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $workflow_id = ''; + + /** + * @param string $parent Required. Project and location in which the workflow should be created. + * Format: projects/{project}/locations/{location} + * Please see {@see WorkflowsClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Workflows\V1\Workflow $workflow Required. Workflow to be created. + * @param string $workflowId Required. The ID of the workflow to be created. It has to fulfill the + * following requirements: + * + * * Must contain only letters, numbers, underscores and hyphens. + * * Must start with a letter. + * * Must be between 1-64 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project and location. + * + * @return \Google\Cloud\Workflows\V1\CreateWorkflowRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Workflows\V1\Workflow $workflow, string $workflowId): self + { + return (new self()) + ->setParent($parent) + ->setWorkflow($workflow) + ->setWorkflowId($workflowId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Project and location in which the workflow should be created. + * Format: projects/{project}/locations/{location} + * @type \Google\Cloud\Workflows\V1\Workflow $workflow + * Required. Workflow to be created. + * @type string $workflow_id + * Required. The ID of the workflow to be created. It has to fulfill the + * following requirements: + * * Must contain only letters, numbers, underscores and hyphens. + * * Must start with a letter. + * * Must be between 1-64 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project and location. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\V1\Workflows::initOnce(); + parent::__construct($data); + } + + /** + * Required. Project and location in which the workflow should be created. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Project and location in which the workflow should be created. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Workflow to be created. + * + * Generated from protobuf field .google.cloud.workflows.v1.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Workflows\V1\Workflow|null + */ + public function getWorkflow() + { + return $this->workflow; + } + + public function hasWorkflow() + { + return isset($this->workflow); + } + + public function clearWorkflow() + { + unset($this->workflow); + } + + /** + * Required. Workflow to be created. + * + * Generated from protobuf field .google.cloud.workflows.v1.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Workflows\V1\Workflow $var + * @return $this + */ + public function setWorkflow($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Workflows\V1\Workflow::class); + $this->workflow = $var; + + return $this; + } + + /** + * Required. The ID of the workflow to be created. It has to fulfill the + * following requirements: + * * Must contain only letters, numbers, underscores and hyphens. + * * Must start with a letter. + * * Must be between 1-64 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project and location. + * + * Generated from protobuf field string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getWorkflowId() + { + return $this->workflow_id; + } + + /** + * Required. The ID of the workflow to be created. It has to fulfill the + * following requirements: + * * Must contain only letters, numbers, underscores and hyphens. + * * Must start with a letter. + * * Must be between 1-64 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project and location. + * + * Generated from protobuf field string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setWorkflowId($var) + { + GPBUtil::checkString($var, True); + $this->workflow_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/DeleteWorkflowRequest.php b/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/DeleteWorkflowRequest.php new file mode 100644 index 000000000000..ded08ff65dce --- /dev/null +++ b/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/DeleteWorkflowRequest.php @@ -0,0 +1,88 @@ +google.cloud.workflows.v1.DeleteWorkflowRequest + */ +class DeleteWorkflowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the workflow to be deleted. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the workflow to be deleted. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * Please see {@see WorkflowsClient::workflowName()} for help formatting this field. + * + * @return \Google\Cloud\Workflows\V1\DeleteWorkflowRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the workflow to be deleted. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\V1\Workflows::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the workflow to be deleted. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the workflow to be deleted. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/GetWorkflowRequest.php b/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/GetWorkflowRequest.php new file mode 100644 index 000000000000..9a87ba492512 --- /dev/null +++ b/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/GetWorkflowRequest.php @@ -0,0 +1,87 @@ +google.cloud.workflows.v1.GetWorkflowRequest + */ +class GetWorkflowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the workflow which information should be retrieved. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the workflow which information should be retrieved. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * Please see {@see WorkflowsClient::workflowName()} for help formatting this field. + * + * @return \Google\Cloud\Workflows\V1\GetWorkflowRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the workflow which information should be retrieved. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\V1\Workflows::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the workflow which information should be retrieved. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the workflow which information should be retrieved. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/ListWorkflowsRequest.php b/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/ListWorkflowsRequest.php new file mode 100644 index 000000000000..30fcb110dcdb --- /dev/null +++ b/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/ListWorkflowsRequest.php @@ -0,0 +1,260 @@ +google.cloud.workflows.v1.ListWorkflowsRequest + */ +class ListWorkflowsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Project and location from which the workflows should be listed. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of workflows to return per call. The service may return + * fewer than this value. If the value is not specified, a default value of + * 500 will be used. The maximum permitted value is 1000 and values greater + * than 1000 will be coerced down to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListWorkflows` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListWorkflows` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filter to restrict results to specific workflows. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Comma-separated list of fields that that specify the order of the results. + * Default sorting order for a field is ascending. To specify descending order + * for a field, append a " desc" suffix. + * If not specified, the results will be returned in an unspecified order. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Project and location from which the workflows should be listed. + * Format: projects/{project}/locations/{location} + * Please see {@see WorkflowsClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Workflows\V1\ListWorkflowsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Project and location from which the workflows should be listed. + * Format: projects/{project}/locations/{location} + * @type int $page_size + * Maximum number of workflows to return per call. The service may return + * fewer than this value. If the value is not specified, a default value of + * 500 will be used. The maximum permitted value is 1000 and values greater + * than 1000 will be coerced down to 1000. + * @type string $page_token + * A page token, received from a previous `ListWorkflows` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListWorkflows` must + * match the call that provided the page token. + * @type string $filter + * Filter to restrict results to specific workflows. + * @type string $order_by + * Comma-separated list of fields that that specify the order of the results. + * Default sorting order for a field is ascending. To specify descending order + * for a field, append a " desc" suffix. + * If not specified, the results will be returned in an unspecified order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\V1\Workflows::initOnce(); + parent::__construct($data); + } + + /** + * Required. Project and location from which the workflows should be listed. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Project and location from which the workflows should be listed. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of workflows to return per call. The service may return + * fewer than this value. If the value is not specified, a default value of + * 500 will be used. The maximum permitted value is 1000 and values greater + * than 1000 will be coerced down to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of workflows to return per call. The service may return + * fewer than this value. If the value is not specified, a default value of + * 500 will be used. The maximum permitted value is 1000 and values greater + * than 1000 will be coerced down to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListWorkflows` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListWorkflows` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListWorkflows` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListWorkflows` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filter to restrict results to specific workflows. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter to restrict results to specific workflows. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Comma-separated list of fields that that specify the order of the results. + * Default sorting order for a field is ascending. To specify descending order + * for a field, append a " desc" suffix. + * If not specified, the results will be returned in an unspecified order. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Comma-separated list of fields that that specify the order of the results. + * Default sorting order for a field is ascending. To specify descending order + * for a field, append a " desc" suffix. + * If not specified, the results will be returned in an unspecified order. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/ListWorkflowsResponse.php b/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/ListWorkflowsResponse.php new file mode 100644 index 000000000000..9bf10165ca1f --- /dev/null +++ b/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/ListWorkflowsResponse.php @@ -0,0 +1,141 @@ +google.cloud.workflows.v1.ListWorkflowsResponse + */ +class ListWorkflowsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The workflows which match the request. + * + * Generated from protobuf field repeated .google.cloud.workflows.v1.Workflow workflows = 1; + */ + private $workflows; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Unreachable resources. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Workflows\V1\Workflow>|\Google\Protobuf\Internal\RepeatedField $workflows + * The workflows which match the request. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Unreachable resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\V1\Workflows::initOnce(); + parent::__construct($data); + } + + /** + * The workflows which match the request. + * + * Generated from protobuf field repeated .google.cloud.workflows.v1.Workflow workflows = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWorkflows() + { + return $this->workflows; + } + + /** + * The workflows which match the request. + * + * Generated from protobuf field repeated .google.cloud.workflows.v1.Workflow workflows = 1; + * @param array<\Google\Cloud\Workflows\V1\Workflow>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWorkflows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Workflows\V1\Workflow::class); + $this->workflows = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Unreachable resources. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Unreachable resources. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/OperationMetadata.php b/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/OperationMetadata.php new file mode 100644 index 000000000000..498dac12a82c --- /dev/null +++ b/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/OperationMetadata.php @@ -0,0 +1,223 @@ +google.cloud.workflows.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3; + */ + protected $target = ''; + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + */ + protected $verb = ''; + /** + * API version used to start the operation. + * + * Generated from protobuf field string api_version = 5; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * The time the operation finished running. + * @type string $target + * Server-defined resource path for the target of the operation. + * @type string $verb + * Name of the verb executed by the operation. + * @type string $api_version + * API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\V1\Workflows::initOnce(); + parent::__construct($data); + } + + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * API version used to start the operation. + * + * Generated from protobuf field string api_version = 5; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * API version used to start the operation. + * + * Generated from protobuf field string api_version = 5; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/UpdateWorkflowRequest.php b/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/UpdateWorkflowRequest.php new file mode 100644 index 000000000000..6a77b5a19df4 --- /dev/null +++ b/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/UpdateWorkflowRequest.php @@ -0,0 +1,143 @@ +google.cloud.workflows.v1.UpdateWorkflowRequest + */ +class UpdateWorkflowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Workflow to be updated. + * + * Generated from protobuf field .google.cloud.workflows.v1.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $workflow = null; + /** + * List of fields to be updated. If not present, the entire workflow + * will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Workflows\V1\Workflow $workflow Required. Workflow to be updated. + * @param \Google\Protobuf\FieldMask $updateMask List of fields to be updated. If not present, the entire workflow + * will be updated. + * + * @return \Google\Cloud\Workflows\V1\UpdateWorkflowRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Workflows\V1\Workflow $workflow, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setWorkflow($workflow) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Workflows\V1\Workflow $workflow + * Required. Workflow to be updated. + * @type \Google\Protobuf\FieldMask $update_mask + * List of fields to be updated. If not present, the entire workflow + * will be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\V1\Workflows::initOnce(); + parent::__construct($data); + } + + /** + * Required. Workflow to be updated. + * + * Generated from protobuf field .google.cloud.workflows.v1.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Workflows\V1\Workflow|null + */ + public function getWorkflow() + { + return $this->workflow; + } + + public function hasWorkflow() + { + return isset($this->workflow); + } + + public function clearWorkflow() + { + unset($this->workflow); + } + + /** + * Required. Workflow to be updated. + * + * Generated from protobuf field .google.cloud.workflows.v1.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Workflows\V1\Workflow $var + * @return $this + */ + public function setWorkflow($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Workflows\V1\Workflow::class); + $this->workflow = $var; + + return $this; + } + + /** + * List of fields to be updated. If not present, the entire workflow + * will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * List of fields to be updated. If not present, the entire workflow + * will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/Workflow.php b/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/Workflow.php new file mode 100644 index 000000000000..3e25d060823f --- /dev/null +++ b/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/Workflow.php @@ -0,0 +1,503 @@ +google.cloud.workflows.v1.Workflow + */ +class Workflow extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the workflow. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Description of the workflow provided by the user. + * Must be at most 1000 unicode characters long. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Output only. State of the workflow deployment. + * + * Generated from protobuf field .google.cloud.workflows.v1.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The revision of the workflow. + * A new revision of a workflow is created as a result of updating the + * following properties of a workflow: + * - [Service account][google.cloud.workflows.v1.Workflow.service_account] + * - [Workflow code to be executed][google.cloud.workflows.v1.Workflow.source_contents] + * The format is "000001-a4d", where the first 6 characters define + * the zero-padded revision ordinal number. They are followed by a hyphen and + * 3 hexadecimal random characters. + * + * Generated from protobuf field string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $revision_id = ''; + /** + * Output only. The timestamp of when the workflow was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last update timestamp of the workflow. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The timestamp that the latest revision of the workflow + * was created. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $revision_create_time = null; + /** + * Labels associated with this workflow. + * Labels can contain at most 64 entries. Keys and values can be no longer + * than 63 characters and can only contain lowercase letters, numeric + * characters, underscores and dashes. Label keys must start with a letter. + * International characters are allowed. + * + * Generated from protobuf field map labels = 8; + */ + private $labels; + /** + * The service account associated with the latest workflow version. + * This service account represents the identity of the workflow and determines + * what permissions the workflow has. + * Format: projects/{project}/serviceAccounts/{account} or {account} + * Using `-` as a wildcard for the `{project}` or not providing one at all + * will infer the project from the account. The `{account}` value can be the + * `email` address or the `unique_id` of the service account. + * If not provided, workflow will use the project's default service account. + * Modifying this field for an existing workflow results in a new workflow + * revision. + * + * Generated from protobuf field string service_account = 9; + */ + protected $service_account = ''; + protected $source_code; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the workflow. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * @type string $description + * Description of the workflow provided by the user. + * Must be at most 1000 unicode characters long. + * @type int $state + * Output only. State of the workflow deployment. + * @type string $revision_id + * Output only. The revision of the workflow. + * A new revision of a workflow is created as a result of updating the + * following properties of a workflow: + * - [Service account][google.cloud.workflows.v1.Workflow.service_account] + * - [Workflow code to be executed][google.cloud.workflows.v1.Workflow.source_contents] + * The format is "000001-a4d", where the first 6 characters define + * the zero-padded revision ordinal number. They are followed by a hyphen and + * 3 hexadecimal random characters. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp of when the workflow was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last update timestamp of the workflow. + * @type \Google\Protobuf\Timestamp $revision_create_time + * Output only. The timestamp that the latest revision of the workflow + * was created. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels associated with this workflow. + * Labels can contain at most 64 entries. Keys and values can be no longer + * than 63 characters and can only contain lowercase letters, numeric + * characters, underscores and dashes. Label keys must start with a letter. + * International characters are allowed. + * @type string $service_account + * The service account associated with the latest workflow version. + * This service account represents the identity of the workflow and determines + * what permissions the workflow has. + * Format: projects/{project}/serviceAccounts/{account} or {account} + * Using `-` as a wildcard for the `{project}` or not providing one at all + * will infer the project from the account. The `{account}` value can be the + * `email` address or the `unique_id` of the service account. + * If not provided, workflow will use the project's default service account. + * Modifying this field for an existing workflow results in a new workflow + * revision. + * @type string $source_contents + * Workflow code to be executed. The size limit is 128KB. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\V1\Workflows::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the workflow. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the workflow. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Description of the workflow provided by the user. + * Must be at most 1000 unicode characters long. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Description of the workflow provided by the user. + * Must be at most 1000 unicode characters long. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. State of the workflow deployment. + * + * Generated from protobuf field .google.cloud.workflows.v1.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the workflow deployment. + * + * Generated from protobuf field .google.cloud.workflows.v1.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Workflows\V1\Workflow\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The revision of the workflow. + * A new revision of a workflow is created as a result of updating the + * following properties of a workflow: + * - [Service account][google.cloud.workflows.v1.Workflow.service_account] + * - [Workflow code to be executed][google.cloud.workflows.v1.Workflow.source_contents] + * The format is "000001-a4d", where the first 6 characters define + * the zero-padded revision ordinal number. They are followed by a hyphen and + * 3 hexadecimal random characters. + * + * Generated from protobuf field string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRevisionId() + { + return $this->revision_id; + } + + /** + * Output only. The revision of the workflow. + * A new revision of a workflow is created as a result of updating the + * following properties of a workflow: + * - [Service account][google.cloud.workflows.v1.Workflow.service_account] + * - [Workflow code to be executed][google.cloud.workflows.v1.Workflow.source_contents] + * The format is "000001-a4d", where the first 6 characters define + * the zero-padded revision ordinal number. They are followed by a hyphen and + * 3 hexadecimal random characters. + * + * Generated from protobuf field string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRevisionId($var) + { + GPBUtil::checkString($var, True); + $this->revision_id = $var; + + return $this; + } + + /** + * Output only. The timestamp of when the workflow was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp of when the workflow was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The last update timestamp of the workflow. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last update timestamp of the workflow. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The timestamp that the latest revision of the workflow + * was created. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRevisionCreateTime() + { + return $this->revision_create_time; + } + + public function hasRevisionCreateTime() + { + return isset($this->revision_create_time); + } + + public function clearRevisionCreateTime() + { + unset($this->revision_create_time); + } + + /** + * Output only. The timestamp that the latest revision of the workflow + * was created. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRevisionCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->revision_create_time = $var; + + return $this; + } + + /** + * Labels associated with this workflow. + * Labels can contain at most 64 entries. Keys and values can be no longer + * than 63 characters and can only contain lowercase letters, numeric + * characters, underscores and dashes. Label keys must start with a letter. + * International characters are allowed. + * + * Generated from protobuf field map labels = 8; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels associated with this workflow. + * Labels can contain at most 64 entries. Keys and values can be no longer + * than 63 characters and can only contain lowercase letters, numeric + * characters, underscores and dashes. Label keys must start with a letter. + * International characters are allowed. + * + * Generated from protobuf field map labels = 8; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * The service account associated with the latest workflow version. + * This service account represents the identity of the workflow and determines + * what permissions the workflow has. + * Format: projects/{project}/serviceAccounts/{account} or {account} + * Using `-` as a wildcard for the `{project}` or not providing one at all + * will infer the project from the account. The `{account}` value can be the + * `email` address or the `unique_id` of the service account. + * If not provided, workflow will use the project's default service account. + * Modifying this field for an existing workflow results in a new workflow + * revision. + * + * Generated from protobuf field string service_account = 9; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * The service account associated with the latest workflow version. + * This service account represents the identity of the workflow and determines + * what permissions the workflow has. + * Format: projects/{project}/serviceAccounts/{account} or {account} + * Using `-` as a wildcard for the `{project}` or not providing one at all + * will infer the project from the account. The `{account}` value can be the + * `email` address or the `unique_id` of the service account. + * If not provided, workflow will use the project's default service account. + * Modifying this field for an existing workflow results in a new workflow + * revision. + * + * Generated from protobuf field string service_account = 9; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * Workflow code to be executed. The size limit is 128KB. + * + * Generated from protobuf field string source_contents = 10; + * @return string + */ + public function getSourceContents() + { + return $this->readOneof(10); + } + + public function hasSourceContents() + { + return $this->hasOneof(10); + } + + /** + * Workflow code to be executed. The size limit is 128KB. + * + * Generated from protobuf field string source_contents = 10; + * @param string $var + * @return $this + */ + public function setSourceContents($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * @return string + */ + public function getSourceCode() + { + return $this->whichOneof("source_code"); + } + +} + diff --git a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/Workflow/State.php b/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/Workflow/State.php new file mode 100644 index 000000000000..c73bde7d3eba --- /dev/null +++ b/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/Workflow/State.php @@ -0,0 +1,58 @@ +google.cloud.workflows.v1.Workflow.State + */ +class State +{ + /** + * Invalid state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The workflow has been deployed successfully and is serving. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Workflows\V1\Workflow_State::class); + diff --git a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/WorkflowsGrpcClient.php b/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/WorkflowsGrpcClient.php new file mode 100644 index 000000000000..17ac25e56dad --- /dev/null +++ b/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/WorkflowsGrpcClient.php @@ -0,0 +1,121 @@ +_simpleRequest('/google.cloud.workflows.v1.Workflows/ListWorkflows', + $argument, + ['\Google\Cloud\Workflows\V1\ListWorkflowsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets details of a single Workflow. + * @param \Google\Cloud\Workflows\V1\GetWorkflowRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetWorkflow(\Google\Cloud\Workflows\V1\GetWorkflowRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.workflows.v1.Workflows/GetWorkflow', + $argument, + ['\Google\Cloud\Workflows\V1\Workflow', 'decode'], + $metadata, $options); + } + + /** + * Creates a new workflow. If a workflow with the specified name already + * exists in the specified project and location, the long running operation + * will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. + * @param \Google\Cloud\Workflows\V1\CreateWorkflowRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateWorkflow(\Google\Cloud\Workflows\V1\CreateWorkflowRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.workflows.v1.Workflows/CreateWorkflow', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes a workflow with the specified name. + * This method also cancels and deletes all running executions of the + * workflow. + * @param \Google\Cloud\Workflows\V1\DeleteWorkflowRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteWorkflow(\Google\Cloud\Workflows\V1\DeleteWorkflowRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.workflows.v1.Workflows/DeleteWorkflow', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates an existing workflow. + * Running this method has no impact on already running executions of the + * workflow. A new revision of the workflow may be created as a result of a + * successful update operation. In that case, such revision will be used + * in new workflow executions. + * @param \Google\Cloud\Workflows\V1\UpdateWorkflowRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateWorkflow(\Google\Cloud\Workflows\V1\UpdateWorkflowRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.workflows.v1.Workflows/UpdateWorkflow', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/create_workflow.php b/owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/create_workflow.php new file mode 100644 index 000000000000..a0b8b09183f0 --- /dev/null +++ b/owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/create_workflow.php @@ -0,0 +1,98 @@ +setParent($formattedParent) + ->setWorkflow($workflow) + ->setWorkflowId($workflowId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $workflowsClient->createWorkflow($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Workflow $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = WorkflowsClient::locationName('[PROJECT]', '[LOCATION]'); + $workflowId = '[WORKFLOW_ID]'; + + create_workflow_sample($formattedParent, $workflowId); +} +// [END workflows_v1_generated_Workflows_CreateWorkflow_sync] diff --git a/owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/delete_workflow.php b/owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/delete_workflow.php new file mode 100644 index 000000000000..c2b7ac200b74 --- /dev/null +++ b/owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/delete_workflow.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $workflowsClient->deleteWorkflow($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WorkflowsClient::workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + + delete_workflow_sample($formattedName); +} +// [END workflows_v1_generated_Workflows_DeleteWorkflow_sync] diff --git a/owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/get_workflow.php b/owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/get_workflow.php new file mode 100644 index 000000000000..5581ac35b162 --- /dev/null +++ b/owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/get_workflow.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Workflow $response */ + $response = $workflowsClient->getWorkflow($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WorkflowsClient::workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + + get_workflow_sample($formattedName); +} +// [END workflows_v1_generated_Workflows_GetWorkflow_sync] diff --git a/owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/list_workflows.php b/owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/list_workflows.php new file mode 100644 index 000000000000..d7b273fec6e5 --- /dev/null +++ b/owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/list_workflows.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $workflowsClient->listWorkflows($request); + + /** @var Workflow $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = WorkflowsClient::locationName('[PROJECT]', '[LOCATION]'); + + list_workflows_sample($formattedParent); +} +// [END workflows_v1_generated_Workflows_ListWorkflows_sync] diff --git a/owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/update_workflow.php b/owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/update_workflow.php new file mode 100644 index 000000000000..58597c6f10b7 --- /dev/null +++ b/owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/update_workflow.php @@ -0,0 +1,75 @@ +setWorkflow($workflow); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $workflowsClient->updateWorkflow($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Workflow $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END workflows_v1_generated_Workflows_UpdateWorkflow_sync] diff --git a/owl-bot-staging/Workflows/v1/src/V1/Client/BaseClient/WorkflowsBaseClient.php b/owl-bot-staging/Workflows/v1/src/V1/Client/BaseClient/WorkflowsBaseClient.php new file mode 100644 index 000000000000..898a0bd8332c --- /dev/null +++ b/owl-bot-staging/Workflows/v1/src/V1/Client/BaseClient/WorkflowsBaseClient.php @@ -0,0 +1,405 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../../resources/workflows_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../../resources/workflows_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../../resources/workflows_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../../resources/workflows_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a workflow + * resource. + * + * @param string $project + * @param string $location + * @param string $workflow + * + * @return string The formatted workflow resource. + */ + public static function workflowName(string $project, string $location, string $workflow): string + { + return self::getPathTemplate('workflow')->render([ + 'project' => $project, + 'location' => $location, + 'workflow' => $workflow, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - workflow: projects/{project}/locations/{location}/workflows/{workflow} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'workflows.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new workflow. If a workflow with the specified name already + * exists in the specified project and location, the long running operation + * will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. + * + * The async variant is {@see self::createWorkflowAsync()} . + * + * @param CreateWorkflowRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createWorkflow(CreateWorkflowRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateWorkflow', $request, $callOptions)->wait(); + } + + /** + * Deletes a workflow with the specified name. + * This method also cancels and deletes all running executions of the + * workflow. + * + * The async variant is {@see self::deleteWorkflowAsync()} . + * + * @param DeleteWorkflowRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteWorkflow(DeleteWorkflowRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteWorkflow', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Workflow. + * + * The async variant is {@see self::getWorkflowAsync()} . + * + * @param GetWorkflowRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Workflow + * + * @throws ApiException Thrown if the API call fails. + */ + public function getWorkflow(GetWorkflowRequest $request, array $callOptions = []): Workflow + { + return $this->startApiCall('GetWorkflow', $request, $callOptions)->wait(); + } + + /** + * Lists Workflows in a given project and location. + * The default order is not specified. + * + * The async variant is {@see self::listWorkflowsAsync()} . + * + * @param ListWorkflowsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listWorkflows(ListWorkflowsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListWorkflows', $request, $callOptions); + } + + /** + * Updates an existing workflow. + * Running this method has no impact on already running executions of the + * workflow. A new revision of the workflow may be created as a result of a + * successful update operation. In that case, such revision will be used + * in new workflow executions. + * + * The async variant is {@see self::updateWorkflowAsync()} . + * + * @param UpdateWorkflowRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateWorkflow(UpdateWorkflowRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateWorkflow', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Workflows/v1/src/V1/Client/WorkflowsClient.php b/owl-bot-staging/Workflows/v1/src/V1/Client/WorkflowsClient.php new file mode 100644 index 000000000000..4c5a9c18fa50 --- /dev/null +++ b/owl-bot-staging/Workflows/v1/src/V1/Client/WorkflowsClient.php @@ -0,0 +1,40 @@ + [ + 'google.cloud.workflows.v1.Workflows' => [ + 'CreateWorkflow' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Workflows\V1\Workflow', + 'metadataReturnType' => '\Google\Cloud\Workflows\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteWorkflow' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Workflows\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateWorkflow' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Workflows\V1\Workflow', + 'metadataReturnType' => '\Google\Cloud\Workflows\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'workflow.name', + 'fieldAccessors' => [ + 'getWorkflow', + 'getName', + ], + ], + ], + ], + 'GetWorkflow' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Workflows\V1\Workflow', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListWorkflows' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getWorkflows', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Workflows\V1\ListWorkflowsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'location' => 'projects/{project}/locations/{location}', + 'workflow' => 'projects/{project}/locations/{location}/workflows/{workflow}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Workflows/v1/src/V1/resources/workflows_rest_client_config.php b/owl-bot-staging/Workflows/v1/src/V1/resources/workflows_rest_client_config.php new file mode 100644 index 000000000000..0ce03d0f8a98 --- /dev/null +++ b/owl-bot-staging/Workflows/v1/src/V1/resources/workflows_rest_client_config.php @@ -0,0 +1,129 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.workflows.v1.Workflows' => [ + 'CreateWorkflow' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/workflows', + 'body' => 'workflow', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'workflow_id', + ], + ], + 'DeleteWorkflow' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/workflows/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetWorkflow' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/workflows/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListWorkflows' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/workflows', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateWorkflow' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{workflow.name=projects/*/locations/*/workflows/*}', + 'body' => 'workflow', + 'placeholders' => [ + 'workflow.name' => [ + 'getters' => [ + 'getWorkflow', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Workflows/v1/tests/Unit/V1/Client/WorkflowsClientTest.php b/owl-bot-staging/Workflows/v1/tests/Unit/V1/Client/WorkflowsClientTest.php new file mode 100644 index 000000000000..50e00357dd57 --- /dev/null +++ b/owl-bot-staging/Workflows/v1/tests/Unit/V1/Client/WorkflowsClientTest.php @@ -0,0 +1,693 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return WorkflowsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new WorkflowsClient($options); + } + + /** @test */ + public function createWorkflowTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createWorkflowTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $revisionId = 'revisionId513861631'; + $serviceAccount = 'serviceAccount-1948028253'; + $sourceContents = 'sourceContents-1799875906'; + $expectedResponse = new Workflow(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setSourceContents($sourceContents); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createWorkflowTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $workflow = new Workflow(); + $workflowId = 'workflowId1712917915'; + $request = (new CreateWorkflowRequest()) + ->setParent($formattedParent) + ->setWorkflow($workflow) + ->setWorkflowId($workflowId); + $response = $gapicClient->createWorkflow($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.workflows.v1.Workflows/CreateWorkflow', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getWorkflow(); + $this->assertProtobufEquals($workflow, $actualValue); + $actualValue = $actualApiRequestObject->getWorkflowId(); + $this->assertProtobufEquals($workflowId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createWorkflowTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createWorkflowExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createWorkflowTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $workflow = new Workflow(); + $workflowId = 'workflowId1712917915'; + $request = (new CreateWorkflowRequest()) + ->setParent($formattedParent) + ->setWorkflow($workflow) + ->setWorkflowId($workflowId); + $response = $gapicClient->createWorkflow($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createWorkflowTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteWorkflowTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteWorkflowTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteWorkflowTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + $request = (new DeleteWorkflowRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteWorkflow($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.workflows.v1.Workflows/DeleteWorkflow', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteWorkflowTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteWorkflowExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteWorkflowTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + $request = (new DeleteWorkflowRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteWorkflow($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteWorkflowTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getWorkflowTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $revisionId = 'revisionId513861631'; + $serviceAccount = 'serviceAccount-1948028253'; + $sourceContents = 'sourceContents-1799875906'; + $expectedResponse = new Workflow(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setSourceContents($sourceContents); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + $request = (new GetWorkflowRequest()) + ->setName($formattedName); + $response = $gapicClient->getWorkflow($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.workflows.v1.Workflows/GetWorkflow', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getWorkflowExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + $request = (new GetWorkflowRequest()) + ->setName($formattedName); + try { + $gapicClient->getWorkflow($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listWorkflowsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $workflowsElement = new Workflow(); + $workflows = [ + $workflowsElement, + ]; + $expectedResponse = new ListWorkflowsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setWorkflows($workflows); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListWorkflowsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listWorkflows($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getWorkflows()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.workflows.v1.Workflows/ListWorkflows', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listWorkflowsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListWorkflowsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listWorkflows($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateWorkflowTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateWorkflowTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $revisionId = 'revisionId513861631'; + $serviceAccount = 'serviceAccount-1948028253'; + $sourceContents = 'sourceContents-1799875906'; + $expectedResponse = new Workflow(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setSourceContents($sourceContents); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateWorkflowTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $workflow = new Workflow(); + $request = (new UpdateWorkflowRequest()) + ->setWorkflow($workflow); + $response = $gapicClient->updateWorkflow($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.workflows.v1.Workflows/UpdateWorkflow', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getWorkflow(); + $this->assertProtobufEquals($workflow, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateWorkflowTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateWorkflowExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateWorkflowTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $workflow = new Workflow(); + $request = (new UpdateWorkflowRequest()) + ->setWorkflow($workflow); + $response = $gapicClient->updateWorkflow($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateWorkflowTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createWorkflowAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createWorkflowTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $revisionId = 'revisionId513861631'; + $serviceAccount = 'serviceAccount-1948028253'; + $sourceContents = 'sourceContents-1799875906'; + $expectedResponse = new Workflow(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setSourceContents($sourceContents); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createWorkflowTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $workflow = new Workflow(); + $workflowId = 'workflowId1712917915'; + $request = (new CreateWorkflowRequest()) + ->setParent($formattedParent) + ->setWorkflow($workflow) + ->setWorkflowId($workflowId); + $response = $gapicClient->createWorkflowAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.workflows.v1.Workflows/CreateWorkflow', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getWorkflow(); + $this->assertProtobufEquals($workflow, $actualValue); + $actualValue = $actualApiRequestObject->getWorkflowId(); + $this->assertProtobufEquals($workflowId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createWorkflowTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/Workflows/v1beta/proto/src/GPBMetadata/Google/Cloud/Workflows/V1Beta/Workflows.php b/owl-bot-staging/Workflows/v1beta/proto/src/GPBMetadata/Google/Cloud/Workflows/V1Beta/Workflows.php new file mode 100644 index 0000000000000000000000000000000000000000..a0693520bcad216d4bd8e88bb0fc3172df9a901b GIT binary patch literal 4084 zcmbtXL37(g6t0sd#A_PbrJ1^6Iw)>unr0Gdl6D4An-)27LS~Z2)28hV;~9@EuN@It z64J^cWPAWF+_`b*M1KQ6phw`;Qx9B#Ur-JVZ?)RB?6}y5Tq0}VdwTDC@B4Q5-UI*8 zN7t2Y;*!9mq^{IX6naP$Kk%q$d5%(x8VwRCme=xahXkskZ0;)$_YaiP=FY(axQ1R7 zSVUKvp4W7UW;tF|*N(m5sNs0Wq1Ill5o&f{sBvV3T(d<&-?WIbT`ul{N!_GoWjhX1 z*Q)72ta+(pQ8%rI2s0y;$s{P|JMu`MN}CWU`D?67LPHnmO1{t_x$R~n`h z67W82+lX9?+McU0hke%~i?IG#m z)%7N!5=!=F@mBI#7S3)ci#$hNKa=FTLW78;zpf|&p;6%8jq_#!I`XM905rq5D~9WO z3h6%IW*h07mVlnh$Le(a+15A+YBPtwcTcA-)F-* zUXikQan^fgcr<#(()YlIp`~WaAM6{?%gTK_nGT~~m&33H4Imza)B+*RY1|G78a<K!a^+YRm+31c4?SLY~ho0^D8Kq4v|BX zN8}{w*abAzHl2v@Ug;AbW(rGaDuy1v2n2T zv~)3}*Z(j~w9uVz-dY&zP=$?16TQUupc9`Fi-y{1^3>5B&*Ivkor=d!cl*&!Mbu95 z0?NtS>ZI^}23_8@Ln@+&kI3f{&>eq-rhPMj+IexsTd$0Xzl`f>LBtOe$Yp}NNe=iD z%KB!LR72Q_Vl1XG6dJ#x-Vt%*;mzV%G~KWr*i-ln;)`g;3+g1O)=uKt%ND-Mpt-)} zLLXF~U>#*eNg*W2Mxb(Y#2H|HcgYvDn#zc?3n&-4zyRyetT~KhlZ)BH9>Uv1;v?Ys zAkEb-I5Meza0I@E=TOr|%rfyxg!~_f-$ygz%Q4_%putEy!9+m>V4}d(B^HH=LK)3% z5{FRIpYDG~;9Ef8Nvs(CA=70r5gfY=4I0R`h>36l#aRWDyJ6vn47wyYR&gN15GJij zJe9Lyq!8j|G(+4vmrXWG|0=zg07wS)#Rgg~h(ykQc}nXvYH24w|W zA^s_YF7)sM57WOM>tx{O?+hVKpA)BEq4@PLzkN4x8?TB}?kU%abty|rDLGn7$<1-1fUG@#>rbKh8^U{bnWc+&u&GvE@55un4TqJ!> z)R{V0sB->5@8VR~3*%#}O96OkyvG}|EEp{xfZ8vNYpD~*fZ6{QYV9Tb&{})VN36BQ zyRy_Rb+Fi}n6%*qtzsK3zyU;z z?%)$varT+GxR%+4v7Gtz0k;$google.cloud.workflows.v1beta.CreateWorkflowRequest + */ +class CreateWorkflowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Project and location in which the workflow should be created. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Workflow to be created. + * + * Generated from protobuf field .google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $workflow = null; + /** + * Required. The ID of the workflow to be created. It has to fulfill the + * following requirements: + * * Must contain only letters, numbers, underscores and hyphens. + * * Must start with a letter. + * * Must be between 1-64 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project and location. + * + * Generated from protobuf field string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $workflow_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Project and location in which the workflow should be created. + * Format: projects/{project}/locations/{location} + * @type \Google\Cloud\Workflows\V1beta\Workflow $workflow + * Required. Workflow to be created. + * @type string $workflow_id + * Required. The ID of the workflow to be created. It has to fulfill the + * following requirements: + * * Must contain only letters, numbers, underscores and hyphens. + * * Must start with a letter. + * * Must be between 1-64 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project and location. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\V1Beta\Workflows::initOnce(); + parent::__construct($data); + } + + /** + * Required. Project and location in which the workflow should be created. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Project and location in which the workflow should be created. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Workflow to be created. + * + * Generated from protobuf field .google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Workflows\V1beta\Workflow|null + */ + public function getWorkflow() + { + return $this->workflow; + } + + public function hasWorkflow() + { + return isset($this->workflow); + } + + public function clearWorkflow() + { + unset($this->workflow); + } + + /** + * Required. Workflow to be created. + * + * Generated from protobuf field .google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Workflows\V1beta\Workflow $var + * @return $this + */ + public function setWorkflow($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Workflows\V1beta\Workflow::class); + $this->workflow = $var; + + return $this; + } + + /** + * Required. The ID of the workflow to be created. It has to fulfill the + * following requirements: + * * Must contain only letters, numbers, underscores and hyphens. + * * Must start with a letter. + * * Must be between 1-64 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project and location. + * + * Generated from protobuf field string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getWorkflowId() + { + return $this->workflow_id; + } + + /** + * Required. The ID of the workflow to be created. It has to fulfill the + * following requirements: + * * Must contain only letters, numbers, underscores and hyphens. + * * Must start with a letter. + * * Must be between 1-64 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project and location. + * + * Generated from protobuf field string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setWorkflowId($var) + { + GPBUtil::checkString($var, True); + $this->workflow_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/DeleteWorkflowRequest.php b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/DeleteWorkflowRequest.php new file mode 100644 index 000000000000..8eed6f4b51e7 --- /dev/null +++ b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/DeleteWorkflowRequest.php @@ -0,0 +1,73 @@ +google.cloud.workflows.v1beta.DeleteWorkflowRequest + */ +class DeleteWorkflowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the workflow to be deleted. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the workflow to be deleted. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\V1Beta\Workflows::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the workflow to be deleted. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the workflow to be deleted. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/GetWorkflowRequest.php b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/GetWorkflowRequest.php new file mode 100644 index 000000000000..aa97008d3024 --- /dev/null +++ b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/GetWorkflowRequest.php @@ -0,0 +1,72 @@ +google.cloud.workflows.v1beta.GetWorkflowRequest + */ +class GetWorkflowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the workflow which information should be retrieved. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the workflow which information should be retrieved. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\V1Beta\Workflows::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the workflow which information should be retrieved. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the workflow which information should be retrieved. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/ListWorkflowsRequest.php b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/ListWorkflowsRequest.php new file mode 100644 index 000000000000..a7864f89afd7 --- /dev/null +++ b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/ListWorkflowsRequest.php @@ -0,0 +1,245 @@ +google.cloud.workflows.v1beta.ListWorkflowsRequest + */ +class ListWorkflowsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Project and location from which the workflows should be listed. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of workflows to return per call. The service may return + * fewer than this value. If the value is not specified, a default value of + * 500 will be used. The maximum permitted value is 1000 and values greater + * than 1000 will be coerced down to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListWorkflows` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListWorkflows` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filter to restrict results to specific workflows. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Comma-separated list of fields that that specify the order of the results. + * Default sorting order for a field is ascending. To specify descending order + * for a field, append a " desc" suffix. + * If not specified, the results will be returned in an unspecified order. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Project and location from which the workflows should be listed. + * Format: projects/{project}/locations/{location} + * @type int $page_size + * Maximum number of workflows to return per call. The service may return + * fewer than this value. If the value is not specified, a default value of + * 500 will be used. The maximum permitted value is 1000 and values greater + * than 1000 will be coerced down to 1000. + * @type string $page_token + * A page token, received from a previous `ListWorkflows` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListWorkflows` must + * match the call that provided the page token. + * @type string $filter + * Filter to restrict results to specific workflows. + * @type string $order_by + * Comma-separated list of fields that that specify the order of the results. + * Default sorting order for a field is ascending. To specify descending order + * for a field, append a " desc" suffix. + * If not specified, the results will be returned in an unspecified order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\V1Beta\Workflows::initOnce(); + parent::__construct($data); + } + + /** + * Required. Project and location from which the workflows should be listed. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Project and location from which the workflows should be listed. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of workflows to return per call. The service may return + * fewer than this value. If the value is not specified, a default value of + * 500 will be used. The maximum permitted value is 1000 and values greater + * than 1000 will be coerced down to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of workflows to return per call. The service may return + * fewer than this value. If the value is not specified, a default value of + * 500 will be used. The maximum permitted value is 1000 and values greater + * than 1000 will be coerced down to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListWorkflows` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListWorkflows` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListWorkflows` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListWorkflows` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filter to restrict results to specific workflows. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter to restrict results to specific workflows. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Comma-separated list of fields that that specify the order of the results. + * Default sorting order for a field is ascending. To specify descending order + * for a field, append a " desc" suffix. + * If not specified, the results will be returned in an unspecified order. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Comma-separated list of fields that that specify the order of the results. + * Default sorting order for a field is ascending. To specify descending order + * for a field, append a " desc" suffix. + * If not specified, the results will be returned in an unspecified order. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/ListWorkflowsResponse.php b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/ListWorkflowsResponse.php new file mode 100644 index 000000000000..50f2cadd0328 --- /dev/null +++ b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/ListWorkflowsResponse.php @@ -0,0 +1,141 @@ +google.cloud.workflows.v1beta.ListWorkflowsResponse + */ +class ListWorkflowsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The workflows which match the request. + * + * Generated from protobuf field repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; + */ + private $workflows; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Unreachable resources. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Workflows\V1beta\Workflow>|\Google\Protobuf\Internal\RepeatedField $workflows + * The workflows which match the request. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Unreachable resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\V1Beta\Workflows::initOnce(); + parent::__construct($data); + } + + /** + * The workflows which match the request. + * + * Generated from protobuf field repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWorkflows() + { + return $this->workflows; + } + + /** + * The workflows which match the request. + * + * Generated from protobuf field repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; + * @param array<\Google\Cloud\Workflows\V1beta\Workflow>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWorkflows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Workflows\V1beta\Workflow::class); + $this->workflows = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Unreachable resources. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Unreachable resources. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/OperationMetadata.php b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/OperationMetadata.php new file mode 100644 index 000000000000..b4e7df568749 --- /dev/null +++ b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/OperationMetadata.php @@ -0,0 +1,223 @@ +google.cloud.workflows.v1beta.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3; + */ + protected $target = ''; + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + */ + protected $verb = ''; + /** + * API version used to start the operation. + * + * Generated from protobuf field string api_version = 5; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * The time the operation finished running. + * @type string $target + * Server-defined resource path for the target of the operation. + * @type string $verb + * Name of the verb executed by the operation. + * @type string $api_version + * API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\V1Beta\Workflows::initOnce(); + parent::__construct($data); + } + + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * API version used to start the operation. + * + * Generated from protobuf field string api_version = 5; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * API version used to start the operation. + * + * Generated from protobuf field string api_version = 5; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/UpdateWorkflowRequest.php b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/UpdateWorkflowRequest.php new file mode 100644 index 000000000000..eedfd1e55dd6 --- /dev/null +++ b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/UpdateWorkflowRequest.php @@ -0,0 +1,127 @@ +google.cloud.workflows.v1beta.UpdateWorkflowRequest + */ +class UpdateWorkflowRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Workflow to be updated. + * + * Generated from protobuf field .google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $workflow = null; + /** + * List of fields to be updated. If not present, the entire workflow + * will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Workflows\V1beta\Workflow $workflow + * Required. Workflow to be updated. + * @type \Google\Protobuf\FieldMask $update_mask + * List of fields to be updated. If not present, the entire workflow + * will be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\V1Beta\Workflows::initOnce(); + parent::__construct($data); + } + + /** + * Required. Workflow to be updated. + * + * Generated from protobuf field .google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Workflows\V1beta\Workflow|null + */ + public function getWorkflow() + { + return $this->workflow; + } + + public function hasWorkflow() + { + return isset($this->workflow); + } + + public function clearWorkflow() + { + unset($this->workflow); + } + + /** + * Required. Workflow to be updated. + * + * Generated from protobuf field .google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Workflows\V1beta\Workflow $var + * @return $this + */ + public function setWorkflow($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Workflows\V1beta\Workflow::class); + $this->workflow = $var; + + return $this; + } + + /** + * List of fields to be updated. If not present, the entire workflow + * will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * List of fields to be updated. If not present, the entire workflow + * will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/Workflow.php b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/Workflow.php new file mode 100644 index 000000000000..b4dcfbd75c43 --- /dev/null +++ b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/Workflow.php @@ -0,0 +1,503 @@ +google.cloud.workflows.v1beta.Workflow + */ +class Workflow extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the workflow. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Description of the workflow provided by the user. + * Must be at most 1000 unicode characters long. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Output only. State of the workflow deployment. + * + * Generated from protobuf field .google.cloud.workflows.v1beta.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The revision of the workflow. + * A new revision of a workflow is created as a result of updating the + * following fields of a workflow: + * - `source_code` + * - `service_account` + * The format is "000001-a4d", where the first 6 characters define + * the zero-padded revision ordinal number. They are followed by a hyphen and + * 3 hexadecimal random characters. + * + * Generated from protobuf field string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $revision_id = ''; + /** + * Output only. The timestamp of when the workflow was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last update timestamp of the workflow. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The timestamp that the latest revision of the workflow + * was created. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $revision_create_time = null; + /** + * Labels associated with this workflow. + * Labels can contain at most 64 entries. Keys and values can be no longer + * than 63 characters and can only contain lowercase letters, numeric + * characters, underscores and dashes. Label keys must start with a letter. + * International characters are allowed. + * + * Generated from protobuf field map labels = 8; + */ + private $labels; + /** + * Name of the service account associated with the latest workflow version. + * This service account represents the identity of the workflow and determines + * what permissions the workflow has. + * Format: projects/{project}/serviceAccounts/{account} + * Using `-` as a wildcard for the `{project}` will infer the project from + * the account. The `{account}` value can be the `email` address or the + * `unique_id` of the service account. + * If not provided, workflow will use the project's default service account. + * Modifying this field for an existing workflow results in a new workflow + * revision. + * + * Generated from protobuf field string service_account = 9; + */ + protected $service_account = ''; + protected $source_code; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the workflow. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * @type string $description + * Description of the workflow provided by the user. + * Must be at most 1000 unicode characters long. + * @type int $state + * Output only. State of the workflow deployment. + * @type string $revision_id + * Output only. The revision of the workflow. + * A new revision of a workflow is created as a result of updating the + * following fields of a workflow: + * - `source_code` + * - `service_account` + * The format is "000001-a4d", where the first 6 characters define + * the zero-padded revision ordinal number. They are followed by a hyphen and + * 3 hexadecimal random characters. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp of when the workflow was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last update timestamp of the workflow. + * @type \Google\Protobuf\Timestamp $revision_create_time + * Output only. The timestamp that the latest revision of the workflow + * was created. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels associated with this workflow. + * Labels can contain at most 64 entries. Keys and values can be no longer + * than 63 characters and can only contain lowercase letters, numeric + * characters, underscores and dashes. Label keys must start with a letter. + * International characters are allowed. + * @type string $service_account + * Name of the service account associated with the latest workflow version. + * This service account represents the identity of the workflow and determines + * what permissions the workflow has. + * Format: projects/{project}/serviceAccounts/{account} + * Using `-` as a wildcard for the `{project}` will infer the project from + * the account. The `{account}` value can be the `email` address or the + * `unique_id` of the service account. + * If not provided, workflow will use the project's default service account. + * Modifying this field for an existing workflow results in a new workflow + * revision. + * @type string $source_contents + * Workflow code to be executed. The size limit is 32KB. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Workflows\V1Beta\Workflows::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the workflow. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the workflow. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Description of the workflow provided by the user. + * Must be at most 1000 unicode characters long. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Description of the workflow provided by the user. + * Must be at most 1000 unicode characters long. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. State of the workflow deployment. + * + * Generated from protobuf field .google.cloud.workflows.v1beta.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the workflow deployment. + * + * Generated from protobuf field .google.cloud.workflows.v1beta.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Workflows\V1beta\Workflow\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The revision of the workflow. + * A new revision of a workflow is created as a result of updating the + * following fields of a workflow: + * - `source_code` + * - `service_account` + * The format is "000001-a4d", where the first 6 characters define + * the zero-padded revision ordinal number. They are followed by a hyphen and + * 3 hexadecimal random characters. + * + * Generated from protobuf field string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRevisionId() + { + return $this->revision_id; + } + + /** + * Output only. The revision of the workflow. + * A new revision of a workflow is created as a result of updating the + * following fields of a workflow: + * - `source_code` + * - `service_account` + * The format is "000001-a4d", where the first 6 characters define + * the zero-padded revision ordinal number. They are followed by a hyphen and + * 3 hexadecimal random characters. + * + * Generated from protobuf field string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRevisionId($var) + { + GPBUtil::checkString($var, True); + $this->revision_id = $var; + + return $this; + } + + /** + * Output only. The timestamp of when the workflow was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp of when the workflow was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The last update timestamp of the workflow. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last update timestamp of the workflow. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The timestamp that the latest revision of the workflow + * was created. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRevisionCreateTime() + { + return $this->revision_create_time; + } + + public function hasRevisionCreateTime() + { + return isset($this->revision_create_time); + } + + public function clearRevisionCreateTime() + { + unset($this->revision_create_time); + } + + /** + * Output only. The timestamp that the latest revision of the workflow + * was created. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRevisionCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->revision_create_time = $var; + + return $this; + } + + /** + * Labels associated with this workflow. + * Labels can contain at most 64 entries. Keys and values can be no longer + * than 63 characters and can only contain lowercase letters, numeric + * characters, underscores and dashes. Label keys must start with a letter. + * International characters are allowed. + * + * Generated from protobuf field map labels = 8; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels associated with this workflow. + * Labels can contain at most 64 entries. Keys and values can be no longer + * than 63 characters and can only contain lowercase letters, numeric + * characters, underscores and dashes. Label keys must start with a letter. + * International characters are allowed. + * + * Generated from protobuf field map labels = 8; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Name of the service account associated with the latest workflow version. + * This service account represents the identity of the workflow and determines + * what permissions the workflow has. + * Format: projects/{project}/serviceAccounts/{account} + * Using `-` as a wildcard for the `{project}` will infer the project from + * the account. The `{account}` value can be the `email` address or the + * `unique_id` of the service account. + * If not provided, workflow will use the project's default service account. + * Modifying this field for an existing workflow results in a new workflow + * revision. + * + * Generated from protobuf field string service_account = 9; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Name of the service account associated with the latest workflow version. + * This service account represents the identity of the workflow and determines + * what permissions the workflow has. + * Format: projects/{project}/serviceAccounts/{account} + * Using `-` as a wildcard for the `{project}` will infer the project from + * the account. The `{account}` value can be the `email` address or the + * `unique_id` of the service account. + * If not provided, workflow will use the project's default service account. + * Modifying this field for an existing workflow results in a new workflow + * revision. + * + * Generated from protobuf field string service_account = 9; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * Workflow code to be executed. The size limit is 32KB. + * + * Generated from protobuf field string source_contents = 10; + * @return string + */ + public function getSourceContents() + { + return $this->readOneof(10); + } + + public function hasSourceContents() + { + return $this->hasOneof(10); + } + + /** + * Workflow code to be executed. The size limit is 32KB. + * + * Generated from protobuf field string source_contents = 10; + * @param string $var + * @return $this + */ + public function setSourceContents($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * @return string + */ + public function getSourceCode() + { + return $this->whichOneof("source_code"); + } + +} + diff --git a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/Workflow/State.php b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/Workflow/State.php new file mode 100644 index 000000000000..ded042b45d2c --- /dev/null +++ b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/Workflow/State.php @@ -0,0 +1,58 @@ +google.cloud.workflows.v1beta.Workflow.State + */ +class State +{ + /** + * Invalid state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The workflow has been deployed successfully and is serving. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Workflows\V1beta\Workflow_State::class); + diff --git a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/WorkflowsGrpcClient.php b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/WorkflowsGrpcClient.php new file mode 100644 index 000000000000..ff22ee4e2b84 --- /dev/null +++ b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/WorkflowsGrpcClient.php @@ -0,0 +1,121 @@ +_simpleRequest('/google.cloud.workflows.v1beta.Workflows/ListWorkflows', + $argument, + ['\Google\Cloud\Workflows\V1beta\ListWorkflowsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets details of a single Workflow. + * @param \Google\Cloud\Workflows\V1beta\GetWorkflowRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetWorkflow(\Google\Cloud\Workflows\V1beta\GetWorkflowRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.workflows.v1beta.Workflows/GetWorkflow', + $argument, + ['\Google\Cloud\Workflows\V1beta\Workflow', 'decode'], + $metadata, $options); + } + + /** + * Creates a new workflow. If a workflow with the specified name already + * exists in the specified project and location, the long running operation + * will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. + * @param \Google\Cloud\Workflows\V1beta\CreateWorkflowRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateWorkflow(\Google\Cloud\Workflows\V1beta\CreateWorkflowRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.workflows.v1beta.Workflows/CreateWorkflow', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes a workflow with the specified name. + * This method also cancels and deletes all running executions of the + * workflow. + * @param \Google\Cloud\Workflows\V1beta\DeleteWorkflowRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteWorkflow(\Google\Cloud\Workflows\V1beta\DeleteWorkflowRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.workflows.v1beta.Workflows/DeleteWorkflow', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates an existing workflow. + * Running this method has no impact on already running executions of the + * workflow. A new revision of the workflow may be created as a result of a + * successful update operation. In that case, such revision will be used + * in new workflow executions. + * @param \Google\Cloud\Workflows\V1beta\UpdateWorkflowRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateWorkflow(\Google\Cloud\Workflows\V1beta\UpdateWorkflowRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.workflows.v1beta.Workflows/UpdateWorkflow', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/create_workflow.php b/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/create_workflow.php new file mode 100644 index 000000000000..bc06e2f97d09 --- /dev/null +++ b/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/create_workflow.php @@ -0,0 +1,93 @@ +createWorkflow($formattedParent, $workflow, $workflowId); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Workflow $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = WorkflowsClient::locationName('[PROJECT]', '[LOCATION]'); + $workflowId = '[WORKFLOW_ID]'; + + create_workflow_sample($formattedParent, $workflowId); +} +// [END workflows_v1beta_generated_Workflows_CreateWorkflow_sync] diff --git a/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/delete_workflow.php b/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/delete_workflow.php new file mode 100644 index 000000000000..c46edf18f0b8 --- /dev/null +++ b/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/delete_workflow.php @@ -0,0 +1,78 @@ +deleteWorkflow($formattedName); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WorkflowsClient::workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + + delete_workflow_sample($formattedName); +} +// [END workflows_v1beta_generated_Workflows_DeleteWorkflow_sync] diff --git a/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/get_workflow.php b/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/get_workflow.php new file mode 100644 index 000000000000..98d3980788ce --- /dev/null +++ b/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/get_workflow.php @@ -0,0 +1,67 @@ +getWorkflow($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WorkflowsClient::workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + + get_workflow_sample($formattedName); +} +// [END workflows_v1beta_generated_Workflows_GetWorkflow_sync] diff --git a/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/list_workflows.php b/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/list_workflows.php new file mode 100644 index 000000000000..2c50ff843aa7 --- /dev/null +++ b/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/list_workflows.php @@ -0,0 +1,73 @@ +listWorkflows($formattedParent); + + /** @var Workflow $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = WorkflowsClient::locationName('[PROJECT]', '[LOCATION]'); + + list_workflows_sample($formattedParent); +} +// [END workflows_v1beta_generated_Workflows_ListWorkflows_sync] diff --git a/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/update_workflow.php b/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/update_workflow.php new file mode 100644 index 000000000000..82e8d02f4c18 --- /dev/null +++ b/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/update_workflow.php @@ -0,0 +1,72 @@ +updateWorkflow($workflow); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Workflow $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END workflows_v1beta_generated_Workflows_UpdateWorkflow_sync] diff --git a/owl-bot-staging/Workflows/v1beta/src/V1beta/Gapic/WorkflowsGapicClient.php b/owl-bot-staging/Workflows/v1beta/src/V1beta/Gapic/WorkflowsGapicClient.php new file mode 100644 index 000000000000..2914615fb4eb --- /dev/null +++ b/owl-bot-staging/Workflows/v1beta/src/V1beta/Gapic/WorkflowsGapicClient.php @@ -0,0 +1,714 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $workflow = new Workflow(); + * $workflowId = 'workflow_id'; + * $operationResponse = $workflowsClient->createWorkflow($formattedParent, $workflow, $workflowId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $workflowsClient->createWorkflow($formattedParent, $workflow, $workflowId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $workflowsClient->resumeOperation($operationName, 'createWorkflow'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $workflowsClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @experimental + */ +class WorkflowsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.workflows.v1beta.Workflows'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'workflows.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $locationNameTemplate; + + private static $workflowNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/workflows_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/workflows_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/workflows_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/workflows_rest_client_config.php', + ], + ], + ]; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getWorkflowNameTemplate() + { + if (self::$workflowNameTemplate == null) { + self::$workflowNameTemplate = new PathTemplate('projects/{project}/locations/{location}/workflows/{workflow}'); + } + + return self::$workflowNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'location' => self::getLocationNameTemplate(), + 'workflow' => self::getWorkflowNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + * + * @experimental + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a workflow + * resource. + * + * @param string $project + * @param string $location + * @param string $workflow + * + * @return string The formatted workflow resource. + * + * @experimental + */ + public static function workflowName($project, $location, $workflow) + { + return self::getWorkflowNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'workflow' => $workflow, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - workflow: projects/{project}/locations/{location}/workflows/{workflow} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * + * @experimental + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + * + * @experimental + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + * + * @experimental + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'workflows.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a new workflow. If a workflow with the specified name already + * exists in the specified project and location, the long running operation + * will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. + * + * Sample code: + * ``` + * $workflowsClient = new WorkflowsClient(); + * try { + * $formattedParent = $workflowsClient->locationName('[PROJECT]', '[LOCATION]'); + * $workflow = new Workflow(); + * $workflowId = 'workflow_id'; + * $operationResponse = $workflowsClient->createWorkflow($formattedParent, $workflow, $workflowId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $workflowsClient->createWorkflow($formattedParent, $workflow, $workflowId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $workflowsClient->resumeOperation($operationName, 'createWorkflow'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $workflowsClient->close(); + * } + * ``` + * + * @param string $parent Required. Project and location in which the workflow should be created. + * Format: projects/{project}/locations/{location} + * @param Workflow $workflow Required. Workflow to be created. + * @param string $workflowId Required. The ID of the workflow to be created. It has to fulfill the + * following requirements: + * + * * Must contain only letters, numbers, underscores and hyphens. + * * Must start with a letter. + * * Must be between 1-64 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project and location. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function createWorkflow($parent, $workflow, $workflowId, array $optionalArgs = []) + { + $request = new CreateWorkflowRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setWorkflow($workflow); + $request->setWorkflowId($workflowId); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateWorkflow', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a workflow with the specified name. + * This method also cancels and deletes all running executions of the + * workflow. + * + * Sample code: + * ``` + * $workflowsClient = new WorkflowsClient(); + * try { + * $formattedName = $workflowsClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + * $operationResponse = $workflowsClient->deleteWorkflow($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $workflowsClient->deleteWorkflow($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $workflowsClient->resumeOperation($operationName, 'deleteWorkflow'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $workflowsClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the workflow to be deleted. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function deleteWorkflow($name, array $optionalArgs = []) + { + $request = new DeleteWorkflowRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteWorkflow', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets details of a single Workflow. + * + * Sample code: + * ``` + * $workflowsClient = new WorkflowsClient(); + * try { + * $formattedName = $workflowsClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + * $response = $workflowsClient->getWorkflow($formattedName); + * } finally { + * $workflowsClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the workflow which information should be retrieved. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Workflows\V1beta\Workflow + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getWorkflow($name, array $optionalArgs = []) + { + $request = new GetWorkflowRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetWorkflow', Workflow::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists Workflows in a given project and location. + * The default order is not specified. + * + * Sample code: + * ``` + * $workflowsClient = new WorkflowsClient(); + * try { + * $formattedParent = $workflowsClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $workflowsClient->listWorkflows($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $workflowsClient->listWorkflows($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $workflowsClient->close(); + * } + * ``` + * + * @param string $parent Required. Project and location from which the workflows should be listed. + * Format: projects/{project}/locations/{location} + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * Filter to restrict results to specific workflows. + * @type string $orderBy + * Comma-separated list of fields that that specify the order of the results. + * Default sorting order for a field is ascending. To specify descending order + * for a field, append a " desc" suffix. + * If not specified, the results will be returned in an unspecified order. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function listWorkflows($parent, array $optionalArgs = []) + { + $request = new ListWorkflowsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListWorkflows', $optionalArgs, ListWorkflowsResponse::class, $request); + } + + /** + * Updates an existing workflow. + * Running this method has no impact on already running executions of the + * workflow. A new revision of the workflow may be created as a result of a + * successful update operation. In that case, such revision will be used + * in new workflow executions. + * + * Sample code: + * ``` + * $workflowsClient = new WorkflowsClient(); + * try { + * $workflow = new Workflow(); + * $operationResponse = $workflowsClient->updateWorkflow($workflow); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $workflowsClient->updateWorkflow($workflow); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $workflowsClient->resumeOperation($operationName, 'updateWorkflow'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $workflowsClient->close(); + * } + * ``` + * + * @param Workflow $workflow Required. Workflow to be updated. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * List of fields to be updated. If not present, the entire workflow + * will be updated. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function updateWorkflow($workflow, array $optionalArgs = []) + { + $request = new UpdateWorkflowRequest(); + $requestParamHeaders = []; + $request->setWorkflow($workflow); + $requestParamHeaders['workflow.name'] = $workflow->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateWorkflow', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } +} diff --git a/owl-bot-staging/Workflows/v1beta/src/V1beta/WorkflowsClient.php b/owl-bot-staging/Workflows/v1beta/src/V1beta/WorkflowsClient.php new file mode 100644 index 000000000000..866499e8fc40 --- /dev/null +++ b/owl-bot-staging/Workflows/v1beta/src/V1beta/WorkflowsClient.php @@ -0,0 +1,36 @@ + [ + 'google.cloud.workflows.v1beta.Workflows' => [ + 'CreateWorkflow' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Workflows\V1beta\Workflow', + 'metadataReturnType' => '\Google\Cloud\Workflows\V1beta\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteWorkflow' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Workflows\V1beta\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateWorkflow' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Workflows\V1beta\Workflow', + 'metadataReturnType' => '\Google\Cloud\Workflows\V1beta\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListWorkflows' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getWorkflows', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Workflows/v1beta/src/V1beta/resources/workflows_rest_client_config.php b/owl-bot-staging/Workflows/v1beta/src/V1beta/resources/workflows_rest_client_config.php new file mode 100644 index 000000000000..35bd2027c0e3 --- /dev/null +++ b/owl-bot-staging/Workflows/v1beta/src/V1beta/resources/workflows_rest_client_config.php @@ -0,0 +1,129 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.workflows.v1beta.Workflows' => [ + 'CreateWorkflow' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}/workflows', + 'body' => 'workflow', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'workflow_id', + ], + ], + 'DeleteWorkflow' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/workflows/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetWorkflow' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/workflows/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListWorkflows' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}/workflows', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateWorkflow' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1beta/{workflow.name=projects/*/locations/*/workflows/*}', + 'body' => 'workflow', + 'placeholders' => [ + 'workflow.name' => [ + 'getters' => [ + 'getWorkflow', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Workflows/v1beta/tests/Unit/V1beta/WorkflowsClientTest.php b/owl-bot-staging/Workflows/v1beta/tests/Unit/V1beta/WorkflowsClientTest.php new file mode 100644 index 000000000000..2bb06cc9c188 --- /dev/null +++ b/owl-bot-staging/Workflows/v1beta/tests/Unit/V1beta/WorkflowsClientTest.php @@ -0,0 +1,582 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return WorkflowsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new WorkflowsClient($options); + } + + /** @test */ + public function createWorkflowTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createWorkflowTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $revisionId = 'revisionId513861631'; + $serviceAccount = 'serviceAccount-1948028253'; + $sourceContents = 'sourceContents-1799875906'; + $expectedResponse = new Workflow(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setSourceContents($sourceContents); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createWorkflowTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $workflow = new Workflow(); + $workflowId = 'workflowId1712917915'; + $response = $gapicClient->createWorkflow($formattedParent, $workflow, $workflowId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.workflows.v1beta.Workflows/CreateWorkflow', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getWorkflow(); + $this->assertProtobufEquals($workflow, $actualValue); + $actualValue = $actualApiRequestObject->getWorkflowId(); + $this->assertProtobufEquals($workflowId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createWorkflowTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createWorkflowExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createWorkflowTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $workflow = new Workflow(); + $workflowId = 'workflowId1712917915'; + $response = $gapicClient->createWorkflow($formattedParent, $workflow, $workflowId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createWorkflowTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteWorkflowTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteWorkflowTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteWorkflowTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + $response = $gapicClient->deleteWorkflow($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.workflows.v1beta.Workflows/DeleteWorkflow', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteWorkflowTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteWorkflowExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteWorkflowTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + $response = $gapicClient->deleteWorkflow($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteWorkflowTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getWorkflowTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $revisionId = 'revisionId513861631'; + $serviceAccount = 'serviceAccount-1948028253'; + $sourceContents = 'sourceContents-1799875906'; + $expectedResponse = new Workflow(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setSourceContents($sourceContents); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + $response = $gapicClient->getWorkflow($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.workflows.v1beta.Workflows/GetWorkflow', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getWorkflowExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); + try { + $gapicClient->getWorkflow($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listWorkflowsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $workflowsElement = new Workflow(); + $workflows = [ + $workflowsElement, + ]; + $expectedResponse = new ListWorkflowsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setWorkflows($workflows); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listWorkflows($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getWorkflows()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.workflows.v1beta.Workflows/ListWorkflows', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listWorkflowsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listWorkflows($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateWorkflowTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateWorkflowTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $revisionId = 'revisionId513861631'; + $serviceAccount = 'serviceAccount-1948028253'; + $sourceContents = 'sourceContents-1799875906'; + $expectedResponse = new Workflow(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setSourceContents($sourceContents); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateWorkflowTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $workflow = new Workflow(); + $response = $gapicClient->updateWorkflow($workflow); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.workflows.v1beta.Workflows/UpdateWorkflow', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getWorkflow(); + $this->assertProtobufEquals($workflow, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateWorkflowTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateWorkflowExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateWorkflowTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $workflow = new Workflow(); + $response = $gapicClient->updateWorkflow($workflow); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateWorkflowTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} From d08933e25d217762e71092e29954dbf443607689 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 30 May 2023 19:14:08 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../src/V1/AddProductToProductSetRequest.php | 23 + .../src/V1/AsyncBatchAnnotateFilesRequest.php | 13 + .../V1/AsyncBatchAnnotateImagesRequest.php | 15 + Vision/src/V1/BatchAnnotateFilesRequest.php | 14 + Vision/src/V1/BatchAnnotateImagesRequest.php | 13 + .../BaseClient/ImageAnnotatorBaseClient.php | 0 .../BaseClient/ProductSearchBaseClient.php | 0 .../src/V1/Client/ImageAnnotatorClient.php | 0 .../src/V1/Client/ProductSearchClient.php | 0 Vision/src/V1/CreateProductRequest.php | 24 + Vision/src/V1/CreateProductSetRequest.php | 23 + Vision/src/V1/CreateReferenceImageRequest.php | 25 + Vision/src/V1/DeleteProductRequest.php | 17 + Vision/src/V1/DeleteProductSetRequest.php | 17 + Vision/src/V1/DeleteReferenceImageRequest.php | 17 + Vision/src/V1/GetProductRequest.php | 17 + Vision/src/V1/GetProductSetRequest.php | 17 + Vision/src/V1/GetReferenceImageRequest.php | 17 + Vision/src/V1/ImportProductSetsRequest.php | 18 + Vision/src/V1/ListProductSetsRequest.php | 16 + .../V1/ListProductsInProductSetRequest.php | 17 + Vision/src/V1/ListProductsRequest.php | 17 + Vision/src/V1/ListReferenceImagesRequest.php | 17 + Vision/src/V1/PurgeProductsRequest.php | 16 + .../V1/RemoveProductFromProductSetRequest.php | 23 + Vision/src/V1/UpdateProductRequest.php | 20 + Vision/src/V1/UpdateProductSetRequest.php | 18 + .../image_annotator_descriptor_config.php | 45 + .../product_search_descriptor_config.php | 222 + .../V1/Client/ImageAnnotatorClientTest.php | 0 .../V1/Client/ProductSearchClientTest.php | 0 .../BaseClient/VpcAccessServiceBaseClient.php | 0 .../src/V1/Client/VpcAccessServiceClient.php | 0 VpcAccess/src/V1/CreateConnectorRequest.php | 19 + VpcAccess/src/V1/DeleteConnectorRequest.php | 14 + VpcAccess/src/V1/GetConnectorRequest.php | 14 + VpcAccess/src/V1/ListConnectorsRequest.php | 14 + .../vpc_access_service_descriptor_config.php | 54 + .../V1/Client/VpcAccessServiceClientTest.php | 0 .../BaseClient/WebRiskServiceBaseClient.php | 0 .../src/V1/Client/WebRiskServiceClient.php | 0 .../src/V1/ComputeThreatListDiffRequest.php | 24 + WebRisk/src/V1/CreateSubmissionRequest.php | 17 + WebRisk/src/V1/SearchHashesRequest.php | 20 + WebRisk/src/V1/SearchUrisRequest.php | 17 + .../web_risk_service_descriptor_config.php | 36 + .../V1/Client/WebRiskServiceClientTest.php | 0 .../metadata}/V1/CrawledUrl.php | 0 .../metadata}/V1/Finding.php | Bin .../metadata}/V1/FindingAddon.php | Bin .../metadata}/V1/FindingTypeStats.php | 0 .../metadata}/V1/ScanConfig.php | Bin .../metadata}/V1/ScanConfigError.php | Bin .../metadata}/V1/ScanRun.php | Bin .../metadata}/V1/ScanRunErrorTrace.php | Bin .../metadata}/V1/ScanRunLog.php | 0 .../metadata}/V1/ScanRunWarningTrace.php | Bin .../metadata}/V1/WebSecurityScanner.php | 0 .../create_scan_config.php | 0 .../delete_scan_config.php | 0 .../WebSecurityScannerClient/get_finding.php | 0 .../get_scan_config.php | 0 .../WebSecurityScannerClient/get_scan_run.php | 0 .../list_crawled_urls.php | 0 .../list_finding_type_stats.php | 0 .../list_findings.php | 0 .../list_scan_configs.php | 0 .../list_scan_runs.php | 0 .../start_scan_run.php | 0 .../stop_scan_run.php | 0 .../update_scan_config.php | 0 .../WebSecurityScannerBaseClient.php | 0 .../V1/Client/WebSecurityScannerClient.php | 0 .../src}/V1/CrawledUrl.php | 6 +- .../src}/V1/CreateScanConfigRequest.php | 4 +- .../src}/V1/DeleteScanConfigRequest.php | 2 +- .../src}/V1/Finding.php | 36 +- .../src}/V1/Finding/Severity.php | 2 - .../src}/V1/FindingTypeStats.php | 4 +- .../src}/V1/Form.php | 2 +- .../src}/V1/GetFindingRequest.php | 2 +- .../src}/V1/GetScanConfigRequest.php | 2 +- .../src}/V1/GetScanRunRequest.php | 2 +- .../src}/V1/ListCrawledUrlsRequest.php | 6 +- .../src}/V1/ListCrawledUrlsResponse.php | 2 +- .../src}/V1/ListFindingTypeStatsRequest.php | 2 +- .../src}/V1/ListFindingTypeStatsResponse.php | 0 .../src}/V1/ListFindingsRequest.php | 8 +- .../src}/V1/ListFindingsResponse.php | 2 +- .../src}/V1/ListScanConfigsRequest.php | 6 +- .../src}/V1/ListScanConfigsResponse.php | 2 +- .../src}/V1/ListScanRunsRequest.php | 6 +- .../src}/V1/ListScanRunsResponse.php | 2 +- .../src}/V1/OutdatedLibrary.php | 4 +- .../src}/V1/ScanConfig.php | 22 +- .../src}/V1/ScanConfig/Authentication.php | 2 - .../Authentication/CustomAccount.php | 8 +- .../Authentication/GoogleAccount.php | 6 +- .../Authentication/IapCredential.php | 2 - .../IapTestServiceAccountInfo.php | 4 +- .../ExportToSecurityCommandCenter.php | 2 - .../src}/V1/ScanConfig/RiskLevel.php | 2 - .../src}/V1/ScanConfig/Schedule.php | 6 +- .../src}/V1/ScanConfig/UserAgent.php | 2 - .../src}/V1/ScanConfigError.php | 4 +- .../src}/V1/ScanConfigError/Code.php | 2 - .../src}/V1/ScanRun.php | 20 +- .../src}/V1/ScanRun/ExecutionState.php | 2 - .../src}/V1/ScanRun/ResultState.php | 2 - .../src}/V1/ScanRunErrorTrace.php | 6 +- .../src}/V1/ScanRunErrorTrace/Code.php | 2 - .../src}/V1/ScanRunLog.php | 16 +- .../src}/V1/ScanRunWarningTrace.php | 2 +- .../src}/V1/ScanRunWarningTrace/Code.php | 2 - .../src}/V1/StartScanRunRequest.php | 2 +- .../src}/V1/StopScanRunRequest.php | 2 +- .../src}/V1/UpdateScanConfigRequest.php | 4 +- .../src}/V1/ViolatingResource.php | 4 +- .../src}/V1/VulnerableHeaders.php | 0 .../src}/V1/VulnerableHeaders/Header.php | 6 +- .../src}/V1/VulnerableParameters.php | 0 .../src}/V1/WebSecurityScannerGrpcClient.php | 0 .../src}/V1/Xss.php | 6 +- .../src}/V1/Xss/AttackVector.php | 2 - .../src}/V1/Xxe.php | 4 +- .../src}/V1/Xxe/Location.php | 2 - .../src/V1/gapic_metadata.json | 0 .../web_security_scanner_client_config.json | 0 ...web_security_scanner_descriptor_config.php | 0 ...eb_security_scanner_rest_client_config.php | 0 .../Client/WebSecurityScannerClientTest.php | 0 .../metadata}/Executions/V1/Executions.php | Bin .../metadata}/V1/Workflows.php | Bin .../V1/WorkflowsClient/create_workflow.php | 0 .../V1/WorkflowsClient/delete_workflow.php | 0 .../V1/WorkflowsClient/get_workflow.php | 0 .../V1/WorkflowsClient/list_workflows.php | 0 .../V1/WorkflowsClient/update_workflow.php | 0 .../Executions/V1/CancelExecutionRequest.php | 2 +- .../BaseClient/ExecutionsBaseClient.php | 0 .../V1/Client/ExecutionsClient.php | 0 .../Executions/V1/CreateExecutionRequest.php | 4 +- .../src}/Executions/V1/Execution.php | 20 +- .../Executions/V1/Execution/CallLogLevel.php | 0 .../src}/Executions/V1/Execution/Error.php | 6 +- .../Executions/V1/Execution/StackTrace.php | 0 .../V1/Execution/StackTraceElement.php | 6 +- .../Execution/StackTraceElement/Position.php | 6 +- .../src}/Executions/V1/Execution/State.php | 0 .../src}/Executions/V1/ExecutionView.php | 0 .../Executions/V1/ExecutionsGrpcClient.php | 0 .../Executions/V1/GetExecutionRequest.php | 4 +- .../Executions/V1/ListExecutionsRequest.php | 8 +- .../Executions/V1/ListExecutionsResponse.php | 2 +- .../src/Executions}/V1/gapic_metadata.json | 0 .../resources/executions_client_config.json | 0 .../executions_descriptor_config.php | 0 .../executions_rest_client_config.php | 0 .../Client/BaseClient/WorkflowsBaseClient.php | 0 .../src/V1/Client/WorkflowsClient.php | 0 .../src}/V1/CreateWorkflowRequest.php | 6 +- .../src}/V1/DeleteWorkflowRequest.php | 2 +- .../src}/V1/GetWorkflowRequest.php | 2 +- .../src}/V1/ListWorkflowsRequest.php | 10 +- .../src}/V1/ListWorkflowsResponse.php | 2 +- .../src}/V1/OperationMetadata.php | 10 +- .../src}/V1/UpdateWorkflowRequest.php | 4 +- .../src}/V1/Workflow.php | 16 +- .../src}/V1/Workflow/State.php | 2 - .../src}/V1/WorkflowsGrpcClient.php | 0 .../src/V1/gapic_metadata.json | 0 .../V1/resources/workflows_client_config.json | 0 .../resources/workflows_descriptor_config.php | 0 .../workflows_rest_client_config.php | 0 .../src/V1beta/Gapic/WorkflowsGapicClient.php | 12 +- .../V1/Client/ExecutionsClientTest.php | 0 .../Unit/V1/Client/WorkflowsClientTest.php | 0 .../Cloud/Video/Livestream/V1/Outputs.php | Bin 3859 -> 0 bytes .../Cloud/Video/Livestream/V1/Resources.php | Bin 7282 -> 0 bytes .../Cloud/Video/Livestream/V1/Service.php | 170 - .../Cloud/Video/LiveStream/V1/AudioFormat.php | 135 - .../Cloud/Video/LiveStream/V1/AudioStream.php | 327 -- .../V1/AudioStream/AudioMapping.php | 246 - .../LiveStream/V1/AudioStreamProperty.php | 111 - .../Cloud/Video/LiveStream/V1/Channel.php | 745 --- .../Video/LiveStream/V1/Channel/Output.php | 70 - .../LiveStream/V1/Channel/StreamingState.php | 104 - .../V1/ChannelOperationResponse.php | 33 - .../LiveStream/V1/CreateChannelRequest.php | 252 - .../LiveStream/V1/CreateEventRequest.php | 252 - .../LiveStream/V1/CreateInputRequest.php | 252 - .../LiveStream/V1/DeleteChannelRequest.php | 206 - .../LiveStream/V1/DeleteEventRequest.php | 160 - .../LiveStream/V1/DeleteInputRequest.php | 160 - .../Video/LiveStream/V1/ElementaryStream.php | 177 - .../Cloud/Video/LiveStream/V1/Encryption.php | 261 - .../V1/Encryption/Aes128Encryption.php | 36 - .../LiveStream/V1/Encryption/Clearkey.php | 36 - .../LiveStream/V1/Encryption/DrmSystems.php | 213 - .../LiveStream/V1/Encryption/Fairplay.php | 36 - .../V1/Encryption/MpegCommonEncryption.php | 78 - .../LiveStream/V1/Encryption/Playready.php | 36 - .../V1/Encryption/SampleAesEncryption.php | 36 - .../V1/Encryption/SecretManagerSource.php | 74 - .../LiveStream/V1/Encryption/Widevine.php | 36 - .../Cloud/Video/LiveStream/V1/Event.php | 568 -- .../Video/LiveStream/V1/Event/AdBreakTask.php | 80 - .../LiveStream/V1/Event/InputSwitchTask.php | 78 - .../Video/LiveStream/V1/Event/MuteTask.php | 84 - .../V1/Event/ReturnToProgramTask.php | 37 - .../Cloud/Video/LiveStream/V1/Event/State.php | 92 - .../Video/LiveStream/V1/Event/UnmuteTask.php | 37 - .../Video/LiveStream/V1/GetChannelRequest.php | 86 - .../Video/LiveStream/V1/GetEventRequest.php | 86 - .../Video/LiveStream/V1/GetInputRequest.php | 86 - .../Cloud/Video/LiveStream/V1/Input.php | 460 -- .../LiveStream/V1/Input/SecurityRule.php | 80 - .../Cloud/Video/LiveStream/V1/Input/Tier.php | 71 - .../Cloud/Video/LiveStream/V1/Input/Type.php | 64 - .../Video/LiveStream/V1/InputAttachment.php | 149 - .../V1/InputAttachment/AutomaticFailover.php | 82 - .../Cloud/Video/LiveStream/V1/InputConfig.php | 67 - .../V1/InputConfig/InputSwitchMode.php | 72 - .../LiveStream/V1/InputStreamProperty.php | 149 - .../LiveStream/V1/ListChannelsRequest.php | 242 - .../LiveStream/V1/ListChannelsResponse.php | 139 - .../Video/LiveStream/V1/ListEventsRequest.php | 242 - .../LiveStream/V1/ListEventsResponse.php | 139 - .../Video/LiveStream/V1/ListInputsRequest.php | 242 - .../LiveStream/V1/ListInputsResponse.php | 139 - .../V1/LivestreamServiceGrpcClient.php | 282 - .../Cloud/Video/LiveStream/V1/LogConfig.php | 70 - .../LiveStream/V1/LogConfig/LogSeverity.php | 92 - .../Cloud/Video/LiveStream/V1/Manifest.php | 327 -- .../LiveStream/V1/Manifest/ManifestType.php | 64 - .../Cloud/Video/LiveStream/V1/MuxStream.php | 249 - .../Video/LiveStream/V1/OperationMetadata.php | 273 - .../LiveStream/V1/PreprocessingConfig.php | 165 - .../V1/PreprocessingConfig/Audio.php | 106 - .../V1/PreprocessingConfig/Crop.php | 173 - .../LiveStream/V1/PreprocessingConfig/Pad.php | 173 - .../Video/LiveStream/V1/SegmentSettings.php | 105 - .../Cloud/Video/LiveStream/V1/SpriteSheet.php | 367 -- .../LiveStream/V1/StartChannelRequest.php | 160 - .../LiveStream/V1/StopChannelRequest.php | 160 - .../Cloud/Video/LiveStream/V1/TextStream.php | 79 - .../Video/LiveStream/V1/TimecodeConfig.php | 150 - .../V1/TimecodeConfig/TimecodeSource.php | 64 - .../LiveStream/V1/UpdateChannelRequest.php | 293 - .../LiveStream/V1/UpdateInputRequest.php | 253 - .../Cloud/Video/LiveStream/V1/VideoFormat.php | 169 - .../Cloud/Video/LiveStream/V1/VideoStream.php | 75 - .../V1/VideoStream/H264CodecSettings.php | 743 --- .../LiveStream/V1/VideoStreamProperty.php | 111 - .../create_channel.php | 95 - .../LivestreamServiceClient/create_event.php | 82 - .../LivestreamServiceClient/create_input.php | 91 - .../delete_channel.php | 81 - .../LivestreamServiceClient/delete_event.php | 75 - .../LivestreamServiceClient/delete_input.php | 81 - .../LivestreamServiceClient/get_channel.php | 72 - .../V1/LivestreamServiceClient/get_event.php | 77 - .../V1/LivestreamServiceClient/get_input.php | 72 - .../LivestreamServiceClient/get_location.php | 57 - .../LivestreamServiceClient/list_channels.php | 77 - .../LivestreamServiceClient/list_events.php | 77 - .../LivestreamServiceClient/list_inputs.php | 77 - .../list_locations.php | 62 - .../LivestreamServiceClient/start_channel.php | 85 - .../LivestreamServiceClient/stop_channel.php | 85 - .../update_channel.php | 74 - .../LivestreamServiceClient/update_input.php | 71 - .../LivestreamServiceBaseClient.php | 802 --- .../src/V1/Client/LivestreamServiceClient.php | 40 - .../V1/Gapic/LivestreamServiceGapicClient.php | 1799 ------ .../v1/src/V1/LivestreamServiceClient.php | 34 - .../v1/src/V1/gapic_metadata.json | 108 - .../livestream_service_client_config.json | 134 - .../livestream_service_descriptor_config.php | 323 -- .../livestream_service_rest_client_config.php | 274 - .../V1/Client/LivestreamServiceClientTest.php | 1869 ------ .../Unit/V1/LivestreamServiceClientTest.php | 1693 ------ .../Cloud/Video/Stitcher/V1/AdTagDetails.php | 52 - .../Cloud/Video/Stitcher/V1/CdnKeys.php | Bin 1437 -> 0 bytes .../Cloud/Video/Stitcher/V1/Companions.php | Bin 1738 -> 0 bytes .../Google/Cloud/Video/Stitcher/V1/Events.php | Bin 1464 -> 0 bytes .../Cloud/Video/Stitcher/V1/LiveConfigs.php | Bin 2066 -> 0 bytes .../Cloud/Video/Stitcher/V1/Sessions.php | Bin 3688 -> 0 bytes .../Google/Cloud/Video/Stitcher/V1/Slates.php | 37 - .../Cloud/Video/Stitcher/V1/StitchDetails.php | 45 - .../Stitcher/V1/VideoStitcherService.php | 200 - .../Cloud/Video/Stitcher/V1/AdRequest.php | 155 - .../Video/Stitcher/V1/AdStitchDetail.php | 213 - .../Cloud/Video/Stitcher/V1/AdTracking.php | 63 - .../Cloud/Video/Stitcher/V1/AkamaiCdnKey.php | 67 - .../Google/Cloud/Video/Stitcher/V1/CdnKey.php | 219 - .../Cloud/Video/Stitcher/V1/Companion.php | 455 -- .../Cloud/Video/Stitcher/V1/CompanionAds.php | 101 - .../V1/CompanionAds/DisplayRequirement.php | 71 - .../Video/Stitcher/V1/CreateCdnKeyRequest.php | 189 - .../Stitcher/V1/CreateLiveConfigRequest.php | 242 - .../Stitcher/V1/CreateLiveSessionRequest.php | 132 - .../Video/Stitcher/V1/CreateSlateRequest.php | 257 - .../Stitcher/V1/CreateVodSessionRequest.php | 132 - .../Video/Stitcher/V1/DeleteCdnKeyRequest.php | 86 - .../Stitcher/V1/DeleteLiveConfigRequest.php | 86 - .../Video/Stitcher/V1/DeleteSlateRequest.php | 86 - .../Google/Cloud/Video/Stitcher/V1/Event.php | 179 - .../Video/Stitcher/V1/Event/EventType.php | 218 - .../Cloud/Video/Stitcher/V1/GamLiveConfig.php | 135 - .../Video/Stitcher/V1/GetCdnKeyRequest.php | 86 - .../Stitcher/V1/GetLiveAdTagDetailRequest.php | 86 - .../Stitcher/V1/GetLiveConfigRequest.php | 91 - .../Stitcher/V1/GetLiveSessionRequest.php | 86 - .../Video/Stitcher/V1/GetSlateRequest.php | 86 - .../Stitcher/V1/GetVodAdTagDetailRequest.php | 91 - .../Stitcher/V1/GetVodSessionRequest.php | 86 - .../Stitcher/V1/GetVodStitchDetailRequest.php | 91 - .../Cloud/Video/Stitcher/V1/GoogleCdnKey.php | 101 - .../Video/Stitcher/V1/HtmlAdResource.php | 67 - .../Video/Stitcher/V1/IframeAdResource.php | 67 - .../Cloud/Video/Stitcher/V1/Interstitials.php | 111 - .../Video/Stitcher/V1/ListCdnKeysRequest.php | 226 - .../Video/Stitcher/V1/ListCdnKeysResponse.php | 135 - .../V1/ListLiveAdTagDetailsRequest.php | 154 - .../V1/ListLiveAdTagDetailsResponse.php | 101 - .../Stitcher/V1/ListLiveConfigsRequest.php | 234 - .../Stitcher/V1/ListLiveConfigsResponse.php | 135 - .../Video/Stitcher/V1/ListSlatesRequest.php | 226 - .../Video/Stitcher/V1/ListSlatesResponse.php | 135 - .../V1/ListVodAdTagDetailsRequest.php | 154 - .../V1/ListVodAdTagDetailsResponse.php | 101 - .../V1/ListVodStitchDetailsRequest.php | 154 - .../V1/ListVodStitchDetailsResponse.php | 101 - .../Video/Stitcher/V1/LiveAdTagDetail.php | 105 - .../Cloud/Video/Stitcher/V1/LiveConfig.php | 391 -- .../Video/Stitcher/V1/LiveConfig/State.php | 71 - .../V1/LiveConfig/StitchingPolicy.php | 66 - .../Cloud/Video/Stitcher/V1/LiveSession.php | 302 - .../Stitcher/V1/LiveSession/GamSettings.php | 72 - .../Video/Stitcher/V1/ManifestOptions.php | 109 - .../V1/ManifestOptions/OrderPolicy.php | 64 - .../Cloud/Video/Stitcher/V1/MediaCdnKey.php | 101 - .../Video/Stitcher/V1/OperationMetadata.php | 189 - .../Video/Stitcher/V1/PrefetchConfig.php | 131 - .../Cloud/Video/Stitcher/V1/ProgressEvent.php | 128 - .../Video/Stitcher/V1/RenditionFilter.php | 109 - .../Video/Stitcher/V1/RequestMetadata.php | 77 - .../Video/Stitcher/V1/ResponseMetadata.php | 257 - .../Google/Cloud/Video/Stitcher/V1/Slate.php | 153 - .../Video/Stitcher/V1/Slate/GamSlate.php | 105 - .../Video/Stitcher/V1/StaticAdResource.php | 101 - .../Video/Stitcher/V1/UpdateCdnKeyRequest.php | 146 - .../Video/Stitcher/V1/UpdateSlateRequest.php | 136 - .../V1/VideoStitcherServiceGrpcClient.php | 406 -- .../Video/Stitcher/V1/VodAdTagDetail.php | 105 - .../Cloud/Video/Stitcher/V1/VodSession.php | 451 -- .../Stitcher/V1/VodSession/GamSettings.php | 105 - .../Cloud/Video/Stitcher/V1/VodSessionAd.php | 171 - .../Video/Stitcher/V1/VodSessionAdBreak.php | 189 - .../Video/Stitcher/V1/VodSessionContent.php | 81 - .../Video/Stitcher/V1/VodStitchDetail.php | 105 - .../create_cdn_key.php | 94 - .../create_live_config.php | 108 - .../create_live_session.php | 89 - .../create_slate.php | 92 - .../create_vod_session.php | 96 - .../delete_cdn_key.php | 81 - .../delete_live_config.php | 85 - .../delete_slate.php | 81 - .../get_cdn_key.php | 72 - .../get_live_ad_tag_detail.php | 77 - .../get_live_config.php | 78 - .../get_live_session.php | 76 - .../VideoStitcherServiceClient/get_slate.php | 72 - .../get_vod_ad_tag_detail.php | 78 - .../get_vod_session.php | 77 - .../get_vod_stitch_detail.php | 78 - .../list_cdn_keys.php | 77 - .../list_live_ad_tag_details.php | 81 - .../list_live_configs.php | 78 - .../list_slates.php | 77 - .../list_vod_ad_tag_details.php | 81 - .../list_vod_stitch_details.php | 82 - .../update_cdn_key.php | 75 - .../update_slate.php | 74 - .../VideoStitcherServiceBaseClient.php | 1052 ---- .../V1/Client/VideoStitcherServiceClient.php | 40 - .../Gapic/VideoStitcherServiceGapicClient.php | 2057 ------- .../v1/src/V1/VideoStitcherServiceClient.php | 34 - .../v1/src/V1/gapic_metadata.json | 138 - .../video_stitcher_service_client_config.json | 164 - ...deo_stitcher_service_descriptor_config.php | 413 -- ...eo_stitcher_service_rest_client_config.php | 344 -- .../Client/VideoStitcherServiceClientTest.php | 2363 -------- .../V1/VideoStitcherServiceClientTest.php | 2147 ------- .../Cloud/Video/Transcoder/V1/Resources.php | Bin 9456 -> 0 bytes .../Cloud/Video/Transcoder/V1/Services.php | 90 - .../Cloud/Video/Transcoder/V1/AdBreak.php | 81 - .../Cloud/Video/Transcoder/V1/AudioStream.php | 389 -- .../V1/AudioStream/AudioMapping.php | 248 - .../Video/Transcoder/V1/CreateJobRequest.php | 132 - .../V1/CreateJobTemplateRequest.php | 184 - .../Video/Transcoder/V1/DeleteJobRequest.php | 124 - .../V1/DeleteJobTemplateRequest.php | 124 - .../Cloud/Video/Transcoder/V1/EditAtom.php | 209 - .../Video/Transcoder/V1/ElementaryStream.php | 177 - .../Video/Transcoder/V1/GetJobRequest.php | 86 - .../Transcoder/V1/GetJobTemplateRequest.php | 91 - .../Cloud/Video/Transcoder/V1/Input.php | 165 - .../Google/Cloud/Video/Transcoder/V1/Job.php | 588 -- .../Transcoder/V1/Job/ProcessingMode.php | 67 - .../Transcoder/V1/Job/ProcessingState.php | 79 - .../Cloud/Video/Transcoder/V1/JobConfig.php | 405 -- .../Cloud/Video/Transcoder/V1/JobTemplate.php | 157 - .../Transcoder/V1/ListJobTemplatesRequest.php | 234 - .../V1/ListJobTemplatesResponse.php | 135 - .../Video/Transcoder/V1/ListJobsRequest.php | 230 - .../Video/Transcoder/V1/ListJobsResponse.php | 135 - .../Cloud/Video/Transcoder/V1/Manifest.php | 155 - .../Transcoder/V1/Manifest/ManifestType.php | 64 - .../Cloud/Video/Transcoder/V1/MuxStream.php | 261 - .../Cloud/Video/Transcoder/V1/Output.php | 79 - .../Cloud/Video/Transcoder/V1/Overlay.php | 115 - .../Video/Transcoder/V1/Overlay/Animation.php | 144 - .../Transcoder/V1/Overlay/AnimationEnd.php | 82 - .../Transcoder/V1/Overlay/AnimationFade.php | 222 - .../Transcoder/V1/Overlay/AnimationStatic.php | 140 - .../Video/Transcoder/V1/Overlay/FadeType.php | 64 - .../Video/Transcoder/V1/Overlay/Image.php | 168 - .../V1/Overlay/NormalizedCoordinate.php | 104 - .../Transcoder/V1/PreprocessingConfig.php | 341 -- .../V1/PreprocessingConfig/Audio.php | 182 - .../V1/PreprocessingConfig/Color.php | 163 - .../V1/PreprocessingConfig/Crop.php | 173 - .../V1/PreprocessingConfig/Deblock.php | 113 - .../V1/PreprocessingConfig/Deinterlace.php | 111 - .../Deinterlace/BwdifConfig.php | 178 - .../Deinterlace/YadifConfig.php | 216 - .../V1/PreprocessingConfig/Denoise.php | 121 - .../Transcoder/V1/PreprocessingConfig/Pad.php | 173 - .../Video/Transcoder/V1/PubsubDestination.php | 71 - .../Video/Transcoder/V1/SegmentSettings.php | 123 - .../Cloud/Video/Transcoder/V1/SpriteSheet.php | 575 -- .../Cloud/Video/Transcoder/V1/TextStream.php | 209 - .../Transcoder/V1/TextStream/TextMapping.php | 142 - .../V1/TranscoderServiceGrpcClient.php | 160 - .../Cloud/Video/Transcoder/V1/VideoStream.php | 141 - .../V1/VideoStream/H264CodecSettings.php | 994 ---- .../V1/VideoStream/H265CodecSettings.php | 1008 ---- .../V1/VideoStream/Vp9CodecSettings.php | 570 -- .../V1/TranscoderServiceClient/create_job.php | 74 - .../create_job_template.php | 81 - .../V1/TranscoderServiceClient/delete_job.php | 70 - .../delete_job_template.php | 74 - .../V1/TranscoderServiceClient/get_job.php | 72 - .../get_job_template.php | 77 - .../list_job_templates.php | 77 - .../V1/TranscoderServiceClient/list_jobs.php | 76 - .../TranscoderServiceBaseClient.php | 459 -- .../src/V1/Client/TranscoderServiceClient.php | 40 - .../V1/Gapic/TranscoderServiceGapicClient.php | 751 --- .../v1/src/V1/TranscoderServiceClient.php | 34 - .../v1/src/V1/gapic_metadata.json | 58 - .../transcoder_service_client_config.json | 84 - .../transcoder_service_descriptor_config.php | 125 - .../transcoder_service_rest_client_config.php | 102 - .../V1/Client/TranscoderServiceClientTest.php | 670 --- .../Unit/V1/TranscoderServiceClientTest.php | 583 -- .../Google/Cloud/Vision/V1/Geometry.php | 40 - .../Google/Cloud/Vision/V1/ImageAnnotator.php | Bin 11157 -> 0 bytes .../Google/Cloud/Vision/V1/ProductSearch.php | 55 - .../Cloud/Vision/V1/ProductSearchService.php | Bin 9855 -> 0 bytes .../Google/Cloud/Vision/V1/TextAnnotation.php | Bin 2489 -> 0 bytes .../Google/Cloud/Vision/V1/WebDetection.php | 51 - .../V1/AddProductToProductSetRequest.php | 140 - .../Cloud/Vision/V1/AnnotateFileRequest.php | 225 - .../Cloud/Vision/V1/AnnotateFileResponse.php | 198 - .../Cloud/Vision/V1/AnnotateImageRequest.php | 156 - .../Cloud/Vision/V1/AnnotateImageResponse.php | 617 -- .../Vision/V1/AsyncAnnotateFileRequest.php | 199 - .../Vision/V1/AsyncAnnotateFileResponse.php | 77 - .../V1/AsyncBatchAnnotateFilesRequest.php | 143 - .../V1/AsyncBatchAnnotateFilesResponse.php | 71 - .../V1/AsyncBatchAnnotateImagesRequest.php | 188 - .../V1/AsyncBatchAnnotateImagesResponse.php | 77 - .../Vision/V1/BatchAnnotateFilesRequest.php | 147 - .../Vision/V1/BatchAnnotateFilesResponse.php | 71 - .../Vision/V1/BatchAnnotateImagesRequest.php | 142 - .../Vision/V1/BatchAnnotateImagesResponse.php | 67 - .../Vision/V1/BatchOperationMetadata.php | 161 - .../V1/BatchOperationMetadata/State.php | 81 - .../src/Google/Cloud/Vision/V1/Block.php | 279 - .../Cloud/Vision/V1/Block/BlockType.php | 85 - .../Google/Cloud/Vision/V1/BoundingPoly.php | 101 - .../src/Google/Cloud/Vision/V1/ColorInfo.php | 150 - .../Cloud/Vision/V1/CreateProductRequest.php | 189 - .../Vision/V1/CreateProductSetRequest.php | 184 - .../Vision/V1/CreateReferenceImageRequest.php | 194 - .../src/Google/Cloud/Vision/V1/CropHint.php | 153 - .../Cloud/Vision/V1/CropHintsAnnotation.php | 67 - .../Cloud/Vision/V1/CropHintsParams.php | 87 - .../Cloud/Vision/V1/DeleteProductRequest.php | 92 - .../Vision/V1/DeleteProductSetRequest.php | 92 - .../Vision/V1/DeleteReferenceImageRequest.php | 92 - .../Vision/V1/DominantColorsAnnotation.php | 67 - .../Cloud/Vision/V1/EntityAnnotation.php | 422 -- .../Google/Cloud/Vision/V1/FaceAnnotation.php | 627 -- .../Vision/V1/FaceAnnotation/Landmark.php | 114 - .../V1/FaceAnnotation/Landmark/Type.php | 305 - .../src/Google/Cloud/Vision/V1/Feature.php | 153 - .../Google/Cloud/Vision/V1/Feature/Type.php | 139 - .../Google/Cloud/Vision/V1/GcsDestination.php | 135 - .../src/Google/Cloud/Vision/V1/GcsSource.php | 71 - .../Cloud/Vision/V1/GetProductRequest.php | 92 - .../Cloud/Vision/V1/GetProductSetRequest.php | 92 - .../Vision/V1/GetReferenceImageRequest.php | 92 - .../src/Google/Cloud/Vision/V1/Image.php | 135 - .../Vision/V1/ImageAnnotationContext.php | 106 - .../Vision/V1/ImageAnnotatorGrpcClient.php | 116 - .../Google/Cloud/Vision/V1/ImageContext.php | 315 - .../Cloud/Vision/V1/ImageProperties.php | 77 - .../Google/Cloud/Vision/V1/ImageSource.php | 169 - .../Vision/V1/ImportProductSetsGcsSource.php | 252 - .../V1/ImportProductSetsInputConfig.php | 78 - .../Vision/V1/ImportProductSetsRequest.php | 133 - .../Vision/V1/ImportProductSetsResponse.php | 120 - .../Google/Cloud/Vision/V1/InputConfig.php | 165 - .../Google/Cloud/Vision/V1/LatLongRect.php | 121 - .../src/Google/Cloud/Vision/V1/Likelihood.php | 83 - .../Vision/V1/ListProductSetsRequest.php | 155 - .../Vision/V1/ListProductSetsResponse.php | 105 - .../V1/ListProductsInProductSetRequest.php | 160 - .../V1/ListProductsInProductSetResponse.php | 105 - .../Cloud/Vision/V1/ListProductsRequest.php | 160 - .../Cloud/Vision/V1/ListProductsResponse.php | 105 - .../Vision/V1/ListReferenceImagesRequest.php | 168 - .../Vision/V1/ListReferenceImagesResponse.php | 135 - .../Vision/V1/LocalizedObjectAnnotation.php | 221 - .../Google/Cloud/Vision/V1/LocationInfo.php | 77 - .../Cloud/Vision/V1/NormalizedVertex.php | 103 - .../Cloud/Vision/V1/OperationMetadata.php | 155 - .../Vision/V1/OperationMetadata/State.php | 78 - .../Google/Cloud/Vision/V1/OutputConfig.php | 143 - .../proto/src/Google/Cloud/Vision/V1/Page.php | 221 - .../src/Google/Cloud/Vision/V1/Paragraph.php | 245 - .../src/Google/Cloud/Vision/V1/Position.php | 137 - .../src/Google/Cloud/Vision/V1/Product.php | 271 - .../Cloud/Vision/V1/Product/KeyValue.php | 112 - .../Vision/V1/ProductSearchGrpcClient.php | 470 -- .../Cloud/Vision/V1/ProductSearchParams.php | 239 - .../Cloud/Vision/V1/ProductSearchResults.php | 165 - .../V1/ProductSearchResults/GroupedResult.php | 149 - .../ProductSearchResults/ObjectAnnotation.php | 180 - .../Vision/V1/ProductSearchResults/Result.php | 156 - .../src/Google/Cloud/Vision/V1/ProductSet.php | 231 - .../Cloud/Vision/V1/ProductSetPurgeConfig.php | 75 - .../src/Google/Cloud/Vision/V1/Property.php | 135 - .../Cloud/Vision/V1/PurgeProductsRequest.php | 203 - .../Google/Cloud/Vision/V1/ReferenceImage.php | 176 - .../V1/RemoveProductFromProductSetRequest.php | 140 - .../Cloud/Vision/V1/SafeSearchAnnotation.php | 233 - .../src/Google/Cloud/Vision/V1/Symbol.php | 245 - .../Google/Cloud/Vision/V1/TextAnnotation.php | 107 - .../V1/TextAnnotation/DetectedBreak.php | 104 - .../DetectedBreak/BreakType.php | 86 - .../V1/TextAnnotation/DetectedLanguage.php | 112 - .../Vision/V1/TextAnnotation/TextProperty.php | 114 - .../Cloud/Vision/V1/TextDetectionParams.php | 110 - .../Cloud/Vision/V1/UpdateProductRequest.php | 161 - .../Vision/V1/UpdateProductSetRequest.php | 151 - .../src/Google/Cloud/Vision/V1/Vertex.php | 102 - .../Google/Cloud/Vision/V1/WebDetection.php | 253 - .../Vision/V1/WebDetection/WebEntity.php | 142 - .../Cloud/Vision/V1/WebDetection/WebImage.php | 104 - .../Cloud/Vision/V1/WebDetection/WebLabel.php | 112 - .../Cloud/Vision/V1/WebDetection/WebPage.php | 222 - .../Cloud/Vision/V1/WebDetectionParams.php | 67 - .../proto/src/Google/Cloud/Vision/V1/Word.php | 249 - .../async_batch_annotate_files.php | 74 - .../async_batch_annotate_images.php | 79 - .../batch_annotate_files.php | 63 - .../batch_annotate_images.php | 57 - .../add_product_to_product_set.php | 80 - .../V1/ProductSearchClient/create_product.php | 79 - .../create_product_set.php | 76 - .../create_reference_image.php | 95 - .../V1/ProductSearchClient/delete_product.php | 71 - .../delete_product_set.php | 70 - .../delete_reference_image.php | 78 - .../V1/ProductSearchClient/get_product.php | 73 - .../ProductSearchClient/get_product_set.php | 73 - .../get_reference_image.php | 78 - .../import_product_sets.php | 94 - .../ProductSearchClient/list_product_sets.php | 78 - .../V1/ProductSearchClient/list_products.php | 78 - .../list_products_in_product_set.php | 80 - .../list_reference_images.php | 80 - .../V1/ProductSearchClient/purge_products.php | 100 - .../remove_product_from_product_set.php | 75 - .../V1/ProductSearchClient/update_product.php | 70 - .../update_product_set.php | 63 - .../V1/Gapic/ImageAnnotatorGapicClient.php | 614 -- .../src/V1/Gapic/ProductSearchGapicClient.php | 1590 ----- .../Vision/V1/src/V1/ImageAnnotatorClient.php | 34 - .../Vision/V1/src/V1/ProductSearchClient.php | 34 - .../Vision/V1/src/V1/gapic_metadata.json | 142 - .../image_annotator_client_config.json | 55 - .../image_annotator_descriptor_config.php | 73 - .../image_annotator_rest_client_config.php | 132 - .../product_search_client_config.json | 140 - .../product_search_descriptor_config.php | 290 - .../product_search_rest_client_config.php | 256 - .../Unit/V1/ImageAnnotatorClientTest.php | 423 -- .../tests/Unit/V1/ProductSearchClientTest.php | 1403 ----- .../Cloud/Vmmigration/V1/Vmmigration.php | Bin 37746 -> 0 bytes .../Cloud/VMMigration/V1/AdaptingOSStep.php | 33 - .../V1/AddGroupMigrationRequest.php | 115 - .../V1/AddGroupMigrationResponse.php | 33 - .../Cloud/VMMigration/V1/ApplianceVersion.php | 169 - .../Cloud/VMMigration/V1/AppliedLicense.php | 101 - .../VMMigration/V1/AppliedLicense/Type.php | 71 - .../Cloud/VMMigration/V1/AvailableUpdates.php | 137 - .../Cloud/VMMigration/V1/AwsSecurityGroup.php | 101 - .../Cloud/VMMigration/V1/AwsSourceDetails.php | 348 -- .../AwsSourceDetails/AccessKeyCredentials.php | 104 - .../VMMigration/V1/AwsSourceDetails/State.php | 74 - .../VMMigration/V1/AwsSourceDetails/Tag.php | 104 - .../VMMigration/V1/AwsSourceVmDetails.php | 101 - .../V1/AwsSourceVmDetails/Firmware.php | 64 - .../Cloud/VMMigration/V1/AwsVmDetails.php | 645 --- .../V1/AwsVmDetails/BootOption.php | 64 - .../V1/AwsVmDetails/PowerState.php | 79 - .../V1/AwsVmDetails/VmArchitecture.php | 78 - .../V1/AwsVmDetails/VmVirtualizationType.php | 64 - .../Cloud/VMMigration/V1/AwsVmsDetails.php | 67 - .../VMMigration/V1/CancelCloneJobRequest.php | 81 - .../VMMigration/V1/CancelCloneJobResponse.php | 33 - .../V1/CancelCutoverJobRequest.php | 81 - .../V1/CancelCutoverJobResponse.php | 33 - .../Google/Cloud/VMMigration/V1/CloneJob.php | 370 -- .../Cloud/VMMigration/V1/CloneJob/State.php | 100 - .../Google/Cloud/VMMigration/V1/CloneStep.php | 229 - .../V1/ComputeEngineBootOption.php | 61 - .../VMMigration/V1/ComputeEngineDiskType.php | 69 - .../V1/ComputeEngineLicenseType.php | 61 - .../V1/ComputeEngineTargetDefaults.php | 674 --- .../V1/ComputeEngineTargetDetails.php | 670 --- .../VMMigration/V1/ComputeScheduling.php | 206 - .../ComputeScheduling/OnHostMaintenance.php | 62 - .../V1/ComputeScheduling/RestartType.php | 67 - .../VMMigration/V1/CreateCloneJobRequest.php | 237 - .../V1/CreateCutoverJobRequest.php | 237 - .../V1/CreateDatacenterConnectorRequest.php | 252 - .../VMMigration/V1/CreateGroupRequest.php | 237 - .../V1/CreateMigratingVmRequest.php | 237 - .../VMMigration/V1/CreateSourceRequest.php | 237 - .../V1/CreateTargetProjectRequest.php | 237 - .../V1/CreateUtilizationReportRequest.php | 258 - .../Cloud/VMMigration/V1/CutoverJob.php | 435 -- .../Cloud/VMMigration/V1/CutoverJob/State.php | 100 - .../Cloud/VMMigration/V1/CutoverStep.php | 295 - .../Google/Cloud/VMMigration/V1/CycleStep.php | 229 - .../VMMigration/V1/DatacenterConnector.php | 620 -- .../V1/DatacenterConnector/State.php | 81 - .../V1/DeleteDatacenterConnectorRequest.php | 155 - .../VMMigration/V1/DeleteGroupRequest.php | 155 - .../V1/DeleteMigratingVmRequest.php | 81 - .../VMMigration/V1/DeleteSourceRequest.php | 155 - .../V1/DeleteTargetProjectRequest.php | 155 - .../V1/DeleteUtilizationReportRequest.php | 155 - .../VMMigration/V1/FetchInventoryRequest.php | 120 - .../VMMigration/V1/FetchInventoryResponse.php | 157 - .../V1/FinalizeMigrationRequest.php | 81 - .../V1/FinalizeMigrationResponse.php | 33 - .../VMMigration/V1/GetCloneJobRequest.php | 81 - .../VMMigration/V1/GetCutoverJobRequest.php | 81 - .../V1/GetDatacenterConnectorRequest.php | 81 - .../Cloud/VMMigration/V1/GetGroupRequest.php | 81 - .../VMMigration/V1/GetMigratingVmRequest.php | 115 - .../V1/GetReplicationCycleRequest.php | 81 - .../Cloud/VMMigration/V1/GetSourceRequest.php | 81 - .../V1/GetTargetProjectRequest.php | 81 - .../V1/GetUtilizationReportRequest.php | 119 - .../src/Google/Cloud/VMMigration/V1/Group.php | 224 - .../V1/InitializingReplicationStep.php | 33 - .../V1/InstantiatingMigratedVMStep.php | 33 - .../VMMigration/V1/ListCloneJobsRequest.php | 241 - .../VMMigration/V1/ListCloneJobsResponse.php | 139 - .../VMMigration/V1/ListCutoverJobsRequest.php | 241 - .../V1/ListCutoverJobsResponse.php | 139 - .../V1/ListDatacenterConnectorsRequest.php | 245 - .../V1/ListDatacenterConnectorsResponse.php | 139 - .../VMMigration/V1/ListGroupsRequest.php | 241 - .../VMMigration/V1/ListGroupsResponse.php | 139 - .../V1/ListMigratingVmsRequest.php | 275 - .../V1/ListMigratingVmsResponse.php | 139 - .../V1/ListReplicationCyclesRequest.php | 241 - .../V1/ListReplicationCyclesResponse.php | 139 - .../VMMigration/V1/ListSourcesRequest.php | 241 - .../VMMigration/V1/ListSourcesResponse.php | 139 - .../V1/ListTargetProjectsRequest.php | 241 - .../V1/ListTargetProjectsResponse.php | 139 - .../V1/ListUtilizationReportsRequest.php | 279 - .../V1/ListUtilizationReportsResponse.php | 139 - .../Cloud/VMMigration/V1/MigratingVm.php | 796 --- .../VMMigration/V1/MigratingVm/State.php | 133 - .../Cloud/VMMigration/V1/MigratingVmView.php | 63 - .../Cloud/VMMigration/V1/MigrationError.php | 239 - .../V1/MigrationError/ErrorCode.php | 115 - .../Cloud/VMMigration/V1/NetworkInterface.php | 177 - .../VMMigration/V1/OperationMetadata.php | 307 - .../VMMigration/V1/PauseMigrationRequest.php | 67 - .../VMMigration/V1/PauseMigrationResponse.php | 33 - .../VMMigration/V1/PostProcessingStep.php | 33 - .../VMMigration/V1/PreparingVMDisksStep.php | 33 - .../V1/RemoveGroupMigrationRequest.php | 115 - .../V1/RemoveGroupMigrationResponse.php | 33 - .../Cloud/VMMigration/V1/ReplicatingStep.php | 177 - .../Cloud/VMMigration/V1/ReplicationCycle.php | 393 -- .../VMMigration/V1/ReplicationCycle/State.php | 79 - .../Cloud/VMMigration/V1/ReplicationSync.php | 81 - .../VMMigration/V1/ResumeMigrationRequest.php | 67 - .../V1/ResumeMigrationResponse.php | 33 - .../Cloud/VMMigration/V1/SchedulePolicy.php | 119 - .../VMMigration/V1/SchedulingNodeAffinity.php | 141 - .../V1/SchedulingNodeAffinity/Operator.php | 65 - .../V1/ShuttingDownSourceVMStep.php | 33 - .../Google/Cloud/VMMigration/V1/Source.php | 299 - .../VMMigration/V1/StartMigrationRequest.php | 81 - .../VMMigration/V1/StartMigrationResponse.php | 33 - .../Cloud/VMMigration/V1/TargetProject.php | 228 - .../VMMigration/V1/UpdateGroupRequest.php | 230 - .../V1/UpdateMigratingVmRequest.php | 230 - .../VMMigration/V1/UpdateSourceRequest.php | 230 - .../V1/UpdateTargetProjectRequest.php | 230 - .../V1/UpgradeApplianceRequest.php | 141 - .../V1/UpgradeApplianceResponse.php | 33 - .../Cloud/VMMigration/V1/UpgradeStatus.php | 223 - .../VMMigration/V1/UpgradeStatus/State.php | 71 - .../VMMigration/V1/UtilizationReport.php | 446 -- .../V1/UtilizationReport/State.php | 71 - .../V1/UtilizationReport/TimeFrame.php | 71 - .../VMMigration/V1/UtilizationReportView.php | 64 - .../VMMigration/V1/VmMigrationGrpcClient.php | 754 --- .../VMMigration/V1/VmUtilizationInfo.php | 153 - .../VMMigration/V1/VmUtilizationMetrics.php | 313 - .../VMMigration/V1/VmwareSourceDetails.php | 174 - .../Cloud/VMMigration/V1/VmwareVmDetails.php | 453 -- .../V1/VmwareVmDetails/BootOption.php | 64 - .../V1/VmwareVmDetails/PowerState.php | 71 - .../Cloud/VMMigration/V1/VmwareVmsDetails.php | 67 - .../VmMigrationClient/add_group_migration.php | 83 - .../V1/VmMigrationClient/cancel_clone_job.php | 89 - .../VmMigrationClient/cancel_cutover_job.php | 89 - .../V1/VmMigrationClient/create_clone_job.php | 93 - .../VmMigrationClient/create_cutover_job.php | 95 - .../create_datacenter_connector.php | 93 - .../V1/VmMigrationClient/create_group.php | 88 - .../VmMigrationClient/create_migrating_vm.php | 88 - .../V1/VmMigrationClient/create_source.php | 88 - .../create_target_project.php | 91 - .../create_utilization_report.php | 95 - .../delete_datacenter_connector.php | 85 - .../V1/VmMigrationClient/delete_group.php | 80 - .../VmMigrationClient/delete_migrating_vm.php | 85 - .../V1/VmMigrationClient/delete_source.php | 80 - .../delete_target_project.php | 87 - .../delete_utilization_report.php | 85 - .../V1/VmMigrationClient/fetch_inventory.php | 75 - .../VmMigrationClient/finalize_migration.php | 89 - .../V1/VmMigrationClient/get_clone_job.php | 77 - .../V1/VmMigrationClient/get_cutover_job.php | 77 - .../get_datacenter_connector.php | 76 - .../V1/VmMigrationClient/get_group.php | 71 - .../V1/VmMigrationClient/get_location.php | 57 - .../V1/VmMigrationClient/get_migrating_vm.php | 76 - .../get_replication_cycle.php | 77 - .../V1/VmMigrationClient/get_source.php | 71 - .../VmMigrationClient/get_target_project.php | 78 - .../get_utilization_report.php | 76 - .../V1/VmMigrationClient/list_clone_jobs.php | 87 - .../VmMigrationClient/list_cutover_jobs.php | 87 - .../list_datacenter_connectors.php | 82 - .../V1/VmMigrationClient/list_groups.php | 82 - .../V1/VmMigrationClient/list_locations.php | 62 - .../VmMigrationClient/list_migrating_vms.php | 82 - .../list_replication_cycles.php | 87 - .../V1/VmMigrationClient/list_sources.php | 82 - .../list_target_projects.php | 85 - .../list_utilization_reports.php | 82 - .../V1/VmMigrationClient/pause_migration.php | 90 - .../remove_group_migration.php | 83 - .../V1/VmMigrationClient/resume_migration.php | 91 - .../V1/VmMigrationClient/start_migration.php | 89 - .../V1/VmMigrationClient/update_group.php | 71 - .../VmMigrationClient/update_migrating_vm.php | 71 - .../V1/VmMigrationClient/update_source.php | 71 - .../update_target_project.php | 74 - .../VmMigrationClient/upgrade_appliance.php | 89 - .../BaseClient/VmMigrationBaseClient.php | 1729 ------ .../v1/src/V1/Client/VmMigrationClient.php | 40 - .../src/V1/Gapic/VmMigrationGapicClient.php | 4092 ------------- .../v1/src/V1/VmMigrationClient.php | 34 - .../VmMigration/v1/src/V1/gapic_metadata.json | 258 - .../resources/vm_migration_client_config.json | 292 - .../vm_migration_descriptor_config.php | 871 --- .../vm_migration_rest_client_config.php | 662 --- .../Unit/V1/Client/VmMigrationClientTest.php | 5156 ----------------- .../tests/Unit/V1/VmMigrationClientTest.php | 4806 --------------- .../Cloud/Vmwareengine/V1/Vmwareengine.php | Bin 14986 -> 0 bytes .../Vmwareengine/V1/VmwareengineResources.php | Bin 6992 -> 0 bytes .../Google/Cloud/VmwareEngine/V1/Cluster.php | 319 - .../Cloud/VmwareEngine/V1/Cluster/State.php | 87 - .../VmwareEngine/V1/CreateClusterRequest.php | 306 - .../V1/CreateHcxActivationKeyRequest.php | 313 - .../V1/CreateNetworkPolicyRequest.php | 318 - .../V1/CreatePrivateCloudRequest.php | 306 - .../V1/CreateVmwareEngineNetworkRequest.php | 333 -- .../Cloud/VmwareEngine/V1/Credentials.php | 101 - .../VmwareEngine/V1/DeleteClusterRequest.php | 140 - .../V1/DeleteNetworkPolicyRequest.php | 180 - .../V1/DeletePrivateCloudRequest.php | 262 - .../V1/DeleteVmwareEngineNetworkRequest.php | 226 - .../VmwareEngine/V1/GetClusterRequest.php | 102 - .../V1/GetHcxActivationKeyRequest.php | 101 - .../V1/GetNetworkPolicyRequest.php | 102 - .../VmwareEngine/V1/GetNodeTypeRequest.php | 102 - .../V1/GetPrivateCloudRequest.php | 102 - .../V1/GetVmwareEngineNetworkRequest.php | 102 - .../src/Google/Cloud/VmwareEngine/V1/Hcx.php | 169 - .../Cloud/VmwareEngine/V1/Hcx/State.php | 64 - .../VmwareEngine/V1/HcxActivationKey.php | 236 - .../V1/HcxActivationKey/State.php | 71 - .../VmwareEngine/V1/ListClustersRequest.php | 322 - .../VmwareEngine/V1/ListClustersResponse.php | 144 - .../V1/ListHcxActivationKeysRequest.php | 203 - .../V1/ListHcxActivationKeysResponse.php | 144 - .../V1/ListNetworkPoliciesRequest.php | 361 -- .../V1/ListNetworkPoliciesResponse.php | 144 - .../VmwareEngine/V1/ListNodeTypesRequest.php | 312 - .../VmwareEngine/V1/ListNodeTypesResponse.php | 144 - .../V1/ListPrivateCloudsRequest.php | 362 -- .../V1/ListPrivateCloudsResponse.php | 144 - .../VmwareEngine/V1/ListSubnetsRequest.php | 199 - .../VmwareEngine/V1/ListSubnetsResponse.php | 106 - .../V1/ListVmwareEngineNetworksRequest.php | 357 -- .../V1/ListVmwareEngineNetworksResponse.php | 140 - .../Cloud/VmwareEngine/V1/NetworkConfig.php | 214 - .../Cloud/VmwareEngine/V1/NetworkPolicy.php | 470 -- .../V1/NetworkPolicy/NetworkService.php | 112 - .../V1/NetworkPolicy/NetworkService/State.php | 72 - .../Google/Cloud/VmwareEngine/V1/NodeType.php | 329 -- .../Cloud/VmwareEngine/V1/NodeTypeConfig.php | 113 - .../src/Google/Cloud/VmwareEngine/V1/Nsx.php | 169 - .../Cloud/VmwareEngine/V1/Nsx/State.php | 64 - .../VmwareEngine/V1/OperationMetadata.php | 311 - .../Cloud/VmwareEngine/V1/PrivateCloud.php | 601 -- .../V1/PrivateCloud/ManagementCluster.php | 136 - .../VmwareEngine/V1/PrivateCloud/State.php | 94 - .../V1/ResetNsxCredentialsRequest.php | 185 - .../V1/ResetVcenterCredentialsRequest.php | 185 - .../V1/ShowNsxCredentialsRequest.php | 107 - .../V1/ShowVcenterCredentialsRequest.php | 107 - .../Google/Cloud/VmwareEngine/V1/Subnet.php | 228 - .../Cloud/VmwareEngine/V1/Subnet/State.php | 78 - .../V1/UndeletePrivateCloudRequest.php | 140 - .../VmwareEngine/V1/UpdateClusterRequest.php | 233 - .../V1/UpdateNetworkPolicyRequest.php | 235 - .../V1/UpdatePrivateCloudRequest.php | 195 - .../V1/UpdateVmwareEngineNetworkRequest.php | 240 - .../Google/Cloud/VmwareEngine/V1/Vcenter.php | 169 - .../Cloud/VmwareEngine/V1/Vcenter/State.php | 64 - .../V1/VmwareEngineGrpcClient.php | 566 -- .../VmwareEngine/V1/VmwareEngineNetwork.php | 396 -- .../V1/VmwareEngineNetwork/State.php | 78 - .../V1/VmwareEngineNetwork/Type.php | 59 - .../V1/VmwareEngineNetwork/VpcNetwork.php | 117 - .../VmwareEngineNetwork/VpcNetwork/Type.php | 76 - .../V1/VmwareEngineClient/create_cluster.php | 111 - .../create_hcx_activation_key.php | 108 - .../create_network_policy.php | 115 - .../create_private_cloud.php | 139 - .../create_vmware_engine_network.php | 118 - .../V1/VmwareEngineClient/delete_cluster.php | 92 - .../delete_network_policy.php | 90 - .../delete_private_cloud.php | 101 - .../delete_vmware_engine_network.php | 91 - .../V1/VmwareEngineClient/get_cluster.php | 80 - .../get_hcx_activation_key.php | 80 - .../V1/VmwareEngineClient/get_iam_policy.php | 72 - .../V1/VmwareEngineClient/get_location.php | 57 - .../VmwareEngineClient/get_network_policy.php | 79 - .../V1/VmwareEngineClient/get_node_type.php | 75 - .../VmwareEngineClient/get_private_cloud.php | 75 - .../get_vmware_engine_network.php | 82 - .../V1/VmwareEngineClient/list_clusters.php | 84 - .../list_hcx_activation_keys.php | 85 - .../V1/VmwareEngineClient/list_locations.php | 62 - .../list_network_policies.php | 79 - .../V1/VmwareEngineClient/list_node_types.php | 80 - .../list_private_clouds.php | 80 - .../V1/VmwareEngineClient/list_subnets.php | 85 - .../list_vmware_engine_networks.php | 79 - .../reset_nsx_credentials.php | 92 - .../reset_vcenter_credentials.php | 92 - .../V1/VmwareEngineClient/set_iam_policy.php | 77 - .../show_nsx_credentials.php | 80 - .../show_vcenter_credentials.php | 80 - .../test_iam_permissions.php | 84 - .../undelete_private_cloud.php | 90 - .../V1/VmwareEngineClient/update_cluster.php | 83 - .../update_network_policy.php | 101 - .../update_private_cloud.php | 118 - .../update_vmware_engine_network.php | 90 - .../BaseClient/VmwareEngineBaseClient.php | 1408 ----- .../v1/src/V1/Client/VmwareEngineClient.php | 40 - .../src/V1/Gapic/VmwareEngineGapicClient.php | 3417 ----------- .../v1/src/V1/VmwareEngineClient.php | 34 - .../v1/src/V1/gapic_metadata.json | 198 - .../vmware_engine_client_config.json | 224 - .../vmware_engine_descriptor_config.php | 635 -- .../vmware_engine_rest_client_config.php | 523 -- .../Unit/V1/Client/VmwareEngineClientTest.php | 3818 ------------ .../tests/Unit/V1/VmwareEngineClientTest.php | 3525 ----------- .../Google/Cloud/Vpcaccess/V1/VpcAccess.php | Bin 3596 -> 0 bytes .../Google/Cloud/VpcAccess/V1/Connector.php | 421 -- .../Cloud/VpcAccess/V1/Connector/State.php | 85 - .../Cloud/VpcAccess/V1/Connector/Subnet.php | 124 - .../VpcAccess/V1/CreateConnectorRequest.php | 168 - .../VpcAccess/V1/DeleteConnectorRequest.php | 81 - .../VpcAccess/V1/GetConnectorRequest.php | 81 - .../VpcAccess/V1/ListConnectorsRequest.php | 149 - .../VpcAccess/V1/ListConnectorsResponse.php | 101 - .../Cloud/VpcAccess/V1/OperationMetadata.php | 197 - .../V1/VpcAccessServiceGrpcClient.php | 99 - .../create_connector.php | 84 - .../delete_connector.php | 76 - .../VpcAccessServiceClient/get_connector.php | 67 - .../list_connectors.php | 71 - .../VpcAccessServiceClient/list_locations.php | 58 - .../V1/Gapic/VpcAccessServiceGapicClient.php | 662 --- .../v1/src/V1/VpcAccessServiceClient.php | 34 - .../VpcAccess/v1/src/V1/gapic_metadata.json | 43 - .../vpc_access_service_client_config.json | 70 - .../vpc_access_service_descriptor_config.php | 103 - .../vpc_access_service_rest_client_config.php | 94 - .../Unit/V1/VpcAccessServiceClientTest.php | 531 -- .../Google/Cloud/Webrisk/V1/Webrisk.php | Bin 6405 -> 0 bytes .../Cloud/WebRisk/V1/CompressionType.php | 61 - .../V1/ComputeThreatListDiffRequest.php | 193 - .../Constraints.php | 154 - .../V1/ComputeThreatListDiffResponse.php | 315 - .../Checksum.php | 74 - .../ResponseType.php | 66 - .../WebRisk/V1/CreateSubmissionRequest.php | 132 - .../src/Google/Cloud/WebRisk/V1/RawHashes.php | 123 - .../Google/Cloud/WebRisk/V1/RawIndices.php | 67 - .../Cloud/WebRisk/V1/RiceDeltaEncoding.php | 190 - .../Cloud/WebRisk/V1/SearchHashesRequest.php | 137 - .../Cloud/WebRisk/V1/SearchHashesResponse.php | 117 - .../V1/SearchHashesResponse/ThreatHash.php | 160 - .../Cloud/WebRisk/V1/SearchUrisRequest.php | 122 - .../Cloud/WebRisk/V1/SearchUrisResponse.php | 75 - .../V1/SearchUrisResponse/ThreatUri.php | 118 - .../Google/Cloud/WebRisk/V1/Submission.php | 113 - .../Cloud/WebRisk/V1/SubmitUriMetadata.php | 156 - .../WebRisk/V1/SubmitUriMetadata/State.php | 85 - .../Cloud/WebRisk/V1/SubmitUriRequest.php | 203 - .../Cloud/WebRisk/V1/ThreatDiscovery.php | 105 - .../WebRisk/V1/ThreatDiscovery/Platform.php | 78 - .../Cloud/WebRisk/V1/ThreatEntryAdditions.php | 124 - .../Cloud/WebRisk/V1/ThreatEntryRemovals.php | 133 - .../Google/Cloud/WebRisk/V1/ThreatInfo.php | 157 - .../Cloud/WebRisk/V1/ThreatInfo/AbuseType.php | 71 - .../WebRisk/V1/ThreatInfo/Confidence.php | 117 - .../ThreatInfo/Confidence/ConfidenceLevel.php | 71 - .../V1/ThreatInfo/ThreatJustification.php | 104 - .../JustificationLabel.php | 71 - .../Google/Cloud/WebRisk/V1/ThreatType.php | 77 - .../WebRisk/V1/WebRiskServiceGrpcClient.php | 139 - .../compute_threat_list_diff.php | 77 - .../create_submission.php | 80 - .../V1/WebRiskServiceClient/search_hashes.php | 74 - .../V1/WebRiskServiceClient/search_uris.php | 76 - .../V1/WebRiskServiceClient/submit_uri.php | 95 - .../V1/Gapic/WebRiskServiceGapicClient.php | 575 -- .../v1/src/V1/WebRiskServiceClient.php | 34 - .../WebRisk/v1/src/V1/gapic_metadata.json | 43 - .../web_risk_service_client_config.json | 70 - .../web_risk_service_descriptor_config.php | 54 - .../web_risk_service_rest_client_config.php | 92 - .../Unit/V1/WebRiskServiceClientTest.php | 449 -- .../Google/Cloud/Webrisk/V1Beta1/Webrisk.php | Bin 4188 -> 0 bytes .../Cloud/WebRisk/V1beta1/CompressionType.php | 61 - .../V1beta1/ComputeThreatListDiffRequest.php | 149 - .../Constraints.php | 154 - .../V1beta1/ComputeThreatListDiffResponse.php | 307 - .../Checksum.php | 74 - .../ResponseType.php | 66 - .../Cloud/WebRisk/V1beta1/RawHashes.php | 119 - .../Cloud/WebRisk/V1beta1/RawIndices.php | 67 - .../WebRisk/V1beta1/RiceDeltaEncoding.php | 190 - .../WebRisk/V1beta1/SearchHashesRequest.php | 105 - .../WebRisk/V1beta1/SearchHashesResponse.php | 117 - .../SearchHashesResponse/ThreatHash.php | 160 - .../WebRisk/V1beta1/SearchUrisRequest.php | 101 - .../WebRisk/V1beta1/SearchUrisResponse.php | 75 - .../V1beta1/SearchUrisResponse/ThreatUri.php | 118 - .../WebRisk/V1beta1/ThreatEntryAdditions.php | 124 - .../WebRisk/V1beta1/ThreatEntryRemovals.php | 133 - .../Cloud/WebRisk/V1beta1/ThreatType.php | 69 - .../WebRiskServiceV1Beta1GrpcClient.php | 86 - .../compute_threat_list_diff.php | 70 - .../search_hashes.php | 73 - .../search_uris.php | 71 - .../WebRiskServiceV1Beta1GapicClient.php | 304 - .../V1beta1/WebRiskServiceV1Beta1Client.php | 36 - .../v1beta1/src/V1beta1/gapic_metadata.json | 33 - ...b_risk_service_v1_beta1_client_config.json | 50 - ...isk_service_v1_beta1_descriptor_config.php | 7 - ...sk_service_v1_beta1_rest_client_config.php | 21 - .../WebRiskServiceV1Beta1ClientTest.php | 249 - .../Websecurityscanner/V1Beta/CrawledUrl.php | 32 - .../Websecurityscanner/V1Beta/Finding.php | 49 - .../V1Beta/FindingAddon.php | 49 - .../V1Beta/FindingTypeStats.php | 30 - .../Websecurityscanner/V1Beta/ScanConfig.php | Bin 3047 -> 0 bytes .../V1Beta/ScanConfigError.php | Bin 2516 -> 0 bytes .../Websecurityscanner/V1Beta/ScanRun.php | Bin 2280 -> 0 bytes .../V1Beta/ScanRunErrorTrace.php | Bin 1501 -> 0 bytes .../V1Beta/ScanRunWarningTrace.php | Bin 1252 -> 0 bytes .../V1Beta/WebSecurityScanner.php | 121 - .../WebSecurityScanner/V1beta/CrawledUrl.php | 141 - .../V1beta/CreateScanConfigRequest.php | 115 - .../V1beta/DeleteScanConfigRequest.php | 71 - .../WebSecurityScanner/V1beta/Finding.php | 686 --- .../V1beta/FindingTypeStats.php | 102 - .../Cloud/WebSecurityScanner/V1beta/Form.php | 101 - .../V1beta/GetFindingRequest.php | 75 - .../V1beta/GetScanConfigRequest.php | 71 - .../V1beta/GetScanRunRequest.php | 75 - .../V1beta/ListCrawledUrlsRequest.php | 159 - .../V1beta/ListCrawledUrlsResponse.php | 105 - .../V1beta/ListFindingTypeStatsRequest.php | 75 - .../V1beta/ListFindingTypeStatsResponse.php | 67 - .../V1beta/ListFindingsRequest.php | 205 - .../V1beta/ListFindingsResponse.php | 105 - .../V1beta/ListScanConfigsRequest.php | 155 - .../V1beta/ListScanConfigsResponse.php | 105 - .../V1beta/ListScanRunsRequest.php | 155 - .../V1beta/ListScanRunsResponse.php | 105 - .../V1beta/OutdatedLibrary.php | 135 - .../WebSecurityScanner/V1beta/ScanConfig.php | 507 -- .../V1beta/ScanConfig/Authentication.php | 111 - .../Authentication/CustomAccount.php | 142 - .../Authentication/GoogleAccount.php | 108 - .../ExportToSecurityCommandCenter.php | 65 - .../V1beta/ScanConfig/RiskLevel.php | 66 - .../V1beta/ScanConfig/Schedule.php | 126 - .../V1beta/ScanConfig/TargetPlatform.php | 65 - .../V1beta/ScanConfig/UserAgent.php | 71 - .../V1beta/ScanConfigError.php | 116 - .../V1beta/ScanConfigError/Code.php | 355 -- .../WebSecurityScanner/V1beta/ScanRun.php | 486 -- .../V1beta/ScanRun/ExecutionState.php | 72 - .../V1beta/ScanRun/ResultState.php | 72 - .../V1beta/ScanRunErrorTrace.php | 162 - .../V1beta/ScanRunErrorTrace/Code.php | 99 - .../V1beta/ScanRunWarningTrace.php | 69 - .../V1beta/ScanRunWarningTrace/Code.php | 85 - .../V1beta/StartScanRunRequest.php | 71 - .../V1beta/StopScanRunRequest.php | 75 - .../V1beta/UpdateScanConfigRequest.php | 137 - .../V1beta/ViolatingResource.php | 102 - .../V1beta/VulnerableHeaders.php | 101 - .../V1beta/VulnerableHeaders/Header.php | 104 - .../V1beta/VulnerableParameters.php | 67 - .../V1beta/WebSecurityScannerGrpcClient.php | 234 - .../Cloud/WebSecurityScanner/V1beta/Xss.php | 101 - .../create_scan_config.php | 80 - .../delete_scan_config.php | 65 - .../WebSecurityScannerClient/get_finding.php | 73 - .../get_scan_config.php | 67 - .../WebSecurityScannerClient/get_scan_run.php | 68 - .../list_crawled_urls.php | 77 - .../list_finding_type_stats.php | 72 - .../list_findings.php | 82 - .../list_scan_configs.php | 72 - .../list_scan_runs.php | 73 - .../start_scan_run.php | 67 - .../stop_scan_run.php | 68 - .../update_scan_config.php | 77 - .../Gapic/WebSecurityScannerGapicClient.php | 1057 ---- .../src/V1beta/WebSecurityScannerClient.php | 36 - .../v1beta/src/V1beta/gapic_metadata.json | 83 - .../web_security_scanner_client_config.json | 110 - ...web_security_scanner_descriptor_config.php | 48 - ...eb_security_scanner_rest_client_config.php | 163 - .../V1beta/WebSecurityScannerClientTest.php | 960 --- .../V1/ExecutionsClient/cancel_execution.php | 78 - .../V1/ExecutionsClient/create_execution.php | 75 - .../V1/ExecutionsClient/get_execution.php | 78 - .../V1/ExecutionsClient/list_executions.php | 80 - .../Executions/V1Beta/Executions.php | Bin 3803 -> 0 bytes .../V1beta/CancelExecutionRequest.php | 77 - .../V1beta/CreateExecutionRequest.php | 121 - .../Workflows/Executions/V1beta/Execution.php | 359 -- .../Executions/V1beta/Execution/Error.php | 104 - .../Executions/V1beta/Execution/State.php | 79 - .../Executions/V1beta/ExecutionView.php | 63 - .../V1beta/ExecutionsGrpcClient.php | 99 - .../Executions/V1beta/GetExecutionRequest.php | 115 - .../V1beta/ListExecutionsRequest.php | 207 - .../V1beta/ListExecutionsResponse.php | 107 - .../ExecutionsClient/cancel_execution.php | 73 - .../ExecutionsClient/create_execution.php | 71 - .../V1beta/ExecutionsClient/get_execution.php | 73 - .../ExecutionsClient/list_executions.php | 75 - .../v1beta/src/V1beta/ExecutionsClient.php | 36 - .../V1beta/Gapic/ExecutionsGapicClient.php | 516 -- .../v1beta/src/V1beta/gapic_metadata.json | 38 - .../resources/executions_client_config.json | 46 - .../executions_descriptor_config.php | 18 - .../executions_rest_client_config.php | 54 - .../Unit/V1beta/ExecutionsClientTest.php | 332 -- .../Cloud/Workflows/V1Beta/Workflows.php | Bin 4084 -> 0 bytes .../V1beta/CreateWorkflowRequest.php | 175 - .../V1beta/DeleteWorkflowRequest.php | 73 - .../Workflows/V1beta/GetWorkflowRequest.php | 72 - .../Workflows/V1beta/ListWorkflowsRequest.php | 245 - .../V1beta/ListWorkflowsResponse.php | 141 - .../Workflows/V1beta/OperationMetadata.php | 223 - .../V1beta/UpdateWorkflowRequest.php | 127 - .../Cloud/Workflows/V1beta/Workflow.php | 503 -- .../Cloud/Workflows/V1beta/Workflow/State.php | 58 - .../Workflows/V1beta/WorkflowsGrpcClient.php | 121 - .../WorkflowsClient/create_workflow.php | 93 - .../WorkflowsClient/delete_workflow.php | 78 - .../V1beta/WorkflowsClient/get_workflow.php | 67 - .../V1beta/WorkflowsClient/list_workflows.php | 73 - .../WorkflowsClient/update_workflow.php | 72 - .../src/V1beta/Gapic/WorkflowsGapicClient.php | 714 --- .../v1beta/src/V1beta/WorkflowsClient.php | 36 - .../v1beta/src/V1beta/gapic_metadata.json | 43 - .../resources/workflows_client_config.json | 47 - .../resources/workflows_descriptor_config.php | 48 - .../workflows_rest_client_config.php | 129 - .../tests/Unit/V1beta/WorkflowsClientTest.php | 582 -- 1149 files changed, 1077 insertions(+), 185556 deletions(-) rename {owl-bot-staging/Vision/V1 => Vision}/src/V1/Client/BaseClient/ImageAnnotatorBaseClient.php (100%) rename {owl-bot-staging/Vision/V1 => Vision}/src/V1/Client/BaseClient/ProductSearchBaseClient.php (100%) rename {owl-bot-staging/Vision/V1 => Vision}/src/V1/Client/ImageAnnotatorClient.php (100%) rename {owl-bot-staging/Vision/V1 => Vision}/src/V1/Client/ProductSearchClient.php (100%) rename {owl-bot-staging/Vision/V1 => Vision}/tests/Unit/V1/Client/ImageAnnotatorClientTest.php (100%) rename {owl-bot-staging/Vision/V1 => Vision}/tests/Unit/V1/Client/ProductSearchClientTest.php (100%) rename {owl-bot-staging/VpcAccess/v1 => VpcAccess}/src/V1/Client/BaseClient/VpcAccessServiceBaseClient.php (100%) rename {owl-bot-staging/VpcAccess/v1 => VpcAccess}/src/V1/Client/VpcAccessServiceClient.php (100%) rename {owl-bot-staging/VpcAccess/v1 => VpcAccess}/tests/Unit/V1/Client/VpcAccessServiceClientTest.php (100%) rename {owl-bot-staging/WebRisk/v1 => WebRisk}/src/V1/Client/BaseClient/WebRiskServiceBaseClient.php (100%) rename {owl-bot-staging/WebRisk/v1 => WebRisk}/src/V1/Client/WebRiskServiceClient.php (100%) rename {owl-bot-staging/WebRisk/v1 => WebRisk}/tests/Unit/V1/Client/WebRiskServiceClientTest.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner => WebSecurityScanner/metadata}/V1/CrawledUrl.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner => WebSecurityScanner/metadata}/V1/Finding.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner => WebSecurityScanner/metadata}/V1/FindingAddon.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner => WebSecurityScanner/metadata}/V1/FindingTypeStats.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner => WebSecurityScanner/metadata}/V1/ScanConfig.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner => WebSecurityScanner/metadata}/V1/ScanConfigError.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner => WebSecurityScanner/metadata}/V1/ScanRun.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner => WebSecurityScanner/metadata}/V1/ScanRunErrorTrace.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner => WebSecurityScanner/metadata}/V1/ScanRunLog.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner => WebSecurityScanner/metadata}/V1/ScanRunWarningTrace.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner => WebSecurityScanner/metadata}/V1/WebSecurityScanner.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1 => WebSecurityScanner}/samples/V1/WebSecurityScannerClient/create_scan_config.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1 => WebSecurityScanner}/samples/V1/WebSecurityScannerClient/delete_scan_config.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1 => WebSecurityScanner}/samples/V1/WebSecurityScannerClient/get_finding.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1 => WebSecurityScanner}/samples/V1/WebSecurityScannerClient/get_scan_config.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1 => WebSecurityScanner}/samples/V1/WebSecurityScannerClient/get_scan_run.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1 => WebSecurityScanner}/samples/V1/WebSecurityScannerClient/list_crawled_urls.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1 => WebSecurityScanner}/samples/V1/WebSecurityScannerClient/list_finding_type_stats.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1 => WebSecurityScanner}/samples/V1/WebSecurityScannerClient/list_findings.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1 => WebSecurityScanner}/samples/V1/WebSecurityScannerClient/list_scan_configs.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1 => WebSecurityScanner}/samples/V1/WebSecurityScannerClient/list_scan_runs.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1 => WebSecurityScanner}/samples/V1/WebSecurityScannerClient/start_scan_run.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1 => WebSecurityScanner}/samples/V1/WebSecurityScannerClient/stop_scan_run.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1 => WebSecurityScanner}/samples/V1/WebSecurityScannerClient/update_scan_config.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1 => WebSecurityScanner}/src/V1/Client/BaseClient/WebSecurityScannerBaseClient.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1 => WebSecurityScanner}/src/V1/Client/WebSecurityScannerClient.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/CrawledUrl.php (97%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/CreateScanConfigRequest.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/DeleteScanConfigRequest.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/Finding.php (97%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/Finding/Severity.php (91%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/FindingTypeStats.php (97%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/Form.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/GetFindingRequest.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/GetScanConfigRequest.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/GetScanRunRequest.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ListCrawledUrlsRequest.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ListCrawledUrlsResponse.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ListFindingTypeStatsRequest.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ListFindingTypeStatsResponse.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ListFindingsRequest.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ListFindingsResponse.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ListScanConfigsRequest.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ListScanConfigsResponse.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ListScanRunsRequest.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ListScanRunsResponse.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/OutdatedLibrary.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ScanConfig.php (97%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ScanConfig/Authentication.php (96%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ScanConfig/Authentication/CustomAccount.php (93%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ScanConfig/Authentication/GoogleAccount.php (92%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ScanConfig/Authentication/IapCredential.php (93%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ScanConfig/Authentication/IapCredential/IapTestServiceAccountInfo.php (89%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ScanConfig/ExportToSecurityCommandCenter.php (89%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ScanConfig/RiskLevel.php (90%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ScanConfig/Schedule.php (93%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ScanConfig/UserAgent.php (91%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ScanConfigError.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ScanConfigError/Code.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ScanRun.php (97%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ScanRun/ExecutionState.php (91%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ScanRun/ResultState.php (91%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ScanRunErrorTrace.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ScanRunErrorTrace/Code.php (94%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ScanRunLog.php (96%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ScanRunWarningTrace.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ScanRunWarningTrace/Code.php (94%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/StartScanRunRequest.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/StopScanRunRequest.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/UpdateScanConfigRequest.php (98%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/ViolatingResource.php (97%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/VulnerableHeaders.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/VulnerableHeaders/Header.php (90%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/VulnerableParameters.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/WebSecurityScannerGrpcClient.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/Xss.php (97%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/Xss/AttackVector.php (96%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/Xxe.php (97%) rename {owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner => WebSecurityScanner/src}/V1/Xxe/Location.php (90%) rename {owl-bot-staging/WebSecurityScanner/v1 => WebSecurityScanner}/src/V1/gapic_metadata.json (100%) rename {owl-bot-staging/WebSecurityScanner/v1 => WebSecurityScanner}/src/V1/resources/web_security_scanner_client_config.json (100%) rename {owl-bot-staging/WebSecurityScanner/v1 => WebSecurityScanner}/src/V1/resources/web_security_scanner_descriptor_config.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1 => WebSecurityScanner}/src/V1/resources/web_security_scanner_rest_client_config.php (100%) rename {owl-bot-staging/WebSecurityScanner/v1 => WebSecurityScanner}/tests/Unit/V1/Client/WebSecurityScannerClientTest.php (100%) rename {owl-bot-staging/Workflows/Executions/v1/proto/src/GPBMetadata/Google/Cloud/Workflows => Workflows/metadata}/Executions/V1/Executions.php (100%) rename {owl-bot-staging/Workflows/v1/proto/src/GPBMetadata/Google/Cloud/Workflows => Workflows/metadata}/V1/Workflows.php (100%) rename {owl-bot-staging/Workflows/v1 => Workflows}/samples/V1/WorkflowsClient/create_workflow.php (100%) rename {owl-bot-staging/Workflows/v1 => Workflows}/samples/V1/WorkflowsClient/delete_workflow.php (100%) rename {owl-bot-staging/Workflows/v1 => Workflows}/samples/V1/WorkflowsClient/get_workflow.php (100%) rename {owl-bot-staging/Workflows/v1 => Workflows}/samples/V1/WorkflowsClient/list_workflows.php (100%) rename {owl-bot-staging/Workflows/v1 => Workflows}/samples/V1/WorkflowsClient/update_workflow.php (100%) rename {owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/Executions/V1/CancelExecutionRequest.php (99%) rename {owl-bot-staging/Workflows/Executions/v1/src => Workflows/src/Executions}/V1/Client/BaseClient/ExecutionsBaseClient.php (100%) rename {owl-bot-staging/Workflows/Executions/v1/src => Workflows/src/Executions}/V1/Client/ExecutionsClient.php (100%) rename {owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/Executions/V1/CreateExecutionRequest.php (98%) rename {owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/Executions/V1/Execution.php (97%) rename {owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/Executions/V1/Execution/CallLogLevel.php (100%) rename {owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/Executions/V1/Execution/Error.php (97%) rename {owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/Executions/V1/Execution/StackTrace.php (100%) rename {owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/Executions/V1/Execution/StackTraceElement.php (97%) rename {owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/Executions/V1/Execution/StackTraceElement/Position.php (98%) rename {owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/Executions/V1/Execution/State.php (100%) rename {owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/Executions/V1/ExecutionView.php (100%) rename {owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/Executions/V1/ExecutionsGrpcClient.php (100%) rename {owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/Executions/V1/GetExecutionRequest.php (98%) rename {owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/Executions/V1/ListExecutionsRequest.php (98%) rename {owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/Executions/V1/ListExecutionsResponse.php (98%) rename {owl-bot-staging/Workflows/Executions/v1/src => Workflows/src/Executions}/V1/gapic_metadata.json (100%) rename {owl-bot-staging/Workflows/Executions/v1/src => Workflows/src/Executions}/V1/resources/executions_client_config.json (100%) rename {owl-bot-staging/Workflows/Executions/v1/src => Workflows/src/Executions}/V1/resources/executions_descriptor_config.php (100%) rename {owl-bot-staging/Workflows/Executions/v1/src => Workflows/src/Executions}/V1/resources/executions_rest_client_config.php (100%) rename {owl-bot-staging/Workflows/v1 => Workflows}/src/V1/Client/BaseClient/WorkflowsBaseClient.php (100%) rename {owl-bot-staging/Workflows/v1 => Workflows}/src/V1/Client/WorkflowsClient.php (100%) rename {owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/V1/CreateWorkflowRequest.php (98%) rename {owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/V1/DeleteWorkflowRequest.php (99%) rename {owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/V1/GetWorkflowRequest.php (99%) rename {owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/V1/ListWorkflowsRequest.php (98%) rename {owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/V1/ListWorkflowsResponse.php (99%) rename {owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/V1/OperationMetadata.php (97%) rename {owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/V1/UpdateWorkflowRequest.php (98%) rename {owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/V1/Workflow.php (98%) rename {owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/V1/Workflow/State.php (90%) rename {owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows => Workflows/src}/V1/WorkflowsGrpcClient.php (100%) rename {owl-bot-staging/Workflows/v1 => Workflows}/src/V1/gapic_metadata.json (100%) rename {owl-bot-staging/Workflows/v1 => Workflows}/src/V1/resources/workflows_client_config.json (100%) rename {owl-bot-staging/Workflows/v1 => Workflows}/src/V1/resources/workflows_descriptor_config.php (100%) rename {owl-bot-staging/Workflows/v1 => Workflows}/src/V1/resources/workflows_rest_client_config.php (100%) rename {owl-bot-staging/Workflows/Executions/v1/tests/Unit => Workflows/tests/Unit/Executions}/V1/Client/ExecutionsClientTest.php (100%) rename {owl-bot-staging/Workflows/v1 => Workflows}/tests/Unit/V1/Client/WorkflowsClientTest.php (100%) delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Outputs.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Resources.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Service.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioFormat.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream/AudioMapping.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStreamProperty.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/Output.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/StreamingState.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ChannelOperationResponse.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateChannelRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateEventRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateInputRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteChannelRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteEventRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteInputRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ElementaryStream.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Aes128Encryption.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Clearkey.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/DrmSystems.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Fairplay.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/MpegCommonEncryption.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Playready.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SampleAesEncryption.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SecretManagerSource.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Widevine.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/AdBreakTask.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/InputSwitchTask.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/MuteTask.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/ReturnToProgramTask.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/State.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/UnmuteTask.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetChannelRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetEventRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetInputRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/SecurityRule.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Tier.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Type.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment/AutomaticFailover.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig/InputSwitchMode.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputStreamProperty.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsResponse.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsResponse.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsResponse.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LivestreamServiceGrpcClient.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig/LogSeverity.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest/ManifestType.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/MuxStream.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Audio.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Crop.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Pad.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SegmentSettings.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SpriteSheet.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StartChannelRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StopChannelRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TextStream.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig/TimecodeSource.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateChannelRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateInputRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoFormat.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream/H264CodecSettings.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStreamProperty.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_channel.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_event.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_input.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_channel.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_event.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_input.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_channel.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_event.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_input.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_location.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_channels.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_events.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_inputs.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_locations.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/start_channel.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/stop_channel.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_channel.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_input.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/Client/BaseClient/LivestreamServiceBaseClient.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/Client/LivestreamServiceClient.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/Gapic/LivestreamServiceGapicClient.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/LivestreamServiceClient.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_client_config.json delete mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_descriptor_config.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_rest_client_config.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/tests/Unit/V1/Client/LivestreamServiceClientTest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/tests/Unit/V1/LivestreamServiceClientTest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/AdTagDetails.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/CdnKeys.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Companions.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Events.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/LiveConfigs.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Sessions.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Slates.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/StitchDetails.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/VideoStitcherService.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdStitchDetail.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdTracking.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AkamaiCdnKey.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CdnKey.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Companion.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds/DisplayRequirement.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateCdnKeyRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveConfigRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveSessionRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateSlateRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodSessionRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteCdnKeyRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteLiveConfigRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteSlateRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event/EventType.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamLiveConfig.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetCdnKeyRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveAdTagDetailRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveConfigRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveSessionRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetSlateRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodAdTagDetailRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodSessionRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodStitchDetailRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GoogleCdnKey.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/HtmlAdResource.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/IframeAdResource.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Interstitials.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysResponse.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsResponse.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsResponse.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesResponse.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsResponse.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsResponse.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveAdTagDetail.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/State.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/StitchingPolicy.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession/GamSettings.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions/OrderPolicy.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/PrefetchConfig.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ProgressEvent.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RenditionFilter.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RequestMetadata.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ResponseMetadata.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate/GamSlate.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/StaticAdResource.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateCdnKeyRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateSlateRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VideoStitcherServiceGrpcClient.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodAdTagDetail.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession/GamSettings.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAd.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAdBreak.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionContent.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodStitchDetail.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_cdn_key.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_config.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_session.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_slate.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_session.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_cdn_key.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_live_config.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_slate.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_cdn_key.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_ad_tag_detail.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_config.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_session.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_slate.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_ad_tag_detail.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_session.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_stitch_detail.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_cdn_keys.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_ad_tag_details.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_configs.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_slates.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_ad_tag_details.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_stitch_details.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_cdn_key.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_slate.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/Client/BaseClient/VideoStitcherServiceBaseClient.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/Client/VideoStitcherServiceClient.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/Gapic/VideoStitcherServiceGapicClient.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/VideoStitcherServiceClient.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_client_config.json delete mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_descriptor_config.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_rest_client_config.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/tests/Unit/V1/Client/VideoStitcherServiceClientTest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/tests/Unit/V1/VideoStitcherServiceClientTest.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/GPBMetadata/Google/Cloud/Video/Transcoder/V1/Resources.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/GPBMetadata/Google/Cloud/Video/Transcoder/V1/Services.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AdBreak.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream/AudioMapping.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobRequest.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobTemplateRequest.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobRequest.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobTemplateRequest.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/EditAtom.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ElementaryStream.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobRequest.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobTemplateRequest.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Input.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingMode.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingState.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobConfig.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobTemplate.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesRequest.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesResponse.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsRequest.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsResponse.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/ManifestType.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/MuxStream.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Output.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Animation.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationEnd.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationFade.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationStatic.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/FadeType.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Image.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/NormalizedCoordinate.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Audio.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Color.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Crop.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deblock.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/BwdifConfig.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/YadifConfig.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Denoise.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Pad.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PubsubDestination.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SegmentSettings.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SpriteSheet.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream/TextMapping.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TranscoderServiceGrpcClient.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H264CodecSettings.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H265CodecSettings.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/Vp9CodecSettings.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job_template.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job_template.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job_template.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_job_templates.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_jobs.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/Client/BaseClient/TranscoderServiceBaseClient.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/Client/TranscoderServiceClient.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/Gapic/TranscoderServiceGapicClient.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/TranscoderServiceClient.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_client_config.json delete mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_descriptor_config.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_rest_client_config.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/Client/TranscoderServiceClientTest.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/TranscoderServiceClientTest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/Geometry.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ImageAnnotator.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearch.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearchService.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/TextAnnotation.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/WebDetection.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AddProductToProductSetRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata/State.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block/BlockType.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BoundingPoly.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ColorInfo.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductSetRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateReferenceImageRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHint.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsAnnotation.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsParams.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductSetRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteReferenceImageRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DominantColorsAnnotation.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/EntityAnnotation.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark/Type.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature/Type.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsDestination.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsSource.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductSetRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetReferenceImageRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Image.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotationContext.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotatorGrpcClient.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageContext.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageProperties.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageSource.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsGcsSource.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsInputConfig.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/InputConfig.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LatLongRect.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Likelihood.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocalizedObjectAnnotation.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocationInfo.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/NormalizedVertex.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata/State.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OutputConfig.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Page.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Paragraph.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Position.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product/KeyValue.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchGrpcClient.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchParams.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/GroupedResult.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/ObjectAnnotation.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/Result.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSet.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSetPurgeConfig.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Property.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/PurgeProductsRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ReferenceImage.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/RemoveProductFromProductSetRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/SafeSearchAnnotation.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Symbol.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak/BreakType.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedLanguage.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/TextProperty.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextDetectionParams.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductSetRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Vertex.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebEntity.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebImage.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebLabel.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebPage.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetectionParams.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Word.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_files.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_images.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_files.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_images.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/add_product_to_product_set.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product_set.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_reference_image.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product_set.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_reference_image.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product_set.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_reference_image.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/import_product_sets.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_product_sets.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products_in_product_set.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_reference_images.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/purge_products.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/remove_product_from_product_set.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product_set.php delete mode 100644 owl-bot-staging/Vision/V1/src/V1/Gapic/ImageAnnotatorGapicClient.php delete mode 100644 owl-bot-staging/Vision/V1/src/V1/Gapic/ProductSearchGapicClient.php delete mode 100644 owl-bot-staging/Vision/V1/src/V1/ImageAnnotatorClient.php delete mode 100644 owl-bot-staging/Vision/V1/src/V1/ProductSearchClient.php delete mode 100644 owl-bot-staging/Vision/V1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_client_config.json delete mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_descriptor_config.php delete mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_rest_client_config.php delete mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/product_search_client_config.json delete mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/product_search_descriptor_config.php delete mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/product_search_rest_client_config.php delete mode 100644 owl-bot-staging/Vision/V1/tests/Unit/V1/ImageAnnotatorClientTest.php delete mode 100644 owl-bot-staging/Vision/V1/tests/Unit/V1/ProductSearchClientTest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/GPBMetadata/Google/Cloud/Vmmigration/V1/Vmmigration.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AdaptingOSStep.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ApplianceVersion.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense/Type.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AvailableUpdates.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSecurityGroup.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/AccessKeyCredentials.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/State.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/Tag.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails/Firmware.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/BootOption.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/PowerState.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmArchitecture.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmVirtualizationType.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmsDetails.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob/State.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneStep.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineBootOption.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDiskType.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineLicenseType.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDefaults.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDetails.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/OnHostMaintenance.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/RestartType.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCloneJobRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCutoverJobRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateDatacenterConnectorRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateGroupRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateMigratingVmRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateSourceRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateTargetProjectRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateUtilizationReportRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob/State.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverStep.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CycleStep.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector/State.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteDatacenterConnectorRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteGroupRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteMigratingVmRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteSourceRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteTargetProjectRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteUtilizationReportRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCloneJobRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCutoverJobRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetDatacenterConnectorRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetGroupRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetMigratingVmRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetReplicationCycleRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetSourceRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetTargetProjectRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetUtilizationReportRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InitializingReplicationStep.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InstantiatingMigratedVMStep.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/State.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVmView.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError/ErrorCode.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/NetworkInterface.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PostProcessingStep.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PreparingVMDisksStep.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicatingStep.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle/State.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationSync.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulePolicy.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity/Operator.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShuttingDownSourceVMStep.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Source.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/TargetProject.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateGroupRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateMigratingVmRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateSourceRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateTargetProjectRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus/State.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/State.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/TimeFrame.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReportView.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmMigrationGrpcClient.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationInfo.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationMetrics.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceDetails.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/BootOption.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/PowerState.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmsDetails.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/add_group_migration.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_clone_job.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_cutover_job.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_clone_job.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_cutover_job.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_datacenter_connector.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_group.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_migrating_vm.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_source.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_target_project.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_utilization_report.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_datacenter_connector.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_group.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_migrating_vm.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_source.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_target_project.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_utilization_report.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/fetch_inventory.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/finalize_migration.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_clone_job.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_cutover_job.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_datacenter_connector.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_group.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_location.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_migrating_vm.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_replication_cycle.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_source.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_target_project.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_utilization_report.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_clone_jobs.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_cutover_jobs.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_datacenter_connectors.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_groups.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_locations.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_migrating_vms.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_replication_cycles.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_sources.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_target_projects.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_utilization_reports.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/pause_migration.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/remove_group_migration.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/resume_migration.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/start_migration.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_group.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_migrating_vm.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_source.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_target_project.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/upgrade_appliance.php delete mode 100644 owl-bot-staging/VmMigration/v1/src/V1/Client/BaseClient/VmMigrationBaseClient.php delete mode 100644 owl-bot-staging/VmMigration/v1/src/V1/Client/VmMigrationClient.php delete mode 100644 owl-bot-staging/VmMigration/v1/src/V1/Gapic/VmMigrationGapicClient.php delete mode 100644 owl-bot-staging/VmMigration/v1/src/V1/VmMigrationClient.php delete mode 100644 owl-bot-staging/VmMigration/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_client_config.json delete mode 100644 owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_descriptor_config.php delete mode 100644 owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_rest_client_config.php delete mode 100644 owl-bot-staging/VmMigration/v1/tests/Unit/V1/Client/VmMigrationClientTest.php delete mode 100644 owl-bot-staging/VmMigration/v1/tests/Unit/V1/VmMigrationClientTest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/GPBMetadata/Google/Cloud/Vmwareengine/V1/Vmwareengine.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/GPBMetadata/Google/Cloud/Vmwareengine/V1/VmwareengineResources.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateClusterRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateHcxActivationKeyRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPolicyRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateCloudRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateVmwareEngineNetworkRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Credentials.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteClusterRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPolicyRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateCloudRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteVmwareEngineNetworkRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetClusterRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetHcxActivationKeyRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPolicyRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeTypeRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateCloudRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetVmwareEngineNetworkRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkConfig.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeTypeConfig.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/ManagementCluster.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetNsxCredentialsRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetVcenterCredentialsRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowNsxCredentialsRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowVcenterCredentialsRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UndeletePrivateCloudRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateClusterRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPolicyRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateCloudRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateVmwareEngineNetworkRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineGrpcClient.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/Type.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork/Type.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_cluster.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_hcx_activation_key.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_policy.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_cloud.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_vmware_engine_network.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_cluster.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_policy.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_cloud.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_vmware_engine_network.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_cluster.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_hcx_activation_key.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_iam_policy.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_location.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_policy.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node_type.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_cloud.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_vmware_engine_network.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_clusters.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_hcx_activation_keys.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_locations.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_policies.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_node_types.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_clouds.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_subnets.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_vmware_engine_networks.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_nsx_credentials.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_vcenter_credentials.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/set_iam_policy.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_nsx_credentials.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_vcenter_credentials.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/undelete_private_cloud.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_cluster.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_policy.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_cloud.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_vmware_engine_network.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/Client/BaseClient/VmwareEngineBaseClient.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/Client/VmwareEngineClient.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/Gapic/VmwareEngineGapicClient.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/VmwareEngineClient.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_client_config.json delete mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_descriptor_config.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_rest_client_config.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/tests/Unit/V1/Client/VmwareEngineClientTest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/tests/Unit/V1/VmwareEngineClientTest.php delete mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/GPBMetadata/Google/Cloud/Vpcaccess/V1/VpcAccess.php delete mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector.php delete mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/State.php delete mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/Subnet.php delete mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/CreateConnectorRequest.php delete mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/DeleteConnectorRequest.php delete mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/GetConnectorRequest.php delete mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsRequest.php delete mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsResponse.php delete mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/VpcAccessServiceGrpcClient.php delete mode 100644 owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/create_connector.php delete mode 100644 owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/delete_connector.php delete mode 100644 owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/get_connector.php delete mode 100644 owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_connectors.php delete mode 100644 owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_locations.php delete mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/Gapic/VpcAccessServiceGapicClient.php delete mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/VpcAccessServiceClient.php delete mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_client_config.json delete mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_descriptor_config.php delete mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_rest_client_config.php delete mode 100644 owl-bot-staging/VpcAccess/v1/tests/Unit/V1/VpcAccessServiceClientTest.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/GPBMetadata/Google/Cloud/Webrisk/V1/Webrisk.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/CompressionType.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffRequest.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffRequest/Constraints.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse/Checksum.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse/ResponseType.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/CreateSubmissionRequest.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RawHashes.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RawIndices.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RiceDeltaEncoding.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesRequest.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesResponse.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesResponse/ThreatHash.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisRequest.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisResponse.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisResponse/ThreatUri.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/Submission.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriMetadata.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriMetadata/State.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriRequest.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatDiscovery.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatDiscovery/Platform.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatEntryAdditions.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatEntryRemovals.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/AbuseType.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/Confidence.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/Confidence/ConfidenceLevel.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/ThreatJustification.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/ThreatJustification/JustificationLabel.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatType.php delete mode 100644 owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/WebRiskServiceGrpcClient.php delete mode 100644 owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/compute_threat_list_diff.php delete mode 100644 owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/create_submission.php delete mode 100644 owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/search_hashes.php delete mode 100644 owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/search_uris.php delete mode 100644 owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/submit_uri.php delete mode 100644 owl-bot-staging/WebRisk/v1/src/V1/Gapic/WebRiskServiceGapicClient.php delete mode 100644 owl-bot-staging/WebRisk/v1/src/V1/WebRiskServiceClient.php delete mode 100644 owl-bot-staging/WebRisk/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/WebRisk/v1/src/V1/resources/web_risk_service_client_config.json delete mode 100644 owl-bot-staging/WebRisk/v1/src/V1/resources/web_risk_service_descriptor_config.php delete mode 100644 owl-bot-staging/WebRisk/v1/src/V1/resources/web_risk_service_rest_client_config.php delete mode 100644 owl-bot-staging/WebRisk/v1/tests/Unit/V1/WebRiskServiceClientTest.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/GPBMetadata/Google/Cloud/Webrisk/V1Beta1/Webrisk.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/CompressionType.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffRequest.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffRequest/Constraints.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse/Checksum.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse/ResponseType.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RawHashes.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RawIndices.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RiceDeltaEncoding.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesRequest.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesResponse.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesResponse/ThreatHash.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisRequest.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisResponse.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisResponse/ThreatUri.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatEntryAdditions.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatEntryRemovals.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatType.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/WebRiskServiceV1Beta1GrpcClient.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/compute_threat_list_diff.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/search_hashes.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/search_uris.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/src/V1beta1/Gapic/WebRiskServiceV1Beta1GapicClient.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/src/V1beta1/WebRiskServiceV1Beta1Client.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/src/V1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/WebRisk/v1beta1/src/V1beta1/resources/web_risk_service_v1_beta1_client_config.json delete mode 100644 owl-bot-staging/WebRisk/v1beta1/src/V1beta1/resources/web_risk_service_v1_beta1_descriptor_config.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/src/V1beta1/resources/web_risk_service_v1_beta1_rest_client_config.php delete mode 100644 owl-bot-staging/WebRisk/v1beta1/tests/Unit/V1beta1/WebRiskServiceV1Beta1ClientTest.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/CrawledUrl.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/Finding.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/FindingAddon.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/FindingTypeStats.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/ScanConfig.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/ScanConfigError.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/ScanRun.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/ScanRunErrorTrace.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/ScanRunWarningTrace.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/WebSecurityScanner.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/CrawledUrl.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/CreateScanConfigRequest.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/DeleteScanConfigRequest.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Finding.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/FindingTypeStats.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Form.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetFindingRequest.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetScanConfigRequest.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetScanRunRequest.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListCrawledUrlsRequest.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListCrawledUrlsResponse.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingTypeStatsRequest.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingTypeStatsResponse.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingsRequest.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingsResponse.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanConfigsRequest.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanConfigsResponse.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanRunsRequest.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanRunsResponse.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/OutdatedLibrary.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication/CustomAccount.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication/GoogleAccount.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/ExportToSecurityCommandCenter.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/RiskLevel.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Schedule.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/TargetPlatform.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/UserAgent.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfigError.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfigError/Code.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun/ExecutionState.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun/ResultState.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunErrorTrace.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunErrorTrace/Code.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunWarningTrace.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunWarningTrace/Code.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/StartScanRunRequest.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/StopScanRunRequest.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/UpdateScanConfigRequest.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ViolatingResource.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableHeaders.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableHeaders/Header.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableParameters.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/WebSecurityScannerGrpcClient.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Xss.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/create_scan_config.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/delete_scan_config.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_finding.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_scan_config.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_scan_run.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_crawled_urls.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_finding_type_stats.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_findings.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_scan_configs.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_scan_runs.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/start_scan_run.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/stop_scan_run.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/update_scan_config.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/Gapic/WebSecurityScannerGapicClient.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/WebSecurityScannerClient.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/resources/web_security_scanner_client_config.json delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/resources/web_security_scanner_descriptor_config.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/resources/web_security_scanner_rest_client_config.php delete mode 100644 owl-bot-staging/WebSecurityScanner/v1beta/tests/Unit/V1beta/WebSecurityScannerClientTest.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/cancel_execution.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/create_execution.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/get_execution.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/list_executions.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1beta/proto/src/GPBMetadata/Google/Cloud/Workflows/Executions/V1Beta/Executions.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/CancelExecutionRequest.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/CreateExecutionRequest.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution/Error.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution/State.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ExecutionView.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ExecutionsGrpcClient.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/GetExecutionRequest.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ListExecutionsRequest.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ListExecutionsResponse.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/cancel_execution.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/create_execution.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/get_execution.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/list_executions.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/ExecutionsClient.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/Gapic/ExecutionsGapicClient.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_client_config.json delete mode 100644 owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_descriptor_config.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_rest_client_config.php delete mode 100644 owl-bot-staging/Workflows/Executions/v1beta/tests/Unit/V1beta/ExecutionsClientTest.php delete mode 100644 owl-bot-staging/Workflows/v1beta/proto/src/GPBMetadata/Google/Cloud/Workflows/V1Beta/Workflows.php delete mode 100644 owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/CreateWorkflowRequest.php delete mode 100644 owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/DeleteWorkflowRequest.php delete mode 100644 owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/GetWorkflowRequest.php delete mode 100644 owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/ListWorkflowsRequest.php delete mode 100644 owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/ListWorkflowsResponse.php delete mode 100644 owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/OperationMetadata.php delete mode 100644 owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/UpdateWorkflowRequest.php delete mode 100644 owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/Workflow.php delete mode 100644 owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/Workflow/State.php delete mode 100644 owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/WorkflowsGrpcClient.php delete mode 100644 owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/create_workflow.php delete mode 100644 owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/delete_workflow.php delete mode 100644 owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/get_workflow.php delete mode 100644 owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/list_workflows.php delete mode 100644 owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/update_workflow.php delete mode 100644 owl-bot-staging/Workflows/v1beta/src/V1beta/Gapic/WorkflowsGapicClient.php delete mode 100644 owl-bot-staging/Workflows/v1beta/src/V1beta/WorkflowsClient.php delete mode 100644 owl-bot-staging/Workflows/v1beta/src/V1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/Workflows/v1beta/src/V1beta/resources/workflows_client_config.json delete mode 100644 owl-bot-staging/Workflows/v1beta/src/V1beta/resources/workflows_descriptor_config.php delete mode 100644 owl-bot-staging/Workflows/v1beta/src/V1beta/resources/workflows_rest_client_config.php delete mode 100644 owl-bot-staging/Workflows/v1beta/tests/Unit/V1beta/WorkflowsClientTest.php diff --git a/Vision/src/V1/AddProductToProductSetRequest.php b/Vision/src/V1/AddProductToProductSetRequest.php index d4333d17298e..b63cb1879314 100644 --- a/Vision/src/V1/AddProductToProductSetRequest.php +++ b/Vision/src/V1/AddProductToProductSetRequest.php @@ -32,6 +32,29 @@ class AddProductToProductSetRequest extends \Google\Protobuf\Internal\Message */ private $product = ''; + /** + * @param string $name Required. The resource name for the ProductSet to modify. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. + * @param string $product Required. The resource name for the Product to be added to this ProductSet. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * Please see {@see ProductSearchClient::productName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\AddProductToProductSetRequest + * + * @experimental + */ + public static function build(string $name, string $product): self + { + return (new self()) + ->setName($name) + ->setProduct($product); + } + /** * Constructor. * diff --git a/Vision/src/V1/AsyncBatchAnnotateFilesRequest.php b/Vision/src/V1/AsyncBatchAnnotateFilesRequest.php index 53199fb8405e..404de6b27ac6 100644 --- a/Vision/src/V1/AsyncBatchAnnotateFilesRequest.php +++ b/Vision/src/V1/AsyncBatchAnnotateFilesRequest.php @@ -36,6 +36,19 @@ class AsyncBatchAnnotateFilesRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; + /** + * @param \Google\Cloud\Vision\V1\AsyncAnnotateFileRequest[] $requests Required. Individual async file annotation requests for this batch. + * + * @return \Google\Cloud\Vision\V1\AsyncBatchAnnotateFilesRequest + * + * @experimental + */ + public static function build(array $requests): self + { + return (new self()) + ->setRequests($requests); + } + /** * Constructor. * diff --git a/Vision/src/V1/AsyncBatchAnnotateImagesRequest.php b/Vision/src/V1/AsyncBatchAnnotateImagesRequest.php index a7a498180eaf..e9a686aed5c2 100644 --- a/Vision/src/V1/AsyncBatchAnnotateImagesRequest.php +++ b/Vision/src/V1/AsyncBatchAnnotateImagesRequest.php @@ -41,6 +41,21 @@ class AsyncBatchAnnotateImagesRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; + /** + * @param \Google\Cloud\Vision\V1\AnnotateImageRequest[] $requests Required. Individual image annotation requests for this batch. + * @param \Google\Cloud\Vision\V1\OutputConfig $outputConfig Required. The desired output location and metadata (e.g. format). + * + * @return \Google\Cloud\Vision\V1\AsyncBatchAnnotateImagesRequest + * + * @experimental + */ + public static function build(array $requests, \Google\Cloud\Vision\V1\OutputConfig $outputConfig): self + { + return (new self()) + ->setRequests($requests) + ->setOutputConfig($outputConfig); + } + /** * Constructor. * diff --git a/Vision/src/V1/BatchAnnotateFilesRequest.php b/Vision/src/V1/BatchAnnotateFilesRequest.php index ffcbb366d4df..9176fad5c393 100644 --- a/Vision/src/V1/BatchAnnotateFilesRequest.php +++ b/Vision/src/V1/BatchAnnotateFilesRequest.php @@ -36,6 +36,20 @@ class BatchAnnotateFilesRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; + /** + * @param \Google\Cloud\Vision\V1\AnnotateFileRequest[] $requests Required. The list of file annotation requests. Right now we support only one + * AnnotateFileRequest in BatchAnnotateFilesRequest. + * + * @return \Google\Cloud\Vision\V1\BatchAnnotateFilesRequest + * + * @experimental + */ + public static function build(array $requests): self + { + return (new self()) + ->setRequests($requests); + } + /** * Constructor. * diff --git a/Vision/src/V1/BatchAnnotateImagesRequest.php b/Vision/src/V1/BatchAnnotateImagesRequest.php index ffe3d0a569e1..e2a66c07a760 100644 --- a/Vision/src/V1/BatchAnnotateImagesRequest.php +++ b/Vision/src/V1/BatchAnnotateImagesRequest.php @@ -35,6 +35,19 @@ class BatchAnnotateImagesRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; + /** + * @param \Google\Cloud\Vision\V1\AnnotateImageRequest[] $requests Required. Individual image annotation requests for this batch. + * + * @return \Google\Cloud\Vision\V1\BatchAnnotateImagesRequest + * + * @experimental + */ + public static function build(array $requests): self + { + return (new self()) + ->setRequests($requests); + } + /** * Constructor. * diff --git a/owl-bot-staging/Vision/V1/src/V1/Client/BaseClient/ImageAnnotatorBaseClient.php b/Vision/src/V1/Client/BaseClient/ImageAnnotatorBaseClient.php similarity index 100% rename from owl-bot-staging/Vision/V1/src/V1/Client/BaseClient/ImageAnnotatorBaseClient.php rename to Vision/src/V1/Client/BaseClient/ImageAnnotatorBaseClient.php diff --git a/owl-bot-staging/Vision/V1/src/V1/Client/BaseClient/ProductSearchBaseClient.php b/Vision/src/V1/Client/BaseClient/ProductSearchBaseClient.php similarity index 100% rename from owl-bot-staging/Vision/V1/src/V1/Client/BaseClient/ProductSearchBaseClient.php rename to Vision/src/V1/Client/BaseClient/ProductSearchBaseClient.php diff --git a/owl-bot-staging/Vision/V1/src/V1/Client/ImageAnnotatorClient.php b/Vision/src/V1/Client/ImageAnnotatorClient.php similarity index 100% rename from owl-bot-staging/Vision/V1/src/V1/Client/ImageAnnotatorClient.php rename to Vision/src/V1/Client/ImageAnnotatorClient.php diff --git a/owl-bot-staging/Vision/V1/src/V1/Client/ProductSearchClient.php b/Vision/src/V1/Client/ProductSearchClient.php similarity index 100% rename from owl-bot-staging/Vision/V1/src/V1/Client/ProductSearchClient.php rename to Vision/src/V1/Client/ProductSearchClient.php diff --git a/Vision/src/V1/CreateProductRequest.php b/Vision/src/V1/CreateProductRequest.php index a6105a57ad0f..e9794833dcbb 100644 --- a/Vision/src/V1/CreateProductRequest.php +++ b/Vision/src/V1/CreateProductRequest.php @@ -39,6 +39,30 @@ class CreateProductRequest extends \Google\Protobuf\Internal\Message */ private $product_id = ''; + /** + * @param string $parent Required. The project in which the Product should be created. + * + * Format is + * `projects/PROJECT_ID/locations/LOC_ID`. Please see + * {@see ProductSearchClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Vision\V1\Product $product Required. The product to create. + * @param string $productId A user-supplied resource id for this Product. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * + * @return \Google\Cloud\Vision\V1\CreateProductRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Vision\V1\Product $product, string $productId): self + { + return (new self()) + ->setParent($parent) + ->setProduct($product) + ->setProductId($productId); + } + /** * Constructor. * diff --git a/Vision/src/V1/CreateProductSetRequest.php b/Vision/src/V1/CreateProductSetRequest.php index b7878ac8d789..adafbbe77f3c 100644 --- a/Vision/src/V1/CreateProductSetRequest.php +++ b/Vision/src/V1/CreateProductSetRequest.php @@ -38,6 +38,29 @@ class CreateProductSetRequest extends \Google\Protobuf\Internal\Message */ private $product_set_id = ''; + /** + * @param string $parent Required. The project in which the ProductSet should be created. + * + * Format is `projects/PROJECT_ID/locations/LOC_ID`. Please see + * {@see ProductSearchClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Vision\V1\ProductSet $productSet Required. The ProductSet to create. + * @param string $productSetId A user-supplied resource id for this ProductSet. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * + * @return \Google\Cloud\Vision\V1\CreateProductSetRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Vision\V1\ProductSet $productSet, string $productSetId): self + { + return (new self()) + ->setParent($parent) + ->setProductSet($productSet) + ->setProductSetId($productSetId); + } + /** * Constructor. * diff --git a/Vision/src/V1/CreateReferenceImageRequest.php b/Vision/src/V1/CreateReferenceImageRequest.php index 35e737c8ad18..76bcdc313cac 100644 --- a/Vision/src/V1/CreateReferenceImageRequest.php +++ b/Vision/src/V1/CreateReferenceImageRequest.php @@ -40,6 +40,31 @@ class CreateReferenceImageRequest extends \Google\Protobuf\Internal\Message */ private $reference_image_id = ''; + /** + * @param string $parent Required. Resource name of the product in which to create the reference image. + * + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. Please see + * {@see ProductSearchClient::productName()} for help formatting this field. + * @param \Google\Cloud\Vision\V1\ReferenceImage $referenceImage Required. The reference image to create. + * If an image ID is specified, it is ignored. + * @param string $referenceImageId A user-supplied resource id for the ReferenceImage to be added. If set, + * the server will attempt to use this value as the resource id. If it is + * already in use, an error is returned with code ALREADY_EXISTS. Must be at + * most 128 characters long. It cannot contain the character `/`. + * + * @return \Google\Cloud\Vision\V1\CreateReferenceImageRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Vision\V1\ReferenceImage $referenceImage, string $referenceImageId): self + { + return (new self()) + ->setParent($parent) + ->setReferenceImage($referenceImage) + ->setReferenceImageId($referenceImageId); + } + /** * Constructor. * diff --git a/Vision/src/V1/DeleteProductRequest.php b/Vision/src/V1/DeleteProductRequest.php index 1c6cb0e02bc6..c7f5c0686c6f 100644 --- a/Vision/src/V1/DeleteProductRequest.php +++ b/Vision/src/V1/DeleteProductRequest.php @@ -24,6 +24,23 @@ class DeleteProductRequest extends \Google\Protobuf\Internal\Message */ private $name = ''; + /** + * @param string $name Required. Resource name of product to delete. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * Please see {@see ProductSearchClient::productName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\DeleteProductRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + /** * Constructor. * diff --git a/Vision/src/V1/DeleteProductSetRequest.php b/Vision/src/V1/DeleteProductSetRequest.php index d811b9cba94c..89ebe692cf0b 100644 --- a/Vision/src/V1/DeleteProductSetRequest.php +++ b/Vision/src/V1/DeleteProductSetRequest.php @@ -24,6 +24,23 @@ class DeleteProductSetRequest extends \Google\Protobuf\Internal\Message */ private $name = ''; + /** + * @param string $name Required. Resource name of the ProductSet to delete. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\DeleteProductSetRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + /** * Constructor. * diff --git a/Vision/src/V1/DeleteReferenceImageRequest.php b/Vision/src/V1/DeleteReferenceImageRequest.php index db12966022eb..6d82ad8850a5 100644 --- a/Vision/src/V1/DeleteReferenceImageRequest.php +++ b/Vision/src/V1/DeleteReferenceImageRequest.php @@ -24,6 +24,23 @@ class DeleteReferenceImageRequest extends \Google\Protobuf\Internal\Message */ private $name = ''; + /** + * @param string $name Required. The resource name of the reference image to delete. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` + * Please see {@see ProductSearchClient::referenceImageName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\DeleteReferenceImageRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + /** * Constructor. * diff --git a/Vision/src/V1/GetProductRequest.php b/Vision/src/V1/GetProductRequest.php index 470e31545a69..5f55af3f8a06 100644 --- a/Vision/src/V1/GetProductRequest.php +++ b/Vision/src/V1/GetProductRequest.php @@ -24,6 +24,23 @@ class GetProductRequest extends \Google\Protobuf\Internal\Message */ private $name = ''; + /** + * @param string $name Required. Resource name of the Product to get. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * Please see {@see ProductSearchClient::productName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\GetProductRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + /** * Constructor. * diff --git a/Vision/src/V1/GetProductSetRequest.php b/Vision/src/V1/GetProductSetRequest.php index 5f2e334ab531..62de33b462da 100644 --- a/Vision/src/V1/GetProductSetRequest.php +++ b/Vision/src/V1/GetProductSetRequest.php @@ -24,6 +24,23 @@ class GetProductSetRequest extends \Google\Protobuf\Internal\Message */ private $name = ''; + /** + * @param string $name Required. Resource name of the ProductSet to get. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\GetProductSetRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + /** * Constructor. * diff --git a/Vision/src/V1/GetReferenceImageRequest.php b/Vision/src/V1/GetReferenceImageRequest.php index dbe3f1225fa6..6ef7a5082beb 100644 --- a/Vision/src/V1/GetReferenceImageRequest.php +++ b/Vision/src/V1/GetReferenceImageRequest.php @@ -24,6 +24,23 @@ class GetReferenceImageRequest extends \Google\Protobuf\Internal\Message */ private $name = ''; + /** + * @param string $name Required. The resource name of the ReferenceImage to get. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. Please see + * {@see ProductSearchClient::referenceImageName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\GetReferenceImageRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + /** * Constructor. * diff --git a/Vision/src/V1/ImportProductSetsRequest.php b/Vision/src/V1/ImportProductSetsRequest.php index 3b02a3df7834..c8ec7ccbd47a 100644 --- a/Vision/src/V1/ImportProductSetsRequest.php +++ b/Vision/src/V1/ImportProductSetsRequest.php @@ -29,6 +29,24 @@ class ImportProductSetsRequest extends \Google\Protobuf\Internal\Message */ private $input_config = null; + /** + * @param string $parent Required. The project in which the ProductSets should be imported. + * + * Format is `projects/PROJECT_ID/locations/LOC_ID`. Please see + * {@see ProductSearchClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Vision\V1\ImportProductSetsInputConfig $inputConfig Required. The input content for the list of requests. + * + * @return \Google\Cloud\Vision\V1\ImportProductSetsRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Vision\V1\ImportProductSetsInputConfig $inputConfig): self + { + return (new self()) + ->setParent($parent) + ->setInputConfig($inputConfig); + } + /** * Constructor. * diff --git a/Vision/src/V1/ListProductSetsRequest.php b/Vision/src/V1/ListProductSetsRequest.php index acc48a20c9c6..87bb3be3bb0f 100644 --- a/Vision/src/V1/ListProductSetsRequest.php +++ b/Vision/src/V1/ListProductSetsRequest.php @@ -35,6 +35,22 @@ class ListProductSetsRequest extends \Google\Protobuf\Internal\Message */ private $page_token = ''; + /** + * @param string $parent Required. The project from which ProductSets should be listed. + * + * Format is `projects/PROJECT_ID/locations/LOC_ID`. Please see + * {@see ProductSearchClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\ListProductSetsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + /** * Constructor. * diff --git a/Vision/src/V1/ListProductsInProductSetRequest.php b/Vision/src/V1/ListProductsInProductSetRequest.php index 5ba960cd9e35..1694201f0a84 100644 --- a/Vision/src/V1/ListProductsInProductSetRequest.php +++ b/Vision/src/V1/ListProductsInProductSetRequest.php @@ -36,6 +36,23 @@ class ListProductsInProductSetRequest extends \Google\Protobuf\Internal\Message */ private $page_token = ''; + /** + * @param string $name Required. The ProductSet resource for which to retrieve Products. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\ListProductsInProductSetRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + /** * Constructor. * diff --git a/Vision/src/V1/ListProductsRequest.php b/Vision/src/V1/ListProductsRequest.php index 1f59758c3c1f..feec3e8e5c58 100644 --- a/Vision/src/V1/ListProductsRequest.php +++ b/Vision/src/V1/ListProductsRequest.php @@ -36,6 +36,23 @@ class ListProductsRequest extends \Google\Protobuf\Internal\Message */ private $page_token = ''; + /** + * @param string $parent Required. The project OR ProductSet from which Products should be listed. + * + * Format: + * `projects/PROJECT_ID/locations/LOC_ID` + * Please see {@see ProductSearchClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\ListProductsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + /** * Constructor. * diff --git a/Vision/src/V1/ListReferenceImagesRequest.php b/Vision/src/V1/ListReferenceImagesRequest.php index 4dec2658f247..75417445e135 100644 --- a/Vision/src/V1/ListReferenceImagesRequest.php +++ b/Vision/src/V1/ListReferenceImagesRequest.php @@ -38,6 +38,23 @@ class ListReferenceImagesRequest extends \Google\Protobuf\Internal\Message */ private $page_token = ''; + /** + * @param string $parent Required. Resource name of the product containing the reference images. + * + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. Please see + * {@see ProductSearchClient::productName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\ListReferenceImagesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + /** * Constructor. * diff --git a/Vision/src/V1/PurgeProductsRequest.php b/Vision/src/V1/PurgeProductsRequest.php index 7430e5eec76e..e1e229f645ea 100644 --- a/Vision/src/V1/PurgeProductsRequest.php +++ b/Vision/src/V1/PurgeProductsRequest.php @@ -31,6 +31,22 @@ class PurgeProductsRequest extends \Google\Protobuf\Internal\Message private $force = false; protected $target; + /** + * @param string $parent Required. The project and location in which the Products should be deleted. + * + * Format is `projects/PROJECT_ID/locations/LOC_ID`. Please see + * {@see ProductSearchClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\PurgeProductsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + /** * Constructor. * diff --git a/Vision/src/V1/RemoveProductFromProductSetRequest.php b/Vision/src/V1/RemoveProductFromProductSetRequest.php index db0e08f4fb14..4d8ebd638c24 100644 --- a/Vision/src/V1/RemoveProductFromProductSetRequest.php +++ b/Vision/src/V1/RemoveProductFromProductSetRequest.php @@ -32,6 +32,29 @@ class RemoveProductFromProductSetRequest extends \Google\Protobuf\Internal\Messa */ private $product = ''; + /** + * @param string $name Required. The resource name for the ProductSet to modify. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. + * @param string $product Required. The resource name for the Product to be removed from this ProductSet. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * Please see {@see ProductSearchClient::productName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\RemoveProductFromProductSetRequest + * + * @experimental + */ + public static function build(string $name, string $product): self + { + return (new self()) + ->setName($name) + ->setProduct($product); + } + /** * Constructor. * diff --git a/Vision/src/V1/UpdateProductRequest.php b/Vision/src/V1/UpdateProductRequest.php index 64a6a9115b3e..febfeeb880da 100644 --- a/Vision/src/V1/UpdateProductRequest.php +++ b/Vision/src/V1/UpdateProductRequest.php @@ -33,6 +33,26 @@ class UpdateProductRequest extends \Google\Protobuf\Internal\Message */ private $update_mask = null; + /** + * @param \Google\Cloud\Vision\V1\Product $product Required. The Product resource which replaces the one on the server. + * product.name is immutable. + * @param \Google\Protobuf\FieldMask $updateMask The [FieldMask][google.protobuf.FieldMask] that specifies which fields + * to update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask paths include `product_labels`, `display_name`, and + * `description`. + * + * @return \Google\Cloud\Vision\V1\UpdateProductRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Vision\V1\Product $product, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setProduct($product) + ->setUpdateMask($updateMask); + } + /** * Constructor. * diff --git a/Vision/src/V1/UpdateProductSetRequest.php b/Vision/src/V1/UpdateProductSetRequest.php index 709b67e0b499..db231b5ec775 100644 --- a/Vision/src/V1/UpdateProductSetRequest.php +++ b/Vision/src/V1/UpdateProductSetRequest.php @@ -31,6 +31,24 @@ class UpdateProductSetRequest extends \Google\Protobuf\Internal\Message */ private $update_mask = null; + /** + * @param \Google\Cloud\Vision\V1\ProductSet $productSet Required. The ProductSet resource which replaces the one on the server. + * @param \Google\Protobuf\FieldMask $updateMask The [FieldMask][google.protobuf.FieldMask] that specifies which fields to + * update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask path is `display_name`. + * + * @return \Google\Cloud\Vision\V1\UpdateProductSetRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Vision\V1\ProductSet $productSet, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setProductSet($productSet) + ->setUpdateMask($updateMask); + } + /** * Constructor. * diff --git a/Vision/src/V1/resources/image_annotator_descriptor_config.php b/Vision/src/V1/resources/image_annotator_descriptor_config.php index 91b6cbda0e1a..05ecadd575c1 100644 --- a/Vision/src/V1/resources/image_annotator_descriptor_config.php +++ b/Vision/src/V1/resources/image_annotator_descriptor_config.php @@ -12,6 +12,15 @@ 'maxPollDelayMillis' => '5000', 'totalPollTimeoutMillis' => '300000', ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], ], 'AsyncBatchAnnotateImages' => [ 'longRunning' => [ @@ -22,6 +31,42 @@ 'maxPollDelayMillis' => '5000', 'totalPollTimeoutMillis' => '300000', ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchAnnotateFiles' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\BatchAnnotateFilesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchAnnotateImages' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\BatchAnnotateImagesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'productSet' => 'projects/{project}/locations/{location}/productSets/{product_set}', ], ], ], diff --git a/Vision/src/V1/resources/product_search_descriptor_config.php b/Vision/src/V1/resources/product_search_descriptor_config.php index 3aadd4e46b91..62781007ff5c 100644 --- a/Vision/src/V1/resources/product_search_descriptor_config.php +++ b/Vision/src/V1/resources/product_search_descriptor_config.php @@ -12,6 +12,15 @@ 'maxPollDelayMillis' => '5000', 'totalPollTimeoutMillis' => '300000', ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], ], 'PurgeProducts' => [ 'longRunning' => [ @@ -22,6 +31,135 @@ 'maxPollDelayMillis' => '5000', 'totalPollTimeoutMillis' => '300000', ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'AddProductToProductSet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateProduct' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\Product', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateProductSet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ProductSet', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateReferenceImage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ReferenceImage', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteProduct' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteProductSet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteReferenceImage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetProduct' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\Product', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetProductSet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ProductSet', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetReferenceImage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ReferenceImage', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], ], 'ListProductSets' => [ 'pageStreaming' => [ @@ -32,6 +170,16 @@ 'responsePageTokenGetMethod' => 'getNextPageToken', 'resourcesGetMethod' => 'getProductSets', ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ListProductSetsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], ], 'ListProducts' => [ 'pageStreaming' => [ @@ -42,6 +190,16 @@ 'responsePageTokenGetMethod' => 'getNextPageToken', 'resourcesGetMethod' => 'getProducts', ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ListProductsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], ], 'ListProductsInProductSet' => [ 'pageStreaming' => [ @@ -52,6 +210,16 @@ 'responsePageTokenGetMethod' => 'getNextPageToken', 'resourcesGetMethod' => 'getProducts', ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ListProductsInProductSetResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], ], 'ListReferenceImages' => [ 'pageStreaming' => [ @@ -62,6 +230,60 @@ 'responsePageTokenGetMethod' => 'getNextPageToken', 'resourcesGetMethod' => 'getReferenceImages', ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ListReferenceImagesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'RemoveProductFromProductSet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateProduct' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\Product', + 'headerParams' => [ + [ + 'keyName' => 'product.name', + 'fieldAccessors' => [ + 'getProduct', + 'getName', + ], + ], + ], + ], + 'UpdateProductSet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ProductSet', + 'headerParams' => [ + [ + 'keyName' => 'product_set.name', + 'fieldAccessors' => [ + 'getProductSet', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'location' => 'projects/{project}/locations/{location}', + 'product' => 'projects/{project}/locations/{location}/products/{product}', + 'productSet' => 'projects/{project}/locations/{location}/productSets/{product_set}', + 'referenceImage' => 'projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}', ], ], ], diff --git a/owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ImageAnnotatorClientTest.php b/Vision/tests/Unit/V1/Client/ImageAnnotatorClientTest.php similarity index 100% rename from owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ImageAnnotatorClientTest.php rename to Vision/tests/Unit/V1/Client/ImageAnnotatorClientTest.php diff --git a/owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ProductSearchClientTest.php b/Vision/tests/Unit/V1/Client/ProductSearchClientTest.php similarity index 100% rename from owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ProductSearchClientTest.php rename to Vision/tests/Unit/V1/Client/ProductSearchClientTest.php diff --git a/owl-bot-staging/VpcAccess/v1/src/V1/Client/BaseClient/VpcAccessServiceBaseClient.php b/VpcAccess/src/V1/Client/BaseClient/VpcAccessServiceBaseClient.php similarity index 100% rename from owl-bot-staging/VpcAccess/v1/src/V1/Client/BaseClient/VpcAccessServiceBaseClient.php rename to VpcAccess/src/V1/Client/BaseClient/VpcAccessServiceBaseClient.php diff --git a/owl-bot-staging/VpcAccess/v1/src/V1/Client/VpcAccessServiceClient.php b/VpcAccess/src/V1/Client/VpcAccessServiceClient.php similarity index 100% rename from owl-bot-staging/VpcAccess/v1/src/V1/Client/VpcAccessServiceClient.php rename to VpcAccess/src/V1/Client/VpcAccessServiceClient.php diff --git a/VpcAccess/src/V1/CreateConnectorRequest.php b/VpcAccess/src/V1/CreateConnectorRequest.php index 7d7efcbcfdc2..b49a5bbec05f 100644 --- a/VpcAccess/src/V1/CreateConnectorRequest.php +++ b/VpcAccess/src/V1/CreateConnectorRequest.php @@ -35,6 +35,25 @@ class CreateConnectorRequest extends \Google\Protobuf\Internal\Message */ private $connector = null; + /** + * @param string $parent Required. The project and location in which the configuration should be created, + * specified in the format `projects/*/locations/*`. Please see + * {@see VpcAccessServiceClient::locationName()} for help formatting this field. + * @param string $connectorId Required. The ID to use for this connector. + * @param \Google\Cloud\VpcAccess\V1\Connector $connector Required. Resource to create. + * + * @return \Google\Cloud\VpcAccess\V1\CreateConnectorRequest + * + * @experimental + */ + public static function build(string $parent, string $connectorId, \Google\Cloud\VpcAccess\V1\Connector $connector): self + { + return (new self()) + ->setParent($parent) + ->setConnectorId($connectorId) + ->setConnector($connector); + } + /** * Constructor. * diff --git a/VpcAccess/src/V1/DeleteConnectorRequest.php b/VpcAccess/src/V1/DeleteConnectorRequest.php index 16954fd458e7..fb81852e3e40 100644 --- a/VpcAccess/src/V1/DeleteConnectorRequest.php +++ b/VpcAccess/src/V1/DeleteConnectorRequest.php @@ -22,6 +22,20 @@ class DeleteConnectorRequest extends \Google\Protobuf\Internal\Message */ private $name = ''; + /** + * @param string $name Required. Name of a Serverless VPC Access connector to delete. Please see + * {@see VpcAccessServiceClient::connectorName()} for help formatting this field. + * + * @return \Google\Cloud\VpcAccess\V1\DeleteConnectorRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + /** * Constructor. * diff --git a/VpcAccess/src/V1/GetConnectorRequest.php b/VpcAccess/src/V1/GetConnectorRequest.php index 0481910aa5d7..1c1587bbf048 100644 --- a/VpcAccess/src/V1/GetConnectorRequest.php +++ b/VpcAccess/src/V1/GetConnectorRequest.php @@ -22,6 +22,20 @@ class GetConnectorRequest extends \Google\Protobuf\Internal\Message */ private $name = ''; + /** + * @param string $name Required. Name of a Serverless VPC Access connector to get. Please see + * {@see VpcAccessServiceClient::connectorName()} for help formatting this field. + * + * @return \Google\Cloud\VpcAccess\V1\GetConnectorRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + /** * Constructor. * diff --git a/VpcAccess/src/V1/ListConnectorsRequest.php b/VpcAccess/src/V1/ListConnectorsRequest.php index d1925a466fc3..7f9fc3f4c24f 100644 --- a/VpcAccess/src/V1/ListConnectorsRequest.php +++ b/VpcAccess/src/V1/ListConnectorsRequest.php @@ -34,6 +34,20 @@ class ListConnectorsRequest extends \Google\Protobuf\Internal\Message */ private $page_token = ''; + /** + * @param string $parent Required. The project and location from which the routes should be listed. Please see + * {@see VpcAccessServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VpcAccess\V1\ListConnectorsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + /** * Constructor. * diff --git a/VpcAccess/src/V1/resources/vpc_access_service_descriptor_config.php b/VpcAccess/src/V1/resources/vpc_access_service_descriptor_config.php index 0ea85b60905b..d7820fe3a3fb 100644 --- a/VpcAccess/src/V1/resources/vpc_access_service_descriptor_config.php +++ b/VpcAccess/src/V1/resources/vpc_access_service_descriptor_config.php @@ -12,6 +12,15 @@ 'maxPollDelayMillis' => '5000', 'totalPollTimeoutMillis' => '300000', ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], ], 'DeleteConnector' => [ 'longRunning' => [ @@ -22,6 +31,27 @@ 'maxPollDelayMillis' => '5000', 'totalPollTimeoutMillis' => '300000', ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetConnector' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VpcAccess\V1\Connector', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], ], 'ListConnectors' => [ 'pageStreaming' => [ @@ -32,6 +62,16 @@ 'responsePageTokenGetMethod' => 'getNextPageToken', 'resourcesGetMethod' => 'getConnectors', ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VpcAccess\V1\ListConnectorsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], ], 'ListLocations' => [ 'pageStreaming' => [ @@ -42,8 +82,22 @@ 'responsePageTokenGetMethod' => 'getNextPageToken', 'resourcesGetMethod' => 'getLocations', ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], 'interfaceOverride' => 'google.cloud.location.Locations', ], + 'templateMap' => [ + 'connector' => 'projects/{project}/locations/{location}/connectors/{connector}', + 'location' => 'projects/{project}/locations/{location}', + ], ], ], ]; diff --git a/owl-bot-staging/VpcAccess/v1/tests/Unit/V1/Client/VpcAccessServiceClientTest.php b/VpcAccess/tests/Unit/V1/Client/VpcAccessServiceClientTest.php similarity index 100% rename from owl-bot-staging/VpcAccess/v1/tests/Unit/V1/Client/VpcAccessServiceClientTest.php rename to VpcAccess/tests/Unit/V1/Client/VpcAccessServiceClientTest.php diff --git a/owl-bot-staging/WebRisk/v1/src/V1/Client/BaseClient/WebRiskServiceBaseClient.php b/WebRisk/src/V1/Client/BaseClient/WebRiskServiceBaseClient.php similarity index 100% rename from owl-bot-staging/WebRisk/v1/src/V1/Client/BaseClient/WebRiskServiceBaseClient.php rename to WebRisk/src/V1/Client/BaseClient/WebRiskServiceBaseClient.php diff --git a/owl-bot-staging/WebRisk/v1/src/V1/Client/WebRiskServiceClient.php b/WebRisk/src/V1/Client/WebRiskServiceClient.php similarity index 100% rename from owl-bot-staging/WebRisk/v1/src/V1/Client/WebRiskServiceClient.php rename to WebRisk/src/V1/Client/WebRiskServiceClient.php diff --git a/WebRisk/src/V1/ComputeThreatListDiffRequest.php b/WebRisk/src/V1/ComputeThreatListDiffRequest.php index dae7ec0c0eaa..4411a416c179 100644 --- a/WebRisk/src/V1/ComputeThreatListDiffRequest.php +++ b/WebRisk/src/V1/ComputeThreatListDiffRequest.php @@ -40,6 +40,30 @@ class ComputeThreatListDiffRequest extends \Google\Protobuf\Internal\Message */ private $constraints = null; + /** + * @param int $threatType Required. The threat list to update. Only a single ThreatType should be + * specified per request. If you want to handle multiple ThreatTypes, you must + * make one request per ThreatType. + * For allowed values, use constants defined on {@see \Google\Cloud\WebRisk\V1\ThreatType} + * @param string $versionToken The current version token of the client for the requested list (the + * client version that was received from the last successful diff). + * If the client does not have a version token (this is the first time calling + * ComputeThreatListDiff), this may be left empty and a full database + * snapshot will be returned. + * @param \Google\Cloud\WebRisk\V1\ComputeThreatListDiffRequest\Constraints $constraints Required. The constraints associated with this request. + * + * @return \Google\Cloud\WebRisk\V1\ComputeThreatListDiffRequest + * + * @experimental + */ + public static function build(int $threatType, string $versionToken, \Google\Cloud\WebRisk\V1\ComputeThreatListDiffRequest\Constraints $constraints): self + { + return (new self()) + ->setThreatType($threatType) + ->setVersionToken($versionToken) + ->setConstraints($constraints); + } + /** * Constructor. * diff --git a/WebRisk/src/V1/CreateSubmissionRequest.php b/WebRisk/src/V1/CreateSubmissionRequest.php index d6cdfb3d5c81..d92be7b35781 100644 --- a/WebRisk/src/V1/CreateSubmissionRequest.php +++ b/WebRisk/src/V1/CreateSubmissionRequest.php @@ -29,6 +29,23 @@ class CreateSubmissionRequest extends \Google\Protobuf\Internal\Message */ private $submission = null; + /** + * @param string $parent Required. The name of the project that is making the submission. This + * string is in the format "projects/{project_number}". Please see + * {@see WebRiskServiceClient::projectName()} for help formatting this field. + * @param \Google\Cloud\WebRisk\V1\Submission $submission Required. The submission that contains the content of the phishing report. + * + * @return \Google\Cloud\WebRisk\V1\CreateSubmissionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\WebRisk\V1\Submission $submission): self + { + return (new self()) + ->setParent($parent) + ->setSubmission($submission); + } + /** * Constructor. * diff --git a/WebRisk/src/V1/SearchHashesRequest.php b/WebRisk/src/V1/SearchHashesRequest.php index a29e79cec05f..cc89da297737 100644 --- a/WebRisk/src/V1/SearchHashesRequest.php +++ b/WebRisk/src/V1/SearchHashesRequest.php @@ -32,6 +32,26 @@ class SearchHashesRequest extends \Google\Protobuf\Internal\Message */ private $threat_types; + /** + * @param string $hashPrefix A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + * hash. For JSON requests, this field is base64-encoded. + * Note that if this parameter is provided by a URI, it must be encoded using + * the web safe base64 variant (RFC 4648). + * @param int[] $threatTypes Required. The ThreatLists to search in. Multiple ThreatLists may be + * specified. + * For allowed values, use constants defined on {@see \Google\Cloud\WebRisk\V1\ThreatType} + * + * @return \Google\Cloud\WebRisk\V1\SearchHashesRequest + * + * @experimental + */ + public static function build(string $hashPrefix, array $threatTypes): self + { + return (new self()) + ->setHashPrefix($hashPrefix) + ->setThreatTypes($threatTypes); + } + /** * Constructor. * diff --git a/WebRisk/src/V1/SearchUrisRequest.php b/WebRisk/src/V1/SearchUrisRequest.php index 9a893fc3d873..bed3dfb1ac6d 100644 --- a/WebRisk/src/V1/SearchUrisRequest.php +++ b/WebRisk/src/V1/SearchUrisRequest.php @@ -29,6 +29,23 @@ class SearchUrisRequest extends \Google\Protobuf\Internal\Message */ private $threat_types; + /** + * @param string $uri Required. The URI to be checked for matches. + * @param int[] $threatTypes Required. The ThreatLists to search in. Multiple ThreatLists may be + * specified. + * For allowed values, use constants defined on {@see \Google\Cloud\WebRisk\V1\ThreatType} + * + * @return \Google\Cloud\WebRisk\V1\SearchUrisRequest + * + * @experimental + */ + public static function build(string $uri, array $threatTypes): self + { + return (new self()) + ->setUri($uri) + ->setThreatTypes($threatTypes); + } + /** * Constructor. * diff --git a/WebRisk/src/V1/resources/web_risk_service_descriptor_config.php b/WebRisk/src/V1/resources/web_risk_service_descriptor_config.php index 1b17faa7eafe..1eb7f1427c23 100644 --- a/WebRisk/src/V1/resources/web_risk_service_descriptor_config.php +++ b/WebRisk/src/V1/resources/web_risk_service_descriptor_config.php @@ -12,6 +12,42 @@ 'maxPollDelayMillis' => '5000', 'totalPollTimeoutMillis' => '300000', ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ComputeThreatListDiff' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\WebRisk\V1\ComputeThreatListDiffResponse', + ], + 'CreateSubmission' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\WebRisk\V1\Submission', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'SearchHashes' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\WebRisk\V1\SearchHashesResponse', + ], + 'SearchUris' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\WebRisk\V1\SearchUrisResponse', + ], + 'templateMap' => [ + 'project' => 'projects/{project}', ], ], ], diff --git a/owl-bot-staging/WebRisk/v1/tests/Unit/V1/Client/WebRiskServiceClientTest.php b/WebRisk/tests/Unit/V1/Client/WebRiskServiceClientTest.php similarity index 100% rename from owl-bot-staging/WebRisk/v1/tests/Unit/V1/Client/WebRiskServiceClientTest.php rename to WebRisk/tests/Unit/V1/Client/WebRiskServiceClientTest.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/CrawledUrl.php b/WebSecurityScanner/metadata/V1/CrawledUrl.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/CrawledUrl.php rename to WebSecurityScanner/metadata/V1/CrawledUrl.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/Finding.php b/WebSecurityScanner/metadata/V1/Finding.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/Finding.php rename to WebSecurityScanner/metadata/V1/Finding.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/FindingAddon.php b/WebSecurityScanner/metadata/V1/FindingAddon.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/FindingAddon.php rename to WebSecurityScanner/metadata/V1/FindingAddon.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/FindingTypeStats.php b/WebSecurityScanner/metadata/V1/FindingTypeStats.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/FindingTypeStats.php rename to WebSecurityScanner/metadata/V1/FindingTypeStats.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanConfig.php b/WebSecurityScanner/metadata/V1/ScanConfig.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanConfig.php rename to WebSecurityScanner/metadata/V1/ScanConfig.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanConfigError.php b/WebSecurityScanner/metadata/V1/ScanConfigError.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanConfigError.php rename to WebSecurityScanner/metadata/V1/ScanConfigError.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanRun.php b/WebSecurityScanner/metadata/V1/ScanRun.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanRun.php rename to WebSecurityScanner/metadata/V1/ScanRun.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanRunErrorTrace.php b/WebSecurityScanner/metadata/V1/ScanRunErrorTrace.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanRunErrorTrace.php rename to WebSecurityScanner/metadata/V1/ScanRunErrorTrace.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanRunLog.php b/WebSecurityScanner/metadata/V1/ScanRunLog.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanRunLog.php rename to WebSecurityScanner/metadata/V1/ScanRunLog.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanRunWarningTrace.php b/WebSecurityScanner/metadata/V1/ScanRunWarningTrace.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/ScanRunWarningTrace.php rename to WebSecurityScanner/metadata/V1/ScanRunWarningTrace.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/WebSecurityScanner.php b/WebSecurityScanner/metadata/V1/WebSecurityScanner.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1/WebSecurityScanner.php rename to WebSecurityScanner/metadata/V1/WebSecurityScanner.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/create_scan_config.php b/WebSecurityScanner/samples/V1/WebSecurityScannerClient/create_scan_config.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/create_scan_config.php rename to WebSecurityScanner/samples/V1/WebSecurityScannerClient/create_scan_config.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/delete_scan_config.php b/WebSecurityScanner/samples/V1/WebSecurityScannerClient/delete_scan_config.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/delete_scan_config.php rename to WebSecurityScanner/samples/V1/WebSecurityScannerClient/delete_scan_config.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/get_finding.php b/WebSecurityScanner/samples/V1/WebSecurityScannerClient/get_finding.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/get_finding.php rename to WebSecurityScanner/samples/V1/WebSecurityScannerClient/get_finding.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/get_scan_config.php b/WebSecurityScanner/samples/V1/WebSecurityScannerClient/get_scan_config.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/get_scan_config.php rename to WebSecurityScanner/samples/V1/WebSecurityScannerClient/get_scan_config.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/get_scan_run.php b/WebSecurityScanner/samples/V1/WebSecurityScannerClient/get_scan_run.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/get_scan_run.php rename to WebSecurityScanner/samples/V1/WebSecurityScannerClient/get_scan_run.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_crawled_urls.php b/WebSecurityScanner/samples/V1/WebSecurityScannerClient/list_crawled_urls.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_crawled_urls.php rename to WebSecurityScanner/samples/V1/WebSecurityScannerClient/list_crawled_urls.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_finding_type_stats.php b/WebSecurityScanner/samples/V1/WebSecurityScannerClient/list_finding_type_stats.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_finding_type_stats.php rename to WebSecurityScanner/samples/V1/WebSecurityScannerClient/list_finding_type_stats.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_findings.php b/WebSecurityScanner/samples/V1/WebSecurityScannerClient/list_findings.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_findings.php rename to WebSecurityScanner/samples/V1/WebSecurityScannerClient/list_findings.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_scan_configs.php b/WebSecurityScanner/samples/V1/WebSecurityScannerClient/list_scan_configs.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_scan_configs.php rename to WebSecurityScanner/samples/V1/WebSecurityScannerClient/list_scan_configs.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_scan_runs.php b/WebSecurityScanner/samples/V1/WebSecurityScannerClient/list_scan_runs.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/list_scan_runs.php rename to WebSecurityScanner/samples/V1/WebSecurityScannerClient/list_scan_runs.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/start_scan_run.php b/WebSecurityScanner/samples/V1/WebSecurityScannerClient/start_scan_run.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/start_scan_run.php rename to WebSecurityScanner/samples/V1/WebSecurityScannerClient/start_scan_run.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/stop_scan_run.php b/WebSecurityScanner/samples/V1/WebSecurityScannerClient/stop_scan_run.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/stop_scan_run.php rename to WebSecurityScanner/samples/V1/WebSecurityScannerClient/stop_scan_run.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/update_scan_config.php b/WebSecurityScanner/samples/V1/WebSecurityScannerClient/update_scan_config.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/samples/V1/WebSecurityScannerClient/update_scan_config.php rename to WebSecurityScanner/samples/V1/WebSecurityScannerClient/update_scan_config.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/src/V1/Client/BaseClient/WebSecurityScannerBaseClient.php b/WebSecurityScanner/src/V1/Client/BaseClient/WebSecurityScannerBaseClient.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/src/V1/Client/BaseClient/WebSecurityScannerBaseClient.php rename to WebSecurityScanner/src/V1/Client/BaseClient/WebSecurityScannerBaseClient.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/src/V1/Client/WebSecurityScannerClient.php b/WebSecurityScanner/src/V1/Client/WebSecurityScannerClient.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/src/V1/Client/WebSecurityScannerClient.php rename to WebSecurityScanner/src/V1/Client/WebSecurityScannerClient.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/CrawledUrl.php b/WebSecurityScanner/src/V1/CrawledUrl.php similarity index 97% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/CrawledUrl.php rename to WebSecurityScanner/src/V1/CrawledUrl.php index 64ba4bc60cbc..02c39e1e0008 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/CrawledUrl.php +++ b/WebSecurityScanner/src/V1/CrawledUrl.php @@ -23,19 +23,19 @@ class CrawledUrl extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string http_method = 1; */ - protected $http_method = ''; + private $http_method = ''; /** * Output only. The URL that was crawled. * * Generated from protobuf field string url = 2; */ - protected $url = ''; + private $url = ''; /** * Output only. The body of the request that was used to visit the URL. * * Generated from protobuf field string body = 3; */ - protected $body = ''; + private $body = ''; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/CreateScanConfigRequest.php b/WebSecurityScanner/src/V1/CreateScanConfigRequest.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/CreateScanConfigRequest.php rename to WebSecurityScanner/src/V1/CreateScanConfigRequest.php index fff8861ade4f..7304c81603fd 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/CreateScanConfigRequest.php +++ b/WebSecurityScanner/src/V1/CreateScanConfigRequest.php @@ -21,13 +21,13 @@ class CreateScanConfigRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1; */ - protected $parent = ''; + private $parent = ''; /** * Required. The ScanConfig to be created. * * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig scan_config = 2; */ - protected $scan_config = null; + private $scan_config = null; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/DeleteScanConfigRequest.php b/WebSecurityScanner/src/V1/DeleteScanConfigRequest.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/DeleteScanConfigRequest.php rename to WebSecurityScanner/src/V1/DeleteScanConfigRequest.php index c425beafce9d..a80b0a779f66 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/DeleteScanConfigRequest.php +++ b/WebSecurityScanner/src/V1/DeleteScanConfigRequest.php @@ -21,7 +21,7 @@ class DeleteScanConfigRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1; */ - protected $name = ''; + private $name = ''; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Finding.php b/WebSecurityScanner/src/V1/Finding.php similarity index 97% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Finding.php rename to WebSecurityScanner/src/V1/Finding.php index 4bc03c3293b3..c9d0c46bdd6c 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Finding.php +++ b/WebSecurityScanner/src/V1/Finding.php @@ -23,7 +23,7 @@ class Finding extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1; */ - protected $name = ''; + private $name = ''; /** * Output only. The type of the Finding. * Detailed and up-to-date information on findings can be found here: @@ -31,111 +31,111 @@ class Finding extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string finding_type = 2; */ - protected $finding_type = ''; + private $finding_type = ''; /** * Output only. The severity level of the reported vulnerability. * * Generated from protobuf field .google.cloud.websecurityscanner.v1.Finding.Severity severity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - protected $severity = 0; + private $severity = 0; /** * Output only. The http method of the request that triggered the vulnerability, in * uppercase. * * Generated from protobuf field string http_method = 3; */ - protected $http_method = ''; + private $http_method = ''; /** * Output only. The URL produced by the server-side fuzzer and used in the request that * triggered the vulnerability. * * Generated from protobuf field string fuzzed_url = 4; */ - protected $fuzzed_url = ''; + private $fuzzed_url = ''; /** * Output only. The body of the request that triggered the vulnerability. * * Generated from protobuf field string body = 5; */ - protected $body = ''; + private $body = ''; /** * Output only. The description of the vulnerability. * * Generated from protobuf field string description = 6; */ - protected $description = ''; + private $description = ''; /** * Output only. The URL containing human-readable payload that user can leverage to * reproduce the vulnerability. * * Generated from protobuf field string reproduction_url = 7; */ - protected $reproduction_url = ''; + private $reproduction_url = ''; /** * Output only. If the vulnerability was originated from nested IFrame, the immediate * parent IFrame is reported. * * Generated from protobuf field string frame_url = 8; */ - protected $frame_url = ''; + private $frame_url = ''; /** * Output only. The URL where the browser lands when the vulnerability is detected. * * Generated from protobuf field string final_url = 9; */ - protected $final_url = ''; + private $final_url = ''; /** * Output only. The tracking ID uniquely identifies a vulnerability instance across * multiple ScanRuns. * * Generated from protobuf field string tracking_id = 10; */ - protected $tracking_id = ''; + private $tracking_id = ''; /** * Output only. An addon containing information reported for a vulnerability with an HTML * form, if any. * * Generated from protobuf field .google.cloud.websecurityscanner.v1.Form form = 16; */ - protected $form = null; + private $form = null; /** * Output only. An addon containing information about outdated libraries. * * Generated from protobuf field .google.cloud.websecurityscanner.v1.OutdatedLibrary outdated_library = 11; */ - protected $outdated_library = null; + private $outdated_library = null; /** * Output only. An addon containing detailed information regarding any resource causing the * vulnerability such as JavaScript sources, image, audio files, etc. * * Generated from protobuf field .google.cloud.websecurityscanner.v1.ViolatingResource violating_resource = 12; */ - protected $violating_resource = null; + private $violating_resource = null; /** * Output only. An addon containing information about vulnerable or missing HTTP headers. * * Generated from protobuf field .google.cloud.websecurityscanner.v1.VulnerableHeaders vulnerable_headers = 15; */ - protected $vulnerable_headers = null; + private $vulnerable_headers = null; /** * Output only. An addon containing information about request parameters which were found * to be vulnerable. * * Generated from protobuf field .google.cloud.websecurityscanner.v1.VulnerableParameters vulnerable_parameters = 13; */ - protected $vulnerable_parameters = null; + private $vulnerable_parameters = null; /** * Output only. An addon containing information reported for an XSS, if any. * * Generated from protobuf field .google.cloud.websecurityscanner.v1.Xss xss = 14; */ - protected $xss = null; + private $xss = null; /** * Output only. An addon containing information reported for an XXE, if any. * * Generated from protobuf field .google.cloud.websecurityscanner.v1.Xxe xxe = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - protected $xxe = null; + private $xxe = null; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Finding/Severity.php b/WebSecurityScanner/src/V1/Finding/Severity.php similarity index 91% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Finding/Severity.php rename to WebSecurityScanner/src/V1/Finding/Severity.php index 414c89667eba..1618f553f0d7 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Finding/Severity.php +++ b/WebSecurityScanner/src/V1/Finding/Severity.php @@ -73,6 +73,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Severity::class, \Google\Cloud\WebSecurityScanner\V1\Finding_Severity::class); diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/FindingTypeStats.php b/WebSecurityScanner/src/V1/FindingTypeStats.php similarity index 97% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/FindingTypeStats.php rename to WebSecurityScanner/src/V1/FindingTypeStats.php index 52c1f5d58553..18e81a062c50 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/FindingTypeStats.php +++ b/WebSecurityScanner/src/V1/FindingTypeStats.php @@ -21,13 +21,13 @@ class FindingTypeStats extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string finding_type = 1; */ - protected $finding_type = ''; + private $finding_type = ''; /** * Output only. The count of findings belonging to this finding type. * * Generated from protobuf field int32 finding_count = 2; */ - protected $finding_count = 0; + private $finding_count = 0; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Form.php b/WebSecurityScanner/src/V1/Form.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Form.php rename to WebSecurityScanner/src/V1/Form.php index d7c8fa1b4d63..9f1711502a2e 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Form.php +++ b/WebSecurityScanner/src/V1/Form.php @@ -20,7 +20,7 @@ class Form extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string action_uri = 1; */ - protected $action_uri = ''; + private $action_uri = ''; /** * ! The names of form fields related to the vulnerability. * diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/GetFindingRequest.php b/WebSecurityScanner/src/V1/GetFindingRequest.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/GetFindingRequest.php rename to WebSecurityScanner/src/V1/GetFindingRequest.php index 56613939f49b..74716b561f83 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/GetFindingRequest.php +++ b/WebSecurityScanner/src/V1/GetFindingRequest.php @@ -22,7 +22,7 @@ class GetFindingRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1; */ - protected $name = ''; + private $name = ''; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/GetScanConfigRequest.php b/WebSecurityScanner/src/V1/GetScanConfigRequest.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/GetScanConfigRequest.php rename to WebSecurityScanner/src/V1/GetScanConfigRequest.php index b2835242fe3b..994c1d2d73ae 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/GetScanConfigRequest.php +++ b/WebSecurityScanner/src/V1/GetScanConfigRequest.php @@ -21,7 +21,7 @@ class GetScanConfigRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1; */ - protected $name = ''; + private $name = ''; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/GetScanRunRequest.php b/WebSecurityScanner/src/V1/GetScanRunRequest.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/GetScanRunRequest.php rename to WebSecurityScanner/src/V1/GetScanRunRequest.php index b7d3f11f9e1e..6fe198582180 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/GetScanRunRequest.php +++ b/WebSecurityScanner/src/V1/GetScanRunRequest.php @@ -22,7 +22,7 @@ class GetScanRunRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1; */ - protected $name = ''; + private $name = ''; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListCrawledUrlsRequest.php b/WebSecurityScanner/src/V1/ListCrawledUrlsRequest.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListCrawledUrlsRequest.php rename to WebSecurityScanner/src/V1/ListCrawledUrlsRequest.php index 55c61e7b7fba..b9fcb855a282 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListCrawledUrlsRequest.php +++ b/WebSecurityScanner/src/V1/ListCrawledUrlsRequest.php @@ -22,7 +22,7 @@ class ListCrawledUrlsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1; */ - protected $parent = ''; + private $parent = ''; /** * A token identifying a page of results to be returned. This should be a * `next_page_token` value returned from a previous List request. @@ -30,7 +30,7 @@ class ListCrawledUrlsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 2; */ - protected $page_token = ''; + private $page_token = ''; /** * The maximum number of CrawledUrls to return, can be limited by server. * If not specified or not positive, the implementation will select a @@ -38,7 +38,7 @@ class ListCrawledUrlsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 3; */ - protected $page_size = 0; + private $page_size = 0; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListCrawledUrlsResponse.php b/WebSecurityScanner/src/V1/ListCrawledUrlsResponse.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListCrawledUrlsResponse.php rename to WebSecurityScanner/src/V1/ListCrawledUrlsResponse.php index 2a14aca66997..334c23bc2075 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListCrawledUrlsResponse.php +++ b/WebSecurityScanner/src/V1/ListCrawledUrlsResponse.php @@ -27,7 +27,7 @@ class ListCrawledUrlsResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - protected $next_page_token = ''; + private $next_page_token = ''; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingTypeStatsRequest.php b/WebSecurityScanner/src/V1/ListFindingTypeStatsRequest.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingTypeStatsRequest.php rename to WebSecurityScanner/src/V1/ListFindingTypeStatsRequest.php index 2e969337f774..b5a85a275f4c 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingTypeStatsRequest.php +++ b/WebSecurityScanner/src/V1/ListFindingTypeStatsRequest.php @@ -22,7 +22,7 @@ class ListFindingTypeStatsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1; */ - protected $parent = ''; + private $parent = ''; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingTypeStatsResponse.php b/WebSecurityScanner/src/V1/ListFindingTypeStatsResponse.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingTypeStatsResponse.php rename to WebSecurityScanner/src/V1/ListFindingTypeStatsResponse.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingsRequest.php b/WebSecurityScanner/src/V1/ListFindingsRequest.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingsRequest.php rename to WebSecurityScanner/src/V1/ListFindingsRequest.php index 44485fffb638..6da53e2b0844 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingsRequest.php +++ b/WebSecurityScanner/src/V1/ListFindingsRequest.php @@ -22,7 +22,7 @@ class ListFindingsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1; */ - protected $parent = ''; + private $parent = ''; /** * The filter expression. The expression must be in the format: * . @@ -31,7 +31,7 @@ class ListFindingsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string filter = 2; */ - protected $filter = ''; + private $filter = ''; /** * A token identifying a page of results to be returned. This should be a * `next_page_token` value returned from a previous List request. @@ -39,7 +39,7 @@ class ListFindingsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - protected $page_token = ''; + private $page_token = ''; /** * The maximum number of Findings to return, can be limited by server. * If not specified or not positive, the implementation will select a @@ -47,7 +47,7 @@ class ListFindingsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 4; */ - protected $page_size = 0; + private $page_size = 0; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingsResponse.php b/WebSecurityScanner/src/V1/ListFindingsResponse.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingsResponse.php rename to WebSecurityScanner/src/V1/ListFindingsResponse.php index 8adbe0f0cb91..651fc29b6b1d 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListFindingsResponse.php +++ b/WebSecurityScanner/src/V1/ListFindingsResponse.php @@ -27,7 +27,7 @@ class ListFindingsResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - protected $next_page_token = ''; + private $next_page_token = ''; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanConfigsRequest.php b/WebSecurityScanner/src/V1/ListScanConfigsRequest.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanConfigsRequest.php rename to WebSecurityScanner/src/V1/ListScanConfigsRequest.php index fdd69ae7994e..966bce32086f 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanConfigsRequest.php +++ b/WebSecurityScanner/src/V1/ListScanConfigsRequest.php @@ -21,7 +21,7 @@ class ListScanConfigsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1; */ - protected $parent = ''; + private $parent = ''; /** * A token identifying a page of results to be returned. This should be a * `next_page_token` value returned from a previous List request. @@ -29,7 +29,7 @@ class ListScanConfigsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 2; */ - protected $page_token = ''; + private $page_token = ''; /** * The maximum number of ScanConfigs to return, can be limited by server. * If not specified or not positive, the implementation will select a @@ -37,7 +37,7 @@ class ListScanConfigsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 3; */ - protected $page_size = 0; + private $page_size = 0; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanConfigsResponse.php b/WebSecurityScanner/src/V1/ListScanConfigsResponse.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanConfigsResponse.php rename to WebSecurityScanner/src/V1/ListScanConfigsResponse.php index 4fe50cac7c9a..e035a6058910 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanConfigsResponse.php +++ b/WebSecurityScanner/src/V1/ListScanConfigsResponse.php @@ -27,7 +27,7 @@ class ListScanConfigsResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - protected $next_page_token = ''; + private $next_page_token = ''; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanRunsRequest.php b/WebSecurityScanner/src/V1/ListScanRunsRequest.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanRunsRequest.php rename to WebSecurityScanner/src/V1/ListScanRunsRequest.php index ad0f4a66754d..9f6f1296801f 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanRunsRequest.php +++ b/WebSecurityScanner/src/V1/ListScanRunsRequest.php @@ -21,7 +21,7 @@ class ListScanRunsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1; */ - protected $parent = ''; + private $parent = ''; /** * A token identifying a page of results to be returned. This should be a * `next_page_token` value returned from a previous List request. @@ -29,7 +29,7 @@ class ListScanRunsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 2; */ - protected $page_token = ''; + private $page_token = ''; /** * The maximum number of ScanRuns to return, can be limited by server. * If not specified or not positive, the implementation will select a @@ -37,7 +37,7 @@ class ListScanRunsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 3; */ - protected $page_size = 0; + private $page_size = 0; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanRunsResponse.php b/WebSecurityScanner/src/V1/ListScanRunsResponse.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanRunsResponse.php rename to WebSecurityScanner/src/V1/ListScanRunsResponse.php index 716f771565ec..a83a4bfa935c 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ListScanRunsResponse.php +++ b/WebSecurityScanner/src/V1/ListScanRunsResponse.php @@ -27,7 +27,7 @@ class ListScanRunsResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - protected $next_page_token = ''; + private $next_page_token = ''; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/OutdatedLibrary.php b/WebSecurityScanner/src/V1/OutdatedLibrary.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/OutdatedLibrary.php rename to WebSecurityScanner/src/V1/OutdatedLibrary.php index 2ec473bc7eeb..a72216c0f3d9 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/OutdatedLibrary.php +++ b/WebSecurityScanner/src/V1/OutdatedLibrary.php @@ -20,13 +20,13 @@ class OutdatedLibrary extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string library_name = 1; */ - protected $library_name = ''; + private $library_name = ''; /** * The version number. * * Generated from protobuf field string version = 2; */ - protected $version = ''; + private $version = ''; /** * URLs to learn more information about the vulnerabilities in the library. * diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig.php b/WebSecurityScanner/src/V1/ScanConfig.php similarity index 97% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig.php rename to WebSecurityScanner/src/V1/ScanConfig.php index 2a96fcca040b..fc94ed8b5598 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig.php +++ b/WebSecurityScanner/src/V1/ScanConfig.php @@ -22,13 +22,13 @@ class ScanConfig extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1; */ - protected $name = ''; + private $name = ''; /** * Required. The user provided display name of the ScanConfig. * * Generated from protobuf field string display_name = 2; */ - protected $display_name = ''; + private $display_name = ''; /** * The maximum QPS during scanning. A valid value ranges from 5 to 20 * inclusively. If the field is unspecified or its value is set 0, server will @@ -37,7 +37,7 @@ class ScanConfig extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 max_qps = 3; */ - protected $max_qps = 0; + private $max_qps = 0; /** * Required. The starting URLs from which the scanner finds site pages. * @@ -50,13 +50,13 @@ class ScanConfig extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.Authentication authentication = 5; */ - protected $authentication = null; + private $authentication = null; /** * The user agent used during scanning. * * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.UserAgent user_agent = 6; */ - protected $user_agent = 0; + private $user_agent = 0; /** * The excluded URL patterns as described in * https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls @@ -69,40 +69,40 @@ class ScanConfig extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.Schedule schedule = 8; */ - protected $schedule = null; + private $schedule = null; /** * Controls export of scan configurations and results to Security * Command Center. * * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.ExportToSecurityCommandCenter export_to_security_command_center = 10; */ - protected $export_to_security_command_center = 0; + private $export_to_security_command_center = 0; /** * The risk level selected for the scan * * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig.RiskLevel risk_level = 12; */ - protected $risk_level = 0; + private $risk_level = 0; /** * Whether the scan config is managed by Web Security Scanner, output * only. * * Generated from protobuf field bool managed_scan = 13; */ - protected $managed_scan = false; + private $managed_scan = false; /** * Whether the scan configuration has enabled static IP address scan feature. * If enabled, the scanner will access applications from static IP addresses. * * Generated from protobuf field bool static_ip_scan = 14; */ - protected $static_ip_scan = false; + private $static_ip_scan = false; /** * Whether to keep scanning even if most requests return HTTP error codes. * * Generated from protobuf field bool ignore_http_status_errors = 15; */ - protected $ignore_http_status_errors = false; + private $ignore_http_status_errors = false; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication.php b/WebSecurityScanner/src/V1/ScanConfig/Authentication.php similarity index 96% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication.php rename to WebSecurityScanner/src/V1/ScanConfig/Authentication.php index 35fe4660708d..ffbe744d721b 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication.php +++ b/WebSecurityScanner/src/V1/ScanConfig/Authentication.php @@ -144,6 +144,4 @@ public function getAuthentication() } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Authentication::class, \Google\Cloud\WebSecurityScanner\V1\ScanConfig_Authentication::class); diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/CustomAccount.php b/WebSecurityScanner/src/V1/ScanConfig/Authentication/CustomAccount.php similarity index 93% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/CustomAccount.php rename to WebSecurityScanner/src/V1/ScanConfig/Authentication/CustomAccount.php index ab282fcb92a1..782e701aab4b 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/CustomAccount.php +++ b/WebSecurityScanner/src/V1/ScanConfig/Authentication/CustomAccount.php @@ -20,20 +20,20 @@ class CustomAccount extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string username = 1; */ - protected $username = ''; + private $username = ''; /** * Required. Input only. The password of the custom account. The credential is stored encrypted * and not returned in any response nor included in audit logs. * * Generated from protobuf field string password = 2; */ - protected $password = ''; + private $password = ''; /** * Required. The login form URL of the website. * * Generated from protobuf field string login_url = 3; */ - protected $login_url = ''; + private $login_url = ''; /** * Constructor. @@ -137,6 +137,4 @@ public function setLoginUrl($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CustomAccount::class, \Google\Cloud\WebSecurityScanner\V1\ScanConfig_Authentication_CustomAccount::class); diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/GoogleAccount.php b/WebSecurityScanner/src/V1/ScanConfig/Authentication/GoogleAccount.php similarity index 92% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/GoogleAccount.php rename to WebSecurityScanner/src/V1/ScanConfig/Authentication/GoogleAccount.php index c6a369fd893e..ccd596347fc5 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/GoogleAccount.php +++ b/WebSecurityScanner/src/V1/ScanConfig/Authentication/GoogleAccount.php @@ -21,14 +21,14 @@ class GoogleAccount extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string username = 1; */ - protected $username = ''; + private $username = ''; /** * Required. Input only. The password of the Google account. The credential is stored encrypted * and not returned in any response nor included in audit logs. * * Generated from protobuf field string password = 2; */ - protected $password = ''; + private $password = ''; /** * Constructor. @@ -104,6 +104,4 @@ public function setPassword($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GoogleAccount::class, \Google\Cloud\WebSecurityScanner\V1\ScanConfig_Authentication_GoogleAccount::class); diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/IapCredential.php b/WebSecurityScanner/src/V1/ScanConfig/Authentication/IapCredential.php similarity index 93% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/IapCredential.php rename to WebSecurityScanner/src/V1/ScanConfig/Authentication/IapCredential.php index 3d92e0c8b96e..50e44888f681 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/IapCredential.php +++ b/WebSecurityScanner/src/V1/ScanConfig/Authentication/IapCredential.php @@ -76,6 +76,4 @@ public function getIapCredentials() } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IapCredential::class, \Google\Cloud\WebSecurityScanner\V1\ScanConfig_Authentication_IapCredential::class); diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/IapCredential/IapTestServiceAccountInfo.php b/WebSecurityScanner/src/V1/ScanConfig/Authentication/IapCredential/IapTestServiceAccountInfo.php similarity index 89% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/IapCredential/IapTestServiceAccountInfo.php rename to WebSecurityScanner/src/V1/ScanConfig/Authentication/IapCredential/IapTestServiceAccountInfo.php index 9863073c274c..e163c40d8bed 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Authentication/IapCredential/IapTestServiceAccountInfo.php +++ b/WebSecurityScanner/src/V1/ScanConfig/Authentication/IapCredential/IapTestServiceAccountInfo.php @@ -22,7 +22,7 @@ class IapTestServiceAccountInfo extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string target_audience_client_id = 1 [(.google.api.field_behavior) = REQUIRED]; */ - protected $target_audience_client_id = ''; + private $target_audience_client_id = ''; /** * Constructor. @@ -70,6 +70,4 @@ public function setTargetAudienceClientId($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IapTestServiceAccountInfo::class, \Google\Cloud\WebSecurityScanner\V1\ScanConfig_Authentication_IapCredential_IapTestServiceAccountInfo::class); diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/ExportToSecurityCommandCenter.php b/WebSecurityScanner/src/V1/ScanConfig/ExportToSecurityCommandCenter.php similarity index 89% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/ExportToSecurityCommandCenter.php rename to WebSecurityScanner/src/V1/ScanConfig/ExportToSecurityCommandCenter.php index db64d6cda212..143af05d323c 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/ExportToSecurityCommandCenter.php +++ b/WebSecurityScanner/src/V1/ScanConfig/ExportToSecurityCommandCenter.php @@ -60,6 +60,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ExportToSecurityCommandCenter::class, \Google\Cloud\WebSecurityScanner\V1\ScanConfig_ExportToSecurityCommandCenter::class); diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/RiskLevel.php b/WebSecurityScanner/src/V1/ScanConfig/RiskLevel.php similarity index 90% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/RiskLevel.php rename to WebSecurityScanner/src/V1/ScanConfig/RiskLevel.php index 4cc650314a1a..647ec223879e 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/RiskLevel.php +++ b/WebSecurityScanner/src/V1/ScanConfig/RiskLevel.php @@ -61,6 +61,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RiskLevel::class, \Google\Cloud\WebSecurityScanner\V1\ScanConfig_RiskLevel::class); diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Schedule.php b/WebSecurityScanner/src/V1/ScanConfig/Schedule.php similarity index 93% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Schedule.php rename to WebSecurityScanner/src/V1/ScanConfig/Schedule.php index 0f776ecc8718..c4e9e30154f0 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/Schedule.php +++ b/WebSecurityScanner/src/V1/ScanConfig/Schedule.php @@ -23,13 +23,13 @@ class Schedule extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; */ - protected $schedule_time = null; + private $schedule_time = null; /** * Required. The duration of time between executions in days. * * Generated from protobuf field int32 interval_duration_days = 2; */ - protected $interval_duration_days = 0; + private $interval_duration_days = 0; /** * Constructor. @@ -121,6 +121,4 @@ public function setIntervalDurationDays($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Schedule::class, \Google\Cloud\WebSecurityScanner\V1\ScanConfig_Schedule::class); diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/UserAgent.php b/WebSecurityScanner/src/V1/ScanConfig/UserAgent.php similarity index 91% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/UserAgent.php rename to WebSecurityScanner/src/V1/ScanConfig/UserAgent.php index 46d0537dec33..ebd1811c79dc 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfig/UserAgent.php +++ b/WebSecurityScanner/src/V1/ScanConfig/UserAgent.php @@ -66,6 +66,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(UserAgent::class, \Google\Cloud\WebSecurityScanner\V1\ScanConfig_UserAgent::class); diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfigError.php b/WebSecurityScanner/src/V1/ScanConfigError.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfigError.php rename to WebSecurityScanner/src/V1/ScanConfigError.php index f29dc04e6690..9d0dac61611a 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfigError.php +++ b/WebSecurityScanner/src/V1/ScanConfigError.php @@ -23,7 +23,7 @@ class ScanConfigError extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfigError.Code code = 1; */ - protected $code = 0; + private $code = 0; /** * Output only. Indicates the full name of the ScanConfig field that triggers this error, * for example "scan_config.max_qps". This field is provided for @@ -32,7 +32,7 @@ class ScanConfigError extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string field_name = 2; */ - protected $field_name = ''; + private $field_name = ''; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfigError/Code.php b/WebSecurityScanner/src/V1/ScanConfigError/Code.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfigError/Code.php rename to WebSecurityScanner/src/V1/ScanConfigError/Code.php index 1346f35f8789..49b87a6951ab 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanConfigError/Code.php +++ b/WebSecurityScanner/src/V1/ScanConfigError/Code.php @@ -350,6 +350,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Code::class, \Google\Cloud\WebSecurityScanner\V1\ScanConfigError_Code::class); diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRun.php b/WebSecurityScanner/src/V1/ScanRun.php similarity index 97% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRun.php rename to WebSecurityScanner/src/V1/ScanRun.php index ff25c1ee8cb2..82e7a4b4d144 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRun.php +++ b/WebSecurityScanner/src/V1/ScanRun.php @@ -23,40 +23,40 @@ class ScanRun extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1; */ - protected $name = ''; + private $name = ''; /** * Output only. The execution state of the ScanRun. * * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRun.ExecutionState execution_state = 2; */ - protected $execution_state = 0; + private $execution_state = 0; /** * Output only. The result state of the ScanRun. This field is only available after the * execution state reaches "FINISHED". * * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRun.ResultState result_state = 3; */ - protected $result_state = 0; + private $result_state = 0; /** * Output only. The time at which the ScanRun started. * * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; */ - protected $start_time = null; + private $start_time = null; /** * Output only. The time at which the ScanRun reached termination state - that the ScanRun * is either finished or stopped by user. * * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; */ - protected $end_time = null; + private $end_time = null; /** * Output only. The number of URLs crawled during this ScanRun. If the scan is in progress, * the value represents the number of URLs crawled up to now. * * Generated from protobuf field int64 urls_crawled_count = 6; */ - protected $urls_crawled_count = 0; + private $urls_crawled_count = 0; /** * Output only. The number of URLs tested during this ScanRun. If the scan is in progress, * the value represents the number of URLs tested up to now. The number of @@ -65,13 +65,13 @@ class ScanRun extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int64 urls_tested_count = 7; */ - protected $urls_tested_count = 0; + private $urls_tested_count = 0; /** * Output only. Whether the scan run has found any vulnerabilities. * * Generated from protobuf field bool has_vulnerabilities = 8; */ - protected $has_vulnerabilities = false; + private $has_vulnerabilities = false; /** * Output only. The percentage of total completion ranging from 0 to 100. * If the scan is in queue, the value is 0. @@ -80,14 +80,14 @@ class ScanRun extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 progress_percent = 9; */ - protected $progress_percent = 0; + private $progress_percent = 0; /** * Output only. If result_state is an ERROR, this field provides the primary reason for * scan's termination and more details, if such are available. * * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 10; */ - protected $error_trace = null; + private $error_trace = null; /** * Output only. A list of warnings, if such are encountered during this scan run. * diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRun/ExecutionState.php b/WebSecurityScanner/src/V1/ScanRun/ExecutionState.php similarity index 91% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRun/ExecutionState.php rename to WebSecurityScanner/src/V1/ScanRun/ExecutionState.php index 3667287981ad..16738c3bc32a 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRun/ExecutionState.php +++ b/WebSecurityScanner/src/V1/ScanRun/ExecutionState.php @@ -67,6 +67,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ExecutionState::class, \Google\Cloud\WebSecurityScanner\V1\ScanRun_ExecutionState::class); diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRun/ResultState.php b/WebSecurityScanner/src/V1/ScanRun/ResultState.php similarity index 91% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRun/ResultState.php rename to WebSecurityScanner/src/V1/ScanRun/ResultState.php index 1d961ad419fa..45295c686499 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRun/ResultState.php +++ b/WebSecurityScanner/src/V1/ScanRun/ResultState.php @@ -67,6 +67,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ResultState::class, \Google\Cloud\WebSecurityScanner\V1\ScanRun_ResultState::class); diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunErrorTrace.php b/WebSecurityScanner/src/V1/ScanRunErrorTrace.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunErrorTrace.php rename to WebSecurityScanner/src/V1/ScanRunErrorTrace.php index 688868b5b240..5322839fd8a4 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunErrorTrace.php +++ b/WebSecurityScanner/src/V1/ScanRunErrorTrace.php @@ -21,7 +21,7 @@ class ScanRunErrorTrace extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRunErrorTrace.Code code = 1; */ - protected $code = 0; + private $code = 0; /** * Output only. If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error * message encountered during scan configuration validation that is performed @@ -29,7 +29,7 @@ class ScanRunErrorTrace extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfigError scan_config_error = 2; */ - protected $scan_config_error = null; + private $scan_config_error = null; /** * Output only. If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most * common HTTP error code, if such is available. For example, if this code is @@ -37,7 +37,7 @@ class ScanRunErrorTrace extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 most_common_http_error_code = 3; */ - protected $most_common_http_error_code = 0; + private $most_common_http_error_code = 0; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunErrorTrace/Code.php b/WebSecurityScanner/src/V1/ScanRunErrorTrace/Code.php similarity index 94% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunErrorTrace/Code.php rename to WebSecurityScanner/src/V1/ScanRunErrorTrace/Code.php index c49b3a0f42bd..415fe7a300e3 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunErrorTrace/Code.php +++ b/WebSecurityScanner/src/V1/ScanRunErrorTrace/Code.php @@ -94,6 +94,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Code::class, \Google\Cloud\WebSecurityScanner\V1\ScanRunErrorTrace_Code::class); diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunLog.php b/WebSecurityScanner/src/V1/ScanRunLog.php similarity index 96% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunLog.php rename to WebSecurityScanner/src/V1/ScanRunLog.php index 6b90901c9959..94e68e35319f 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunLog.php +++ b/WebSecurityScanner/src/V1/ScanRunLog.php @@ -24,41 +24,41 @@ class ScanRunLog extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string summary = 1; */ - protected $summary = ''; + private $summary = ''; /** * The resource name of the ScanRun being logged. * * Generated from protobuf field string name = 2; */ - protected $name = ''; + private $name = ''; /** * The execution state of the ScanRun. * * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRun.ExecutionState execution_state = 3; */ - protected $execution_state = 0; + private $execution_state = 0; /** * The result state of the ScanRun. * * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRun.ResultState result_state = 4; */ - protected $result_state = 0; + private $result_state = 0; /** * Generated from protobuf field int64 urls_crawled_count = 5; */ - protected $urls_crawled_count = 0; + private $urls_crawled_count = 0; /** * Generated from protobuf field int64 urls_tested_count = 6; */ - protected $urls_tested_count = 0; + private $urls_tested_count = 0; /** * Generated from protobuf field bool has_findings = 7; */ - protected $has_findings = false; + private $has_findings = false; /** * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRunErrorTrace error_trace = 8; */ - protected $error_trace = null; + private $error_trace = null; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunWarningTrace.php b/WebSecurityScanner/src/V1/ScanRunWarningTrace.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunWarningTrace.php rename to WebSecurityScanner/src/V1/ScanRunWarningTrace.php index 88301882093d..f579a33ea8c5 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunWarningTrace.php +++ b/WebSecurityScanner/src/V1/ScanRunWarningTrace.php @@ -22,7 +22,7 @@ class ScanRunWarningTrace extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanRunWarningTrace.Code code = 1; */ - protected $code = 0; + private $code = 0; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunWarningTrace/Code.php b/WebSecurityScanner/src/V1/ScanRunWarningTrace/Code.php similarity index 94% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunWarningTrace/Code.php rename to WebSecurityScanner/src/V1/ScanRunWarningTrace/Code.php index cd610f6f648f..4e6152280e4c 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ScanRunWarningTrace/Code.php +++ b/WebSecurityScanner/src/V1/ScanRunWarningTrace/Code.php @@ -87,6 +87,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Code::class, \Google\Cloud\WebSecurityScanner\V1\ScanRunWarningTrace_Code::class); diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/StartScanRunRequest.php b/WebSecurityScanner/src/V1/StartScanRunRequest.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/StartScanRunRequest.php rename to WebSecurityScanner/src/V1/StartScanRunRequest.php index ac00aa43db70..83dfb78d7a45 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/StartScanRunRequest.php +++ b/WebSecurityScanner/src/V1/StartScanRunRequest.php @@ -21,7 +21,7 @@ class StartScanRunRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1; */ - protected $name = ''; + private $name = ''; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/StopScanRunRequest.php b/WebSecurityScanner/src/V1/StopScanRunRequest.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/StopScanRunRequest.php rename to WebSecurityScanner/src/V1/StopScanRunRequest.php index cb81353bba70..3cd5d0b75916 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/StopScanRunRequest.php +++ b/WebSecurityScanner/src/V1/StopScanRunRequest.php @@ -22,7 +22,7 @@ class StopScanRunRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1; */ - protected $name = ''; + private $name = ''; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/UpdateScanConfigRequest.php b/WebSecurityScanner/src/V1/UpdateScanConfigRequest.php similarity index 98% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/UpdateScanConfigRequest.php rename to WebSecurityScanner/src/V1/UpdateScanConfigRequest.php index 3037cef7bbca..8a91638cd155 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/UpdateScanConfigRequest.php +++ b/WebSecurityScanner/src/V1/UpdateScanConfigRequest.php @@ -22,7 +22,7 @@ class UpdateScanConfigRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.cloud.websecurityscanner.v1.ScanConfig scan_config = 2; */ - protected $scan_config = null; + private $scan_config = null; /** * Required. The update mask applies to the resource. For the `FieldMask` definition, * see @@ -30,7 +30,7 @@ class UpdateScanConfigRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; */ - protected $update_mask = null; + private $update_mask = null; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ViolatingResource.php b/WebSecurityScanner/src/V1/ViolatingResource.php similarity index 97% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ViolatingResource.php rename to WebSecurityScanner/src/V1/ViolatingResource.php index a04f097a8d63..d166ae12d0d3 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/ViolatingResource.php +++ b/WebSecurityScanner/src/V1/ViolatingResource.php @@ -21,13 +21,13 @@ class ViolatingResource extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string content_type = 1; */ - protected $content_type = ''; + private $content_type = ''; /** * URL of this violating resource. * * Generated from protobuf field string resource_url = 2; */ - protected $resource_url = ''; + private $resource_url = ''; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/VulnerableHeaders.php b/WebSecurityScanner/src/V1/VulnerableHeaders.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/VulnerableHeaders.php rename to WebSecurityScanner/src/V1/VulnerableHeaders.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/VulnerableHeaders/Header.php b/WebSecurityScanner/src/V1/VulnerableHeaders/Header.php similarity index 90% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/VulnerableHeaders/Header.php rename to WebSecurityScanner/src/V1/VulnerableHeaders/Header.php index d50f7cefc519..9ab083d9659d 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/VulnerableHeaders/Header.php +++ b/WebSecurityScanner/src/V1/VulnerableHeaders/Header.php @@ -20,13 +20,13 @@ class Header extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1; */ - protected $name = ''; + private $name = ''; /** * Header value. * * Generated from protobuf field string value = 2; */ - protected $value = ''; + private $value = ''; /** * Constructor. @@ -99,6 +99,4 @@ public function setValue($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Header::class, \Google\Cloud\WebSecurityScanner\V1\VulnerableHeaders_Header::class); diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/VulnerableParameters.php b/WebSecurityScanner/src/V1/VulnerableParameters.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/VulnerableParameters.php rename to WebSecurityScanner/src/V1/VulnerableParameters.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/WebSecurityScannerGrpcClient.php b/WebSecurityScanner/src/V1/WebSecurityScannerGrpcClient.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/WebSecurityScannerGrpcClient.php rename to WebSecurityScanner/src/V1/WebSecurityScannerGrpcClient.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xss.php b/WebSecurityScanner/src/V1/Xss.php similarity index 97% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xss.php rename to WebSecurityScanner/src/V1/Xss.php index b3be341c0a1a..dd360613a914 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xss.php +++ b/WebSecurityScanner/src/V1/Xss.php @@ -26,19 +26,19 @@ class Xss extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string error_message = 2; */ - protected $error_message = ''; + private $error_message = ''; /** * The attack vector of the payload triggering this XSS. * * Generated from protobuf field .google.cloud.websecurityscanner.v1.Xss.AttackVector attack_vector = 3; */ - protected $attack_vector = 0; + private $attack_vector = 0; /** * The reproduction url for the seeding POST request of a Stored XSS. * * Generated from protobuf field string stored_xss_seeding_url = 4; */ - protected $stored_xss_seeding_url = ''; + private $stored_xss_seeding_url = ''; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xss/AttackVector.php b/WebSecurityScanner/src/V1/Xss/AttackVector.php similarity index 96% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xss/AttackVector.php rename to WebSecurityScanner/src/V1/Xss/AttackVector.php index 3f1a432eee45..8888e4029e36 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xss/AttackVector.php +++ b/WebSecurityScanner/src/V1/Xss/AttackVector.php @@ -151,6 +151,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AttackVector::class, \Google\Cloud\WebSecurityScanner\V1\Xss_AttackVector::class); diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xxe.php b/WebSecurityScanner/src/V1/Xxe.php similarity index 97% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xxe.php rename to WebSecurityScanner/src/V1/Xxe.php index 55b9f3fd0de0..2fb63902fd56 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xxe.php +++ b/WebSecurityScanner/src/V1/Xxe.php @@ -21,13 +21,13 @@ class Xxe extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string payload_value = 1; */ - protected $payload_value = ''; + private $payload_value = ''; /** * Location within the request where the payload was placed. * * Generated from protobuf field .google.cloud.websecurityscanner.v1.Xxe.Location payload_location = 2; */ - protected $payload_location = 0; + private $payload_location = 0; /** * Constructor. diff --git a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xxe/Location.php b/WebSecurityScanner/src/V1/Xxe/Location.php similarity index 90% rename from owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xxe/Location.php rename to WebSecurityScanner/src/V1/Xxe/Location.php index 5ca1c459cb03..14f66a9a6112 100644 --- a/owl-bot-staging/WebSecurityScanner/v1/proto/src/Google/Cloud/WebSecurityScanner/V1/Xxe/Location.php +++ b/WebSecurityScanner/src/V1/Xxe/Location.php @@ -52,6 +52,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Location::class, \Google\Cloud\WebSecurityScanner\V1\Xxe_Location::class); diff --git a/owl-bot-staging/WebSecurityScanner/v1/src/V1/gapic_metadata.json b/WebSecurityScanner/src/V1/gapic_metadata.json similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/src/V1/gapic_metadata.json rename to WebSecurityScanner/src/V1/gapic_metadata.json diff --git a/owl-bot-staging/WebSecurityScanner/v1/src/V1/resources/web_security_scanner_client_config.json b/WebSecurityScanner/src/V1/resources/web_security_scanner_client_config.json similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/src/V1/resources/web_security_scanner_client_config.json rename to WebSecurityScanner/src/V1/resources/web_security_scanner_client_config.json diff --git a/owl-bot-staging/WebSecurityScanner/v1/src/V1/resources/web_security_scanner_descriptor_config.php b/WebSecurityScanner/src/V1/resources/web_security_scanner_descriptor_config.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/src/V1/resources/web_security_scanner_descriptor_config.php rename to WebSecurityScanner/src/V1/resources/web_security_scanner_descriptor_config.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/src/V1/resources/web_security_scanner_rest_client_config.php b/WebSecurityScanner/src/V1/resources/web_security_scanner_rest_client_config.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/src/V1/resources/web_security_scanner_rest_client_config.php rename to WebSecurityScanner/src/V1/resources/web_security_scanner_rest_client_config.php diff --git a/owl-bot-staging/WebSecurityScanner/v1/tests/Unit/V1/Client/WebSecurityScannerClientTest.php b/WebSecurityScanner/tests/Unit/V1/Client/WebSecurityScannerClientTest.php similarity index 100% rename from owl-bot-staging/WebSecurityScanner/v1/tests/Unit/V1/Client/WebSecurityScannerClientTest.php rename to WebSecurityScanner/tests/Unit/V1/Client/WebSecurityScannerClientTest.php diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/GPBMetadata/Google/Cloud/Workflows/Executions/V1/Executions.php b/Workflows/metadata/Executions/V1/Executions.php similarity index 100% rename from owl-bot-staging/Workflows/Executions/v1/proto/src/GPBMetadata/Google/Cloud/Workflows/Executions/V1/Executions.php rename to Workflows/metadata/Executions/V1/Executions.php diff --git a/owl-bot-staging/Workflows/v1/proto/src/GPBMetadata/Google/Cloud/Workflows/V1/Workflows.php b/Workflows/metadata/V1/Workflows.php similarity index 100% rename from owl-bot-staging/Workflows/v1/proto/src/GPBMetadata/Google/Cloud/Workflows/V1/Workflows.php rename to Workflows/metadata/V1/Workflows.php diff --git a/owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/create_workflow.php b/Workflows/samples/V1/WorkflowsClient/create_workflow.php similarity index 100% rename from owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/create_workflow.php rename to Workflows/samples/V1/WorkflowsClient/create_workflow.php diff --git a/owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/delete_workflow.php b/Workflows/samples/V1/WorkflowsClient/delete_workflow.php similarity index 100% rename from owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/delete_workflow.php rename to Workflows/samples/V1/WorkflowsClient/delete_workflow.php diff --git a/owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/get_workflow.php b/Workflows/samples/V1/WorkflowsClient/get_workflow.php similarity index 100% rename from owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/get_workflow.php rename to Workflows/samples/V1/WorkflowsClient/get_workflow.php diff --git a/owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/list_workflows.php b/Workflows/samples/V1/WorkflowsClient/list_workflows.php similarity index 100% rename from owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/list_workflows.php rename to Workflows/samples/V1/WorkflowsClient/list_workflows.php diff --git a/owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/update_workflow.php b/Workflows/samples/V1/WorkflowsClient/update_workflow.php similarity index 100% rename from owl-bot-staging/Workflows/v1/samples/V1/WorkflowsClient/update_workflow.php rename to Workflows/samples/V1/WorkflowsClient/update_workflow.php diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/CancelExecutionRequest.php b/Workflows/src/Executions/V1/CancelExecutionRequest.php similarity index 99% rename from owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/CancelExecutionRequest.php rename to Workflows/src/Executions/V1/CancelExecutionRequest.php index 2db4641d945c..802859d5a229 100644 --- a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/CancelExecutionRequest.php +++ b/Workflows/src/Executions/V1/CancelExecutionRequest.php @@ -24,7 +24,7 @@ class CancelExecutionRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - protected $name = ''; + private $name = ''; /** * @param string $name Required. Name of the execution to be cancelled. diff --git a/owl-bot-staging/Workflows/Executions/v1/src/V1/Client/BaseClient/ExecutionsBaseClient.php b/Workflows/src/Executions/V1/Client/BaseClient/ExecutionsBaseClient.php similarity index 100% rename from owl-bot-staging/Workflows/Executions/v1/src/V1/Client/BaseClient/ExecutionsBaseClient.php rename to Workflows/src/Executions/V1/Client/BaseClient/ExecutionsBaseClient.php diff --git a/owl-bot-staging/Workflows/Executions/v1/src/V1/Client/ExecutionsClient.php b/Workflows/src/Executions/V1/Client/ExecutionsClient.php similarity index 100% rename from owl-bot-staging/Workflows/Executions/v1/src/V1/Client/ExecutionsClient.php rename to Workflows/src/Executions/V1/Client/ExecutionsClient.php diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/CreateExecutionRequest.php b/Workflows/src/Executions/V1/CreateExecutionRequest.php similarity index 98% rename from owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/CreateExecutionRequest.php rename to Workflows/src/Executions/V1/CreateExecutionRequest.php index 01da8af0af3b..24109250f6fa 100644 --- a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/CreateExecutionRequest.php +++ b/Workflows/src/Executions/V1/CreateExecutionRequest.php @@ -24,13 +24,13 @@ class CreateExecutionRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - protected $parent = ''; + private $parent = ''; /** * Required. Execution to be created. * * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution execution = 2 [(.google.api.field_behavior) = REQUIRED]; */ - protected $execution = null; + private $execution = null; /** * @param string $parent Required. Name of the workflow for which an execution should be created. diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution.php b/Workflows/src/Executions/V1/Execution.php similarity index 97% rename from owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution.php rename to Workflows/src/Executions/V1/Execution.php index 7780a3cb8ebc..65244a78c61e 100644 --- a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution.php +++ b/Workflows/src/Executions/V1/Execution.php @@ -10,7 +10,7 @@ /** * A running instance of a - * [Workflow](/workflows/docs/reference/rest/v1/projects.locations.workflows). + * [Workflow](https://cloud.google.com/workflows/docs/reference/rest/v1/projects.locations.workflows). * * Generated from protobuf message google.cloud.workflows.executions.v1.Execution */ @@ -23,25 +23,25 @@ class Execution extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - protected $name = ''; + private $name = ''; /** * Output only. Marks the beginning of execution. * * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - protected $start_time = null; + private $start_time = null; /** * Output only. Marks the end of execution, successful or not. * * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - protected $end_time = null; + private $end_time = null; /** * Output only. Current state of the execution. * * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - protected $state = 0; + private $state = 0; /** * Input parameters of the execution represented as a JSON string. * The size limit is 32KB. @@ -51,14 +51,14 @@ class Execution extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string argument = 5; */ - protected $argument = ''; + private $argument = ''; /** * Output only. Output of the execution represented as a JSON string. The * value can only be present if the execution's state is `SUCCEEDED`. * * Generated from protobuf field string result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - protected $result = ''; + private $result = ''; /** * Output only. The error which caused the execution to finish prematurely. * The value is only present if the execution's state is `FAILED` @@ -66,19 +66,19 @@ class Execution extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution.Error error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - protected $error = null; + private $error = null; /** * Output only. Revision of the workflow this execution is using. * * Generated from protobuf field string workflow_revision_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - protected $workflow_revision_id = ''; + private $workflow_revision_id = ''; /** * The call logging level associated to this execution. * * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution.CallLogLevel call_log_level = 9; */ - protected $call_log_level = 0; + private $call_log_level = 0; /** * Constructor. diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/CallLogLevel.php b/Workflows/src/Executions/V1/Execution/CallLogLevel.php similarity index 100% rename from owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/CallLogLevel.php rename to Workflows/src/Executions/V1/Execution/CallLogLevel.php diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/Error.php b/Workflows/src/Executions/V1/Execution/Error.php similarity index 97% rename from owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/Error.php rename to Workflows/src/Executions/V1/Execution/Error.php index 33cfcd89b58e..b7d6cd2e68f0 100644 --- a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/Error.php +++ b/Workflows/src/Executions/V1/Execution/Error.php @@ -20,19 +20,19 @@ class Error extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string payload = 1; */ - protected $payload = ''; + private $payload = ''; /** * Human-readable stack trace string. * * Generated from protobuf field string context = 2; */ - protected $context = ''; + private $context = ''; /** * Stack trace with detailed information of where error was generated. * * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution.StackTrace stack_trace = 3; */ - protected $stack_trace = null; + private $stack_trace = null; /** * Constructor. diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/StackTrace.php b/Workflows/src/Executions/V1/Execution/StackTrace.php similarity index 100% rename from owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/StackTrace.php rename to Workflows/src/Executions/V1/Execution/StackTrace.php diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/StackTraceElement.php b/Workflows/src/Executions/V1/Execution/StackTraceElement.php similarity index 97% rename from owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/StackTraceElement.php rename to Workflows/src/Executions/V1/Execution/StackTraceElement.php index 54ffcdb61d1a..7c41e416a3a2 100644 --- a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/StackTraceElement.php +++ b/Workflows/src/Executions/V1/Execution/StackTraceElement.php @@ -20,19 +20,19 @@ class StackTraceElement extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string step = 1; */ - protected $step = ''; + private $step = ''; /** * The routine where the error occurred. * * Generated from protobuf field string routine = 2; */ - protected $routine = ''; + private $routine = ''; /** * The source position information of the stack trace element. * * Generated from protobuf field .google.cloud.workflows.executions.v1.Execution.StackTraceElement.Position position = 3; */ - protected $position = null; + private $position = null; /** * Constructor. diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/StackTraceElement/Position.php b/Workflows/src/Executions/V1/Execution/StackTraceElement/Position.php similarity index 98% rename from owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/StackTraceElement/Position.php rename to Workflows/src/Executions/V1/Execution/StackTraceElement/Position.php index 61107a127090..b2946269326a 100644 --- a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/StackTraceElement/Position.php +++ b/Workflows/src/Executions/V1/Execution/StackTraceElement/Position.php @@ -22,20 +22,20 @@ class Position extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int64 line = 1; */ - protected $line = 0; + private $line = 0; /** * The source code column position (of the line) the current instruction * was generated from. * * Generated from protobuf field int64 column = 2; */ - protected $column = 0; + private $column = 0; /** * The number of bytes of source code making up this stack trace element. * * Generated from protobuf field int64 length = 3; */ - protected $length = 0; + private $length = 0; /** * Constructor. diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/State.php b/Workflows/src/Executions/V1/Execution/State.php similarity index 100% rename from owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/Execution/State.php rename to Workflows/src/Executions/V1/Execution/State.php diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ExecutionView.php b/Workflows/src/Executions/V1/ExecutionView.php similarity index 100% rename from owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ExecutionView.php rename to Workflows/src/Executions/V1/ExecutionView.php diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ExecutionsGrpcClient.php b/Workflows/src/Executions/V1/ExecutionsGrpcClient.php similarity index 100% rename from owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ExecutionsGrpcClient.php rename to Workflows/src/Executions/V1/ExecutionsGrpcClient.php diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/GetExecutionRequest.php b/Workflows/src/Executions/V1/GetExecutionRequest.php similarity index 98% rename from owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/GetExecutionRequest.php rename to Workflows/src/Executions/V1/GetExecutionRequest.php index 53cbf37cff5a..a754d7d49def 100644 --- a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/GetExecutionRequest.php +++ b/Workflows/src/Executions/V1/GetExecutionRequest.php @@ -24,14 +24,14 @@ class GetExecutionRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - protected $name = ''; + private $name = ''; /** * Optional. A view defining which fields should be filled in the returned execution. * The API will default to the FULL view. * * Generated from protobuf field .google.cloud.workflows.executions.v1.ExecutionView view = 2 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $view = 0; + private $view = 0; /** * @param string $name Required. Name of the execution to be retrieved. diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ListExecutionsRequest.php b/Workflows/src/Executions/V1/ListExecutionsRequest.php similarity index 98% rename from owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ListExecutionsRequest.php rename to Workflows/src/Executions/V1/ListExecutionsRequest.php index e2cd4dfd4c73..ff2582a940dd 100644 --- a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ListExecutionsRequest.php +++ b/Workflows/src/Executions/V1/ListExecutionsRequest.php @@ -23,7 +23,7 @@ class ListExecutionsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - protected $parent = ''; + private $parent = ''; /** * Maximum number of executions to return per call. * Max supported value depends on the selected Execution view: it's 10000 for @@ -33,7 +33,7 @@ class ListExecutionsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - protected $page_size = 0; + private $page_size = 0; /** * A page token, received from a previous `ListExecutions` call. * Provide this to retrieve the subsequent page. @@ -42,14 +42,14 @@ class ListExecutionsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - protected $page_token = ''; + private $page_token = ''; /** * Optional. A view defining which fields should be filled in the returned executions. * The API will default to the BASIC view. * * Generated from protobuf field .google.cloud.workflows.executions.v1.ExecutionView view = 4 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $view = 0; + private $view = 0; /** * @param string $parent Required. Name of the workflow for which the executions should be listed. diff --git a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ListExecutionsResponse.php b/Workflows/src/Executions/V1/ListExecutionsResponse.php similarity index 98% rename from owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ListExecutionsResponse.php rename to Workflows/src/Executions/V1/ListExecutionsResponse.php index 6f950c9185b5..bcb29c5343e7 100644 --- a/owl-bot-staging/Workflows/Executions/v1/proto/src/Google/Cloud/Workflows/Executions/V1/ListExecutionsResponse.php +++ b/Workflows/src/Executions/V1/ListExecutionsResponse.php @@ -29,7 +29,7 @@ class ListExecutionsResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - protected $next_page_token = ''; + private $next_page_token = ''; /** * Constructor. diff --git a/owl-bot-staging/Workflows/Executions/v1/src/V1/gapic_metadata.json b/Workflows/src/Executions/V1/gapic_metadata.json similarity index 100% rename from owl-bot-staging/Workflows/Executions/v1/src/V1/gapic_metadata.json rename to Workflows/src/Executions/V1/gapic_metadata.json diff --git a/owl-bot-staging/Workflows/Executions/v1/src/V1/resources/executions_client_config.json b/Workflows/src/Executions/V1/resources/executions_client_config.json similarity index 100% rename from owl-bot-staging/Workflows/Executions/v1/src/V1/resources/executions_client_config.json rename to Workflows/src/Executions/V1/resources/executions_client_config.json diff --git a/owl-bot-staging/Workflows/Executions/v1/src/V1/resources/executions_descriptor_config.php b/Workflows/src/Executions/V1/resources/executions_descriptor_config.php similarity index 100% rename from owl-bot-staging/Workflows/Executions/v1/src/V1/resources/executions_descriptor_config.php rename to Workflows/src/Executions/V1/resources/executions_descriptor_config.php diff --git a/owl-bot-staging/Workflows/Executions/v1/src/V1/resources/executions_rest_client_config.php b/Workflows/src/Executions/V1/resources/executions_rest_client_config.php similarity index 100% rename from owl-bot-staging/Workflows/Executions/v1/src/V1/resources/executions_rest_client_config.php rename to Workflows/src/Executions/V1/resources/executions_rest_client_config.php diff --git a/owl-bot-staging/Workflows/v1/src/V1/Client/BaseClient/WorkflowsBaseClient.php b/Workflows/src/V1/Client/BaseClient/WorkflowsBaseClient.php similarity index 100% rename from owl-bot-staging/Workflows/v1/src/V1/Client/BaseClient/WorkflowsBaseClient.php rename to Workflows/src/V1/Client/BaseClient/WorkflowsBaseClient.php diff --git a/owl-bot-staging/Workflows/v1/src/V1/Client/WorkflowsClient.php b/Workflows/src/V1/Client/WorkflowsClient.php similarity index 100% rename from owl-bot-staging/Workflows/v1/src/V1/Client/WorkflowsClient.php rename to Workflows/src/V1/Client/WorkflowsClient.php diff --git a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/CreateWorkflowRequest.php b/Workflows/src/V1/CreateWorkflowRequest.php similarity index 98% rename from owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/CreateWorkflowRequest.php rename to Workflows/src/V1/CreateWorkflowRequest.php index 6a782e25355d..d76562322628 100644 --- a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/CreateWorkflowRequest.php +++ b/Workflows/src/V1/CreateWorkflowRequest.php @@ -23,13 +23,13 @@ class CreateWorkflowRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - protected $parent = ''; + private $parent = ''; /** * Required. Workflow to be created. * * Generated from protobuf field .google.cloud.workflows.v1.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; */ - protected $workflow = null; + private $workflow = null; /** * Required. The ID of the workflow to be created. It has to fulfill the * following requirements: @@ -41,7 +41,7 @@ class CreateWorkflowRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; */ - protected $workflow_id = ''; + private $workflow_id = ''; /** * @param string $parent Required. Project and location in which the workflow should be created. diff --git a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/DeleteWorkflowRequest.php b/Workflows/src/V1/DeleteWorkflowRequest.php similarity index 99% rename from owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/DeleteWorkflowRequest.php rename to Workflows/src/V1/DeleteWorkflowRequest.php index ded08ff65dce..17740cd3d319 100644 --- a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/DeleteWorkflowRequest.php +++ b/Workflows/src/V1/DeleteWorkflowRequest.php @@ -23,7 +23,7 @@ class DeleteWorkflowRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - protected $name = ''; + private $name = ''; /** * @param string $name Required. Name of the workflow to be deleted. diff --git a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/GetWorkflowRequest.php b/Workflows/src/V1/GetWorkflowRequest.php similarity index 99% rename from owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/GetWorkflowRequest.php rename to Workflows/src/V1/GetWorkflowRequest.php index 9a87ba492512..b753ea85c1eb 100644 --- a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/GetWorkflowRequest.php +++ b/Workflows/src/V1/GetWorkflowRequest.php @@ -22,7 +22,7 @@ class GetWorkflowRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - protected $name = ''; + private $name = ''; /** * @param string $name Required. Name of the workflow which information should be retrieved. diff --git a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/ListWorkflowsRequest.php b/Workflows/src/V1/ListWorkflowsRequest.php similarity index 98% rename from owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/ListWorkflowsRequest.php rename to Workflows/src/V1/ListWorkflowsRequest.php index 30fcb110dcdb..046a79a70120 100644 --- a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/ListWorkflowsRequest.php +++ b/Workflows/src/V1/ListWorkflowsRequest.php @@ -23,7 +23,7 @@ class ListWorkflowsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - protected $parent = ''; + private $parent = ''; /** * Maximum number of workflows to return per call. The service may return * fewer than this value. If the value is not specified, a default value of @@ -32,7 +32,7 @@ class ListWorkflowsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - protected $page_size = 0; + private $page_size = 0; /** * A page token, received from a previous `ListWorkflows` call. * Provide this to retrieve the subsequent page. @@ -41,13 +41,13 @@ class ListWorkflowsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - protected $page_token = ''; + private $page_token = ''; /** * Filter to restrict results to specific workflows. * * Generated from protobuf field string filter = 4; */ - protected $filter = ''; + private $filter = ''; /** * Comma-separated list of fields that that specify the order of the results. * Default sorting order for a field is ascending. To specify descending order @@ -56,7 +56,7 @@ class ListWorkflowsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string order_by = 5; */ - protected $order_by = ''; + private $order_by = ''; /** * @param string $parent Required. Project and location from which the workflows should be listed. diff --git a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/ListWorkflowsResponse.php b/Workflows/src/V1/ListWorkflowsResponse.php similarity index 99% rename from owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/ListWorkflowsResponse.php rename to Workflows/src/V1/ListWorkflowsResponse.php index 9bf10165ca1f..434b32999503 100644 --- a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/ListWorkflowsResponse.php +++ b/Workflows/src/V1/ListWorkflowsResponse.php @@ -29,7 +29,7 @@ class ListWorkflowsResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - protected $next_page_token = ''; + private $next_page_token = ''; /** * Unreachable resources. * diff --git a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/OperationMetadata.php b/Workflows/src/V1/OperationMetadata.php similarity index 97% rename from owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/OperationMetadata.php rename to Workflows/src/V1/OperationMetadata.php index 498dac12a82c..017e062f5322 100644 --- a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/OperationMetadata.php +++ b/Workflows/src/V1/OperationMetadata.php @@ -20,31 +20,31 @@ class OperationMetadata extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; */ - protected $create_time = null; + private $create_time = null; /** * The time the operation finished running. * * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; */ - protected $end_time = null; + private $end_time = null; /** * Server-defined resource path for the target of the operation. * * Generated from protobuf field string target = 3; */ - protected $target = ''; + private $target = ''; /** * Name of the verb executed by the operation. * * Generated from protobuf field string verb = 4; */ - protected $verb = ''; + private $verb = ''; /** * API version used to start the operation. * * Generated from protobuf field string api_version = 5; */ - protected $api_version = ''; + private $api_version = ''; /** * Constructor. diff --git a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/UpdateWorkflowRequest.php b/Workflows/src/V1/UpdateWorkflowRequest.php similarity index 98% rename from owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/UpdateWorkflowRequest.php rename to Workflows/src/V1/UpdateWorkflowRequest.php index 6a77b5a19df4..765d71b50b0a 100644 --- a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/UpdateWorkflowRequest.php +++ b/Workflows/src/V1/UpdateWorkflowRequest.php @@ -22,14 +22,14 @@ class UpdateWorkflowRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.cloud.workflows.v1.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; */ - protected $workflow = null; + private $workflow = null; /** * List of fields to be updated. If not present, the entire workflow * will be updated. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; */ - protected $update_mask = null; + private $update_mask = null; /** * @param \Google\Cloud\Workflows\V1\Workflow $workflow Required. Workflow to be updated. diff --git a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/Workflow.php b/Workflows/src/V1/Workflow.php similarity index 98% rename from owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/Workflow.php rename to Workflows/src/V1/Workflow.php index 3e25d060823f..549a42c38467 100644 --- a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/Workflow.php +++ b/Workflows/src/V1/Workflow.php @@ -21,20 +21,20 @@ class Workflow extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1; */ - protected $name = ''; + private $name = ''; /** * Description of the workflow provided by the user. * Must be at most 1000 unicode characters long. * * Generated from protobuf field string description = 2; */ - protected $description = ''; + private $description = ''; /** * Output only. State of the workflow deployment. * * Generated from protobuf field .google.cloud.workflows.v1.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - protected $state = 0; + private $state = 0; /** * Output only. The revision of the workflow. * A new revision of a workflow is created as a result of updating the @@ -47,26 +47,26 @@ class Workflow extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - protected $revision_id = ''; + private $revision_id = ''; /** * Output only. The timestamp of when the workflow was created. * * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - protected $create_time = null; + private $create_time = null; /** * Output only. The last update timestamp of the workflow. * * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - protected $update_time = null; + private $update_time = null; /** * Output only. The timestamp that the latest revision of the workflow * was created. * * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - protected $revision_create_time = null; + private $revision_create_time = null; /** * Labels associated with this workflow. * Labels can contain at most 64 entries. Keys and values can be no longer @@ -91,7 +91,7 @@ class Workflow extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string service_account = 9; */ - protected $service_account = ''; + private $service_account = ''; protected $source_code; /** diff --git a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/Workflow/State.php b/Workflows/src/V1/Workflow/State.php similarity index 90% rename from owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/Workflow/State.php rename to Workflows/src/V1/Workflow/State.php index c73bde7d3eba..6cf2a24430e2 100644 --- a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/Workflow/State.php +++ b/Workflows/src/V1/Workflow/State.php @@ -53,6 +53,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Workflows\V1\Workflow_State::class); diff --git a/owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/WorkflowsGrpcClient.php b/Workflows/src/V1/WorkflowsGrpcClient.php similarity index 100% rename from owl-bot-staging/Workflows/v1/proto/src/Google/Cloud/Workflows/V1/WorkflowsGrpcClient.php rename to Workflows/src/V1/WorkflowsGrpcClient.php diff --git a/owl-bot-staging/Workflows/v1/src/V1/gapic_metadata.json b/Workflows/src/V1/gapic_metadata.json similarity index 100% rename from owl-bot-staging/Workflows/v1/src/V1/gapic_metadata.json rename to Workflows/src/V1/gapic_metadata.json diff --git a/owl-bot-staging/Workflows/v1/src/V1/resources/workflows_client_config.json b/Workflows/src/V1/resources/workflows_client_config.json similarity index 100% rename from owl-bot-staging/Workflows/v1/src/V1/resources/workflows_client_config.json rename to Workflows/src/V1/resources/workflows_client_config.json diff --git a/owl-bot-staging/Workflows/v1/src/V1/resources/workflows_descriptor_config.php b/Workflows/src/V1/resources/workflows_descriptor_config.php similarity index 100% rename from owl-bot-staging/Workflows/v1/src/V1/resources/workflows_descriptor_config.php rename to Workflows/src/V1/resources/workflows_descriptor_config.php diff --git a/owl-bot-staging/Workflows/v1/src/V1/resources/workflows_rest_client_config.php b/Workflows/src/V1/resources/workflows_rest_client_config.php similarity index 100% rename from owl-bot-staging/Workflows/v1/src/V1/resources/workflows_rest_client_config.php rename to Workflows/src/V1/resources/workflows_rest_client_config.php diff --git a/Workflows/src/V1beta/Gapic/WorkflowsGapicClient.php b/Workflows/src/V1beta/Gapic/WorkflowsGapicClient.php index a2a55cbcb2ca..d04adfaf35ec 100644 --- a/Workflows/src/V1beta/Gapic/WorkflowsGapicClient.php +++ b/Workflows/src/V1beta/Gapic/WorkflowsGapicClient.php @@ -65,7 +65,7 @@ * $operationResponse->pollUntilComplete(); * if ($operationResponse->operationSucceeded()) { * $result = $operationResponse->getResult(); - * // doSomethingWith($result) + * // doSomethingWith($result) * } else { * $error = $operationResponse->getError(); * // handleError($error) @@ -82,7 +82,7 @@ * } * if ($newOperationResponse->operationSucceeded()) { * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) + * // doSomethingWith($result) * } else { * $error = $newOperationResponse->getError(); * // handleError($error) @@ -373,7 +373,7 @@ public function __construct(array $options = []) * $operationResponse->pollUntilComplete(); * if ($operationResponse->operationSucceeded()) { * $result = $operationResponse->getResult(); - * // doSomethingWith($result) + * // doSomethingWith($result) * } else { * $error = $operationResponse->getError(); * // handleError($error) @@ -390,7 +390,7 @@ public function __construct(array $options = []) * } * if ($newOperationResponse->operationSucceeded()) { * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) + * // doSomethingWith($result) * } else { * $error = $newOperationResponse->getError(); * // handleError($error) @@ -651,7 +651,7 @@ public function listWorkflows($parent, array $optionalArgs = []) * $operationResponse->pollUntilComplete(); * if ($operationResponse->operationSucceeded()) { * $result = $operationResponse->getResult(); - * // doSomethingWith($result) + * // doSomethingWith($result) * } else { * $error = $operationResponse->getError(); * // handleError($error) @@ -668,7 +668,7 @@ public function listWorkflows($parent, array $optionalArgs = []) * } * if ($newOperationResponse->operationSucceeded()) { * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) + * // doSomethingWith($result) * } else { * $error = $newOperationResponse->getError(); * // handleError($error) diff --git a/owl-bot-staging/Workflows/Executions/v1/tests/Unit/V1/Client/ExecutionsClientTest.php b/Workflows/tests/Unit/Executions/V1/Client/ExecutionsClientTest.php similarity index 100% rename from owl-bot-staging/Workflows/Executions/v1/tests/Unit/V1/Client/ExecutionsClientTest.php rename to Workflows/tests/Unit/Executions/V1/Client/ExecutionsClientTest.php diff --git a/owl-bot-staging/Workflows/v1/tests/Unit/V1/Client/WorkflowsClientTest.php b/Workflows/tests/Unit/V1/Client/WorkflowsClientTest.php similarity index 100% rename from owl-bot-staging/Workflows/v1/tests/Unit/V1/Client/WorkflowsClientTest.php rename to Workflows/tests/Unit/V1/Client/WorkflowsClientTest.php diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Outputs.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Outputs.php deleted file mode 100644 index 8a26de1c8668a6254604bc3301994b7281d4e22f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3859 zcmcInTW=dh6prmUv5ynS*)+v*1#C^ErqHgH6mfAV5MOeEy0NfZiDI-`ugCVP>)q|{ zY#JB!842-AfEV6*<%M5?#1n}B0B2@)*G`i(p%QtCcV^Bv=X~>>Gjl%r#2Gs9mb^zS z;%b!iNya<*wiF6Ia&lkz<&|Rb;t#DBnM9%k|np`#PF>w(shsEDvmZ zV3Lw<+J3KeWb}w#GL0kRQI}|=($Qwg_Nn7jPvOu2mNp`uqv=H6YgQVBYCVl=ojs1y zsWOz#Lx$417ol_>Zf*nUrsjF_p+JLgK*m4E@0x}#dsL(NZ{6@z!!oF$nZ`4W>8{+@ zOpl=L>9u{|(y3uvGBY@|bh2?%7MN`9x?>{;cjeHpCZh!@=^R*;xRz#iYQ)oB!=bj@ z#HHo(fY69cHnMRu*p|T=eR)IpST3J(@~%u>pG@yA%Pyh5Yi)DC8Nl=CSLY1Yb{wO# zYY?+nAw%uRu-$Tb64eCcEYm2knvXg_J}z(C9y_E{L-9~!M9wzjG~WK$2uR!M^&*aT zQB@mJR4m3D@N*uN|0X9Xke|Zkr*Qcx6Zt7en}s(5L@qx(!cs4YR0y(A2<9nkEt=VLgU*}5HsalTs$*SJ93 zpJ6bX-!tqGCVp9%9cC55R3SsjF%3}?9Oc%<&a}}e1gWgRGKpdipo%}nAl>kf#iEb` z7HnEthO}-YK?atRJlirY6+k)#;UQxQockPd9vLu7RgX|=SOYJg}X3^wgN+G z6&8u5yJLq*S2cS1IktcCmpG&vnq~B{3^D)uC^nT99)3P)=`)yR$DL<1XSd$Jc;66A z34bv0R}#PP#HBoBM*eZYlZOOgkYZ*HmPZ=S1kviYZ&5Crr1Sx-hQp5uanw+g0TXMX zN12?Jt{k^}+pC zvtB*eJ*d}mGtxXH_V2ZFF)0PJwVl>}E?)d22AP)Q8kDq#git99bA8(#X*8e@L*|S+ zF6kS`oW&qy8CE=Qs6I7%bf`MUF)EIFi|V32{p>|HQ|OfsXSjW?lR>0V_?HAjLZI zJk(*;w)(~Z#gXK>807MHcoyfD808EUg(s%853{;!JDj4-R{7PSs)!)%Lc-B{oXO1A zhpz_I)Ov+gND9{$VAk~e9*;6s=yYI~?;`{%HGsa01xRJDEq;ozsC;w{%0|_$!)hclD`u`jRx?eM zyzLN69iWPs>QmAhEa8VL;6#Qn@h9;b*@Oi)6;%@^^p_IvT#A|;V>0%z=4Wu2Ujtp$8Do%Gh8J)s#dUMS&qWS^y3wBS zf@uxtFrUT2n1tzxnaIjYeu?9uKBw^qx+-ycN{WPH=&e+ z6jEw=SeSXTr=&$la+^s7n`WJ#kzgI8(}$X65i=+?Le_W~;jpQV@ktxqX7eM>aj<$| z=}sWom&oxcPeqw%2n0sDr;QxEtGFJ9#HG*pp(hL9#bANkg=?=u+OY6lt+KZWzx5(L ziE$)Af6NO{pr-;XikTpg>8gAUvf`PphLcl5#G@JD?XLE^{CbKNWq`?x0h4-~TJA-0 z7nWYUs_#th{YanUwRC>bF8&mUY&*E>g7SO_bE5U&N15HaM1G${P{Pj^?_i`7fKPSR z?)ULM5>)E*UBZ-k8`A9hRiD`?PbQDd)@oQ}*t3Ff@CYaOXNq4>{13K!6Rx!n8ujX7 zt**8XAAC`L@j_mKr3N-xJ1Se&YVS0fcsZ}aa=lTh*J|||A7|#dcx4eEe9RT$eC5v= ztYgO(I&4l z+BosVRahG*o{h@G&ELW$ouJhVdOhCkiB%o!_Wp{m3#4+HLzT7GFdW+K&hhur aof}afaZB`4Q?1vzZ5LlDnxp6N9N=FVNuR?2 diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Resources.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Resources.php deleted file mode 100644 index dee3a328b2b712b78ec69ac9299cd86e1c82d085..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7282 zcmc&(OLN=S6%I*}5)bvDAiJTNwuV_v?Zh@|$w}p=_cJ0qCCZo_n6(z4zx| zI0FZMB5x6kxSCJ;^1+Gh4~Xozwr}gUDIbgu4~Z-5_Ruj*;udAO+LU*jUAb1RckiL7 zXOCQ+l;tDaJ~By3H|NQ8cGxELYP@!e3BMe4# z$afI!8W>c*HguxPwjI6K!KfKsqbdu4$GrQ;BC%zBqL{o4Z1c|FIa)@(?4r)ED*^|G#_j|9)Up zG2lZnz;*NzjpdQZ>B4_gkgQwib!i@EXnyBna_m7``V=xc)&ZZW6e<_TkD2vAZw`uj z6hr52B>tr&sMN^8q9CLa(WEMnGPMI@dbt@nfzvz{=DFUsMW%9bhe_2e-#wAaFyo&% zB$vcF7uO#}h3KLTlQoE&TfCtx%1BvAj9ep^LeVrgLI-X+E;;hqVeU0!)~#K7SA9&rP)qX~R)n%{oGzW9Z*>{xM`GJ(q#R8*(DzZUK_V znmOVTmoCSj#|l4#8Rn&1knO&1)zrP+PODa_Z`Nzo><7{Uq}$y_OKt6SwzDye;<-+{ z%irRK&rp;)iHg>1?F*tQh&N<~8i>#{{VW#^+>Op}xE*ibQ%c9X-&O z_ca=yacLJMViKyR=AMZ7_j14#UY`zG3uSrmOJ71}IC>WXWf;)I=|GLqJAv>L(nHNM z4zUZ;tfm$4lL+!cM5@Aq=U`nRsy846Ar=_KG1k)Yp;uCa|M>dA!@DNZnm>C(hooyf81?~!AaDAw$p94T3EYNtXOxIHbu+M@;Ce! zeVZ#EoGB{YyS@Ym1+*Ns2o0?F zy_WBBPQo3=pF0etfgpviV2MpM{v_RlA2AE6omcg4Wm|1Ds~3&`5q!9*)OVWu*t%Nn z+9vy{H9;-OXn9Z?rwnzEaw|)Wv^H z;1ZHNUjCOToW)>;o9G;=kefT^w1NRES51QC$FTb39rIX{mJYsxL)#r{z98WdN(aN< zWI`BunTc1VOG#SabY4M_7|p*m`u;$5jCYiPQ=XrcZo|TW7)Jv?_)Lj>5|bYeUECrd zo5S`ngWqCwC08tvPIF-;+DTp)DSglOY zKNkOEg^EgmwJD(Tz5B3y=__>%(^W+tEl76Z-&`0%c zx|uq{G(jFl-Tq>_+c|8Tof>s*EICws621mA!x5$&-RP*6i9NmnZcop>k*0@ zU)u!5{3#?kvE)1A>xgB3^;{38tC8sDlR;%LwXrE3|9)iy^bX=>pTcsWRJew=qXNvj063HAV)zNH`HqDp$T8YqT zL;}ZtPd8F{orFBx}XWO}17NTDU zPQ9Mqjb|w00SBTrI9P`rr(;R^HDvnkQ1wncpA0=w^`q3OaI;XXy2B0^=bASmr4es! z{W2~Tf0;y#zm1I)d` zON(Q}BJ>$st?M9F$Y&tk!e1=){S*3+ib*sV11JCIIKbFZ(iY4ig<|reLPVgL<3$#O z$te(01~$2%dN%_KG?(g-rYm5Yi!l8BM$QP=O?A@6x0Ku(23irg+$d zeY+L=ZI#ype*DLd{*LU+cV!q^cwIK$t2zfSCSSgZ%UkS@tXQFUWJSiui#vGA#kU2; z{k6XbLwe#KO0SEhgWH5@l}pgE;FcdnPHX7V=(-*c93Gd>FNFOqT><2rkc3b UqFvX}uei}-Bl*44DVzfQAFp&HdH?_b diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Service.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Service.php deleted file mode 100644 index 8dde8ea46e77..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Service.php +++ /dev/null @@ -1,170 +0,0 @@ -internalAddGeneratedFile( - ' -�4 -.google/cloud/video/livestream/v1/service.proto google.cloud.video.livestream.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto0google/cloud/video/livestream/v1/resources.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"� -CreateChannelRequest9 -parent ( B)�A�A#!livestream.googleapis.com/Channel? -channel ( 2).google.cloud.video.livestream.v1.ChannelB�A - -channel_id ( B�A - -request_id ( "� -ListChannelsRequest9 -parent ( B)�A�A#!livestream.googleapis.com/Channel - page_size ( - -page_token (  -filter (  -order_by ( "� -ListChannelsResponse; -channels ( 2).google.cloud.video.livestream.v1.Channel -next_page_token (  - unreachable ( "L -GetChannelRequest7 -name ( B)�A�A# -!livestream.googleapis.com/Channel"r -DeleteChannelRequest7 -name ( B)�A�A# -!livestream.googleapis.com/Channel - -request_id (  -force ("� -UpdateChannelRequest/ - update_mask ( 2.google.protobuf.FieldMask? -channel ( 2).google.cloud.video.livestream.v1.ChannelB�A - -request_id ( "b -StartChannelRequest7 -name ( B)�A�A# -!livestream.googleapis.com/Channel - -request_id ( "a -StopChannelRequest7 -name ( B)�A�A# -!livestream.googleapis.com/Channel - -request_id ( "� -CreateInputRequest7 -parent ( B\'�A�A!livestream.googleapis.com/Input; -input ( 2\'.google.cloud.video.livestream.v1.InputB�A -input_id ( B�A - -request_id ( "� -ListInputsRequest7 -parent ( B\'�A�A!livestream.googleapis.com/Input - page_size ( - -page_token (  -filter (  -order_by ( "{ -ListInputsResponse7 -inputs ( 2\'.google.cloud.video.livestream.v1.Input -next_page_token (  - unreachable ( "H -GetInputRequest5 -name ( B\'�A�A! -livestream.googleapis.com/Input"_ -DeleteInputRequest5 -name ( B\'�A�A! -livestream.googleapis.com/Input - -request_id ( "� -UpdateInputRequest/ - update_mask ( 2.google.protobuf.FieldMask; -input ( 2\'.google.cloud.video.livestream.v1.InputB�A - -request_id ( "� -CreateEventRequest7 -parent ( B\'�A�A!livestream.googleapis.com/Event; -event ( 2\'.google.cloud.video.livestream.v1.EventB�A -event_id ( B�A - -request_id ( "� -ListEventsRequest7 -parent ( B\'�A�A!livestream.googleapis.com/Event - page_size ( - -page_token (  -filter (  -order_by ( "{ -ListEventsResponse7 -events ( 2\'.google.cloud.video.livestream.v1.Event -next_page_token (  - unreachable ( "H -GetEventRequest5 -name ( B\'�A�A! -livestream.googleapis.com/Event"_ -DeleteEventRequest5 -name ( B\'�A�A! -livestream.googleapis.com/Event - -request_id ( " -ChannelOperationResponse"� -OperationMetadata4 - create_time ( 2.google.protobuf.TimestampB�A1 -end_time ( 2.google.protobuf.TimestampB�A -target ( B�A -verb ( B�A# -requested_cancellation (B�A - api_version ( B�A2� -LivestreamService� - CreateChannel6.google.cloud.video.livestream.v1.CreateChannelRequest.google.longrunning.Operation"x���7",/v1/{parent=projects/*/locations/*}/channels:channel�Aparent,channel,channel_id�A -ChannelOperationMetadata� - ListChannels5.google.cloud.video.livestream.v1.ListChannelsRequest6.google.cloud.video.livestream.v1.ListChannelsResponse"=���.,/v1/{parent=projects/*/locations/*}/channels�Aparent� - -GetChannel3.google.cloud.video.livestream.v1.GetChannelRequest).google.cloud.video.livestream.v1.Channel";���.,/v1/{name=projects/*/locations/*/channels/*}�Aname� - DeleteChannel6.google.cloud.video.livestream.v1.DeleteChannelRequest.google.longrunning.Operation"h���.*,/v1/{name=projects/*/locations/*/channels/*}�Aname�A* -google.protobuf.EmptyOperationMetadata� - UpdateChannel6.google.cloud.video.livestream.v1.UpdateChannelRequest.google.longrunning.Operation"z���?24/v1/{channel.name=projects/*/locations/*/channels/*}:channel�Achannel,update_mask�A -ChannelOperationMetadata� - StartChannel5.google.cloud.video.livestream.v1.StartChannelRequest.google.longrunning.Operation"t���7"2/v1/{name=projects/*/locations/*/channels/*}:start:*�Aname�A- -ChannelOperationResponseOperationMetadata� - StopChannel4.google.cloud.video.livestream.v1.StopChannelRequest.google.longrunning.Operation"s���6"1/v1/{name=projects/*/locations/*/channels/*}:stop:*�Aname�A- -ChannelOperationResponseOperationMetadata� - CreateInput4.google.cloud.video.livestream.v1.CreateInputRequest.google.longrunning.Operation"n���3"*/v1/{parent=projects/*/locations/*}/inputs:input�Aparent,input,input_id�A -InputOperationMetadata� - -ListInputs3.google.cloud.video.livestream.v1.ListInputsRequest4.google.cloud.video.livestream.v1.ListInputsResponse";���,*/v1/{parent=projects/*/locations/*}/inputs�Aparent� -GetInput1.google.cloud.video.livestream.v1.GetInputRequest\'.google.cloud.video.livestream.v1.Input"9���,*/v1/{name=projects/*/locations/*/inputs/*}�Aname� - DeleteInput4.google.cloud.video.livestream.v1.DeleteInputRequest.google.longrunning.Operation"f���,**/v1/{name=projects/*/locations/*/inputs/*}�Aname�A* -google.protobuf.EmptyOperationMetadata� - UpdateInput4.google.cloud.video.livestream.v1.UpdateInputRequest.google.longrunning.Operation"p���920/v1/{input.name=projects/*/locations/*/inputs/*}:input�Ainput,update_mask�A -InputOperationMetadata� - CreateEvent4.google.cloud.video.livestream.v1.CreateEventRequest\'.google.cloud.video.livestream.v1.Event"\\���>"5/v1/{parent=projects/*/locations/*/channels/*}/events:event�Aparent,event,event_id� - -ListEvents3.google.cloud.video.livestream.v1.ListEventsRequest4.google.cloud.video.livestream.v1.ListEventsResponse"F���75/v1/{parent=projects/*/locations/*/channels/*}/events�Aparent� -GetEvent1.google.cloud.video.livestream.v1.GetEventRequest\'.google.cloud.video.livestream.v1.Event"D���75/v1/{name=projects/*/locations/*/channels/*/events/*}�Aname� - DeleteEvent4.google.cloud.video.livestream.v1.DeleteEventRequest.google.protobuf.Empty"D���7*5/v1/{name=projects/*/locations/*/channels/*/events/*}�AnameM�Alivestream.googleapis.com�A.https://www.googleapis.com/auth/cloud-platformB� -$com.google.cloud.video.livestream.v1B ServiceProtoPZDcloud.google.com/go/video/livestream/apiv1/livestreampb;livestreampb� Google.Cloud.Video.LiveStream.V1� Google\\Cloud\\Video\\LiveStream\\V1�$Google::Cloud::Video::LiveStream::V1�Ad -*secretmanager.googleapis.com/SecretVersion6projects/{project}/secrets/{secret}/versions/{version}bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioFormat.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioFormat.php deleted file mode 100644 index 183a21001565..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioFormat.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.video.livestream.v1.AudioFormat - */ -class AudioFormat extends \Google\Protobuf\Internal\Message -{ - /** - * Audio codec used in this audio stream. - * - * Generated from protobuf field string codec = 1; - */ - protected $codec = ''; - /** - * The number of audio channels. - * - * Generated from protobuf field int32 channel_count = 2; - */ - protected $channel_count = 0; - /** - * A list of channel names specifying the layout of the audio channels. - * - * Generated from protobuf field repeated string channel_layout = 3; - */ - private $channel_layout; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $codec - * Audio codec used in this audio stream. - * @type int $channel_count - * The number of audio channels. - * @type array|\Google\Protobuf\Internal\RepeatedField $channel_layout - * A list of channel names specifying the layout of the audio channels. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Audio codec used in this audio stream. - * - * Generated from protobuf field string codec = 1; - * @return string - */ - public function getCodec() - { - return $this->codec; - } - - /** - * Audio codec used in this audio stream. - * - * Generated from protobuf field string codec = 1; - * @param string $var - * @return $this - */ - public function setCodec($var) - { - GPBUtil::checkString($var, True); - $this->codec = $var; - - return $this; - } - - /** - * The number of audio channels. - * - * Generated from protobuf field int32 channel_count = 2; - * @return int - */ - public function getChannelCount() - { - return $this->channel_count; - } - - /** - * The number of audio channels. - * - * Generated from protobuf field int32 channel_count = 2; - * @param int $var - * @return $this - */ - public function setChannelCount($var) - { - GPBUtil::checkInt32($var); - $this->channel_count = $var; - - return $this; - } - - /** - * A list of channel names specifying the layout of the audio channels. - * - * Generated from protobuf field repeated string channel_layout = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getChannelLayout() - { - return $this->channel_layout; - } - - /** - * A list of channel names specifying the layout of the audio channels. - * - * Generated from protobuf field repeated string channel_layout = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setChannelLayout($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->channel_layout = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream.php deleted file mode 100644 index 004559384953..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream.php +++ /dev/null @@ -1,327 +0,0 @@ -google.cloud.video.livestream.v1.AudioStream - */ -class AudioStream extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies whether pass through (transmuxing) is enabled or not. - * If set to `true`, the rest of the settings, other than `mapping`, will be - * ignored. The default is `false`. - * - * Generated from protobuf field bool transmux = 8; - */ - protected $transmux = false; - /** - * The codec for this audio stream. The default is `aac`. - * Supported audio codecs: - * - `aac` - * - * Generated from protobuf field string codec = 1; - */ - protected $codec = ''; - /** - * Required. Audio bitrate in bits per second. Must be between 1 and - * 10,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bitrate_bps = 0; - /** - * Number of audio channels. Must be between 1 and 6. The default is 2. - * - * Generated from protobuf field int32 channel_count = 3; - */ - protected $channel_count = 0; - /** - * A list of channel names specifying layout of the audio channels. - * This only affects the metadata embedded in the container headers, if - * supported by the specified format. The default is `[fl, fr]`. - * Supported channel names: - * - `fl` - Front left channel - * - `fr` - Front right channel - * - `sl` - Side left channel - * - `sr` - Side right channel - * - `fc` - Front center channel - * - `lfe` - Low frequency - * - * Generated from protobuf field repeated string channel_layout = 4; - */ - private $channel_layout; - /** - * The mapping for the input streams and audio channels. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStream.AudioMapping mapping = 5; - */ - private $mapping; - /** - * The audio sample rate in Hertz. The default is 48000 Hertz. - * - * Generated from protobuf field int32 sample_rate_hertz = 6; - */ - protected $sample_rate_hertz = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $transmux - * Specifies whether pass through (transmuxing) is enabled or not. - * If set to `true`, the rest of the settings, other than `mapping`, will be - * ignored. The default is `false`. - * @type string $codec - * The codec for this audio stream. The default is `aac`. - * Supported audio codecs: - * - `aac` - * @type int $bitrate_bps - * Required. Audio bitrate in bits per second. Must be between 1 and - * 10,000,000. - * @type int $channel_count - * Number of audio channels. Must be between 1 and 6. The default is 2. - * @type array|\Google\Protobuf\Internal\RepeatedField $channel_layout - * A list of channel names specifying layout of the audio channels. - * This only affects the metadata embedded in the container headers, if - * supported by the specified format. The default is `[fl, fr]`. - * Supported channel names: - * - `fl` - Front left channel - * - `fr` - Front right channel - * - `sl` - Side left channel - * - `sr` - Side right channel - * - `fc` - Front center channel - * - `lfe` - Low frequency - * @type array<\Google\Cloud\Video\LiveStream\V1\AudioStream\AudioMapping>|\Google\Protobuf\Internal\RepeatedField $mapping - * The mapping for the input streams and audio channels. - * @type int $sample_rate_hertz - * The audio sample rate in Hertz. The default is 48000 Hertz. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * Specifies whether pass through (transmuxing) is enabled or not. - * If set to `true`, the rest of the settings, other than `mapping`, will be - * ignored. The default is `false`. - * - * Generated from protobuf field bool transmux = 8; - * @return bool - */ - public function getTransmux() - { - return $this->transmux; - } - - /** - * Specifies whether pass through (transmuxing) is enabled or not. - * If set to `true`, the rest of the settings, other than `mapping`, will be - * ignored. The default is `false`. - * - * Generated from protobuf field bool transmux = 8; - * @param bool $var - * @return $this - */ - public function setTransmux($var) - { - GPBUtil::checkBool($var); - $this->transmux = $var; - - return $this; - } - - /** - * The codec for this audio stream. The default is `aac`. - * Supported audio codecs: - * - `aac` - * - * Generated from protobuf field string codec = 1; - * @return string - */ - public function getCodec() - { - return $this->codec; - } - - /** - * The codec for this audio stream. The default is `aac`. - * Supported audio codecs: - * - `aac` - * - * Generated from protobuf field string codec = 1; - * @param string $var - * @return $this - */ - public function setCodec($var) - { - GPBUtil::checkString($var, True); - $this->codec = $var; - - return $this; - } - - /** - * Required. Audio bitrate in bits per second. Must be between 1 and - * 10,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getBitrateBps() - { - return $this->bitrate_bps; - } - - /** - * Required. Audio bitrate in bits per second. Must be between 1 and - * 10,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setBitrateBps($var) - { - GPBUtil::checkInt32($var); - $this->bitrate_bps = $var; - - return $this; - } - - /** - * Number of audio channels. Must be between 1 and 6. The default is 2. - * - * Generated from protobuf field int32 channel_count = 3; - * @return int - */ - public function getChannelCount() - { - return $this->channel_count; - } - - /** - * Number of audio channels. Must be between 1 and 6. The default is 2. - * - * Generated from protobuf field int32 channel_count = 3; - * @param int $var - * @return $this - */ - public function setChannelCount($var) - { - GPBUtil::checkInt32($var); - $this->channel_count = $var; - - return $this; - } - - /** - * A list of channel names specifying layout of the audio channels. - * This only affects the metadata embedded in the container headers, if - * supported by the specified format. The default is `[fl, fr]`. - * Supported channel names: - * - `fl` - Front left channel - * - `fr` - Front right channel - * - `sl` - Side left channel - * - `sr` - Side right channel - * - `fc` - Front center channel - * - `lfe` - Low frequency - * - * Generated from protobuf field repeated string channel_layout = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getChannelLayout() - { - return $this->channel_layout; - } - - /** - * A list of channel names specifying layout of the audio channels. - * This only affects the metadata embedded in the container headers, if - * supported by the specified format. The default is `[fl, fr]`. - * Supported channel names: - * - `fl` - Front left channel - * - `fr` - Front right channel - * - `sl` - Side left channel - * - `sr` - Side right channel - * - `fc` - Front center channel - * - `lfe` - Low frequency - * - * Generated from protobuf field repeated string channel_layout = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setChannelLayout($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->channel_layout = $arr; - - return $this; - } - - /** - * The mapping for the input streams and audio channels. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStream.AudioMapping mapping = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMapping() - { - return $this->mapping; - } - - /** - * The mapping for the input streams and audio channels. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStream.AudioMapping mapping = 5; - * @param array<\Google\Cloud\Video\LiveStream\V1\AudioStream\AudioMapping>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMapping($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\AudioStream\AudioMapping::class); - $this->mapping = $arr; - - return $this; - } - - /** - * The audio sample rate in Hertz. The default is 48000 Hertz. - * - * Generated from protobuf field int32 sample_rate_hertz = 6; - * @return int - */ - public function getSampleRateHertz() - { - return $this->sample_rate_hertz; - } - - /** - * The audio sample rate in Hertz. The default is 48000 Hertz. - * - * Generated from protobuf field int32 sample_rate_hertz = 6; - * @param int $var - * @return $this - */ - public function setSampleRateHertz($var) - { - GPBUtil::checkInt32($var); - $this->sample_rate_hertz = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream/AudioMapping.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream/AudioMapping.php deleted file mode 100644 index 032ef41bd53a..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream/AudioMapping.php +++ /dev/null @@ -1,246 +0,0 @@ -google.cloud.video.livestream.v1.AudioStream.AudioMapping - */ -class AudioMapping extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `Channel` - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * that identifies the input that this audio mapping applies to. If an - * active input doesn't have an audio mapping, the primary audio track in - * the input stream will be selected. - * - * Generated from protobuf field string input_key = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_key = ''; - /** - * Required. The zero-based index of the track in the input stream. - * All [mapping][google.cloud.video.livestream.v1.AudioStream.mapping]s in - * the same [AudioStream][google.cloud.video.livestream.v1.AudioStream] must - * have the same input track. - * - * Generated from protobuf field int32 input_track = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_track = 0; - /** - * Required. The zero-based index of the channel in the input stream. - * - * Generated from protobuf field int32 input_channel = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_channel = 0; - /** - * Required. The zero-based index of the channel in the output audio stream. - * Must be consistent with the - * [input_channel][google.cloud.video.livestream.v1.AudioStream.AudioMapping.input_channel]. - * - * Generated from protobuf field int32 output_channel = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $output_channel = 0; - /** - * Audio volume control in dB. Negative values decrease volume, - * positive values increase. The default is 0. - * - * Generated from protobuf field double gain_db = 5; - */ - protected $gain_db = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $input_key - * Required. The `Channel` - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * that identifies the input that this audio mapping applies to. If an - * active input doesn't have an audio mapping, the primary audio track in - * the input stream will be selected. - * @type int $input_track - * Required. The zero-based index of the track in the input stream. - * All [mapping][google.cloud.video.livestream.v1.AudioStream.mapping]s in - * the same [AudioStream][google.cloud.video.livestream.v1.AudioStream] must - * have the same input track. - * @type int $input_channel - * Required. The zero-based index of the channel in the input stream. - * @type int $output_channel - * Required. The zero-based index of the channel in the output audio stream. - * Must be consistent with the - * [input_channel][google.cloud.video.livestream.v1.AudioStream.AudioMapping.input_channel]. - * @type float $gain_db - * Audio volume control in dB. Negative values decrease volume, - * positive values increase. The default is 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `Channel` - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * that identifies the input that this audio mapping applies to. If an - * active input doesn't have an audio mapping, the primary audio track in - * the input stream will be selected. - * - * Generated from protobuf field string input_key = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInputKey() - { - return $this->input_key; - } - - /** - * Required. The `Channel` - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * that identifies the input that this audio mapping applies to. If an - * active input doesn't have an audio mapping, the primary audio track in - * the input stream will be selected. - * - * Generated from protobuf field string input_key = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInputKey($var) - { - GPBUtil::checkString($var, True); - $this->input_key = $var; - - return $this; - } - - /** - * Required. The zero-based index of the track in the input stream. - * All [mapping][google.cloud.video.livestream.v1.AudioStream.mapping]s in - * the same [AudioStream][google.cloud.video.livestream.v1.AudioStream] must - * have the same input track. - * - * Generated from protobuf field int32 input_track = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getInputTrack() - { - return $this->input_track; - } - - /** - * Required. The zero-based index of the track in the input stream. - * All [mapping][google.cloud.video.livestream.v1.AudioStream.mapping]s in - * the same [AudioStream][google.cloud.video.livestream.v1.AudioStream] must - * have the same input track. - * - * Generated from protobuf field int32 input_track = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setInputTrack($var) - { - GPBUtil::checkInt32($var); - $this->input_track = $var; - - return $this; - } - - /** - * Required. The zero-based index of the channel in the input stream. - * - * Generated from protobuf field int32 input_channel = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getInputChannel() - { - return $this->input_channel; - } - - /** - * Required. The zero-based index of the channel in the input stream. - * - * Generated from protobuf field int32 input_channel = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setInputChannel($var) - { - GPBUtil::checkInt32($var); - $this->input_channel = $var; - - return $this; - } - - /** - * Required. The zero-based index of the channel in the output audio stream. - * Must be consistent with the - * [input_channel][google.cloud.video.livestream.v1.AudioStream.AudioMapping.input_channel]. - * - * Generated from protobuf field int32 output_channel = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getOutputChannel() - { - return $this->output_channel; - } - - /** - * Required. The zero-based index of the channel in the output audio stream. - * Must be consistent with the - * [input_channel][google.cloud.video.livestream.v1.AudioStream.AudioMapping.input_channel]. - * - * Generated from protobuf field int32 output_channel = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setOutputChannel($var) - { - GPBUtil::checkInt32($var); - $this->output_channel = $var; - - return $this; - } - - /** - * Audio volume control in dB. Negative values decrease volume, - * positive values increase. The default is 0. - * - * Generated from protobuf field double gain_db = 5; - * @return float - */ - public function getGainDb() - { - return $this->gain_db; - } - - /** - * Audio volume control in dB. Negative values decrease volume, - * positive values increase. The default is 0. - * - * Generated from protobuf field double gain_db = 5; - * @param float $var - * @return $this - */ - public function setGainDb($var) - { - GPBUtil::checkDouble($var); - $this->gain_db = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AudioMapping::class, \Google\Cloud\Video\LiveStream\V1\AudioStream_AudioMapping::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStreamProperty.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStreamProperty.php deleted file mode 100644 index 320aecc20086..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStreamProperty.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.video.livestream.v1.AudioStreamProperty - */ -class AudioStreamProperty extends \Google\Protobuf\Internal\Message -{ - /** - * Index of this audio stream. - * - * Generated from protobuf field int32 index = 1; - */ - protected $index = 0; - /** - * Properties of the audio format. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; - */ - protected $audio_format = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $index - * Index of this audio stream. - * @type \Google\Cloud\Video\LiveStream\V1\AudioFormat $audio_format - * Properties of the audio format. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Index of this audio stream. - * - * Generated from protobuf field int32 index = 1; - * @return int - */ - public function getIndex() - { - return $this->index; - } - - /** - * Index of this audio stream. - * - * Generated from protobuf field int32 index = 1; - * @param int $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt32($var); - $this->index = $var; - - return $this; - } - - /** - * Properties of the audio format. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; - * @return \Google\Cloud\Video\LiveStream\V1\AudioFormat|null - */ - public function getAudioFormat() - { - return $this->audio_format; - } - - public function hasAudioFormat() - { - return isset($this->audio_format); - } - - public function clearAudioFormat() - { - unset($this->audio_format); - } - - /** - * Properties of the audio format. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; - * @param \Google\Cloud\Video\LiveStream\V1\AudioFormat $var - * @return $this - */ - public function setAudioFormat($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\AudioFormat::class); - $this->audio_format = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel.php deleted file mode 100644 index e776a7a3ec77..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel.php +++ /dev/null @@ -1,745 +0,0 @@ -google.cloud.video.livestream.v1.Channel - */ -class Channel extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the channel, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User-defined key/value metadata. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * A list of input attachments that this channel uses. - * One channel can have multiple inputs as the input sources. Only one - * input can be selected as the input source at one time. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.InputAttachment input_attachments = 16; - */ - private $input_attachments; - /** - * Output only. The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * that serves as the current input source. The first input in the - * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments] - * is the initial input source. - * - * Generated from protobuf field string active_input = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $active_input = ''; - /** - * Required. Information about the output (that is, the Cloud Storage bucket - * to store the generated live stream). - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.Output output = 9 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $output = null; - /** - * List of elementary streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.ElementaryStream elementary_streams = 10; - */ - private $elementary_streams; - /** - * List of multiplexing settings for output streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.MuxStream mux_streams = 11; - */ - private $mux_streams; - /** - * List of output manifests. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Manifest manifests = 12; - */ - private $manifests; - /** - * List of output sprite sheets. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.SpriteSheet sprite_sheets = 13; - */ - private $sprite_sheets; - /** - * Output only. State of the streaming operation. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.StreamingState streaming_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $streaming_state = 0; - /** - * Output only. A description of the reason for the streaming error. This - * property is always present when - * [streaming_state][google.cloud.video.livestream.v1.Channel.streaming_state] - * is - * [STREAMING_ERROR][google.cloud.video.livestream.v1.Channel.StreamingState.STREAMING_ERROR]. - * - * Generated from protobuf field .google.rpc.Status streaming_error = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $streaming_error = null; - /** - * Configuration of platform logs for this channel. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig log_config = 19; - */ - protected $log_config = null; - /** - * Configuration of timecode for this channel. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig timecode_config = 21; - */ - protected $timecode_config = null; - /** - * Encryption configurations for this channel. Each configuration has an ID - * which is referred to by each MuxStream to indicate which configuration is - * used for that output. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Encryption encryptions = 24; - */ - private $encryptions; - /** - * The configuration for input sources defined in - * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments]. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig input_config = 25; - */ - protected $input_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the channel, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update time. - * @type array|\Google\Protobuf\Internal\MapField $labels - * User-defined key/value metadata. - * @type array<\Google\Cloud\Video\LiveStream\V1\InputAttachment>|\Google\Protobuf\Internal\RepeatedField $input_attachments - * A list of input attachments that this channel uses. - * One channel can have multiple inputs as the input sources. Only one - * input can be selected as the input source at one time. - * @type string $active_input - * Output only. The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * that serves as the current input source. The first input in the - * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments] - * is the initial input source. - * @type \Google\Cloud\Video\LiveStream\V1\Channel\Output $output - * Required. Information about the output (that is, the Cloud Storage bucket - * to store the generated live stream). - * @type array<\Google\Cloud\Video\LiveStream\V1\ElementaryStream>|\Google\Protobuf\Internal\RepeatedField $elementary_streams - * List of elementary streams. - * @type array<\Google\Cloud\Video\LiveStream\V1\MuxStream>|\Google\Protobuf\Internal\RepeatedField $mux_streams - * List of multiplexing settings for output streams. - * @type array<\Google\Cloud\Video\LiveStream\V1\Manifest>|\Google\Protobuf\Internal\RepeatedField $manifests - * List of output manifests. - * @type array<\Google\Cloud\Video\LiveStream\V1\SpriteSheet>|\Google\Protobuf\Internal\RepeatedField $sprite_sheets - * List of output sprite sheets. - * @type int $streaming_state - * Output only. State of the streaming operation. - * @type \Google\Rpc\Status $streaming_error - * Output only. A description of the reason for the streaming error. This - * property is always present when - * [streaming_state][google.cloud.video.livestream.v1.Channel.streaming_state] - * is - * [STREAMING_ERROR][google.cloud.video.livestream.v1.Channel.StreamingState.STREAMING_ERROR]. - * @type \Google\Cloud\Video\LiveStream\V1\LogConfig $log_config - * Configuration of platform logs for this channel. - * @type \Google\Cloud\Video\LiveStream\V1\TimecodeConfig $timecode_config - * Configuration of timecode for this channel. - * @type array<\Google\Cloud\Video\LiveStream\V1\Encryption>|\Google\Protobuf\Internal\RepeatedField $encryptions - * Encryption configurations for this channel. Each configuration has an ID - * which is referred to by each MuxStream to indicate which configuration is - * used for that output. - * @type \Google\Cloud\Video\LiveStream\V1\InputConfig $input_config - * The configuration for input sources defined in - * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the channel, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the channel, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * User-defined key/value metadata. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * User-defined key/value metadata. - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * A list of input attachments that this channel uses. - * One channel can have multiple inputs as the input sources. Only one - * input can be selected as the input source at one time. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.InputAttachment input_attachments = 16; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInputAttachments() - { - return $this->input_attachments; - } - - /** - * A list of input attachments that this channel uses. - * One channel can have multiple inputs as the input sources. Only one - * input can be selected as the input source at one time. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.InputAttachment input_attachments = 16; - * @param array<\Google\Cloud\Video\LiveStream\V1\InputAttachment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInputAttachments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\InputAttachment::class); - $this->input_attachments = $arr; - - return $this; - } - - /** - * Output only. The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * that serves as the current input source. The first input in the - * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments] - * is the initial input source. - * - * Generated from protobuf field string active_input = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getActiveInput() - { - return $this->active_input; - } - - /** - * Output only. The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * that serves as the current input source. The first input in the - * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments] - * is the initial input source. - * - * Generated from protobuf field string active_input = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setActiveInput($var) - { - GPBUtil::checkString($var, True); - $this->active_input = $var; - - return $this; - } - - /** - * Required. Information about the output (that is, the Cloud Storage bucket - * to store the generated live stream). - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.Output output = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\LiveStream\V1\Channel\Output|null - */ - public function getOutput() - { - return $this->output; - } - - public function hasOutput() - { - return isset($this->output); - } - - public function clearOutput() - { - unset($this->output); - } - - /** - * Required. Information about the output (that is, the Cloud Storage bucket - * to store the generated live stream). - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.Output output = 9 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\LiveStream\V1\Channel\Output $var - * @return $this - */ - public function setOutput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Channel\Output::class); - $this->output = $var; - - return $this; - } - - /** - * List of elementary streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.ElementaryStream elementary_streams = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getElementaryStreams() - { - return $this->elementary_streams; - } - - /** - * List of elementary streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.ElementaryStream elementary_streams = 10; - * @param array<\Google\Cloud\Video\LiveStream\V1\ElementaryStream>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setElementaryStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\ElementaryStream::class); - $this->elementary_streams = $arr; - - return $this; - } - - /** - * List of multiplexing settings for output streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.MuxStream mux_streams = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMuxStreams() - { - return $this->mux_streams; - } - - /** - * List of multiplexing settings for output streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.MuxStream mux_streams = 11; - * @param array<\Google\Cloud\Video\LiveStream\V1\MuxStream>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMuxStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\MuxStream::class); - $this->mux_streams = $arr; - - return $this; - } - - /** - * List of output manifests. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Manifest manifests = 12; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getManifests() - { - return $this->manifests; - } - - /** - * List of output manifests. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Manifest manifests = 12; - * @param array<\Google\Cloud\Video\LiveStream\V1\Manifest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setManifests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Manifest::class); - $this->manifests = $arr; - - return $this; - } - - /** - * List of output sprite sheets. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.SpriteSheet sprite_sheets = 13; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSpriteSheets() - { - return $this->sprite_sheets; - } - - /** - * List of output sprite sheets. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.SpriteSheet sprite_sheets = 13; - * @param array<\Google\Cloud\Video\LiveStream\V1\SpriteSheet>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpriteSheets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\SpriteSheet::class); - $this->sprite_sheets = $arr; - - return $this; - } - - /** - * Output only. State of the streaming operation. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.StreamingState streaming_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getStreamingState() - { - return $this->streaming_state; - } - - /** - * Output only. State of the streaming operation. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.StreamingState streaming_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setStreamingState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Channel\StreamingState::class); - $this->streaming_state = $var; - - return $this; - } - - /** - * Output only. A description of the reason for the streaming error. This - * property is always present when - * [streaming_state][google.cloud.video.livestream.v1.Channel.streaming_state] - * is - * [STREAMING_ERROR][google.cloud.video.livestream.v1.Channel.StreamingState.STREAMING_ERROR]. - * - * Generated from protobuf field .google.rpc.Status streaming_error = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getStreamingError() - { - return $this->streaming_error; - } - - public function hasStreamingError() - { - return isset($this->streaming_error); - } - - public function clearStreamingError() - { - unset($this->streaming_error); - } - - /** - * Output only. A description of the reason for the streaming error. This - * property is always present when - * [streaming_state][google.cloud.video.livestream.v1.Channel.streaming_state] - * is - * [STREAMING_ERROR][google.cloud.video.livestream.v1.Channel.StreamingState.STREAMING_ERROR]. - * - * Generated from protobuf field .google.rpc.Status streaming_error = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setStreamingError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->streaming_error = $var; - - return $this; - } - - /** - * Configuration of platform logs for this channel. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig log_config = 19; - * @return \Google\Cloud\Video\LiveStream\V1\LogConfig|null - */ - public function getLogConfig() - { - return $this->log_config; - } - - public function hasLogConfig() - { - return isset($this->log_config); - } - - public function clearLogConfig() - { - unset($this->log_config); - } - - /** - * Configuration of platform logs for this channel. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig log_config = 19; - * @param \Google\Cloud\Video\LiveStream\V1\LogConfig $var - * @return $this - */ - public function setLogConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\LogConfig::class); - $this->log_config = $var; - - return $this; - } - - /** - * Configuration of timecode for this channel. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig timecode_config = 21; - * @return \Google\Cloud\Video\LiveStream\V1\TimecodeConfig|null - */ - public function getTimecodeConfig() - { - return $this->timecode_config; - } - - public function hasTimecodeConfig() - { - return isset($this->timecode_config); - } - - public function clearTimecodeConfig() - { - unset($this->timecode_config); - } - - /** - * Configuration of timecode for this channel. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig timecode_config = 21; - * @param \Google\Cloud\Video\LiveStream\V1\TimecodeConfig $var - * @return $this - */ - public function setTimecodeConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\TimecodeConfig::class); - $this->timecode_config = $var; - - return $this; - } - - /** - * Encryption configurations for this channel. Each configuration has an ID - * which is referred to by each MuxStream to indicate which configuration is - * used for that output. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Encryption encryptions = 24; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEncryptions() - { - return $this->encryptions; - } - - /** - * Encryption configurations for this channel. Each configuration has an ID - * which is referred to by each MuxStream to indicate which configuration is - * used for that output. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Encryption encryptions = 24; - * @param array<\Google\Cloud\Video\LiveStream\V1\Encryption>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEncryptions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Encryption::class); - $this->encryptions = $arr; - - return $this; - } - - /** - * The configuration for input sources defined in - * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments]. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig input_config = 25; - * @return \Google\Cloud\Video\LiveStream\V1\InputConfig|null - */ - public function getInputConfig() - { - return $this->input_config; - } - - public function hasInputConfig() - { - return isset($this->input_config); - } - - public function clearInputConfig() - { - unset($this->input_config); - } - - /** - * The configuration for input sources defined in - * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments]. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig input_config = 25; - * @param \Google\Cloud\Video\LiveStream\V1\InputConfig $var - * @return $this - */ - public function setInputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\InputConfig::class); - $this->input_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/Output.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/Output.php deleted file mode 100644 index 1124a8488084..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/Output.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.video.livestream.v1.Channel.Output - */ -class Output extends \Google\Protobuf\Internal\Message -{ - /** - * URI for the output file(s). For example, `gs://my-bucket/outputs/`. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * URI for the output file(s). For example, `gs://my-bucket/outputs/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * URI for the output file(s). For example, `gs://my-bucket/outputs/`. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI for the output file(s). For example, `gs://my-bucket/outputs/`. - * - * Generated from protobuf field string uri = 1; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Output::class, \Google\Cloud\Video\LiveStream\V1\Channel_Output::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/StreamingState.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/StreamingState.php deleted file mode 100644 index 87b538780fb8..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/StreamingState.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.video.livestream.v1.Channel.StreamingState - */ -class StreamingState -{ - /** - * Streaming state is not specified. - * - * Generated from protobuf enum STREAMING_STATE_UNSPECIFIED = 0; - */ - const STREAMING_STATE_UNSPECIFIED = 0; - /** - * Channel is getting the input stream, generating the live streams to the - * specified output location. - * - * Generated from protobuf enum STREAMING = 1; - */ - const STREAMING = 1; - /** - * Channel is waiting for the input stream through the input. - * - * Generated from protobuf enum AWAITING_INPUT = 2; - */ - const AWAITING_INPUT = 2; - /** - * Channel is running, but has trouble publishing the live streams onto the - * specified output location (for example, the specified Cloud Storage - * bucket is not writable). - * - * Generated from protobuf enum STREAMING_ERROR = 4; - */ - const STREAMING_ERROR = 4; - /** - * Channel is generating live streams with no input stream. Live streams are - * filled out with black screen, while input stream is missing. - * Not supported yet. - * - * Generated from protobuf enum STREAMING_NO_INPUT = 5; - */ - const STREAMING_NO_INPUT = 5; - /** - * Channel is stopped, finishing live streams. - * - * Generated from protobuf enum STOPPED = 6; - */ - const STOPPED = 6; - /** - * Channel is starting. - * - * Generated from protobuf enum STARTING = 7; - */ - const STARTING = 7; - /** - * Channel is stopping. - * - * Generated from protobuf enum STOPPING = 8; - */ - const STOPPING = 8; - - private static $valueToName = [ - self::STREAMING_STATE_UNSPECIFIED => 'STREAMING_STATE_UNSPECIFIED', - self::STREAMING => 'STREAMING', - self::AWAITING_INPUT => 'AWAITING_INPUT', - self::STREAMING_ERROR => 'STREAMING_ERROR', - self::STREAMING_NO_INPUT => 'STREAMING_NO_INPUT', - self::STOPPED => 'STOPPED', - self::STARTING => 'STARTING', - self::STOPPING => 'STOPPING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StreamingState::class, \Google\Cloud\Video\LiveStream\V1\Channel_StreamingState::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ChannelOperationResponse.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ChannelOperationResponse.php deleted file mode 100644 index df5cc4567242..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ChannelOperationResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.video.livestream.v1.ChannelOperationResponse - */ -class ChannelOperationResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateChannelRequest.php deleted file mode 100644 index 6945278c5aa1..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateChannelRequest.php +++ /dev/null @@ -1,252 +0,0 @@ -google.cloud.video.livestream.v1.CreateChannelRequest - */ -class CreateChannelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The channel resource to be created. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $channel = null; - /** - * Required. The ID of the channel resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * Generated from protobuf field string channel_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $channel_id = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 4; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. Please see - * {@see LivestreamServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Video\LiveStream\V1\Channel $channel Required. The channel resource to be created. - * @param string $channelId Required. The ID of the channel resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * @return \Google\Cloud\Video\LiveStream\V1\CreateChannelRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\LiveStream\V1\Channel $channel, string $channelId): self - { - return (new self()) - ->setParent($parent) - ->setChannel($channel) - ->setChannelId($channelId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * @type \Google\Cloud\Video\LiveStream\V1\Channel $channel - * Required. The channel resource to be created. - * @type string $channel_id - * Required. The ID of the channel resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The channel resource to be created. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\LiveStream\V1\Channel|null - */ - public function getChannel() - { - return $this->channel; - } - - public function hasChannel() - { - return isset($this->channel); - } - - public function clearChannel() - { - unset($this->channel); - } - - /** - * Required. The channel resource to be created. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\LiveStream\V1\Channel $var - * @return $this - */ - public function setChannel($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Channel::class); - $this->channel = $var; - - return $this; - } - - /** - * Required. The ID of the channel resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * Generated from protobuf field string channel_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getChannelId() - { - return $this->channel_id; - } - - /** - * Required. The ID of the channel resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * Generated from protobuf field string channel_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setChannelId($var) - { - GPBUtil::checkString($var, True); - $this->channel_id = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 4; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 4; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateEventRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateEventRequest.php deleted file mode 100644 index 821c7f956b9e..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateEventRequest.php +++ /dev/null @@ -1,252 +0,0 @@ -google.cloud.video.livestream.v1.CreateEventRequest - */ -class CreateEventRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent channel for the resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The event resource to be created. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event event = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $event = null; - /** - * Required. The ID of the event resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * Generated from protobuf field string event_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $event_id = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 4; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent channel for the resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. Please see - * {@see LivestreamServiceClient::channelName()} for help formatting this field. - * @param \Google\Cloud\Video\LiveStream\V1\Event $event Required. The event resource to be created. - * @param string $eventId Required. The ID of the event resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * @return \Google\Cloud\Video\LiveStream\V1\CreateEventRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\LiveStream\V1\Event $event, string $eventId): self - { - return (new self()) - ->setParent($parent) - ->setEvent($event) - ->setEventId($eventId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent channel for the resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * @type \Google\Cloud\Video\LiveStream\V1\Event $event - * Required. The event resource to be created. - * @type string $event_id - * Required. The ID of the event resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent channel for the resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent channel for the resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The event resource to be created. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\LiveStream\V1\Event|null - */ - public function getEvent() - { - return $this->event; - } - - public function hasEvent() - { - return isset($this->event); - } - - public function clearEvent() - { - unset($this->event); - } - - /** - * Required. The event resource to be created. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\LiveStream\V1\Event $var - * @return $this - */ - public function setEvent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event::class); - $this->event = $var; - - return $this; - } - - /** - * Required. The ID of the event resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * Generated from protobuf field string event_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEventId() - { - return $this->event_id; - } - - /** - * Required. The ID of the event resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * Generated from protobuf field string event_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEventId($var) - { - GPBUtil::checkString($var, True); - $this->event_id = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 4; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 4; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateInputRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateInputRequest.php deleted file mode 100644 index 839b2d4d046e..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateInputRequest.php +++ /dev/null @@ -1,252 +0,0 @@ -google.cloud.video.livestream.v1.CreateInputRequest - */ -class CreateInputRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The input resource to be created. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input = null; - /** - * Required. The ID of the input resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * Generated from protobuf field string input_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_id = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 4; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. Please see - * {@see LivestreamServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Video\LiveStream\V1\Input $input Required. The input resource to be created. - * @param string $inputId Required. The ID of the input resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * @return \Google\Cloud\Video\LiveStream\V1\CreateInputRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\LiveStream\V1\Input $input, string $inputId): self - { - return (new self()) - ->setParent($parent) - ->setInput($input) - ->setInputId($inputId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * @type \Google\Cloud\Video\LiveStream\V1\Input $input - * Required. The input resource to be created. - * @type string $input_id - * Required. The ID of the input resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The input resource to be created. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\LiveStream\V1\Input|null - */ - public function getInput() - { - return $this->input; - } - - public function hasInput() - { - return isset($this->input); - } - - public function clearInput() - { - unset($this->input); - } - - /** - * Required. The input resource to be created. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\LiveStream\V1\Input $var - * @return $this - */ - public function setInput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Input::class); - $this->input = $var; - - return $this; - } - - /** - * Required. The ID of the input resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * Generated from protobuf field string input_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInputId() - { - return $this->input_id; - } - - /** - * Required. The ID of the input resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * Generated from protobuf field string input_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInputId($var) - { - GPBUtil::checkString($var, True); - $this->input_id = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 4; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 4; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteChannelRequest.php deleted file mode 100644 index e5ad476fe21d..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteChannelRequest.php +++ /dev/null @@ -1,206 +0,0 @@ -google.cloud.video.livestream.v1.DeleteChannelRequest - */ -class DeleteChannelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 2; - */ - protected $request_id = ''; - /** - * If the `force` field is set to the default value of `false`, you must - * delete all of a channel's events before you can delete the channel itself. - * If the field is set to `true`, requests to delete a channel also delete - * associated channel events. - * - * Generated from protobuf field bool force = 3; - */ - protected $force = false; - - /** - * @param string $name Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. Please see - * {@see LivestreamServiceClient::channelName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\DeleteChannelRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * @type bool $force - * If the `force` field is set to the default value of `false`, you must - * delete all of a channel's events before you can delete the channel itself. - * If the field is set to `true`, requests to delete a channel also delete - * associated channel events. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 2; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 2; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * If the `force` field is set to the default value of `false`, you must - * delete all of a channel's events before you can delete the channel itself. - * If the field is set to `true`, requests to delete a channel also delete - * associated channel events. - * - * Generated from protobuf field bool force = 3; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * If the `force` field is set to the default value of `false`, you must - * delete all of a channel's events before you can delete the channel itself. - * If the field is set to `true`, requests to delete a channel also delete - * associated channel events. - * - * Generated from protobuf field bool force = 3; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteEventRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteEventRequest.php deleted file mode 100644 index 870470706fe4..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteEventRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.video.livestream.v1.DeleteEventRequest - */ -class DeleteEventRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the event resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 2; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the event resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. Please see - * {@see LivestreamServiceClient::eventName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\DeleteEventRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the event resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the event resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the event resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 2; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 2; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteInputRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteInputRequest.php deleted file mode 100644 index 457d3d144f65..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteInputRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.video.livestream.v1.DeleteInputRequest - */ -class DeleteInputRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the input resource, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 2; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the input resource, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. Please see - * {@see LivestreamServiceClient::inputName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\DeleteInputRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the input resource, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the input resource, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the input resource, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 2; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 2; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ElementaryStream.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ElementaryStream.php deleted file mode 100644 index 029528a39f4a..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ElementaryStream.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.video.livestream.v1.ElementaryStream - */ -class ElementaryStream extends \Google\Protobuf\Internal\Message -{ - /** - * A unique key for this elementary stream. - * - * Generated from protobuf field string key = 4; - */ - protected $key = ''; - protected $elementary_stream; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * A unique key for this elementary stream. - * @type \Google\Cloud\Video\LiveStream\V1\VideoStream $video_stream - * Encoding of a video stream. - * @type \Google\Cloud\Video\LiveStream\V1\AudioStream $audio_stream - * Encoding of an audio stream. - * @type \Google\Cloud\Video\LiveStream\V1\TextStream $text_stream - * Encoding of a text stream. For example, closed captions or subtitles. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * A unique key for this elementary stream. - * - * Generated from protobuf field string key = 4; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * A unique key for this elementary stream. - * - * Generated from protobuf field string key = 4; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * Encoding of a video stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.VideoStream video_stream = 1; - * @return \Google\Cloud\Video\LiveStream\V1\VideoStream|null - */ - public function getVideoStream() - { - return $this->readOneof(1); - } - - public function hasVideoStream() - { - return $this->hasOneof(1); - } - - /** - * Encoding of a video stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.VideoStream video_stream = 1; - * @param \Google\Cloud\Video\LiveStream\V1\VideoStream $var - * @return $this - */ - public function setVideoStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\VideoStream::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Encoding of an audio stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.AudioStream audio_stream = 2; - * @return \Google\Cloud\Video\LiveStream\V1\AudioStream|null - */ - public function getAudioStream() - { - return $this->readOneof(2); - } - - public function hasAudioStream() - { - return $this->hasOneof(2); - } - - /** - * Encoding of an audio stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.AudioStream audio_stream = 2; - * @param \Google\Cloud\Video\LiveStream\V1\AudioStream $var - * @return $this - */ - public function setAudioStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\AudioStream::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Encoding of a text stream. For example, closed captions or subtitles. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.TextStream text_stream = 3; - * @return \Google\Cloud\Video\LiveStream\V1\TextStream|null - */ - public function getTextStream() - { - return $this->readOneof(3); - } - - public function hasTextStream() - { - return $this->hasOneof(3); - } - - /** - * Encoding of a text stream. For example, closed captions or subtitles. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.TextStream text_stream = 3; - * @param \Google\Cloud\Video\LiveStream\V1\TextStream $var - * @return $this - */ - public function setTextStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\TextStream::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getElementaryStream() - { - return $this->whichOneof("elementary_stream"); - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption.php deleted file mode 100644 index a0e5fa6b0c1a..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption.php +++ /dev/null @@ -1,261 +0,0 @@ -google.cloud.video.livestream.v1.Encryption - */ -class Encryption extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Identifier for this set of encryption options. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $id = ''; - /** - * Required. Configuration for DRM systems. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.DrmSystems drm_systems = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $drm_systems = null; - protected $secret_source; - protected $encryption_mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Required. Identifier for this set of encryption options. - * @type \Google\Cloud\Video\LiveStream\V1\Encryption\SecretManagerSource $secret_manager_key_source - * For keys stored in Google Secret Manager. - * @type \Google\Cloud\Video\LiveStream\V1\Encryption\DrmSystems $drm_systems - * Required. Configuration for DRM systems. - * @type \Google\Cloud\Video\LiveStream\V1\Encryption\Aes128Encryption $aes128 - * Configuration for HLS AES-128 encryption. - * @type \Google\Cloud\Video\LiveStream\V1\Encryption\SampleAesEncryption $sample_aes - * Configuration for HLS SAMPLE-AES encryption. - * @type \Google\Cloud\Video\LiveStream\V1\Encryption\MpegCommonEncryption $mpeg_cenc - * Configuration for MPEG-Dash Common Encryption (MPEG-CENC). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Identifier for this set of encryption options. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Required. Identifier for this set of encryption options. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * For keys stored in Google Secret Manager. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.SecretManagerSource secret_manager_key_source = 7; - * @return \Google\Cloud\Video\LiveStream\V1\Encryption\SecretManagerSource|null - */ - public function getSecretManagerKeySource() - { - return $this->readOneof(7); - } - - public function hasSecretManagerKeySource() - { - return $this->hasOneof(7); - } - - /** - * For keys stored in Google Secret Manager. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.SecretManagerSource secret_manager_key_source = 7; - * @param \Google\Cloud\Video\LiveStream\V1\Encryption\SecretManagerSource $var - * @return $this - */ - public function setSecretManagerKeySource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\SecretManagerSource::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Required. Configuration for DRM systems. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.DrmSystems drm_systems = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\LiveStream\V1\Encryption\DrmSystems|null - */ - public function getDrmSystems() - { - return $this->drm_systems; - } - - public function hasDrmSystems() - { - return isset($this->drm_systems); - } - - public function clearDrmSystems() - { - unset($this->drm_systems); - } - - /** - * Required. Configuration for DRM systems. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.DrmSystems drm_systems = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\LiveStream\V1\Encryption\DrmSystems $var - * @return $this - */ - public function setDrmSystems($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\DrmSystems::class); - $this->drm_systems = $var; - - return $this; - } - - /** - * Configuration for HLS AES-128 encryption. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Aes128Encryption aes128 = 4; - * @return \Google\Cloud\Video\LiveStream\V1\Encryption\Aes128Encryption|null - */ - public function getAes128() - { - return $this->readOneof(4); - } - - public function hasAes128() - { - return $this->hasOneof(4); - } - - /** - * Configuration for HLS AES-128 encryption. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Aes128Encryption aes128 = 4; - * @param \Google\Cloud\Video\LiveStream\V1\Encryption\Aes128Encryption $var - * @return $this - */ - public function setAes128($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\Aes128Encryption::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Configuration for HLS SAMPLE-AES encryption. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.SampleAesEncryption sample_aes = 5; - * @return \Google\Cloud\Video\LiveStream\V1\Encryption\SampleAesEncryption|null - */ - public function getSampleAes() - { - return $this->readOneof(5); - } - - public function hasSampleAes() - { - return $this->hasOneof(5); - } - - /** - * Configuration for HLS SAMPLE-AES encryption. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.SampleAesEncryption sample_aes = 5; - * @param \Google\Cloud\Video\LiveStream\V1\Encryption\SampleAesEncryption $var - * @return $this - */ - public function setSampleAes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\SampleAesEncryption::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Configuration for MPEG-Dash Common Encryption (MPEG-CENC). - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption mpeg_cenc = 6; - * @return \Google\Cloud\Video\LiveStream\V1\Encryption\MpegCommonEncryption|null - */ - public function getMpegCenc() - { - return $this->readOneof(6); - } - - public function hasMpegCenc() - { - return $this->hasOneof(6); - } - - /** - * Configuration for MPEG-Dash Common Encryption (MPEG-CENC). - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption mpeg_cenc = 6; - * @param \Google\Cloud\Video\LiveStream\V1\Encryption\MpegCommonEncryption $var - * @return $this - */ - public function setMpegCenc($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\MpegCommonEncryption::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getSecretSource() - { - return $this->whichOneof("secret_source"); - } - - /** - * @return string - */ - public function getEncryptionMode() - { - return $this->whichOneof("encryption_mode"); - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Aes128Encryption.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Aes128Encryption.php deleted file mode 100644 index 1903c805f7fb..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Aes128Encryption.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.video.livestream.v1.Encryption.Aes128Encryption - */ -class Aes128Encryption extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Aes128Encryption::class, \Google\Cloud\Video\LiveStream\V1\Encryption_Aes128Encryption::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Clearkey.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Clearkey.php deleted file mode 100644 index cf2a3c4ff2de..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Clearkey.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.video.livestream.v1.Encryption.Clearkey - */ -class Clearkey extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Clearkey::class, \Google\Cloud\Video\LiveStream\V1\Encryption_Clearkey::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/DrmSystems.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/DrmSystems.php deleted file mode 100644 index c0123be1577a..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/DrmSystems.php +++ /dev/null @@ -1,213 +0,0 @@ -google.cloud.video.livestream.v1.Encryption.DrmSystems - */ -class DrmSystems extends \Google\Protobuf\Internal\Message -{ - /** - * Widevine configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Widevine widevine = 1; - */ - protected $widevine = null; - /** - * Fairplay configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Fairplay fairplay = 2; - */ - protected $fairplay = null; - /** - * Playready configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Playready playready = 3; - */ - protected $playready = null; - /** - * Clearkey configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Clearkey clearkey = 4; - */ - protected $clearkey = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\LiveStream\V1\Encryption\Widevine $widevine - * Widevine configuration. - * @type \Google\Cloud\Video\LiveStream\V1\Encryption\Fairplay $fairplay - * Fairplay configuration. - * @type \Google\Cloud\Video\LiveStream\V1\Encryption\Playready $playready - * Playready configuration. - * @type \Google\Cloud\Video\LiveStream\V1\Encryption\Clearkey $clearkey - * Clearkey configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Widevine configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Widevine widevine = 1; - * @return \Google\Cloud\Video\LiveStream\V1\Encryption\Widevine|null - */ - public function getWidevine() - { - return $this->widevine; - } - - public function hasWidevine() - { - return isset($this->widevine); - } - - public function clearWidevine() - { - unset($this->widevine); - } - - /** - * Widevine configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Widevine widevine = 1; - * @param \Google\Cloud\Video\LiveStream\V1\Encryption\Widevine $var - * @return $this - */ - public function setWidevine($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\Widevine::class); - $this->widevine = $var; - - return $this; - } - - /** - * Fairplay configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Fairplay fairplay = 2; - * @return \Google\Cloud\Video\LiveStream\V1\Encryption\Fairplay|null - */ - public function getFairplay() - { - return $this->fairplay; - } - - public function hasFairplay() - { - return isset($this->fairplay); - } - - public function clearFairplay() - { - unset($this->fairplay); - } - - /** - * Fairplay configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Fairplay fairplay = 2; - * @param \Google\Cloud\Video\LiveStream\V1\Encryption\Fairplay $var - * @return $this - */ - public function setFairplay($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\Fairplay::class); - $this->fairplay = $var; - - return $this; - } - - /** - * Playready configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Playready playready = 3; - * @return \Google\Cloud\Video\LiveStream\V1\Encryption\Playready|null - */ - public function getPlayready() - { - return $this->playready; - } - - public function hasPlayready() - { - return isset($this->playready); - } - - public function clearPlayready() - { - unset($this->playready); - } - - /** - * Playready configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Playready playready = 3; - * @param \Google\Cloud\Video\LiveStream\V1\Encryption\Playready $var - * @return $this - */ - public function setPlayready($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\Playready::class); - $this->playready = $var; - - return $this; - } - - /** - * Clearkey configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Clearkey clearkey = 4; - * @return \Google\Cloud\Video\LiveStream\V1\Encryption\Clearkey|null - */ - public function getClearkey() - { - return $this->clearkey; - } - - public function hasClearkey() - { - return isset($this->clearkey); - } - - public function clearClearkey() - { - unset($this->clearkey); - } - - /** - * Clearkey configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Clearkey clearkey = 4; - * @param \Google\Cloud\Video\LiveStream\V1\Encryption\Clearkey $var - * @return $this - */ - public function setClearkey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\Clearkey::class); - $this->clearkey = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DrmSystems::class, \Google\Cloud\Video\LiveStream\V1\Encryption_DrmSystems::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Fairplay.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Fairplay.php deleted file mode 100644 index dc53b5d3a7d9..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Fairplay.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.video.livestream.v1.Encryption.Fairplay - */ -class Fairplay extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Fairplay::class, \Google\Cloud\Video\LiveStream\V1\Encryption_Fairplay::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/MpegCommonEncryption.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/MpegCommonEncryption.php deleted file mode 100644 index 828acd25e267..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/MpegCommonEncryption.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption - */ -class MpegCommonEncryption extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Specify the encryption scheme, supported schemes: - * - `cenc` - AES-CTR subsample - * - `cbcs`- AES-CBC subsample pattern - * - * Generated from protobuf field string scheme = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scheme = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $scheme - * Required. Specify the encryption scheme, supported schemes: - * - `cenc` - AES-CTR subsample - * - `cbcs`- AES-CBC subsample pattern - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Specify the encryption scheme, supported schemes: - * - `cenc` - AES-CTR subsample - * - `cbcs`- AES-CBC subsample pattern - * - * Generated from protobuf field string scheme = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getScheme() - { - return $this->scheme; - } - - /** - * Required. Specify the encryption scheme, supported schemes: - * - `cenc` - AES-CTR subsample - * - `cbcs`- AES-CBC subsample pattern - * - * Generated from protobuf field string scheme = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setScheme($var) - { - GPBUtil::checkString($var, True); - $this->scheme = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MpegCommonEncryption::class, \Google\Cloud\Video\LiveStream\V1\Encryption_MpegCommonEncryption::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Playready.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Playready.php deleted file mode 100644 index a1296c0e2581..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Playready.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.video.livestream.v1.Encryption.Playready - */ -class Playready extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Playready::class, \Google\Cloud\Video\LiveStream\V1\Encryption_Playready::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SampleAesEncryption.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SampleAesEncryption.php deleted file mode 100644 index 566b81c20da9..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SampleAesEncryption.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.video.livestream.v1.Encryption.SampleAesEncryption - */ -class SampleAesEncryption extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SampleAesEncryption::class, \Google\Cloud\Video\LiveStream\V1\Encryption_SampleAesEncryption::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SecretManagerSource.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SecretManagerSource.php deleted file mode 100644 index 0cd575268442..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SecretManagerSource.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.video.livestream.v1.Encryption.SecretManagerSource - */ -class SecretManagerSource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Secret Version containing the encryption key. - * `projects/{project}/secrets/{secret_id}/versions/{version_number}` - * - * Generated from protobuf field string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $secret_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $secret_version - * Required. The name of the Secret Version containing the encryption key. - * `projects/{project}/secrets/{secret_id}/versions/{version_number}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Secret Version containing the encryption key. - * `projects/{project}/secrets/{secret_id}/versions/{version_number}` - * - * Generated from protobuf field string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSecretVersion() - { - return $this->secret_version; - } - - /** - * Required. The name of the Secret Version containing the encryption key. - * `projects/{project}/secrets/{secret_id}/versions/{version_number}` - * - * Generated from protobuf field string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSecretVersion($var) - { - GPBUtil::checkString($var, True); - $this->secret_version = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SecretManagerSource::class, \Google\Cloud\Video\LiveStream\V1\Encryption_SecretManagerSource::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Widevine.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Widevine.php deleted file mode 100644 index a14e8b2be44b..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Widevine.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.video.livestream.v1.Encryption.Widevine - */ -class Widevine extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Widevine::class, \Google\Cloud\Video\LiveStream\V1\Encryption_Widevine::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event.php deleted file mode 100644 index 3bf6c5f47fe2..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event.php +++ /dev/null @@ -1,568 +0,0 @@ -google.cloud.video.livestream.v1.Event - */ -class Event extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the event, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User-defined key/value metadata. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * When this field is set to true, the event will be executed at the earliest - * time that the server can schedule the event and - * [execution_time][google.cloud.video.livestream.v1.Event.execution_time] - * will be populated with the time that the server actually schedules the - * event. - * - * Generated from protobuf field bool execute_now = 9; - */ - protected $execute_now = false; - /** - * The time to execute the event. If you set - * [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to - * `true`, then do not set this field in the `CreateEvent` request. In - * this case, the server schedules the event and populates this field. If you - * set [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to - * `false`, then you must set this field to at least 10 seconds in the future - * or else the event can't be created. - * - * Generated from protobuf field .google.protobuf.Timestamp execution_time = 10; - */ - protected $execution_time = null; - /** - * Output only. The state of the event. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. An error object that describes the reason for the failure. - * This property is always present when `state` is `FAILED`. - * - * Generated from protobuf field .google.rpc.Status error = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - protected $task; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the event, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update time. - * @type array|\Google\Protobuf\Internal\MapField $labels - * User-defined key/value metadata. - * @type \Google\Cloud\Video\LiveStream\V1\Event\InputSwitchTask $input_switch - * Required. Switches to another input stream. - * @type \Google\Cloud\Video\LiveStream\V1\Event\AdBreakTask $ad_break - * Required. Inserts a new ad opportunity. - * @type \Google\Cloud\Video\LiveStream\V1\Event\ReturnToProgramTask $return_to_program - * Required. Stops any running ad break. - * @type \Google\Cloud\Video\LiveStream\V1\Event\MuteTask $mute - * Required. Mutes the stream. - * @type \Google\Cloud\Video\LiveStream\V1\Event\UnmuteTask $unmute - * Required. Unmutes the stream. - * @type bool $execute_now - * When this field is set to true, the event will be executed at the earliest - * time that the server can schedule the event and - * [execution_time][google.cloud.video.livestream.v1.Event.execution_time] - * will be populated with the time that the server actually schedules the - * event. - * @type \Google\Protobuf\Timestamp $execution_time - * The time to execute the event. If you set - * [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to - * `true`, then do not set this field in the `CreateEvent` request. In - * this case, the server schedules the event and populates this field. If you - * set [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to - * `false`, then you must set this field to at least 10 seconds in the future - * or else the event can't be created. - * @type int $state - * Output only. The state of the event. - * @type \Google\Rpc\Status $error - * Output only. An error object that describes the reason for the failure. - * This property is always present when `state` is `FAILED`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the event, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the event, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * User-defined key/value metadata. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * User-defined key/value metadata. - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. Switches to another input stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.InputSwitchTask input_switch = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\LiveStream\V1\Event\InputSwitchTask|null - */ - public function getInputSwitch() - { - return $this->readOneof(5); - } - - public function hasInputSwitch() - { - return $this->hasOneof(5); - } - - /** - * Required. Switches to another input stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.InputSwitchTask input_switch = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\LiveStream\V1\Event\InputSwitchTask $var - * @return $this - */ - public function setInputSwitch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event\InputSwitchTask::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Required. Inserts a new ad opportunity. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.AdBreakTask ad_break = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\LiveStream\V1\Event\AdBreakTask|null - */ - public function getAdBreak() - { - return $this->readOneof(6); - } - - public function hasAdBreak() - { - return $this->hasOneof(6); - } - - /** - * Required. Inserts a new ad opportunity. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.AdBreakTask ad_break = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\LiveStream\V1\Event\AdBreakTask $var - * @return $this - */ - public function setAdBreak($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event\AdBreakTask::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Required. Stops any running ad break. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.ReturnToProgramTask return_to_program = 13 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\LiveStream\V1\Event\ReturnToProgramTask|null - */ - public function getReturnToProgram() - { - return $this->readOneof(13); - } - - public function hasReturnToProgram() - { - return $this->hasOneof(13); - } - - /** - * Required. Stops any running ad break. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.ReturnToProgramTask return_to_program = 13 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\LiveStream\V1\Event\ReturnToProgramTask $var - * @return $this - */ - public function setReturnToProgram($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event\ReturnToProgramTask::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * Required. Mutes the stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.MuteTask mute = 15 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\LiveStream\V1\Event\MuteTask|null - */ - public function getMute() - { - return $this->readOneof(15); - } - - public function hasMute() - { - return $this->hasOneof(15); - } - - /** - * Required. Mutes the stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.MuteTask mute = 15 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\LiveStream\V1\Event\MuteTask $var - * @return $this - */ - public function setMute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event\MuteTask::class); - $this->writeOneof(15, $var); - - return $this; - } - - /** - * Required. Unmutes the stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.UnmuteTask unmute = 16 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\LiveStream\V1\Event\UnmuteTask|null - */ - public function getUnmute() - { - return $this->readOneof(16); - } - - public function hasUnmute() - { - return $this->hasOneof(16); - } - - /** - * Required. Unmutes the stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.UnmuteTask unmute = 16 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\LiveStream\V1\Event\UnmuteTask $var - * @return $this - */ - public function setUnmute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event\UnmuteTask::class); - $this->writeOneof(16, $var); - - return $this; - } - - /** - * When this field is set to true, the event will be executed at the earliest - * time that the server can schedule the event and - * [execution_time][google.cloud.video.livestream.v1.Event.execution_time] - * will be populated with the time that the server actually schedules the - * event. - * - * Generated from protobuf field bool execute_now = 9; - * @return bool - */ - public function getExecuteNow() - { - return $this->execute_now; - } - - /** - * When this field is set to true, the event will be executed at the earliest - * time that the server can schedule the event and - * [execution_time][google.cloud.video.livestream.v1.Event.execution_time] - * will be populated with the time that the server actually schedules the - * event. - * - * Generated from protobuf field bool execute_now = 9; - * @param bool $var - * @return $this - */ - public function setExecuteNow($var) - { - GPBUtil::checkBool($var); - $this->execute_now = $var; - - return $this; - } - - /** - * The time to execute the event. If you set - * [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to - * `true`, then do not set this field in the `CreateEvent` request. In - * this case, the server schedules the event and populates this field. If you - * set [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to - * `false`, then you must set this field to at least 10 seconds in the future - * or else the event can't be created. - * - * Generated from protobuf field .google.protobuf.Timestamp execution_time = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExecutionTime() - { - return $this->execution_time; - } - - public function hasExecutionTime() - { - return isset($this->execution_time); - } - - public function clearExecutionTime() - { - unset($this->execution_time); - } - - /** - * The time to execute the event. If you set - * [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to - * `true`, then do not set this field in the `CreateEvent` request. In - * this case, the server schedules the event and populates this field. If you - * set [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to - * `false`, then you must set this field to at least 10 seconds in the future - * or else the event can't be created. - * - * Generated from protobuf field .google.protobuf.Timestamp execution_time = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExecutionTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->execution_time = $var; - - return $this; - } - - /** - * Output only. The state of the event. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the event. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Event\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. An error object that describes the reason for the failure. - * This property is always present when `state` is `FAILED`. - * - * Generated from protobuf field .google.rpc.Status error = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. An error object that describes the reason for the failure. - * This property is always present when `state` is `FAILED`. - * - * Generated from protobuf field .google.rpc.Status error = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * @return string - */ - public function getTask() - { - return $this->whichOneof("task"); - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/AdBreakTask.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/AdBreakTask.php deleted file mode 100644 index 31d381b2eedf..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/AdBreakTask.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.video.livestream.v1.Event.AdBreakTask - */ -class AdBreakTask extends \Google\Protobuf\Internal\Message -{ - /** - * Duration of an ad opportunity. Must be greater than 0. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - */ - protected $duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $duration - * Duration of an ad opportunity. Must be greater than 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Duration of an ad opportunity. Must be greater than 0. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Duration of an ad opportunity. Must be greater than 0. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AdBreakTask::class, \Google\Cloud\Video\LiveStream\V1\Event_AdBreakTask::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/InputSwitchTask.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/InputSwitchTask.php deleted file mode 100644 index bae050a14d8b..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/InputSwitchTask.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.video.livestream.v1.Event.InputSwitchTask - */ -class InputSwitchTask extends \Google\Protobuf\Internal\Message -{ - /** - * The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * of the input to switch to. - * - * Generated from protobuf field string input_key = 1; - */ - protected $input_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $input_key - * The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * of the input to switch to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * of the input to switch to. - * - * Generated from protobuf field string input_key = 1; - * @return string - */ - public function getInputKey() - { - return $this->input_key; - } - - /** - * The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * of the input to switch to. - * - * Generated from protobuf field string input_key = 1; - * @param string $var - * @return $this - */ - public function setInputKey($var) - { - GPBUtil::checkString($var, True); - $this->input_key = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InputSwitchTask::class, \Google\Cloud\Video\LiveStream\V1\Event_InputSwitchTask::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/MuteTask.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/MuteTask.php deleted file mode 100644 index f080a8603fb6..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/MuteTask.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.video.livestream.v1.Event.MuteTask - */ -class MuteTask extends \Google\Protobuf\Internal\Message -{ - /** - * Duration for which the stream should be muted. If omitted, the stream - * will be muted until an UnmuteTask event is sent. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - */ - protected $duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $duration - * Duration for which the stream should be muted. If omitted, the stream - * will be muted until an UnmuteTask event is sent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Duration for which the stream should be muted. If omitted, the stream - * will be muted until an UnmuteTask event is sent. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Duration for which the stream should be muted. If omitted, the stream - * will be muted until an UnmuteTask event is sent. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MuteTask::class, \Google\Cloud\Video\LiveStream\V1\Event_MuteTask::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/ReturnToProgramTask.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/ReturnToProgramTask.php deleted file mode 100644 index f544f6fa571e..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/ReturnToProgramTask.php +++ /dev/null @@ -1,37 +0,0 @@ -google.cloud.video.livestream.v1.Event.ReturnToProgramTask - */ -class ReturnToProgramTask extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ReturnToProgramTask::class, \Google\Cloud\Video\LiveStream\V1\Event_ReturnToProgramTask::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/State.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/State.php deleted file mode 100644 index fd2043aa0168..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/State.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.video.livestream.v1.Event.State - */ -class State -{ - /** - * Event state is not specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Event is scheduled but not executed yet. - * - * Generated from protobuf enum SCHEDULED = 1; - */ - const SCHEDULED = 1; - /** - * Event is being executed. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * Event has been successfully executed. - * - * Generated from protobuf enum SUCCEEDED = 3; - */ - const SUCCEEDED = 3; - /** - * Event fails to be executed. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - /** - * Event has been created but not scheduled yet. - * - * Generated from protobuf enum PENDING = 5; - */ - const PENDING = 5; - /** - * Event was stopped before running for its full duration. - * - * Generated from protobuf enum STOPPED = 6; - */ - const STOPPED = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::SCHEDULED => 'SCHEDULED', - self::RUNNING => 'RUNNING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::PENDING => 'PENDING', - self::STOPPED => 'STOPPED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Video\LiveStream\V1\Event_State::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/UnmuteTask.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/UnmuteTask.php deleted file mode 100644 index 9ab47234d353..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/UnmuteTask.php +++ /dev/null @@ -1,37 +0,0 @@ -google.cloud.video.livestream.v1.Event.UnmuteTask - */ -class UnmuteTask extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(UnmuteTask::class, \Google\Cloud\Video\LiveStream\V1\Event_UnmuteTask::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetChannelRequest.php deleted file mode 100644 index 2050793dd1f3..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetChannelRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.livestream.v1.GetChannelRequest - */ -class GetChannelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. Please see - * {@see LivestreamServiceClient::channelName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\GetChannelRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetEventRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetEventRequest.php deleted file mode 100644 index cc2a65775439..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetEventRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.livestream.v1.GetEventRequest - */ -class GetEventRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the event resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the event resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. Please see - * {@see LivestreamServiceClient::eventName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\GetEventRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the event resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the event resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the event resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetInputRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetInputRequest.php deleted file mode 100644 index da3712d40ecf..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetInputRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.livestream.v1.GetInputRequest - */ -class GetInputRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the input resource, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the input resource, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. Please see - * {@see LivestreamServiceClient::inputName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\GetInputRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the input resource, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the input resource, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the input resource, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input.php deleted file mode 100644 index 804f7b0d808c..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input.php +++ /dev/null @@ -1,460 +0,0 @@ -google.cloud.video.livestream.v1.Input - */ -class Input extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the input, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User-defined key/value metadata. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Source type. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Type type = 5; - */ - protected $type = 0; - /** - * Tier defines the maximum input specification that is accepted by the - * video pipeline. The billing is charged based on the tier specified here. - * See [Pricing](https://cloud.google.com/livestream/pricing) for more detail. - * The default is `HD`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Tier tier = 14; - */ - protected $tier = 0; - /** - * Output only. URI to push the input stream to. - * Its format depends on the input - * [type][google.cloud.video.livestream.v1.Input.type], for example: - * * `RTMP_PUSH`: `rtmp://1.2.3.4/live/{STREAM-ID}` - * * `SRT_PUSH`: `srt://1.2.3.4:4201?streamid={STREAM-ID}` - * - * Generated from protobuf field string uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uri = ''; - /** - * Preprocessing configurations. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig preprocessing_config = 9; - */ - protected $preprocessing_config = null; - /** - * Security rule for access control. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input.SecurityRule security_rules = 12; - */ - protected $security_rules = null; - /** - * Output only. The information for the input stream. This field will be - * present only when this input receives the input stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputStreamProperty input_stream_property = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $input_stream_property = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the input, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update time. - * @type array|\Google\Protobuf\Internal\MapField $labels - * User-defined key/value metadata. - * @type int $type - * Source type. - * @type int $tier - * Tier defines the maximum input specification that is accepted by the - * video pipeline. The billing is charged based on the tier specified here. - * See [Pricing](https://cloud.google.com/livestream/pricing) for more detail. - * The default is `HD`. - * @type string $uri - * Output only. URI to push the input stream to. - * Its format depends on the input - * [type][google.cloud.video.livestream.v1.Input.type], for example: - * * `RTMP_PUSH`: `rtmp://1.2.3.4/live/{STREAM-ID}` - * * `SRT_PUSH`: `srt://1.2.3.4:4201?streamid={STREAM-ID}` - * @type \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig $preprocessing_config - * Preprocessing configurations. - * @type \Google\Cloud\Video\LiveStream\V1\Input\SecurityRule $security_rules - * Security rule for access control. - * @type \Google\Cloud\Video\LiveStream\V1\InputStreamProperty $input_stream_property - * Output only. The information for the input stream. This field will be - * present only when this input receives the input stream. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the input, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the input, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * User-defined key/value metadata. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * User-defined key/value metadata. - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Source type. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Type type = 5; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Source type. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Type type = 5; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Input\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Tier defines the maximum input specification that is accepted by the - * video pipeline. The billing is charged based on the tier specified here. - * See [Pricing](https://cloud.google.com/livestream/pricing) for more detail. - * The default is `HD`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Tier tier = 14; - * @return int - */ - public function getTier() - { - return $this->tier; - } - - /** - * Tier defines the maximum input specification that is accepted by the - * video pipeline. The billing is charged based on the tier specified here. - * See [Pricing](https://cloud.google.com/livestream/pricing) for more detail. - * The default is `HD`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Tier tier = 14; - * @param int $var - * @return $this - */ - public function setTier($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Input\Tier::class); - $this->tier = $var; - - return $this; - } - - /** - * Output only. URI to push the input stream to. - * Its format depends on the input - * [type][google.cloud.video.livestream.v1.Input.type], for example: - * * `RTMP_PUSH`: `rtmp://1.2.3.4/live/{STREAM-ID}` - * * `SRT_PUSH`: `srt://1.2.3.4:4201?streamid={STREAM-ID}` - * - * Generated from protobuf field string uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Output only. URI to push the input stream to. - * Its format depends on the input - * [type][google.cloud.video.livestream.v1.Input.type], for example: - * * `RTMP_PUSH`: `rtmp://1.2.3.4/live/{STREAM-ID}` - * * `SRT_PUSH`: `srt://1.2.3.4:4201?streamid={STREAM-ID}` - * - * Generated from protobuf field string uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Preprocessing configurations. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig preprocessing_config = 9; - * @return \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig|null - */ - public function getPreprocessingConfig() - { - return $this->preprocessing_config; - } - - public function hasPreprocessingConfig() - { - return isset($this->preprocessing_config); - } - - public function clearPreprocessingConfig() - { - unset($this->preprocessing_config); - } - - /** - * Preprocessing configurations. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig preprocessing_config = 9; - * @param \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig $var - * @return $this - */ - public function setPreprocessingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig::class); - $this->preprocessing_config = $var; - - return $this; - } - - /** - * Security rule for access control. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input.SecurityRule security_rules = 12; - * @return \Google\Cloud\Video\LiveStream\V1\Input\SecurityRule|null - */ - public function getSecurityRules() - { - return $this->security_rules; - } - - public function hasSecurityRules() - { - return isset($this->security_rules); - } - - public function clearSecurityRules() - { - unset($this->security_rules); - } - - /** - * Security rule for access control. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input.SecurityRule security_rules = 12; - * @param \Google\Cloud\Video\LiveStream\V1\Input\SecurityRule $var - * @return $this - */ - public function setSecurityRules($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Input\SecurityRule::class); - $this->security_rules = $var; - - return $this; - } - - /** - * Output only. The information for the input stream. This field will be - * present only when this input receives the input stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputStreamProperty input_stream_property = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Video\LiveStream\V1\InputStreamProperty|null - */ - public function getInputStreamProperty() - { - return $this->input_stream_property; - } - - public function hasInputStreamProperty() - { - return isset($this->input_stream_property); - } - - public function clearInputStreamProperty() - { - unset($this->input_stream_property); - } - - /** - * Output only. The information for the input stream. This field will be - * present only when this input receives the input stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputStreamProperty input_stream_property = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Video\LiveStream\V1\InputStreamProperty $var - * @return $this - */ - public function setInputStreamProperty($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\InputStreamProperty::class); - $this->input_stream_property = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/SecurityRule.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/SecurityRule.php deleted file mode 100644 index c5c7244181e5..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/SecurityRule.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.video.livestream.v1.Input.SecurityRule - */ -class SecurityRule extends \Google\Protobuf\Internal\Message -{ - /** - * At least one ip range must match unless none specified. The IP range is - * defined by CIDR block: for example, `192.0.1.0/24` for a range and - * `192.0.1.0/32` for a single IP address. - * - * Generated from protobuf field repeated string ip_ranges = 1; - */ - private $ip_ranges; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $ip_ranges - * At least one ip range must match unless none specified. The IP range is - * defined by CIDR block: for example, `192.0.1.0/24` for a range and - * `192.0.1.0/32` for a single IP address. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * At least one ip range must match unless none specified. The IP range is - * defined by CIDR block: for example, `192.0.1.0/24` for a range and - * `192.0.1.0/32` for a single IP address. - * - * Generated from protobuf field repeated string ip_ranges = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIpRanges() - { - return $this->ip_ranges; - } - - /** - * At least one ip range must match unless none specified. The IP range is - * defined by CIDR block: for example, `192.0.1.0/24` for a range and - * `192.0.1.0/32` for a single IP address. - * - * Generated from protobuf field repeated string ip_ranges = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIpRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->ip_ranges = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SecurityRule::class, \Google\Cloud\Video\LiveStream\V1\Input_SecurityRule::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Tier.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Tier.php deleted file mode 100644 index e1cc73c68de0..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Tier.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.video.livestream.v1.Input.Tier - */ -class Tier -{ - /** - * Tier is not specified. - * - * Generated from protobuf enum TIER_UNSPECIFIED = 0; - */ - const TIER_UNSPECIFIED = 0; - /** - * Resolution < 1280x720. Bitrate <= 6 Mbps. FPS <= 60. - * - * Generated from protobuf enum SD = 1; - */ - const SD = 1; - /** - * Resolution <= 1920x1080. Bitrate <= 25 Mbps. FPS <= 60. - * - * Generated from protobuf enum HD = 2; - */ - const HD = 2; - /** - * Resolution <= 4096x2160. Not supported yet. - * - * Generated from protobuf enum UHD = 3; - */ - const UHD = 3; - - private static $valueToName = [ - self::TIER_UNSPECIFIED => 'TIER_UNSPECIFIED', - self::SD => 'SD', - self::HD => 'HD', - self::UHD => 'UHD', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Tier::class, \Google\Cloud\Video\LiveStream\V1\Input_Tier::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Type.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Type.php deleted file mode 100644 index 2008bef32975..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.video.livestream.v1.Input.Type - */ -class Type -{ - /** - * Input type is not specified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Input will take an rtmp input stream. - * - * Generated from protobuf enum RTMP_PUSH = 1; - */ - const RTMP_PUSH = 1; - /** - * Input will take an srt (Secure Reliable Transport) input stream. - * - * Generated from protobuf enum SRT_PUSH = 2; - */ - const SRT_PUSH = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::RTMP_PUSH => 'RTMP_PUSH', - self::SRT_PUSH => 'SRT_PUSH', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Video\LiveStream\V1\Input_Type::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment.php deleted file mode 100644 index 86ffab06266a..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.video.livestream.v1.InputAttachment - */ -class InputAttachment extends \Google\Protobuf\Internal\Message -{ - /** - * A unique key for this input attachment. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * The resource name of an existing input, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * Generated from protobuf field string input = 2 [(.google.api.resource_reference) = { - */ - protected $input = ''; - /** - * Automatic failover configurations. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover automatic_failover = 3; - */ - protected $automatic_failover = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * A unique key for this input attachment. - * @type string $input - * The resource name of an existing input, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * @type \Google\Cloud\Video\LiveStream\V1\InputAttachment\AutomaticFailover $automatic_failover - * Automatic failover configurations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * A unique key for this input attachment. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * A unique key for this input attachment. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * The resource name of an existing input, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * Generated from protobuf field string input = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getInput() - { - return $this->input; - } - - /** - * The resource name of an existing input, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * Generated from protobuf field string input = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setInput($var) - { - GPBUtil::checkString($var, True); - $this->input = $var; - - return $this; - } - - /** - * Automatic failover configurations. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover automatic_failover = 3; - * @return \Google\Cloud\Video\LiveStream\V1\InputAttachment\AutomaticFailover|null - */ - public function getAutomaticFailover() - { - return $this->automatic_failover; - } - - public function hasAutomaticFailover() - { - return isset($this->automatic_failover); - } - - public function clearAutomaticFailover() - { - unset($this->automatic_failover); - } - - /** - * Automatic failover configurations. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover automatic_failover = 3; - * @param \Google\Cloud\Video\LiveStream\V1\InputAttachment\AutomaticFailover $var - * @return $this - */ - public function setAutomaticFailover($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\InputAttachment\AutomaticFailover::class); - $this->automatic_failover = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment/AutomaticFailover.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment/AutomaticFailover.php deleted file mode 100644 index d9ae8181935d..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment/AutomaticFailover.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover - */ -class AutomaticFailover extends \Google\Protobuf\Internal\Message -{ - /** - * The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key]s - * of inputs to failover to when this input is disconnected. Currently, only - * up to one backup input is supported. - * - * Generated from protobuf field repeated string input_keys = 1; - */ - private $input_keys; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $input_keys - * The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key]s - * of inputs to failover to when this input is disconnected. Currently, only - * up to one backup input is supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key]s - * of inputs to failover to when this input is disconnected. Currently, only - * up to one backup input is supported. - * - * Generated from protobuf field repeated string input_keys = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInputKeys() - { - return $this->input_keys; - } - - /** - * The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key]s - * of inputs to failover to when this input is disconnected. Currently, only - * up to one backup input is supported. - * - * Generated from protobuf field repeated string input_keys = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInputKeys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->input_keys = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AutomaticFailover::class, \Google\Cloud\Video\LiveStream\V1\InputAttachment_AutomaticFailover::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig.php deleted file mode 100644 index fc6b529049d0..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.video.livestream.v1.InputConfig - */ -class InputConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Input switch mode. Default mode is `FAILOVER_PREFER_PRIMARY`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig.InputSwitchMode input_switch_mode = 1; - */ - protected $input_switch_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $input_switch_mode - * Input switch mode. Default mode is `FAILOVER_PREFER_PRIMARY`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Input switch mode. Default mode is `FAILOVER_PREFER_PRIMARY`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig.InputSwitchMode input_switch_mode = 1; - * @return int - */ - public function getInputSwitchMode() - { - return $this->input_switch_mode; - } - - /** - * Input switch mode. Default mode is `FAILOVER_PREFER_PRIMARY`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig.InputSwitchMode input_switch_mode = 1; - * @param int $var - * @return $this - */ - public function setInputSwitchMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\InputConfig\InputSwitchMode::class); - $this->input_switch_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig/InputSwitchMode.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig/InputSwitchMode.php deleted file mode 100644 index 0a991af82491..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig/InputSwitchMode.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.video.livestream.v1.InputConfig.InputSwitchMode - */ -class InputSwitchMode -{ - /** - * The input switch mode is not specified. - * - * Generated from protobuf enum INPUT_SWITCH_MODE_UNSPECIFIED = 0; - */ - const INPUT_SWITCH_MODE_UNSPECIFIED = 0; - /** - * Automatic failover is enabled. The primary input stream is always - * preferred over its backup input streams configured using the - * [AutomaticFailover][google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover] - * field. - * - * Generated from protobuf enum FAILOVER_PREFER_PRIMARY = 1; - */ - const FAILOVER_PREFER_PRIMARY = 1; - /** - * Automatic failover is disabled. You must use the - * [inputSwitch][google.cloud.video.livestream.v1.Event.input_switch] event - * to switch the active input source for the channel to stream from. When - * this mode is chosen, the - * [AutomaticFailover][google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover] - * field is ignored. - * - * Generated from protobuf enum MANUAL = 3; - */ - const MANUAL = 3; - - private static $valueToName = [ - self::INPUT_SWITCH_MODE_UNSPECIFIED => 'INPUT_SWITCH_MODE_UNSPECIFIED', - self::FAILOVER_PREFER_PRIMARY => 'FAILOVER_PREFER_PRIMARY', - self::MANUAL => 'MANUAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InputSwitchMode::class, \Google\Cloud\Video\LiveStream\V1\InputConfig_InputSwitchMode::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputStreamProperty.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputStreamProperty.php deleted file mode 100644 index 42b27a630665..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputStreamProperty.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.video.livestream.v1.InputStreamProperty - */ -class InputStreamProperty extends \Google\Protobuf\Internal\Message -{ - /** - * The time that the current input stream is accepted and the connection is - * established. - * - * Generated from protobuf field .google.protobuf.Timestamp last_establish_time = 1; - */ - protected $last_establish_time = null; - /** - * Properties of the video streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2; - */ - private $video_streams; - /** - * Properties of the audio streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3; - */ - private $audio_streams; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $last_establish_time - * The time that the current input stream is accepted and the connection is - * established. - * @type array<\Google\Cloud\Video\LiveStream\V1\VideoStreamProperty>|\Google\Protobuf\Internal\RepeatedField $video_streams - * Properties of the video streams. - * @type array<\Google\Cloud\Video\LiveStream\V1\AudioStreamProperty>|\Google\Protobuf\Internal\RepeatedField $audio_streams - * Properties of the audio streams. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The time that the current input stream is accepted and the connection is - * established. - * - * Generated from protobuf field .google.protobuf.Timestamp last_establish_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastEstablishTime() - { - return $this->last_establish_time; - } - - public function hasLastEstablishTime() - { - return isset($this->last_establish_time); - } - - public function clearLastEstablishTime() - { - unset($this->last_establish_time); - } - - /** - * The time that the current input stream is accepted and the connection is - * established. - * - * Generated from protobuf field .google.protobuf.Timestamp last_establish_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastEstablishTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_establish_time = $var; - - return $this; - } - - /** - * Properties of the video streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVideoStreams() - { - return $this->video_streams; - } - - /** - * Properties of the video streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2; - * @param array<\Google\Cloud\Video\LiveStream\V1\VideoStreamProperty>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVideoStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\VideoStreamProperty::class); - $this->video_streams = $arr; - - return $this; - } - - /** - * Properties of the audio streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAudioStreams() - { - return $this->audio_streams; - } - - /** - * Properties of the audio streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3; - * @param array<\Google\Cloud\Video\LiveStream\V1\AudioStreamProperty>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAudioStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\AudioStreamProperty::class); - $this->audio_streams = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsRequest.php deleted file mode 100644 index 2dbfdfd1b10c..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsRequest.php +++ /dev/null @@ -1,242 +0,0 @@ -google.cloud.video.livestream.v1.ListChannelsRequest - */ -class ListChannelsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListChannelsResponse.next_page_token] - * to determine if there are more items left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The filter to apply to list results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. Please see - * {@see LivestreamServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\ListChannelsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * @type int $page_size - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListChannelsResponse.next_page_token] - * to determine if there are more items left to be queried. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * @type string $filter - * The filter to apply to list results. - * @type string $order_by - * Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListChannelsResponse.next_page_token] - * to determine if there are more items left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListChannelsResponse.next_page_token] - * to determine if there are more items left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The filter to apply to list results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter to apply to list results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsResponse.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsResponse.php deleted file mode 100644 index c535a18d3457..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.video.livestream.v1.ListChannelsResponse - */ -class ListChannelsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of channels. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Channel channels = 1; - */ - private $channels; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Video\LiveStream\V1\Channel>|\Google\Protobuf\Internal\RepeatedField $channels - * A list of channels. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * A list of channels. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Channel channels = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getChannels() - { - return $this->channels; - } - - /** - * A list of channels. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Channel channels = 1; - * @param array<\Google\Cloud\Video\LiveStream\V1\Channel>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setChannels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Channel::class); - $this->channels = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsRequest.php deleted file mode 100644 index 2e459d167a5c..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsRequest.php +++ /dev/null @@ -1,242 +0,0 @@ -google.cloud.video.livestream.v1.ListEventsRequest - */ -class ListEventsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent channel for the resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListEventsResponse.next_page_token] - * to determine if there are more items left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The filter to apply to list results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent channel for the resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. Please see - * {@see LivestreamServiceClient::channelName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\ListEventsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent channel for the resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * @type int $page_size - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListEventsResponse.next_page_token] - * to determine if there are more items left to be queried. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * @type string $filter - * The filter to apply to list results. - * @type string $order_by - * Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent channel for the resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent channel for the resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListEventsResponse.next_page_token] - * to determine if there are more items left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListEventsResponse.next_page_token] - * to determine if there are more items left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The filter to apply to list results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter to apply to list results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsResponse.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsResponse.php deleted file mode 100644 index 9c30220fcb35..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.video.livestream.v1.ListEventsResponse - */ -class ListEventsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of events. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Event events = 1; - */ - private $events; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Video\LiveStream\V1\Event>|\Google\Protobuf\Internal\RepeatedField $events - * A list of events. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * A list of events. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Event events = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEvents() - { - return $this->events; - } - - /** - * A list of events. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Event events = 1; - * @param array<\Google\Cloud\Video\LiveStream\V1\Event>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Event::class); - $this->events = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsRequest.php deleted file mode 100644 index 95a3d958d8f5..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsRequest.php +++ /dev/null @@ -1,242 +0,0 @@ -google.cloud.video.livestream.v1.ListInputsRequest - */ -class ListInputsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListInputsResponse.next_page_token] - * to determine if there are more items left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The filter to apply to list results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Specifies the ordering of results following syntax at [Sorting - * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. Please see - * {@see LivestreamServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\ListInputsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * @type int $page_size - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListInputsResponse.next_page_token] - * to determine if there are more items left to be queried. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * @type string $filter - * The filter to apply to list results. - * @type string $order_by - * Specifies the ordering of results following syntax at [Sorting - * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListInputsResponse.next_page_token] - * to determine if there are more items left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListInputsResponse.next_page_token] - * to determine if there are more items left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The filter to apply to list results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter to apply to list results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Specifies the ordering of results following syntax at [Sorting - * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Specifies the ordering of results following syntax at [Sorting - * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsResponse.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsResponse.php deleted file mode 100644 index a996747b4e20..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.video.livestream.v1.ListInputsResponse - */ -class ListInputsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of inputs. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Input inputs = 1; - */ - private $inputs; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Video\LiveStream\V1\Input>|\Google\Protobuf\Internal\RepeatedField $inputs - * A list of inputs. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * A list of inputs. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Input inputs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInputs() - { - return $this->inputs; - } - - /** - * A list of inputs. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Input inputs = 1; - * @param array<\Google\Cloud\Video\LiveStream\V1\Input>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInputs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Input::class); - $this->inputs = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LivestreamServiceGrpcClient.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LivestreamServiceGrpcClient.php deleted file mode 100644 index 038b2486d594..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LivestreamServiceGrpcClient.php +++ /dev/null @@ -1,282 +0,0 @@ -_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/CreateChannel', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Returns a list of all channels in the specified region. - * @param \Google\Cloud\Video\LiveStream\V1\ListChannelsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListChannels(\Google\Cloud\Video\LiveStream\V1\ListChannelsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/ListChannels', - $argument, - ['\Google\Cloud\Video\LiveStream\V1\ListChannelsResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns the specified channel. - * @param \Google\Cloud\Video\LiveStream\V1\GetChannelRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetChannel(\Google\Cloud\Video\LiveStream\V1\GetChannelRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/GetChannel', - $argument, - ['\Google\Cloud\Video\LiveStream\V1\Channel', 'decode'], - $metadata, $options); - } - - /** - * Deletes the specified channel. - * @param \Google\Cloud\Video\LiveStream\V1\DeleteChannelRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteChannel(\Google\Cloud\Video\LiveStream\V1\DeleteChannelRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/DeleteChannel', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates the specified channel. - * @param \Google\Cloud\Video\LiveStream\V1\UpdateChannelRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateChannel(\Google\Cloud\Video\LiveStream\V1\UpdateChannelRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/UpdateChannel', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Starts the specified channel. Part of the video pipeline will be created - * only when the StartChannel request is received by the server. - * @param \Google\Cloud\Video\LiveStream\V1\StartChannelRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function StartChannel(\Google\Cloud\Video\LiveStream\V1\StartChannelRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/StartChannel', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Stops the specified channel. Part of the video pipeline will be released - * when the StopChannel request is received by the server. - * @param \Google\Cloud\Video\LiveStream\V1\StopChannelRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function StopChannel(\Google\Cloud\Video\LiveStream\V1\StopChannelRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/StopChannel', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Creates an input with the provided unique ID in the specified region. - * @param \Google\Cloud\Video\LiveStream\V1\CreateInputRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateInput(\Google\Cloud\Video\LiveStream\V1\CreateInputRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/CreateInput', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Returns a list of all inputs in the specified region. - * @param \Google\Cloud\Video\LiveStream\V1\ListInputsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListInputs(\Google\Cloud\Video\LiveStream\V1\ListInputsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/ListInputs', - $argument, - ['\Google\Cloud\Video\LiveStream\V1\ListInputsResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns the specified input. - * @param \Google\Cloud\Video\LiveStream\V1\GetInputRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetInput(\Google\Cloud\Video\LiveStream\V1\GetInputRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/GetInput', - $argument, - ['\Google\Cloud\Video\LiveStream\V1\Input', 'decode'], - $metadata, $options); - } - - /** - * Deletes the specified input. - * @param \Google\Cloud\Video\LiveStream\V1\DeleteInputRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteInput(\Google\Cloud\Video\LiveStream\V1\DeleteInputRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/DeleteInput', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates the specified input. - * @param \Google\Cloud\Video\LiveStream\V1\UpdateInputRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateInput(\Google\Cloud\Video\LiveStream\V1\UpdateInputRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/UpdateInput', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Creates an event with the provided unique ID in the specified channel. - * @param \Google\Cloud\Video\LiveStream\V1\CreateEventRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateEvent(\Google\Cloud\Video\LiveStream\V1\CreateEventRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/CreateEvent', - $argument, - ['\Google\Cloud\Video\LiveStream\V1\Event', 'decode'], - $metadata, $options); - } - - /** - * Returns a list of all events in the specified channel. - * @param \Google\Cloud\Video\LiveStream\V1\ListEventsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListEvents(\Google\Cloud\Video\LiveStream\V1\ListEventsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/ListEvents', - $argument, - ['\Google\Cloud\Video\LiveStream\V1\ListEventsResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns the specified event. - * @param \Google\Cloud\Video\LiveStream\V1\GetEventRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetEvent(\Google\Cloud\Video\LiveStream\V1\GetEventRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/GetEvent', - $argument, - ['\Google\Cloud\Video\LiveStream\V1\Event', 'decode'], - $metadata, $options); - } - - /** - * Deletes the specified event. - * @param \Google\Cloud\Video\LiveStream\V1\DeleteEventRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteEvent(\Google\Cloud\Video\LiveStream\V1\DeleteEventRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.livestream.v1.LivestreamService/DeleteEvent', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig.php deleted file mode 100644 index 24c7138b5826..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.video.livestream.v1.LogConfig - */ -class LogConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The severity level of platform logging for this resource. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig.LogSeverity log_severity = 1; - */ - protected $log_severity = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $log_severity - * The severity level of platform logging for this resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The severity level of platform logging for this resource. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig.LogSeverity log_severity = 1; - * @return int - */ - public function getLogSeverity() - { - return $this->log_severity; - } - - /** - * The severity level of platform logging for this resource. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig.LogSeverity log_severity = 1; - * @param int $var - * @return $this - */ - public function setLogSeverity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\LogConfig\LogSeverity::class); - $this->log_severity = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig/LogSeverity.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig/LogSeverity.php deleted file mode 100644 index f8a3b5c54235..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig/LogSeverity.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.video.livestream.v1.LogConfig.LogSeverity - */ -class LogSeverity -{ - /** - * Log severity is not specified. This is the same as log severity is OFF. - * - * Generated from protobuf enum LOG_SEVERITY_UNSPECIFIED = 0; - */ - const LOG_SEVERITY_UNSPECIFIED = 0; - /** - * Log is turned off. - * - * Generated from protobuf enum OFF = 1; - */ - const OFF = 1; - /** - * Log with severity higher than or equal to DEBUG are logged. - * - * Generated from protobuf enum DEBUG = 100; - */ - const DEBUG = 100; - /** - * Logs with severity higher than or equal to INFO are logged. - * - * Generated from protobuf enum INFO = 200; - */ - const INFO = 200; - /** - * Logs with severity higher than or equal to WARNING are logged. - * - * Generated from protobuf enum WARNING = 400; - */ - const WARNING = 400; - /** - * Logs with severity higher than or equal to ERROR are logged. - * - * Generated from protobuf enum ERROR = 500; - */ - const ERROR = 500; - - private static $valueToName = [ - self::LOG_SEVERITY_UNSPECIFIED => 'LOG_SEVERITY_UNSPECIFIED', - self::OFF => 'OFF', - self::DEBUG => 'DEBUG', - self::INFO => 'INFO', - self::WARNING => 'WARNING', - self::ERROR => 'ERROR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LogSeverity::class, \Google\Cloud\Video\LiveStream\V1\LogConfig_LogSeverity::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest.php deleted file mode 100644 index 23356416c1f0..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest.php +++ /dev/null @@ -1,327 +0,0 @@ -google.cloud.video.livestream.v1.Manifest - */ -class Manifest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the generated file. The default is `manifest` with the - * extension suffix corresponding to the `Manifest` - * [type][google.cloud.video.livestream.v1.Manifest.type]. If multiple - * manifests are added to the channel, each must have a unique file name. - * - * Generated from protobuf field string file_name = 1; - */ - protected $file_name = ''; - /** - * Required. Type of the manifest, can be `HLS` or `DASH`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Required. List of `MuxStream` - * [key][google.cloud.video.livestream.v1.MuxStream.key]s that should appear - * in this manifest. - * - For HLS, either `fmp4` or `ts` mux streams can be specified but not - * mixed. - * - For DASH, only `fmp4` mux streams can be specified. - * - * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $mux_streams; - /** - * Maximum number of segments that this manifest holds. Once the manifest - * reaches this maximum number of segments, whenever a new segment is added to - * the manifest, the oldest segment will be removed from the manifest. - * The minimum value is 3 and the default value is 5. - * - * Generated from protobuf field int32 max_segment_count = 4; - */ - protected $max_segment_count = 0; - /** - * How long to keep a segment on the output Google Cloud Storage bucket after - * it is removed from the manifest. This field should be large enough to cover - * the manifest propagation delay. Otherwise, a player could receive 404 - * errors while accessing segments which are listed in the manifest that the - * player has, but were already deleted from the output Google Cloud Storage - * bucket. Default value is `60s`. - * - * Generated from protobuf field .google.protobuf.Duration segment_keep_duration = 5; - */ - protected $segment_keep_duration = null; - /** - * Whether to use the timecode, as specified in timecode config, when setting: - * - `availabilityStartTime` attribute in DASH manifests. - * - `#EXT-X-PROGRAM-DATE-TIME` tag in HLS manifests. - * If false, ignore the input timecode and use the time from system clock - * when the manifest is first generated. This is the default behavior. - * - * Generated from protobuf field bool use_timecode_as_timeline = 6; - */ - protected $use_timecode_as_timeline = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $file_name - * The name of the generated file. The default is `manifest` with the - * extension suffix corresponding to the `Manifest` - * [type][google.cloud.video.livestream.v1.Manifest.type]. If multiple - * manifests are added to the channel, each must have a unique file name. - * @type int $type - * Required. Type of the manifest, can be `HLS` or `DASH`. - * @type array|\Google\Protobuf\Internal\RepeatedField $mux_streams - * Required. List of `MuxStream` - * [key][google.cloud.video.livestream.v1.MuxStream.key]s that should appear - * in this manifest. - * - For HLS, either `fmp4` or `ts` mux streams can be specified but not - * mixed. - * - For DASH, only `fmp4` mux streams can be specified. - * @type int $max_segment_count - * Maximum number of segments that this manifest holds. Once the manifest - * reaches this maximum number of segments, whenever a new segment is added to - * the manifest, the oldest segment will be removed from the manifest. - * The minimum value is 3 and the default value is 5. - * @type \Google\Protobuf\Duration $segment_keep_duration - * How long to keep a segment on the output Google Cloud Storage bucket after - * it is removed from the manifest. This field should be large enough to cover - * the manifest propagation delay. Otherwise, a player could receive 404 - * errors while accessing segments which are listed in the manifest that the - * player has, but were already deleted from the output Google Cloud Storage - * bucket. Default value is `60s`. - * @type bool $use_timecode_as_timeline - * Whether to use the timecode, as specified in timecode config, when setting: - * - `availabilityStartTime` attribute in DASH manifests. - * - `#EXT-X-PROGRAM-DATE-TIME` tag in HLS manifests. - * If false, ignore the input timecode and use the time from system clock - * when the manifest is first generated. This is the default behavior. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * The name of the generated file. The default is `manifest` with the - * extension suffix corresponding to the `Manifest` - * [type][google.cloud.video.livestream.v1.Manifest.type]. If multiple - * manifests are added to the channel, each must have a unique file name. - * - * Generated from protobuf field string file_name = 1; - * @return string - */ - public function getFileName() - { - return $this->file_name; - } - - /** - * The name of the generated file. The default is `manifest` with the - * extension suffix corresponding to the `Manifest` - * [type][google.cloud.video.livestream.v1.Manifest.type]. If multiple - * manifests are added to the channel, each must have a unique file name. - * - * Generated from protobuf field string file_name = 1; - * @param string $var - * @return $this - */ - public function setFileName($var) - { - GPBUtil::checkString($var, True); - $this->file_name = $var; - - return $this; - } - - /** - * Required. Type of the manifest, can be `HLS` or `DASH`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. Type of the manifest, can be `HLS` or `DASH`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Manifest\ManifestType::class); - $this->type = $var; - - return $this; - } - - /** - * Required. List of `MuxStream` - * [key][google.cloud.video.livestream.v1.MuxStream.key]s that should appear - * in this manifest. - * - For HLS, either `fmp4` or `ts` mux streams can be specified but not - * mixed. - * - For DASH, only `fmp4` mux streams can be specified. - * - * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMuxStreams() - { - return $this->mux_streams; - } - - /** - * Required. List of `MuxStream` - * [key][google.cloud.video.livestream.v1.MuxStream.key]s that should appear - * in this manifest. - * - For HLS, either `fmp4` or `ts` mux streams can be specified but not - * mixed. - * - For DASH, only `fmp4` mux streams can be specified. - * - * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMuxStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->mux_streams = $arr; - - return $this; - } - - /** - * Maximum number of segments that this manifest holds. Once the manifest - * reaches this maximum number of segments, whenever a new segment is added to - * the manifest, the oldest segment will be removed from the manifest. - * The minimum value is 3 and the default value is 5. - * - * Generated from protobuf field int32 max_segment_count = 4; - * @return int - */ - public function getMaxSegmentCount() - { - return $this->max_segment_count; - } - - /** - * Maximum number of segments that this manifest holds. Once the manifest - * reaches this maximum number of segments, whenever a new segment is added to - * the manifest, the oldest segment will be removed from the manifest. - * The minimum value is 3 and the default value is 5. - * - * Generated from protobuf field int32 max_segment_count = 4; - * @param int $var - * @return $this - */ - public function setMaxSegmentCount($var) - { - GPBUtil::checkInt32($var); - $this->max_segment_count = $var; - - return $this; - } - - /** - * How long to keep a segment on the output Google Cloud Storage bucket after - * it is removed from the manifest. This field should be large enough to cover - * the manifest propagation delay. Otherwise, a player could receive 404 - * errors while accessing segments which are listed in the manifest that the - * player has, but were already deleted from the output Google Cloud Storage - * bucket. Default value is `60s`. - * - * Generated from protobuf field .google.protobuf.Duration segment_keep_duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getSegmentKeepDuration() - { - return $this->segment_keep_duration; - } - - public function hasSegmentKeepDuration() - { - return isset($this->segment_keep_duration); - } - - public function clearSegmentKeepDuration() - { - unset($this->segment_keep_duration); - } - - /** - * How long to keep a segment on the output Google Cloud Storage bucket after - * it is removed from the manifest. This field should be large enough to cover - * the manifest propagation delay. Otherwise, a player could receive 404 - * errors while accessing segments which are listed in the manifest that the - * player has, but were already deleted from the output Google Cloud Storage - * bucket. Default value is `60s`. - * - * Generated from protobuf field .google.protobuf.Duration segment_keep_duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setSegmentKeepDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->segment_keep_duration = $var; - - return $this; - } - - /** - * Whether to use the timecode, as specified in timecode config, when setting: - * - `availabilityStartTime` attribute in DASH manifests. - * - `#EXT-X-PROGRAM-DATE-TIME` tag in HLS manifests. - * If false, ignore the input timecode and use the time from system clock - * when the manifest is first generated. This is the default behavior. - * - * Generated from protobuf field bool use_timecode_as_timeline = 6; - * @return bool - */ - public function getUseTimecodeAsTimeline() - { - return $this->use_timecode_as_timeline; - } - - /** - * Whether to use the timecode, as specified in timecode config, when setting: - * - `availabilityStartTime` attribute in DASH manifests. - * - `#EXT-X-PROGRAM-DATE-TIME` tag in HLS manifests. - * If false, ignore the input timecode and use the time from system clock - * when the manifest is first generated. This is the default behavior. - * - * Generated from protobuf field bool use_timecode_as_timeline = 6; - * @param bool $var - * @return $this - */ - public function setUseTimecodeAsTimeline($var) - { - GPBUtil::checkBool($var); - $this->use_timecode_as_timeline = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest/ManifestType.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest/ManifestType.php deleted file mode 100644 index f3c9bee3a916..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest/ManifestType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.video.livestream.v1.Manifest.ManifestType - */ -class ManifestType -{ - /** - * The manifest type is not specified. - * - * Generated from protobuf enum MANIFEST_TYPE_UNSPECIFIED = 0; - */ - const MANIFEST_TYPE_UNSPECIFIED = 0; - /** - * Create an `HLS` manifest. The corresponding file extension is `.m3u8`. - * - * Generated from protobuf enum HLS = 1; - */ - const HLS = 1; - /** - * Create a `DASH` manifest. The corresponding file extension is `.mpd`. - * - * Generated from protobuf enum DASH = 2; - */ - const DASH = 2; - - private static $valueToName = [ - self::MANIFEST_TYPE_UNSPECIFIED => 'MANIFEST_TYPE_UNSPECIFIED', - self::HLS => 'HLS', - self::DASH => 'DASH', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ManifestType::class, \Google\Cloud\Video\LiveStream\V1\Manifest_ManifestType::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/MuxStream.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/MuxStream.php deleted file mode 100644 index b5198e42c2f0..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/MuxStream.php +++ /dev/null @@ -1,249 +0,0 @@ -google.cloud.video.livestream.v1.MuxStream - */ -class MuxStream extends \Google\Protobuf\Internal\Message -{ - /** - * A unique key for this multiplexed stream. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * The container format. The default is `fmp4`. - * Supported container formats: - * - `fmp4` - the corresponding file extension is `.m4s` - * - `ts` - the corresponding file extension is `.ts` - * - * Generated from protobuf field string container = 3; - */ - protected $container = ''; - /** - * List of `ElementaryStream` - * [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed - * in this stream. - * - For `fmp4` container, must contain either one video or one audio stream. - * - For `ts` container, must contain exactly one audio stream and up to one - * video stream. - * - * Generated from protobuf field repeated string elementary_streams = 4; - */ - private $elementary_streams; - /** - * Segment settings for `fmp4` and `ts`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5; - */ - protected $segment_settings = null; - /** - * Identifier of the encryption configuration to use. If omitted, output - * will be unencrypted. - * - * Generated from protobuf field string encryption_id = 6; - */ - protected $encryption_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * A unique key for this multiplexed stream. - * @type string $container - * The container format. The default is `fmp4`. - * Supported container formats: - * - `fmp4` - the corresponding file extension is `.m4s` - * - `ts` - the corresponding file extension is `.ts` - * @type array|\Google\Protobuf\Internal\RepeatedField $elementary_streams - * List of `ElementaryStream` - * [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed - * in this stream. - * - For `fmp4` container, must contain either one video or one audio stream. - * - For `ts` container, must contain exactly one audio stream and up to one - * video stream. - * @type \Google\Cloud\Video\LiveStream\V1\SegmentSettings $segment_settings - * Segment settings for `fmp4` and `ts`. - * @type string $encryption_id - * Identifier of the encryption configuration to use. If omitted, output - * will be unencrypted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * A unique key for this multiplexed stream. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * A unique key for this multiplexed stream. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * The container format. The default is `fmp4`. - * Supported container formats: - * - `fmp4` - the corresponding file extension is `.m4s` - * - `ts` - the corresponding file extension is `.ts` - * - * Generated from protobuf field string container = 3; - * @return string - */ - public function getContainer() - { - return $this->container; - } - - /** - * The container format. The default is `fmp4`. - * Supported container formats: - * - `fmp4` - the corresponding file extension is `.m4s` - * - `ts` - the corresponding file extension is `.ts` - * - * Generated from protobuf field string container = 3; - * @param string $var - * @return $this - */ - public function setContainer($var) - { - GPBUtil::checkString($var, True); - $this->container = $var; - - return $this; - } - - /** - * List of `ElementaryStream` - * [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed - * in this stream. - * - For `fmp4` container, must contain either one video or one audio stream. - * - For `ts` container, must contain exactly one audio stream and up to one - * video stream. - * - * Generated from protobuf field repeated string elementary_streams = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getElementaryStreams() - { - return $this->elementary_streams; - } - - /** - * List of `ElementaryStream` - * [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed - * in this stream. - * - For `fmp4` container, must contain either one video or one audio stream. - * - For `ts` container, must contain exactly one audio stream and up to one - * video stream. - * - * Generated from protobuf field repeated string elementary_streams = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setElementaryStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->elementary_streams = $arr; - - return $this; - } - - /** - * Segment settings for `fmp4` and `ts`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5; - * @return \Google\Cloud\Video\LiveStream\V1\SegmentSettings|null - */ - public function getSegmentSettings() - { - return $this->segment_settings; - } - - public function hasSegmentSettings() - { - return isset($this->segment_settings); - } - - public function clearSegmentSettings() - { - unset($this->segment_settings); - } - - /** - * Segment settings for `fmp4` and `ts`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5; - * @param \Google\Cloud\Video\LiveStream\V1\SegmentSettings $var - * @return $this - */ - public function setSegmentSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\SegmentSettings::class); - $this->segment_settings = $var; - - return $this; - } - - /** - * Identifier of the encryption configuration to use. If omitted, output - * will be unencrypted. - * - * Generated from protobuf field string encryption_id = 6; - * @return string - */ - public function getEncryptionId() - { - return $this->encryption_id; - } - - /** - * Identifier of the encryption configuration to use. If omitted, output - * will be unencrypted. - * - * Generated from protobuf field string encryption_id = 6; - * @param string $var - * @return $this - */ - public function setEncryptionId($var) - { - GPBUtil::checkString($var, True); - $this->encryption_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/OperationMetadata.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/OperationMetadata.php deleted file mode 100644 index ccb892bc11cf..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/OperationMetadata.php +++ /dev/null @@ -1,273 +0,0 @@ -google.cloud.video.livestream.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig.php deleted file mode 100644 index 3f4966135443..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.video.livestream.v1.PreprocessingConfig - */ -class PreprocessingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Audio preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Audio audio = 1; - */ - protected $audio = null; - /** - * Specify the video cropping configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Crop crop = 2; - */ - protected $crop = null; - /** - * Specify the video pad filter configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Pad pad = 3; - */ - protected $pad = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Audio $audio - * Audio preprocessing configuration. - * @type \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Crop $crop - * Specify the video cropping configuration. - * @type \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Pad $pad - * Specify the video pad filter configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * Audio preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Audio audio = 1; - * @return \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Audio|null - */ - public function getAudio() - { - return $this->audio; - } - - public function hasAudio() - { - return isset($this->audio); - } - - public function clearAudio() - { - unset($this->audio); - } - - /** - * Audio preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Audio audio = 1; - * @param \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Audio $var - * @return $this - */ - public function setAudio($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Audio::class); - $this->audio = $var; - - return $this; - } - - /** - * Specify the video cropping configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Crop crop = 2; - * @return \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Crop|null - */ - public function getCrop() - { - return $this->crop; - } - - public function hasCrop() - { - return isset($this->crop); - } - - public function clearCrop() - { - unset($this->crop); - } - - /** - * Specify the video cropping configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Crop crop = 2; - * @param \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Crop $var - * @return $this - */ - public function setCrop($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Crop::class); - $this->crop = $var; - - return $this; - } - - /** - * Specify the video pad filter configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Pad pad = 3; - * @return \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Pad|null - */ - public function getPad() - { - return $this->pad; - } - - public function hasPad() - { - return isset($this->pad); - } - - public function clearPad() - { - unset($this->pad); - } - - /** - * Specify the video pad filter configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Pad pad = 3; - * @param \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Pad $var - * @return $this - */ - public function setPad($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Pad::class); - $this->pad = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Audio.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Audio.php deleted file mode 100644 index 5e62f61a0530..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Audio.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.video.livestream.v1.PreprocessingConfig.Audio - */ -class Audio extends \Google\Protobuf\Internal\Message -{ - /** - * Specify audio loudness normalization in loudness units relative to full - * scale (LUFS). Enter a value between -24 and 0 according to the following: - * - -24 is the Advanced Television Systems Committee (ATSC A/85) - * - -23 is the EU R128 broadcast standard - * - -19 is the prior standard for online mono audio - * - -18 is the ReplayGain standard - * - -16 is the prior standard for stereo audio - * - -14 is the new online audio standard recommended by Spotify, as well as - * Amazon Echo - * - 0 disables normalization. The default is 0. - * - * Generated from protobuf field double lufs = 1; - */ - protected $lufs = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $lufs - * Specify audio loudness normalization in loudness units relative to full - * scale (LUFS). Enter a value between -24 and 0 according to the following: - * - -24 is the Advanced Television Systems Committee (ATSC A/85) - * - -23 is the EU R128 broadcast standard - * - -19 is the prior standard for online mono audio - * - -18 is the ReplayGain standard - * - -16 is the prior standard for stereo audio - * - -14 is the new online audio standard recommended by Spotify, as well as - * Amazon Echo - * - 0 disables normalization. The default is 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * Specify audio loudness normalization in loudness units relative to full - * scale (LUFS). Enter a value between -24 and 0 according to the following: - * - -24 is the Advanced Television Systems Committee (ATSC A/85) - * - -23 is the EU R128 broadcast standard - * - -19 is the prior standard for online mono audio - * - -18 is the ReplayGain standard - * - -16 is the prior standard for stereo audio - * - -14 is the new online audio standard recommended by Spotify, as well as - * Amazon Echo - * - 0 disables normalization. The default is 0. - * - * Generated from protobuf field double lufs = 1; - * @return float - */ - public function getLufs() - { - return $this->lufs; - } - - /** - * Specify audio loudness normalization in loudness units relative to full - * scale (LUFS). Enter a value between -24 and 0 according to the following: - * - -24 is the Advanced Television Systems Committee (ATSC A/85) - * - -23 is the EU R128 broadcast standard - * - -19 is the prior standard for online mono audio - * - -18 is the ReplayGain standard - * - -16 is the prior standard for stereo audio - * - -14 is the new online audio standard recommended by Spotify, as well as - * Amazon Echo - * - 0 disables normalization. The default is 0. - * - * Generated from protobuf field double lufs = 1; - * @param float $var - * @return $this - */ - public function setLufs($var) - { - GPBUtil::checkDouble($var); - $this->lufs = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Audio::class, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig_Audio::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Crop.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Crop.php deleted file mode 100644 index 71c8d4b86cde..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Crop.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.video.livestream.v1.PreprocessingConfig.Crop - */ -class Crop extends \Google\Protobuf\Internal\Message -{ - /** - * The number of pixels to crop from the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - */ - protected $top_pixels = 0; - /** - * The number of pixels to crop from the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - */ - protected $bottom_pixels = 0; - /** - * The number of pixels to crop from the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - */ - protected $left_pixels = 0; - /** - * The number of pixels to crop from the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - */ - protected $right_pixels = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $top_pixels - * The number of pixels to crop from the top. The default is 0. - * @type int $bottom_pixels - * The number of pixels to crop from the bottom. The default is 0. - * @type int $left_pixels - * The number of pixels to crop from the left. The default is 0. - * @type int $right_pixels - * The number of pixels to crop from the right. The default is 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * The number of pixels to crop from the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - * @return int - */ - public function getTopPixels() - { - return $this->top_pixels; - } - - /** - * The number of pixels to crop from the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - * @param int $var - * @return $this - */ - public function setTopPixels($var) - { - GPBUtil::checkInt32($var); - $this->top_pixels = $var; - - return $this; - } - - /** - * The number of pixels to crop from the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - * @return int - */ - public function getBottomPixels() - { - return $this->bottom_pixels; - } - - /** - * The number of pixels to crop from the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - * @param int $var - * @return $this - */ - public function setBottomPixels($var) - { - GPBUtil::checkInt32($var); - $this->bottom_pixels = $var; - - return $this; - } - - /** - * The number of pixels to crop from the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - * @return int - */ - public function getLeftPixels() - { - return $this->left_pixels; - } - - /** - * The number of pixels to crop from the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - * @param int $var - * @return $this - */ - public function setLeftPixels($var) - { - GPBUtil::checkInt32($var); - $this->left_pixels = $var; - - return $this; - } - - /** - * The number of pixels to crop from the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - * @return int - */ - public function getRightPixels() - { - return $this->right_pixels; - } - - /** - * The number of pixels to crop from the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - * @param int $var - * @return $this - */ - public function setRightPixels($var) - { - GPBUtil::checkInt32($var); - $this->right_pixels = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Crop::class, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig_Crop::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Pad.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Pad.php deleted file mode 100644 index ee40c165846e..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Pad.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.video.livestream.v1.PreprocessingConfig.Pad - */ -class Pad extends \Google\Protobuf\Internal\Message -{ - /** - * The number of pixels to add to the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - */ - protected $top_pixels = 0; - /** - * The number of pixels to add to the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - */ - protected $bottom_pixels = 0; - /** - * The number of pixels to add to the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - */ - protected $left_pixels = 0; - /** - * The number of pixels to add to the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - */ - protected $right_pixels = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $top_pixels - * The number of pixels to add to the top. The default is 0. - * @type int $bottom_pixels - * The number of pixels to add to the bottom. The default is 0. - * @type int $left_pixels - * The number of pixels to add to the left. The default is 0. - * @type int $right_pixels - * The number of pixels to add to the right. The default is 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * The number of pixels to add to the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - * @return int - */ - public function getTopPixels() - { - return $this->top_pixels; - } - - /** - * The number of pixels to add to the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - * @param int $var - * @return $this - */ - public function setTopPixels($var) - { - GPBUtil::checkInt32($var); - $this->top_pixels = $var; - - return $this; - } - - /** - * The number of pixels to add to the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - * @return int - */ - public function getBottomPixels() - { - return $this->bottom_pixels; - } - - /** - * The number of pixels to add to the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - * @param int $var - * @return $this - */ - public function setBottomPixels($var) - { - GPBUtil::checkInt32($var); - $this->bottom_pixels = $var; - - return $this; - } - - /** - * The number of pixels to add to the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - * @return int - */ - public function getLeftPixels() - { - return $this->left_pixels; - } - - /** - * The number of pixels to add to the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - * @param int $var - * @return $this - */ - public function setLeftPixels($var) - { - GPBUtil::checkInt32($var); - $this->left_pixels = $var; - - return $this; - } - - /** - * The number of pixels to add to the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - * @return int - */ - public function getRightPixels() - { - return $this->right_pixels; - } - - /** - * The number of pixels to add to the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - * @param int $var - * @return $this - */ - public function setRightPixels($var) - { - GPBUtil::checkInt32($var); - $this->right_pixels = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Pad::class, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig_Pad::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SegmentSettings.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SegmentSettings.php deleted file mode 100644 index 6778ece42f49..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SegmentSettings.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.video.livestream.v1.SegmentSettings - */ -class SegmentSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Duration of the segments in seconds. The default is `6s`. Note that - * `segmentDuration` must be greater than or equal to - * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration], - * and `segmentDuration` must be divisible by - * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration]. - * Valid range is [2s, 20s]. - * All [mux_streams][google.cloud.video.livestream.v1.Manifest.mux_streams] in - * the same manifest must have the same segment duration. - * - * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; - */ - protected $segment_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $segment_duration - * Duration of the segments in seconds. The default is `6s`. Note that - * `segmentDuration` must be greater than or equal to - * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration], - * and `segmentDuration` must be divisible by - * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration]. - * Valid range is [2s, 20s]. - * All [mux_streams][google.cloud.video.livestream.v1.Manifest.mux_streams] in - * the same manifest must have the same segment duration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * Duration of the segments in seconds. The default is `6s`. Note that - * `segmentDuration` must be greater than or equal to - * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration], - * and `segmentDuration` must be divisible by - * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration]. - * Valid range is [2s, 20s]. - * All [mux_streams][google.cloud.video.livestream.v1.Manifest.mux_streams] in - * the same manifest must have the same segment duration. - * - * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getSegmentDuration() - { - return $this->segment_duration; - } - - public function hasSegmentDuration() - { - return isset($this->segment_duration); - } - - public function clearSegmentDuration() - { - unset($this->segment_duration); - } - - /** - * Duration of the segments in seconds. The default is `6s`. Note that - * `segmentDuration` must be greater than or equal to - * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration], - * and `segmentDuration` must be divisible by - * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration]. - * Valid range is [2s, 20s]. - * All [mux_streams][google.cloud.video.livestream.v1.Manifest.mux_streams] in - * the same manifest must have the same segment duration. - * - * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setSegmentDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->segment_duration = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SpriteSheet.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SpriteSheet.php deleted file mode 100644 index 719cf70bff52..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SpriteSheet.php +++ /dev/null @@ -1,367 +0,0 @@ -google.cloud.video.livestream.v1.SpriteSheet - */ -class SpriteSheet extends \Google\Protobuf\Internal\Message -{ - /** - * Format type. The default is `jpeg`. - * Supported formats: - * - `jpeg` - * - * Generated from protobuf field string format = 1; - */ - protected $format = ''; - /** - * Required. File name prefix for the generated sprite sheets. If multiple - * sprite sheets are added to the channel, each must have a unique file - * prefix. - * Each sprite sheet has an incremental 10-digit zero-padded suffix starting - * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. - * - * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $file_prefix = ''; - /** - * Required. The width of the sprite in pixels. Must be an even integer. - * - * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $sprite_width_pixels = 0; - /** - * Required. The height of the sprite in pixels. Must be an even integer. - * - * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $sprite_height_pixels = 0; - /** - * The maximum number of sprites per row in a sprite sheet. Valid range is - * [1, 10] and the default value is 1. - * - * Generated from protobuf field int32 column_count = 5; - */ - protected $column_count = 0; - /** - * The maximum number of rows per sprite sheet. When the sprite sheet is full, - * a new sprite sheet is created. Valid range is [1, 10] and the default value - * is 1. - * - * Generated from protobuf field int32 row_count = 6; - */ - protected $row_count = 0; - /** - * Create sprites at regular intervals. Valid range is [1 second, 1 hour] and - * the default value is `10s`. - * - * Generated from protobuf field .google.protobuf.Duration interval = 7; - */ - protected $interval = null; - /** - * The quality of the generated sprite sheet. Enter a value between 1 - * and 100, where 1 is the lowest quality and 100 is the highest quality. - * The default is 100. A high quality value corresponds to a low image data - * compression ratio. - * - * Generated from protobuf field int32 quality = 8; - */ - protected $quality = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $format - * Format type. The default is `jpeg`. - * Supported formats: - * - `jpeg` - * @type string $file_prefix - * Required. File name prefix for the generated sprite sheets. If multiple - * sprite sheets are added to the channel, each must have a unique file - * prefix. - * Each sprite sheet has an incremental 10-digit zero-padded suffix starting - * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. - * @type int $sprite_width_pixels - * Required. The width of the sprite in pixels. Must be an even integer. - * @type int $sprite_height_pixels - * Required. The height of the sprite in pixels. Must be an even integer. - * @type int $column_count - * The maximum number of sprites per row in a sprite sheet. Valid range is - * [1, 10] and the default value is 1. - * @type int $row_count - * The maximum number of rows per sprite sheet. When the sprite sheet is full, - * a new sprite sheet is created. Valid range is [1, 10] and the default value - * is 1. - * @type \Google\Protobuf\Duration $interval - * Create sprites at regular intervals. Valid range is [1 second, 1 hour] and - * the default value is `10s`. - * @type int $quality - * The quality of the generated sprite sheet. Enter a value between 1 - * and 100, where 1 is the lowest quality and 100 is the highest quality. - * The default is 100. A high quality value corresponds to a low image data - * compression ratio. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * Format type. The default is `jpeg`. - * Supported formats: - * - `jpeg` - * - * Generated from protobuf field string format = 1; - * @return string - */ - public function getFormat() - { - return $this->format; - } - - /** - * Format type. The default is `jpeg`. - * Supported formats: - * - `jpeg` - * - * Generated from protobuf field string format = 1; - * @param string $var - * @return $this - */ - public function setFormat($var) - { - GPBUtil::checkString($var, True); - $this->format = $var; - - return $this; - } - - /** - * Required. File name prefix for the generated sprite sheets. If multiple - * sprite sheets are added to the channel, each must have a unique file - * prefix. - * Each sprite sheet has an incremental 10-digit zero-padded suffix starting - * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. - * - * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFilePrefix() - { - return $this->file_prefix; - } - - /** - * Required. File name prefix for the generated sprite sheets. If multiple - * sprite sheets are added to the channel, each must have a unique file - * prefix. - * Each sprite sheet has an incremental 10-digit zero-padded suffix starting - * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. - * - * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFilePrefix($var) - { - GPBUtil::checkString($var, True); - $this->file_prefix = $var; - - return $this; - } - - /** - * Required. The width of the sprite in pixels. Must be an even integer. - * - * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getSpriteWidthPixels() - { - return $this->sprite_width_pixels; - } - - /** - * Required. The width of the sprite in pixels. Must be an even integer. - * - * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setSpriteWidthPixels($var) - { - GPBUtil::checkInt32($var); - $this->sprite_width_pixels = $var; - - return $this; - } - - /** - * Required. The height of the sprite in pixels. Must be an even integer. - * - * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getSpriteHeightPixels() - { - return $this->sprite_height_pixels; - } - - /** - * Required. The height of the sprite in pixels. Must be an even integer. - * - * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setSpriteHeightPixels($var) - { - GPBUtil::checkInt32($var); - $this->sprite_height_pixels = $var; - - return $this; - } - - /** - * The maximum number of sprites per row in a sprite sheet. Valid range is - * [1, 10] and the default value is 1. - * - * Generated from protobuf field int32 column_count = 5; - * @return int - */ - public function getColumnCount() - { - return $this->column_count; - } - - /** - * The maximum number of sprites per row in a sprite sheet. Valid range is - * [1, 10] and the default value is 1. - * - * Generated from protobuf field int32 column_count = 5; - * @param int $var - * @return $this - */ - public function setColumnCount($var) - { - GPBUtil::checkInt32($var); - $this->column_count = $var; - - return $this; - } - - /** - * The maximum number of rows per sprite sheet. When the sprite sheet is full, - * a new sprite sheet is created. Valid range is [1, 10] and the default value - * is 1. - * - * Generated from protobuf field int32 row_count = 6; - * @return int - */ - public function getRowCount() - { - return $this->row_count; - } - - /** - * The maximum number of rows per sprite sheet. When the sprite sheet is full, - * a new sprite sheet is created. Valid range is [1, 10] and the default value - * is 1. - * - * Generated from protobuf field int32 row_count = 6; - * @param int $var - * @return $this - */ - public function setRowCount($var) - { - GPBUtil::checkInt32($var); - $this->row_count = $var; - - return $this; - } - - /** - * Create sprites at regular intervals. Valid range is [1 second, 1 hour] and - * the default value is `10s`. - * - * Generated from protobuf field .google.protobuf.Duration interval = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getInterval() - { - return $this->interval; - } - - public function hasInterval() - { - return isset($this->interval); - } - - public function clearInterval() - { - unset($this->interval); - } - - /** - * Create sprites at regular intervals. Valid range is [1 second, 1 hour] and - * the default value is `10s`. - * - * Generated from protobuf field .google.protobuf.Duration interval = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setInterval($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->interval = $var; - - return $this; - } - - /** - * The quality of the generated sprite sheet. Enter a value between 1 - * and 100, where 1 is the lowest quality and 100 is the highest quality. - * The default is 100. A high quality value corresponds to a low image data - * compression ratio. - * - * Generated from protobuf field int32 quality = 8; - * @return int - */ - public function getQuality() - { - return $this->quality; - } - - /** - * The quality of the generated sprite sheet. Enter a value between 1 - * and 100, where 1 is the lowest quality and 100 is the highest quality. - * The default is 100. A high quality value corresponds to a low image data - * compression ratio. - * - * Generated from protobuf field int32 quality = 8; - * @param int $var - * @return $this - */ - public function setQuality($var) - { - GPBUtil::checkInt32($var); - $this->quality = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StartChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StartChannelRequest.php deleted file mode 100644 index d70e8707a2a4..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StartChannelRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.video.livestream.v1.StartChannelRequest - */ -class StartChannelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 2; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. Please see - * {@see LivestreamServiceClient::channelName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\StartChannelRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 2; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 2; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StopChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StopChannelRequest.php deleted file mode 100644 index 59ed1b5512cf..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StopChannelRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.video.livestream.v1.StopChannelRequest - */ -class StopChannelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 2; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. Please see - * {@see LivestreamServiceClient::channelName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\StopChannelRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 2; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 2; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TextStream.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TextStream.php deleted file mode 100644 index 65259f395c0a..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TextStream.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.video.livestream.v1.TextStream - */ -class TextStream extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The codec for this text stream. - * Supported text codecs: - * - `cea608` - * - `cea708` - * - * Generated from protobuf field string codec = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $codec = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $codec - * Required. The codec for this text stream. - * Supported text codecs: - * - `cea608` - * - `cea708` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The codec for this text stream. - * Supported text codecs: - * - `cea608` - * - `cea708` - * - * Generated from protobuf field string codec = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCodec() - { - return $this->codec; - } - - /** - * Required. The codec for this text stream. - * Supported text codecs: - * - `cea608` - * - `cea708` - * - * Generated from protobuf field string codec = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCodec($var) - { - GPBUtil::checkString($var, True); - $this->codec = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig.php deleted file mode 100644 index 0bfb38e5aa03..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.video.livestream.v1.TimecodeConfig - */ -class TimecodeConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The source of the timecode that will later be used in outputs/manifests. - * It determines the initial timecode/timestamp (first frame) of output - * streams. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig.TimecodeSource source = 1; - */ - protected $source = 0; - protected $time_offset; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $source - * The source of the timecode that will later be used in outputs/manifests. - * It determines the initial timecode/timestamp (first frame) of output - * streams. - * @type \Google\Protobuf\Duration $utc_offset - * UTC offset. Must be whole seconds, between -18 hours and +18 hours. - * @type \Google\Type\TimeZone $time_zone - * Time zone e.g. "America/Los_Angeles". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * The source of the timecode that will later be used in outputs/manifests. - * It determines the initial timecode/timestamp (first frame) of output - * streams. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig.TimecodeSource source = 1; - * @return int - */ - public function getSource() - { - return $this->source; - } - - /** - * The source of the timecode that will later be used in outputs/manifests. - * It determines the initial timecode/timestamp (first frame) of output - * streams. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig.TimecodeSource source = 1; - * @param int $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\TimecodeConfig\TimecodeSource::class); - $this->source = $var; - - return $this; - } - - /** - * UTC offset. Must be whole seconds, between -18 hours and +18 hours. - * - * Generated from protobuf field .google.protobuf.Duration utc_offset = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getUtcOffset() - { - return $this->readOneof(2); - } - - public function hasUtcOffset() - { - return $this->hasOneof(2); - } - - /** - * UTC offset. Must be whole seconds, between -18 hours and +18 hours. - * - * Generated from protobuf field .google.protobuf.Duration utc_offset = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setUtcOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Time zone e.g. "America/Los_Angeles". - * - * Generated from protobuf field .google.type.TimeZone time_zone = 3; - * @return \Google\Type\TimeZone|null - */ - public function getTimeZone() - { - return $this->readOneof(3); - } - - public function hasTimeZone() - { - return $this->hasOneof(3); - } - - /** - * Time zone e.g. "America/Los_Angeles". - * - * Generated from protobuf field .google.type.TimeZone time_zone = 3; - * @param \Google\Type\TimeZone $var - * @return $this - */ - public function setTimeZone($var) - { - GPBUtil::checkMessage($var, \Google\Type\TimeZone::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getTimeOffset() - { - return $this->whichOneof("time_offset"); - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig/TimecodeSource.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig/TimecodeSource.php deleted file mode 100644 index 143ed3952b6b..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig/TimecodeSource.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.video.livestream.v1.TimecodeConfig.TimecodeSource - */ -class TimecodeSource -{ - /** - * The timecode source is not specified. - * - * Generated from protobuf enum TIMECODE_SOURCE_UNSPECIFIED = 0; - */ - const TIMECODE_SOURCE_UNSPECIFIED = 0; - /** - * Use input media timestamp. - * - * Generated from protobuf enum MEDIA_TIMESTAMP = 1; - */ - const MEDIA_TIMESTAMP = 1; - /** - * Use input embedded timecode e.g. picture timing SEI message. - * - * Generated from protobuf enum EMBEDDED_TIMECODE = 2; - */ - const EMBEDDED_TIMECODE = 2; - - private static $valueToName = [ - self::TIMECODE_SOURCE_UNSPECIFIED => 'TIMECODE_SOURCE_UNSPECIFIED', - self::MEDIA_TIMESTAMP => 'MEDIA_TIMESTAMP', - self::EMBEDDED_TIMECODE => 'EMBEDDED_TIMECODE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TimecodeSource::class, \Google\Cloud\Video\LiveStream\V1\TimecodeConfig_TimecodeSource::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateChannelRequest.php deleted file mode 100644 index 0d41cb29e8b9..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateChannelRequest.php +++ /dev/null @@ -1,293 +0,0 @@ -google.cloud.video.livestream.v1.UpdateChannelRequest - */ -class UpdateChannelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Field mask is used to specify the fields to be overwritten in the Channel - * resource by the update. You can only update the following fields: - * * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) - * * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) - * * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) - * * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) - * * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) - * * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) - * * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) - * * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) - * * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) - * * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. - * If the mask is not present, then each field from the list above is updated - * if the field appears in the request payload. To unset a field, add the - * field to the update mask and remove it from the request payload. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - */ - protected $update_mask = null; - /** - * Required. The channel resource to be updated. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $channel = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 3; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\Video\LiveStream\V1\Channel $channel Required. The channel resource to be updated. - * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the Channel - * resource by the update. You can only update the following fields: - * - * * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) - * * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) - * * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) - * * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) - * * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) - * * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) - * * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) - * * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) - * * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) - * * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) - * - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. - * - * If the mask is not present, then each field from the list above is updated - * if the field appears in the request payload. To unset a field, add the - * field to the update mask and remove it from the request payload. - * - * @return \Google\Cloud\Video\LiveStream\V1\UpdateChannelRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Video\LiveStream\V1\Channel $channel, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setChannel($channel) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Field mask is used to specify the fields to be overwritten in the Channel - * resource by the update. You can only update the following fields: - * * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) - * * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) - * * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) - * * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) - * * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) - * * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) - * * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) - * * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) - * * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) - * * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. - * If the mask is not present, then each field from the list above is updated - * if the field appears in the request payload. To unset a field, add the - * field to the update mask and remove it from the request payload. - * @type \Google\Cloud\Video\LiveStream\V1\Channel $channel - * Required. The channel resource to be updated. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Field mask is used to specify the fields to be overwritten in the Channel - * resource by the update. You can only update the following fields: - * * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) - * * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) - * * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) - * * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) - * * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) - * * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) - * * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) - * * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) - * * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) - * * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. - * If the mask is not present, then each field from the list above is updated - * if the field appears in the request payload. To unset a field, add the - * field to the update mask and remove it from the request payload. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Field mask is used to specify the fields to be overwritten in the Channel - * resource by the update. You can only update the following fields: - * * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) - * * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) - * * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) - * * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) - * * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) - * * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) - * * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) - * * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) - * * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) - * * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. - * If the mask is not present, then each field from the list above is updated - * if the field appears in the request payload. To unset a field, add the - * field to the update mask and remove it from the request payload. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The channel resource to be updated. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\LiveStream\V1\Channel|null - */ - public function getChannel() - { - return $this->channel; - } - - public function hasChannel() - { - return isset($this->channel); - } - - public function clearChannel() - { - unset($this->channel); - } - - /** - * Required. The channel resource to be updated. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\LiveStream\V1\Channel $var - * @return $this - */ - public function setChannel($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Channel::class); - $this->channel = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 3; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 3; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateInputRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateInputRequest.php deleted file mode 100644 index c68b33c975ce..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateInputRequest.php +++ /dev/null @@ -1,253 +0,0 @@ -google.cloud.video.livestream.v1.UpdateInputRequest - */ -class UpdateInputRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Field mask is used to specify the fields to be overwritten in the Input - * resource by the update. You can only update the following fields: - * * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) - * * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. - * If the mask is not present, then each field from the list above is updated - * if the field appears in the request payload. To unset a field, add the - * field to the update mask and remove it from the request payload. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - */ - protected $update_mask = null; - /** - * Required. The input resource to be updated. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 3; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\Video\LiveStream\V1\Input $input Required. The input resource to be updated. - * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the Input - * resource by the update. You can only update the following fields: - * - * * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) - * * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) - * - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. - * - * If the mask is not present, then each field from the list above is updated - * if the field appears in the request payload. To unset a field, add the - * field to the update mask and remove it from the request payload. - * - * @return \Google\Cloud\Video\LiveStream\V1\UpdateInputRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Video\LiveStream\V1\Input $input, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setInput($input) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Field mask is used to specify the fields to be overwritten in the Input - * resource by the update. You can only update the following fields: - * * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) - * * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. - * If the mask is not present, then each field from the list above is updated - * if the field appears in the request payload. To unset a field, add the - * field to the update mask and remove it from the request payload. - * @type \Google\Cloud\Video\LiveStream\V1\Input $input - * Required. The input resource to be updated. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Field mask is used to specify the fields to be overwritten in the Input - * resource by the update. You can only update the following fields: - * * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) - * * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. - * If the mask is not present, then each field from the list above is updated - * if the field appears in the request payload. To unset a field, add the - * field to the update mask and remove it from the request payload. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Field mask is used to specify the fields to be overwritten in the Input - * resource by the update. You can only update the following fields: - * * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) - * * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. - * If the mask is not present, then each field from the list above is updated - * if the field appears in the request payload. To unset a field, add the - * field to the update mask and remove it from the request payload. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The input resource to be updated. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\LiveStream\V1\Input|null - */ - public function getInput() - { - return $this->input; - } - - public function hasInput() - { - return isset($this->input); - } - - public function clearInput() - { - unset($this->input); - } - - /** - * Required. The input resource to be updated. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\LiveStream\V1\Input $var - * @return $this - */ - public function setInput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Input::class); - $this->input = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 3; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 3; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoFormat.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoFormat.php deleted file mode 100644 index 605d4d41bf8e..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoFormat.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.video.livestream.v1.VideoFormat - */ -class VideoFormat extends \Google\Protobuf\Internal\Message -{ - /** - * Video codec used in this video stream. - * - * Generated from protobuf field string codec = 1; - */ - protected $codec = ''; - /** - * The width of the video stream in pixels. - * - * Generated from protobuf field int32 width_pixels = 2; - */ - protected $width_pixels = 0; - /** - * The height of the video stream in pixels. - * - * Generated from protobuf field int32 height_pixels = 3; - */ - protected $height_pixels = 0; - /** - * The frame rate of the input video stream. - * - * Generated from protobuf field double frame_rate = 4; - */ - protected $frame_rate = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $codec - * Video codec used in this video stream. - * @type int $width_pixels - * The width of the video stream in pixels. - * @type int $height_pixels - * The height of the video stream in pixels. - * @type float $frame_rate - * The frame rate of the input video stream. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Video codec used in this video stream. - * - * Generated from protobuf field string codec = 1; - * @return string - */ - public function getCodec() - { - return $this->codec; - } - - /** - * Video codec used in this video stream. - * - * Generated from protobuf field string codec = 1; - * @param string $var - * @return $this - */ - public function setCodec($var) - { - GPBUtil::checkString($var, True); - $this->codec = $var; - - return $this; - } - - /** - * The width of the video stream in pixels. - * - * Generated from protobuf field int32 width_pixels = 2; - * @return int - */ - public function getWidthPixels() - { - return $this->width_pixels; - } - - /** - * The width of the video stream in pixels. - * - * Generated from protobuf field int32 width_pixels = 2; - * @param int $var - * @return $this - */ - public function setWidthPixels($var) - { - GPBUtil::checkInt32($var); - $this->width_pixels = $var; - - return $this; - } - - /** - * The height of the video stream in pixels. - * - * Generated from protobuf field int32 height_pixels = 3; - * @return int - */ - public function getHeightPixels() - { - return $this->height_pixels; - } - - /** - * The height of the video stream in pixels. - * - * Generated from protobuf field int32 height_pixels = 3; - * @param int $var - * @return $this - */ - public function setHeightPixels($var) - { - GPBUtil::checkInt32($var); - $this->height_pixels = $var; - - return $this; - } - - /** - * The frame rate of the input video stream. - * - * Generated from protobuf field double frame_rate = 4; - * @return float - */ - public function getFrameRate() - { - return $this->frame_rate; - } - - /** - * The frame rate of the input video stream. - * - * Generated from protobuf field double frame_rate = 4; - * @param float $var - * @return $this - */ - public function setFrameRate($var) - { - GPBUtil::checkDouble($var); - $this->frame_rate = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream.php deleted file mode 100644 index 6213a93235f8..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.video.livestream.v1.VideoStream - */ -class VideoStream extends \Google\Protobuf\Internal\Message -{ - protected $codec_settings; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\LiveStream\V1\VideoStream\H264CodecSettings $h264 - * H264 codec settings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * H264 codec settings. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.VideoStream.H264CodecSettings h264 = 20; - * @return \Google\Cloud\Video\LiveStream\V1\VideoStream\H264CodecSettings|null - */ - public function getH264() - { - return $this->readOneof(20); - } - - public function hasH264() - { - return $this->hasOneof(20); - } - - /** - * H264 codec settings. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.VideoStream.H264CodecSettings h264 = 20; - * @param \Google\Cloud\Video\LiveStream\V1\VideoStream\H264CodecSettings $var - * @return $this - */ - public function setH264($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\VideoStream\H264CodecSettings::class); - $this->writeOneof(20, $var); - - return $this; - } - - /** - * @return string - */ - public function getCodecSettings() - { - return $this->whichOneof("codec_settings"); - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream/H264CodecSettings.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream/H264CodecSettings.php deleted file mode 100644 index e6953375134f..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream/H264CodecSettings.php +++ /dev/null @@ -1,743 +0,0 @@ -google.cloud.video.livestream.v1.VideoStream.H264CodecSettings - */ -class H264CodecSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The width of the video in pixels. Must be an even integer. - * Valid range is [320, 1920]. - * - * Generated from protobuf field int32 width_pixels = 1; - */ - protected $width_pixels = 0; - /** - * Required. The height of the video in pixels. Must be an even integer. - * Valid range is [180, 1080]. - * - * Generated from protobuf field int32 height_pixels = 2; - */ - protected $height_pixels = 0; - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 60. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $frame_rate = 0.0; - /** - * Required. The video bitrate in bits per second. Minimum value is 10,000. - * - For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps). - * - For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps). - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bitrate_bps = 0; - /** - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * - * Generated from protobuf field bool allow_open_gop = 6; - */ - protected $allow_open_gop = false; - /** - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to - * [bitrate_bps][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.bitrate_bps]. - * - * Generated from protobuf field int32 vbv_size_bits = 9; - */ - protected $vbv_size_bits = 0; - /** - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * [vbv_size_bits][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.vbv_size_bits]. - * - * Generated from protobuf field int32 vbv_fullness_bits = 10; - */ - protected $vbv_fullness_bits = 0; - /** - * The entropy coder to use. The default is `cabac`. - * Supported entropy coders: - * - `cavlc` - * - `cabac` - * - * Generated from protobuf field string entropy_coder = 11; - */ - protected $entropy_coder = ''; - /** - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * - * Generated from protobuf field bool b_pyramid = 12; - */ - protected $b_pyramid = false; - /** - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than - * [gop_frame_count][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_frame_count] - * if set. The default is 0. - * - * Generated from protobuf field int32 b_frame_count = 13; - */ - protected $b_frame_count = 0; - /** - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * - * Generated from protobuf field double aq_strength = 14; - */ - protected $aq_strength = 0.0; - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * `baseline` - * * `main` (default) - * * `high` - * The available options are [FFmpeg-compatible Profile - * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Profile). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the - * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] - * message. - * - * Generated from protobuf field string profile = 15; - */ - protected $profile = ''; - /** - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible Encode - * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune) - * Note that certain values for this field may cause the transcoder to - * override other fields you set in the - * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] - * message. - * - * Generated from protobuf field string tune = 16; - */ - protected $tune = ''; - protected $gop_mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $width_pixels - * Required. The width of the video in pixels. Must be an even integer. - * Valid range is [320, 1920]. - * @type int $height_pixels - * Required. The height of the video in pixels. Must be an even integer. - * Valid range is [180, 1080]. - * @type float $frame_rate - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 60. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * @type int $bitrate_bps - * Required. The video bitrate in bits per second. Minimum value is 10,000. - * - For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps). - * - For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps). - * @type bool $allow_open_gop - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * @type int $gop_frame_count - * Select the GOP size based on the specified frame count. - * If GOP frame count is set instead of GOP duration, GOP duration will be - * calculated by `gopFrameCount`/`frameRate`. The calculated GOP duration - * must satisfy the limitations on `gopDuration` as well. - * Valid range is [60, 600]. - * @type \Google\Protobuf\Duration $gop_duration - * Select the GOP size based on the specified duration. The default is - * `2s`. Note that `gopDuration` must be less than or equal to - * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration], - * and - * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration] - * must be divisible by `gopDuration`. Valid range is [2s, 20s]. - * All video streams in the same channel must have the same GOP size. - * @type int $vbv_size_bits - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to - * [bitrate_bps][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.bitrate_bps]. - * @type int $vbv_fullness_bits - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * [vbv_size_bits][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.vbv_size_bits]. - * @type string $entropy_coder - * The entropy coder to use. The default is `cabac`. - * Supported entropy coders: - * - `cavlc` - * - `cabac` - * @type bool $b_pyramid - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * @type int $b_frame_count - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than - * [gop_frame_count][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_frame_count] - * if set. The default is 0. - * @type float $aq_strength - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * @type string $profile - * Enforces the specified codec profile. The following profiles are - * supported: - * * `baseline` - * * `main` (default) - * * `high` - * The available options are [FFmpeg-compatible Profile - * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Profile). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the - * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] - * message. - * @type string $tune - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible Encode - * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune) - * Note that certain values for this field may cause the transcoder to - * override other fields you set in the - * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] - * message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The width of the video in pixels. Must be an even integer. - * Valid range is [320, 1920]. - * - * Generated from protobuf field int32 width_pixels = 1; - * @return int - */ - public function getWidthPixels() - { - return $this->width_pixels; - } - - /** - * Required. The width of the video in pixels. Must be an even integer. - * Valid range is [320, 1920]. - * - * Generated from protobuf field int32 width_pixels = 1; - * @param int $var - * @return $this - */ - public function setWidthPixels($var) - { - GPBUtil::checkInt32($var); - $this->width_pixels = $var; - - return $this; - } - - /** - * Required. The height of the video in pixels. Must be an even integer. - * Valid range is [180, 1080]. - * - * Generated from protobuf field int32 height_pixels = 2; - * @return int - */ - public function getHeightPixels() - { - return $this->height_pixels; - } - - /** - * Required. The height of the video in pixels. Must be an even integer. - * Valid range is [180, 1080]. - * - * Generated from protobuf field int32 height_pixels = 2; - * @param int $var - * @return $this - */ - public function setHeightPixels($var) - { - GPBUtil::checkInt32($var); - $this->height_pixels = $var; - - return $this; - } - - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 60. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return float - */ - public function getFrameRate() - { - return $this->frame_rate; - } - - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 60. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param float $var - * @return $this - */ - public function setFrameRate($var) - { - GPBUtil::checkDouble($var); - $this->frame_rate = $var; - - return $this; - } - - /** - * Required. The video bitrate in bits per second. Minimum value is 10,000. - * - For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps). - * - For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps). - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getBitrateBps() - { - return $this->bitrate_bps; - } - - /** - * Required. The video bitrate in bits per second. Minimum value is 10,000. - * - For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps). - * - For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps). - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setBitrateBps($var) - { - GPBUtil::checkInt32($var); - $this->bitrate_bps = $var; - - return $this; - } - - /** - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * - * Generated from protobuf field bool allow_open_gop = 6; - * @return bool - */ - public function getAllowOpenGop() - { - return $this->allow_open_gop; - } - - /** - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * - * Generated from protobuf field bool allow_open_gop = 6; - * @param bool $var - * @return $this - */ - public function setAllowOpenGop($var) - { - GPBUtil::checkBool($var); - $this->allow_open_gop = $var; - - return $this; - } - - /** - * Select the GOP size based on the specified frame count. - * If GOP frame count is set instead of GOP duration, GOP duration will be - * calculated by `gopFrameCount`/`frameRate`. The calculated GOP duration - * must satisfy the limitations on `gopDuration` as well. - * Valid range is [60, 600]. - * - * Generated from protobuf field int32 gop_frame_count = 7; - * @return int - */ - public function getGopFrameCount() - { - return $this->readOneof(7); - } - - public function hasGopFrameCount() - { - return $this->hasOneof(7); - } - - /** - * Select the GOP size based on the specified frame count. - * If GOP frame count is set instead of GOP duration, GOP duration will be - * calculated by `gopFrameCount`/`frameRate`. The calculated GOP duration - * must satisfy the limitations on `gopDuration` as well. - * Valid range is [60, 600]. - * - * Generated from protobuf field int32 gop_frame_count = 7; - * @param int $var - * @return $this - */ - public function setGopFrameCount($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Select the GOP size based on the specified duration. The default is - * `2s`. Note that `gopDuration` must be less than or equal to - * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration], - * and - * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration] - * must be divisible by `gopDuration`. Valid range is [2s, 20s]. - * All video streams in the same channel must have the same GOP size. - * - * Generated from protobuf field .google.protobuf.Duration gop_duration = 8; - * @return \Google\Protobuf\Duration|null - */ - public function getGopDuration() - { - return $this->readOneof(8); - } - - public function hasGopDuration() - { - return $this->hasOneof(8); - } - - /** - * Select the GOP size based on the specified duration. The default is - * `2s`. Note that `gopDuration` must be less than or equal to - * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration], - * and - * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration] - * must be divisible by `gopDuration`. Valid range is [2s, 20s]. - * All video streams in the same channel must have the same GOP size. - * - * Generated from protobuf field .google.protobuf.Duration gop_duration = 8; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setGopDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to - * [bitrate_bps][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.bitrate_bps]. - * - * Generated from protobuf field int32 vbv_size_bits = 9; - * @return int - */ - public function getVbvSizeBits() - { - return $this->vbv_size_bits; - } - - /** - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to - * [bitrate_bps][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.bitrate_bps]. - * - * Generated from protobuf field int32 vbv_size_bits = 9; - * @param int $var - * @return $this - */ - public function setVbvSizeBits($var) - { - GPBUtil::checkInt32($var); - $this->vbv_size_bits = $var; - - return $this; - } - - /** - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * [vbv_size_bits][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.vbv_size_bits]. - * - * Generated from protobuf field int32 vbv_fullness_bits = 10; - * @return int - */ - public function getVbvFullnessBits() - { - return $this->vbv_fullness_bits; - } - - /** - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * [vbv_size_bits][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.vbv_size_bits]. - * - * Generated from protobuf field int32 vbv_fullness_bits = 10; - * @param int $var - * @return $this - */ - public function setVbvFullnessBits($var) - { - GPBUtil::checkInt32($var); - $this->vbv_fullness_bits = $var; - - return $this; - } - - /** - * The entropy coder to use. The default is `cabac`. - * Supported entropy coders: - * - `cavlc` - * - `cabac` - * - * Generated from protobuf field string entropy_coder = 11; - * @return string - */ - public function getEntropyCoder() - { - return $this->entropy_coder; - } - - /** - * The entropy coder to use. The default is `cabac`. - * Supported entropy coders: - * - `cavlc` - * - `cabac` - * - * Generated from protobuf field string entropy_coder = 11; - * @param string $var - * @return $this - */ - public function setEntropyCoder($var) - { - GPBUtil::checkString($var, True); - $this->entropy_coder = $var; - - return $this; - } - - /** - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * - * Generated from protobuf field bool b_pyramid = 12; - * @return bool - */ - public function getBPyramid() - { - return $this->b_pyramid; - } - - /** - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * - * Generated from protobuf field bool b_pyramid = 12; - * @param bool $var - * @return $this - */ - public function setBPyramid($var) - { - GPBUtil::checkBool($var); - $this->b_pyramid = $var; - - return $this; - } - - /** - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than - * [gop_frame_count][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_frame_count] - * if set. The default is 0. - * - * Generated from protobuf field int32 b_frame_count = 13; - * @return int - */ - public function getBFrameCount() - { - return $this->b_frame_count; - } - - /** - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than - * [gop_frame_count][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_frame_count] - * if set. The default is 0. - * - * Generated from protobuf field int32 b_frame_count = 13; - * @param int $var - * @return $this - */ - public function setBFrameCount($var) - { - GPBUtil::checkInt32($var); - $this->b_frame_count = $var; - - return $this; - } - - /** - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * - * Generated from protobuf field double aq_strength = 14; - * @return float - */ - public function getAqStrength() - { - return $this->aq_strength; - } - - /** - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * - * Generated from protobuf field double aq_strength = 14; - * @param float $var - * @return $this - */ - public function setAqStrength($var) - { - GPBUtil::checkDouble($var); - $this->aq_strength = $var; - - return $this; - } - - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * `baseline` - * * `main` (default) - * * `high` - * The available options are [FFmpeg-compatible Profile - * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Profile). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the - * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] - * message. - * - * Generated from protobuf field string profile = 15; - * @return string - */ - public function getProfile() - { - return $this->profile; - } - - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * `baseline` - * * `main` (default) - * * `high` - * The available options are [FFmpeg-compatible Profile - * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Profile). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the - * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] - * message. - * - * Generated from protobuf field string profile = 15; - * @param string $var - * @return $this - */ - public function setProfile($var) - { - GPBUtil::checkString($var, True); - $this->profile = $var; - - return $this; - } - - /** - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible Encode - * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune) - * Note that certain values for this field may cause the transcoder to - * override other fields you set in the - * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] - * message. - * - * Generated from protobuf field string tune = 16; - * @return string - */ - public function getTune() - { - return $this->tune; - } - - /** - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible Encode - * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune) - * Note that certain values for this field may cause the transcoder to - * override other fields you set in the - * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] - * message. - * - * Generated from protobuf field string tune = 16; - * @param string $var - * @return $this - */ - public function setTune($var) - { - GPBUtil::checkString($var, True); - $this->tune = $var; - - return $this; - } - - /** - * @return string - */ - public function getGopMode() - { - return $this->whichOneof("gop_mode"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(H264CodecSettings::class, \Google\Cloud\Video\LiveStream\V1\VideoStream_H264CodecSettings::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStreamProperty.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStreamProperty.php deleted file mode 100644 index ffda21dceb46..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStreamProperty.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.video.livestream.v1.VideoStreamProperty - */ -class VideoStreamProperty extends \Google\Protobuf\Internal\Message -{ - /** - * Index of this video stream. - * - * Generated from protobuf field int32 index = 1; - */ - protected $index = 0; - /** - * Properties of the video format. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.VideoFormat video_format = 2; - */ - protected $video_format = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $index - * Index of this video stream. - * @type \Google\Cloud\Video\LiveStream\V1\VideoFormat $video_format - * Properties of the video format. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Index of this video stream. - * - * Generated from protobuf field int32 index = 1; - * @return int - */ - public function getIndex() - { - return $this->index; - } - - /** - * Index of this video stream. - * - * Generated from protobuf field int32 index = 1; - * @param int $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt32($var); - $this->index = $var; - - return $this; - } - - /** - * Properties of the video format. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.VideoFormat video_format = 2; - * @return \Google\Cloud\Video\LiveStream\V1\VideoFormat|null - */ - public function getVideoFormat() - { - return $this->video_format; - } - - public function hasVideoFormat() - { - return isset($this->video_format); - } - - public function clearVideoFormat() - { - unset($this->video_format); - } - - /** - * Properties of the video format. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.VideoFormat video_format = 2; - * @param \Google\Cloud\Video\LiveStream\V1\VideoFormat $var - * @return $this - */ - public function setVideoFormat($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\VideoFormat::class); - $this->video_format = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_channel.php deleted file mode 100644 index a81cd8279bf6..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_channel.php +++ /dev/null @@ -1,95 +0,0 @@ -setOutput($channelOutput); - $request = (new CreateChannelRequest()) - ->setParent($formattedParent) - ->setChannel($channel) - ->setChannelId($channelId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $livestreamServiceClient->createChannel($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Channel $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $channelId = '[CHANNEL_ID]'; - - create_channel_sample($formattedParent, $channelId); -} -// [END livestream_v1_generated_LivestreamService_CreateChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_event.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_event.php deleted file mode 100644 index 0dcda1a55299..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_event.php +++ /dev/null @@ -1,82 +0,0 @@ -setInputSwitch($eventInputSwitch); - $request = (new CreateEventRequest()) - ->setParent($formattedParent) - ->setEvent($event) - ->setEventId($eventId); - - // Call the API and handle any network failures. - try { - /** @var Event $response */ - $response = $livestreamServiceClient->createEvent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $eventId = '[EVENT_ID]'; - - create_event_sample($formattedParent, $eventId); -} -// [END livestream_v1_generated_LivestreamService_CreateEvent_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_input.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_input.php deleted file mode 100644 index 76b3f317620b..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_input.php +++ /dev/null @@ -1,91 +0,0 @@ -setParent($formattedParent) - ->setInput($input) - ->setInputId($inputId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $livestreamServiceClient->createInput($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Input $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $inputId = '[INPUT_ID]'; - - create_input_sample($formattedParent, $inputId); -} -// [END livestream_v1_generated_LivestreamService_CreateInput_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_channel.php deleted file mode 100644 index ce3c080fb1b6..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_channel.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $livestreamServiceClient->deleteChannel($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - - delete_channel_sample($formattedName); -} -// [END livestream_v1_generated_LivestreamService_DeleteChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_event.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_event.php deleted file mode 100644 index bce176bc9ff8..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_event.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $livestreamServiceClient->deleteEvent($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = LivestreamServiceClient::eventName( - '[PROJECT]', - '[LOCATION]', - '[CHANNEL]', - '[EVENT]' - ); - - delete_event_sample($formattedName); -} -// [END livestream_v1_generated_LivestreamService_DeleteEvent_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_input.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_input.php deleted file mode 100644 index a5029ab1224f..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_input.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $livestreamServiceClient->deleteInput($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = LivestreamServiceClient::inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); - - delete_input_sample($formattedName); -} -// [END livestream_v1_generated_LivestreamService_DeleteInput_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_channel.php deleted file mode 100644 index f0c8beb1fbd7..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_channel.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Channel $response */ - $response = $livestreamServiceClient->getChannel($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - - get_channel_sample($formattedName); -} -// [END livestream_v1_generated_LivestreamService_GetChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_event.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_event.php deleted file mode 100644 index 0f5e7832fd48..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_event.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Event $response */ - $response = $livestreamServiceClient->getEvent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = LivestreamServiceClient::eventName( - '[PROJECT]', - '[LOCATION]', - '[CHANNEL]', - '[EVENT]' - ); - - get_event_sample($formattedName); -} -// [END livestream_v1_generated_LivestreamService_GetEvent_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_input.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_input.php deleted file mode 100644 index 96aa5edc1d63..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_input.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Input $response */ - $response = $livestreamServiceClient->getInput($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = LivestreamServiceClient::inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); - - get_input_sample($formattedName); -} -// [END livestream_v1_generated_LivestreamService_GetInput_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_location.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_location.php deleted file mode 100644 index a3b885a9de6b..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END livestream_v1_generated_LivestreamService_GetLocation_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_channels.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_channels.php deleted file mode 100644 index 0e245efa793c..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_channels.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $livestreamServiceClient->listChannels($request); - - /** @var Channel $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_channels_sample($formattedParent); -} -// [END livestream_v1_generated_LivestreamService_ListChannels_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_events.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_events.php deleted file mode 100644 index 3ed4ef0e8b55..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_events.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $livestreamServiceClient->listEvents($request); - - /** @var Event $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - - list_events_sample($formattedParent); -} -// [END livestream_v1_generated_LivestreamService_ListEvents_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_inputs.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_inputs.php deleted file mode 100644 index 220a9285895e..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_inputs.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $livestreamServiceClient->listInputs($request); - - /** @var Input $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_inputs_sample($formattedParent); -} -// [END livestream_v1_generated_LivestreamService_ListInputs_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_locations.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_locations.php deleted file mode 100644 index 5a16f54d9602..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END livestream_v1_generated_LivestreamService_ListLocations_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/start_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/start_channel.php deleted file mode 100644 index 71dcf4e87b24..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/start_channel.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $livestreamServiceClient->startChannel($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ChannelOperationResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - - start_channel_sample($formattedName); -} -// [END livestream_v1_generated_LivestreamService_StartChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/stop_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/stop_channel.php deleted file mode 100644 index 37ece3009599..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/stop_channel.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $livestreamServiceClient->stopChannel($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ChannelOperationResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - - stop_channel_sample($formattedName); -} -// [END livestream_v1_generated_LivestreamService_StopChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_channel.php deleted file mode 100644 index 0b24a725f7f0..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_channel.php +++ /dev/null @@ -1,74 +0,0 @@ -setOutput($channelOutput); - $request = (new UpdateChannelRequest()) - ->setChannel($channel); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $livestreamServiceClient->updateChannel($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Channel $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END livestream_v1_generated_LivestreamService_UpdateChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_input.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_input.php deleted file mode 100644 index 4aa8d72bf935..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_input.php +++ /dev/null @@ -1,71 +0,0 @@ -setInput($input); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $livestreamServiceClient->updateInput($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Input $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END livestream_v1_generated_LivestreamService_UpdateInput_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/src/V1/Client/BaseClient/LivestreamServiceBaseClient.php b/owl-bot-staging/VideoLiveStream/v1/src/V1/Client/BaseClient/LivestreamServiceBaseClient.php deleted file mode 100644 index 5db98580b409..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/src/V1/Client/BaseClient/LivestreamServiceBaseClient.php +++ /dev/null @@ -1,802 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/livestream_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/livestream_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/livestream_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/livestream_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a channel - * resource. - * - * @param string $project - * @param string $location - * @param string $channel - * - * @return string The formatted channel resource. - */ - public static function channelName(string $project, string $location, string $channel): string - { - return self::getPathTemplate('channel')->render([ - 'project' => $project, - 'location' => $location, - 'channel' => $channel, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a event - * resource. - * - * @param string $project - * @param string $location - * @param string $channel - * @param string $event - * - * @return string The formatted event resource. - */ - public static function eventName(string $project, string $location, string $channel, string $event): string - { - return self::getPathTemplate('event')->render([ - 'project' => $project, - 'location' => $location, - 'channel' => $channel, - 'event' => $event, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a input - * resource. - * - * @param string $project - * @param string $location - * @param string $input - * - * @return string The formatted input resource. - */ - public static function inputName(string $project, string $location, string $input): string - { - return self::getPathTemplate('input')->render([ - 'project' => $project, - 'location' => $location, - 'input' => $input, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * secret_version resource. - * - * @param string $project - * @param string $secret - * @param string $version - * - * @return string The formatted secret_version resource. - */ - public static function secretVersionName(string $project, string $secret, string $version): string - { - return self::getPathTemplate('secretVersion')->render([ - 'project' => $project, - 'secret' => $secret, - 'version' => $version, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - channel: projects/{project}/locations/{location}/channels/{channel} - * - event: projects/{project}/locations/{location}/channels/{channel}/events/{event} - * - input: projects/{project}/locations/{location}/inputs/{input} - * - location: projects/{project}/locations/{location} - * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'livestream.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a channel with the provided unique ID in the specified - * region. - * - * The async variant is {@see self::createChannelAsync()} . - * - * @param CreateChannelRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createChannel(CreateChannelRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateChannel', $request, $callOptions)->wait(); - } - - /** - * Creates an event with the provided unique ID in the specified channel. - * - * The async variant is {@see self::createEventAsync()} . - * - * @param CreateEventRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Event - * - * @throws ApiException Thrown if the API call fails. - */ - public function createEvent(CreateEventRequest $request, array $callOptions = []): Event - { - return $this->startApiCall('CreateEvent', $request, $callOptions)->wait(); - } - - /** - * Creates an input with the provided unique ID in the specified region. - * - * The async variant is {@see self::createInputAsync()} . - * - * @param CreateInputRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createInput(CreateInputRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateInput', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified channel. - * - * The async variant is {@see self::deleteChannelAsync()} . - * - * @param DeleteChannelRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteChannel(DeleteChannelRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteChannel', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified event. - * - * The async variant is {@see self::deleteEventAsync()} . - * - * @param DeleteEventRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteEvent(DeleteEventRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteEvent', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified input. - * - * The async variant is {@see self::deleteInputAsync()} . - * - * @param DeleteInputRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteInput(DeleteInputRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteInput', $request, $callOptions)->wait(); - } - - /** - * Returns the specified channel. - * - * The async variant is {@see self::getChannelAsync()} . - * - * @param GetChannelRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Channel - * - * @throws ApiException Thrown if the API call fails. - */ - public function getChannel(GetChannelRequest $request, array $callOptions = []): Channel - { - return $this->startApiCall('GetChannel', $request, $callOptions)->wait(); - } - - /** - * Returns the specified event. - * - * The async variant is {@see self::getEventAsync()} . - * - * @param GetEventRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Event - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEvent(GetEventRequest $request, array $callOptions = []): Event - { - return $this->startApiCall('GetEvent', $request, $callOptions)->wait(); - } - - /** - * Returns the specified input. - * - * The async variant is {@see self::getInputAsync()} . - * - * @param GetInputRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Input - * - * @throws ApiException Thrown if the API call fails. - */ - public function getInput(GetInputRequest $request, array $callOptions = []): Input - { - return $this->startApiCall('GetInput', $request, $callOptions)->wait(); - } - - /** - * Returns a list of all channels in the specified region. - * - * The async variant is {@see self::listChannelsAsync()} . - * - * @param ListChannelsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listChannels(ListChannelsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListChannels', $request, $callOptions); - } - - /** - * Returns a list of all events in the specified channel. - * - * The async variant is {@see self::listEventsAsync()} . - * - * @param ListEventsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listEvents(ListEventsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEvents', $request, $callOptions); - } - - /** - * Returns a list of all inputs in the specified region. - * - * The async variant is {@see self::listInputsAsync()} . - * - * @param ListInputsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listInputs(ListInputsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListInputs', $request, $callOptions); - } - - /** - * Starts the specified channel. Part of the video pipeline will be created - * only when the StartChannel request is received by the server. - * - * The async variant is {@see self::startChannelAsync()} . - * - * @param StartChannelRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function startChannel(StartChannelRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('StartChannel', $request, $callOptions)->wait(); - } - - /** - * Stops the specified channel. Part of the video pipeline will be released - * when the StopChannel request is received by the server. - * - * The async variant is {@see self::stopChannelAsync()} . - * - * @param StopChannelRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function stopChannel(StopChannelRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('StopChannel', $request, $callOptions)->wait(); - } - - /** - * Updates the specified channel. - * - * The async variant is {@see self::updateChannelAsync()} . - * - * @param UpdateChannelRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateChannel(UpdateChannelRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateChannel', $request, $callOptions)->wait(); - } - - /** - * Updates the specified input. - * - * The async variant is {@see self::updateInputAsync()} . - * - * @param UpdateInputRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateInput(UpdateInputRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateInput', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see self::getLocationAsync()} . - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see self::listLocationsAsync()} . - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/VideoLiveStream/v1/src/V1/Client/LivestreamServiceClient.php b/owl-bot-staging/VideoLiveStream/v1/src/V1/Client/LivestreamServiceClient.php deleted file mode 100644 index 055a92e9d6ce..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/src/V1/Client/LivestreamServiceClient.php +++ /dev/null @@ -1,40 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $channel = new Channel(); - * $channelId = 'channel_id'; - * $operationResponse = $livestreamServiceClient->createChannel($formattedParent, $channel, $channelId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $livestreamServiceClient->createChannel($formattedParent, $channel, $channelId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $livestreamServiceClient->resumeOperation($operationName, 'createChannel'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $livestreamServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - */ -class LivestreamServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.video.livestream.v1.LivestreamService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'livestream.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $channelNameTemplate; - - private static $eventNameTemplate; - - private static $inputNameTemplate; - - private static $locationNameTemplate; - - private static $secretVersionNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/livestream_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/livestream_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/livestream_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/livestream_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getChannelNameTemplate() - { - if (self::$channelNameTemplate == null) { - self::$channelNameTemplate = new PathTemplate('projects/{project}/locations/{location}/channels/{channel}'); - } - - return self::$channelNameTemplate; - } - - private static function getEventNameTemplate() - { - if (self::$eventNameTemplate == null) { - self::$eventNameTemplate = new PathTemplate('projects/{project}/locations/{location}/channels/{channel}/events/{event}'); - } - - return self::$eventNameTemplate; - } - - private static function getInputNameTemplate() - { - if (self::$inputNameTemplate == null) { - self::$inputNameTemplate = new PathTemplate('projects/{project}/locations/{location}/inputs/{input}'); - } - - return self::$inputNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getSecretVersionNameTemplate() - { - if (self::$secretVersionNameTemplate == null) { - self::$secretVersionNameTemplate = new PathTemplate('projects/{project}/secrets/{secret}/versions/{version}'); - } - - return self::$secretVersionNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'channel' => self::getChannelNameTemplate(), - 'event' => self::getEventNameTemplate(), - 'input' => self::getInputNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'secretVersion' => self::getSecretVersionNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a channel - * resource. - * - * @param string $project - * @param string $location - * @param string $channel - * - * @return string The formatted channel resource. - */ - public static function channelName($project, $location, $channel) - { - return self::getChannelNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'channel' => $channel, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a event - * resource. - * - * @param string $project - * @param string $location - * @param string $channel - * @param string $event - * - * @return string The formatted event resource. - */ - public static function eventName($project, $location, $channel, $event) - { - return self::getEventNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'channel' => $channel, - 'event' => $event, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a input - * resource. - * - * @param string $project - * @param string $location - * @param string $input - * - * @return string The formatted input resource. - */ - public static function inputName($project, $location, $input) - { - return self::getInputNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'input' => $input, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * secret_version resource. - * - * @param string $project - * @param string $secret - * @param string $version - * - * @return string The formatted secret_version resource. - */ - public static function secretVersionName($project, $secret, $version) - { - return self::getSecretVersionNameTemplate()->render([ - 'project' => $project, - 'secret' => $secret, - 'version' => $version, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - channel: projects/{project}/locations/{location}/channels/{channel} - * - event: projects/{project}/locations/{location}/channels/{channel}/events/{event} - * - input: projects/{project}/locations/{location}/inputs/{input} - * - location: projects/{project}/locations/{location} - * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'livestream.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a channel with the provided unique ID in the specified - * region. - * - * Sample code: - * ``` - * $livestreamServiceClient = new LivestreamServiceClient(); - * try { - * $formattedParent = $livestreamServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $channel = new Channel(); - * $channelId = 'channel_id'; - * $operationResponse = $livestreamServiceClient->createChannel($formattedParent, $channel, $channelId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $livestreamServiceClient->createChannel($formattedParent, $channel, $channelId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $livestreamServiceClient->resumeOperation($operationName, 'createChannel'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $livestreamServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * @param Channel $channel Required. The channel resource to be created. - * @param string $channelId Required. The ID of the channel resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createChannel($parent, $channel, $channelId, array $optionalArgs = []) - { - $request = new CreateChannelRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setChannel($channel); - $request->setChannelId($channelId); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateChannel', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates an event with the provided unique ID in the specified channel. - * - * Sample code: - * ``` - * $livestreamServiceClient = new LivestreamServiceClient(); - * try { - * $formattedParent = $livestreamServiceClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - * $event = new Event(); - * $eventId = 'event_id'; - * $response = $livestreamServiceClient->createEvent($formattedParent, $event, $eventId); - * } finally { - * $livestreamServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent channel for the resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * @param Event $event Required. The event resource to be created. - * @param string $eventId Required. The ID of the event resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Video\LiveStream\V1\Event - * - * @throws ApiException if the remote call fails - */ - public function createEvent($parent, $event, $eventId, array $optionalArgs = []) - { - $request = new CreateEventRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setEvent($event); - $request->setEventId($eventId); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateEvent', Event::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates an input with the provided unique ID in the specified region. - * - * Sample code: - * ``` - * $livestreamServiceClient = new LivestreamServiceClient(); - * try { - * $formattedParent = $livestreamServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $input = new Input(); - * $inputId = 'input_id'; - * $operationResponse = $livestreamServiceClient->createInput($formattedParent, $input, $inputId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $livestreamServiceClient->createInput($formattedParent, $input, $inputId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $livestreamServiceClient->resumeOperation($operationName, 'createInput'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $livestreamServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * @param Input $input Required. The input resource to be created. - * @param string $inputId Required. The ID of the input resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createInput($parent, $input, $inputId, array $optionalArgs = []) - { - $request = new CreateInputRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setInput($input); - $request->setInputId($inputId); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateInput', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes the specified channel. - * - * Sample code: - * ``` - * $livestreamServiceClient = new LivestreamServiceClient(); - * try { - * $formattedName = $livestreamServiceClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - * $operationResponse = $livestreamServiceClient->deleteChannel($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $livestreamServiceClient->deleteChannel($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $livestreamServiceClient->resumeOperation($operationName, 'deleteChannel'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $livestreamServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * @type bool $force - * If the `force` field is set to the default value of `false`, you must - * delete all of a channel's events before you can delete the channel itself. - * If the field is set to `true`, requests to delete a channel also delete - * associated channel events. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteChannel($name, array $optionalArgs = []) - { - $request = new DeleteChannelRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - if (isset($optionalArgs['force'])) { - $request->setForce($optionalArgs['force']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteChannel', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes the specified event. - * - * Sample code: - * ``` - * $livestreamServiceClient = new LivestreamServiceClient(); - * try { - * $formattedName = $livestreamServiceClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[EVENT]'); - * $livestreamServiceClient->deleteEvent($formattedName); - * } finally { - * $livestreamServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the event resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteEvent($name, array $optionalArgs = []) - { - $request = new DeleteEventRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteEvent', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes the specified input. - * - * Sample code: - * ``` - * $livestreamServiceClient = new LivestreamServiceClient(); - * try { - * $formattedName = $livestreamServiceClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); - * $operationResponse = $livestreamServiceClient->deleteInput($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $livestreamServiceClient->deleteInput($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $livestreamServiceClient->resumeOperation($operationName, 'deleteInput'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $livestreamServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the input resource, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteInput($name, array $optionalArgs = []) - { - $request = new DeleteInputRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteInput', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Returns the specified channel. - * - * Sample code: - * ``` - * $livestreamServiceClient = new LivestreamServiceClient(); - * try { - * $formattedName = $livestreamServiceClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - * $response = $livestreamServiceClient->getChannel($formattedName); - * } finally { - * $livestreamServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Video\LiveStream\V1\Channel - * - * @throws ApiException if the remote call fails - */ - public function getChannel($name, array $optionalArgs = []) - { - $request = new GetChannelRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetChannel', Channel::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the specified event. - * - * Sample code: - * ``` - * $livestreamServiceClient = new LivestreamServiceClient(); - * try { - * $formattedName = $livestreamServiceClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[EVENT]'); - * $response = $livestreamServiceClient->getEvent($formattedName); - * } finally { - * $livestreamServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the event resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Video\LiveStream\V1\Event - * - * @throws ApiException if the remote call fails - */ - public function getEvent($name, array $optionalArgs = []) - { - $request = new GetEventRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetEvent', Event::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the specified input. - * - * Sample code: - * ``` - * $livestreamServiceClient = new LivestreamServiceClient(); - * try { - * $formattedName = $livestreamServiceClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); - * $response = $livestreamServiceClient->getInput($formattedName); - * } finally { - * $livestreamServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the input resource, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Video\LiveStream\V1\Input - * - * @throws ApiException if the remote call fails - */ - public function getInput($name, array $optionalArgs = []) - { - $request = new GetInputRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetInput', Input::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns a list of all channels in the specified region. - * - * Sample code: - * ``` - * $livestreamServiceClient = new LivestreamServiceClient(); - * try { - * $formattedParent = $livestreamServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $livestreamServiceClient->listChannels($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $livestreamServiceClient->listChannels($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $livestreamServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * The filter to apply to list results. - * @type string $orderBy - * Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listChannels($parent, array $optionalArgs = []) - { - $request = new ListChannelsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListChannels', $optionalArgs, ListChannelsResponse::class, $request); - } - - /** - * Returns a list of all events in the specified channel. - * - * Sample code: - * ``` - * $livestreamServiceClient = new LivestreamServiceClient(); - * try { - * $formattedParent = $livestreamServiceClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - * // Iterate over pages of elements - * $pagedResponse = $livestreamServiceClient->listEvents($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $livestreamServiceClient->listEvents($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $livestreamServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent channel for the resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * The filter to apply to list results. - * @type string $orderBy - * Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listEvents($parent, array $optionalArgs = []) - { - $request = new ListEventsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListEvents', $optionalArgs, ListEventsResponse::class, $request); - } - - /** - * Returns a list of all inputs in the specified region. - * - * Sample code: - * ``` - * $livestreamServiceClient = new LivestreamServiceClient(); - * try { - * $formattedParent = $livestreamServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $livestreamServiceClient->listInputs($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $livestreamServiceClient->listInputs($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $livestreamServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * The filter to apply to list results. - * @type string $orderBy - * Specifies the ordering of results following syntax at [Sorting - * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listInputs($parent, array $optionalArgs = []) - { - $request = new ListInputsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListInputs', $optionalArgs, ListInputsResponse::class, $request); - } - - /** - * Starts the specified channel. Part of the video pipeline will be created - * only when the StartChannel request is received by the server. - * - * Sample code: - * ``` - * $livestreamServiceClient = new LivestreamServiceClient(); - * try { - * $formattedName = $livestreamServiceClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - * $operationResponse = $livestreamServiceClient->startChannel($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $livestreamServiceClient->startChannel($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $livestreamServiceClient->resumeOperation($operationName, 'startChannel'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $livestreamServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function startChannel($name, array $optionalArgs = []) - { - $request = new StartChannelRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('StartChannel', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Stops the specified channel. Part of the video pipeline will be released - * when the StopChannel request is received by the server. - * - * Sample code: - * ``` - * $livestreamServiceClient = new LivestreamServiceClient(); - * try { - * $formattedName = $livestreamServiceClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - * $operationResponse = $livestreamServiceClient->stopChannel($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $livestreamServiceClient->stopChannel($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $livestreamServiceClient->resumeOperation($operationName, 'stopChannel'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $livestreamServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function stopChannel($name, array $optionalArgs = []) - { - $request = new StopChannelRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('StopChannel', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates the specified channel. - * - * Sample code: - * ``` - * $livestreamServiceClient = new LivestreamServiceClient(); - * try { - * $channel = new Channel(); - * $operationResponse = $livestreamServiceClient->updateChannel($channel); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $livestreamServiceClient->updateChannel($channel); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $livestreamServiceClient->resumeOperation($operationName, 'updateChannel'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $livestreamServiceClient->close(); - * } - * ``` - * - * @param Channel $channel Required. The channel resource to be updated. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Field mask is used to specify the fields to be overwritten in the Channel - * resource by the update. You can only update the following fields: - * - * * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) - * * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) - * * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) - * * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) - * * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) - * * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) - * * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) - * * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) - * * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) - * * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) - * - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. - * - * If the mask is not present, then each field from the list above is updated - * if the field appears in the request payload. To unset a field, add the - * field to the update mask and remove it from the request payload. - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateChannel($channel, array $optionalArgs = []) - { - $request = new UpdateChannelRequest(); - $requestParamHeaders = []; - $request->setChannel($channel); - $requestParamHeaders['channel.name'] = $channel->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateChannel', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates the specified input. - * - * Sample code: - * ``` - * $livestreamServiceClient = new LivestreamServiceClient(); - * try { - * $input = new Input(); - * $operationResponse = $livestreamServiceClient->updateInput($input); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $livestreamServiceClient->updateInput($input); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $livestreamServiceClient->resumeOperation($operationName, 'updateInput'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $livestreamServiceClient->close(); - * } - * ``` - * - * @param Input $input Required. The input resource to be updated. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Field mask is used to specify the fields to be overwritten in the Input - * resource by the update. You can only update the following fields: - * - * * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) - * * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) - * - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. - * - * If the mask is not present, then each field from the list above is updated - * if the field appears in the request payload. To unset a field, add the - * field to the update mask and remove it from the request payload. - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateInput($input, array $optionalArgs = []) - { - $request = new UpdateInputRequest(); - $requestParamHeaders = []; - $request->setInput($input); - $requestParamHeaders['input.name'] = $input->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateInput', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $livestreamServiceClient = new LivestreamServiceClient(); - * try { - * $response = $livestreamServiceClient->getLocation(); - * } finally { - * $livestreamServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $livestreamServiceClient = new LivestreamServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $livestreamServiceClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $livestreamServiceClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $livestreamServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/VideoLiveStream/v1/src/V1/LivestreamServiceClient.php b/owl-bot-staging/VideoLiveStream/v1/src/V1/LivestreamServiceClient.php deleted file mode 100644 index e3f2c3cf351d..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/src/V1/LivestreamServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.video.livestream.v1.LivestreamService' => [ - 'CreateChannel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\Channel', - 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateInput' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\Input', - 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteChannel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteInput' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'StartChannel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\ChannelOperationResponse', - 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'StopChannel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\ChannelOperationResponse', - 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateChannel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\Channel', - 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'channel.name', - 'fieldAccessors' => [ - 'getChannel', - 'getName', - ], - ], - ], - ], - 'UpdateInput' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\Input', - 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'input.name', - 'fieldAccessors' => [ - 'getInput', - 'getName', - ], - ], - ], - ], - 'CreateEvent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\LiveStream\V1\Event', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteEvent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetChannel' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\LiveStream\V1\Channel', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEvent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\LiveStream\V1\Event', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetInput' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\LiveStream\V1\Input', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListChannels' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getChannels', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\LiveStream\V1\ListChannelsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListEvents' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEvents', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\LiveStream\V1\ListEventsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListInputs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getInputs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\LiveStream\V1\ListInputsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'channel' => 'projects/{project}/locations/{location}/channels/{channel}', - 'event' => 'projects/{project}/locations/{location}/channels/{channel}/events/{event}', - 'input' => 'projects/{project}/locations/{location}/inputs/{input}', - 'location' => 'projects/{project}/locations/{location}', - 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{version}', - ], - ], - ], -]; diff --git a/owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_rest_client_config.php b/owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_rest_client_config.php deleted file mode 100644 index 17b5bb70d3f5..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_rest_client_config.php +++ /dev/null @@ -1,274 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.video.livestream.v1.LivestreamService' => [ - 'CreateChannel' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/channels', - 'body' => 'channel', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'channel_id', - ], - ], - 'CreateEvent' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/channels/*}/events', - 'body' => 'event', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'event_id', - ], - ], - 'CreateInput' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/inputs', - 'body' => 'input', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'input_id', - ], - ], - 'DeleteChannel' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteEvent' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*/events/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteInput' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/inputs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetChannel' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEvent' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*/events/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetInput' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/inputs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListChannels' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/channels', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListEvents' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/channels/*}/events', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListInputs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/inputs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'StartChannel' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*}:start', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'StopChannel' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*}:stop', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateChannel' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{channel.name=projects/*/locations/*/channels/*}', - 'body' => 'channel', - 'placeholders' => [ - 'channel.name' => [ - 'getters' => [ - 'getChannel', - 'getName', - ], - ], - ], - ], - 'UpdateInput' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{input.name=projects/*/locations/*/inputs/*}', - 'body' => 'input', - 'placeholders' => [ - 'input.name' => [ - 'getters' => [ - 'getInput', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/VideoLiveStream/v1/tests/Unit/V1/Client/LivestreamServiceClientTest.php b/owl-bot-staging/VideoLiveStream/v1/tests/Unit/V1/Client/LivestreamServiceClientTest.php deleted file mode 100644 index 1d5c31b5f615..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/tests/Unit/V1/Client/LivestreamServiceClientTest.php +++ /dev/null @@ -1,1869 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return LivestreamServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new LivestreamServiceClient($options); - } - - /** @test */ - public function createChannelTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $activeInput = 'activeInput1758551377'; - $expectedResponse = new Channel(); - $expectedResponse->setName($name); - $expectedResponse->setActiveInput($activeInput); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createChannelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $channel = new Channel(); - $channelOutput = new Output(); - $channel->setOutput($channelOutput); - $channelId = 'channelId-1930808873'; - $request = (new CreateChannelRequest()) - ->setParent($formattedParent) - ->setChannel($channel) - ->setChannelId($channelId); - $response = $gapicClient->createChannel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/CreateChannel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getChannel(); - $this->assertProtobufEquals($channel, $actualValue); - $actualValue = $actualApiRequestObject->getChannelId(); - $this->assertProtobufEquals($channelId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createChannelTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createChannelExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $channel = new Channel(); - $channelOutput = new Output(); - $channel->setOutput($channelOutput); - $channelId = 'channelId-1930808873'; - $request = (new CreateChannelRequest()) - ->setParent($formattedParent) - ->setChannel($channel) - ->setChannelId($channelId); - $response = $gapicClient->createChannel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createChannelTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $executeNow = true; - $expectedResponse = new Event(); - $expectedResponse->setName($name); - $expectedResponse->setExecuteNow($executeNow); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $event = new Event(); - $eventInputSwitch = new InputSwitchTask(); - $event->setInputSwitch($eventInputSwitch); - $eventId = 'eventId278118624'; - $request = (new CreateEventRequest()) - ->setParent($formattedParent) - ->setEvent($event) - ->setEventId($eventId); - $response = $gapicClient->createEvent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/CreateEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEvent(); - $this->assertProtobufEquals($event, $actualValue); - $actualValue = $actualRequestObject->getEventId(); - $this->assertProtobufEquals($eventId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $event = new Event(); - $eventInputSwitch = new InputSwitchTask(); - $event->setInputSwitch($eventInputSwitch); - $eventId = 'eventId278118624'; - $request = (new CreateEventRequest()) - ->setParent($formattedParent) - ->setEvent($event) - ->setEventId($eventId); - try { - $gapicClient->createEvent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createInputTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createInputTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uri = 'uri116076'; - $expectedResponse = new Input(); - $expectedResponse->setName($name); - $expectedResponse->setUri($uri); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createInputTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $input = new Input(); - $inputId = 'inputId470715824'; - $request = (new CreateInputRequest()) - ->setParent($formattedParent) - ->setInput($input) - ->setInputId($inputId); - $response = $gapicClient->createInput($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/CreateInput', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getInput(); - $this->assertProtobufEquals($input, $actualValue); - $actualValue = $actualApiRequestObject->getInputId(); - $this->assertProtobufEquals($inputId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInputTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createInputExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createInputTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $input = new Input(); - $inputId = 'inputId470715824'; - $request = (new CreateInputRequest()) - ->setParent($formattedParent) - ->setInput($input) - ->setInputId($inputId); - $response = $gapicClient->createInput($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInputTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteChannelTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteChannelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $request = (new DeleteChannelRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteChannel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/DeleteChannel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteChannelTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteChannelExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $request = (new DeleteChannelRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteChannel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteChannelTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[EVENT]'); - $request = (new DeleteEventRequest()) - ->setName($formattedName); - $gapicClient->deleteEvent($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/DeleteEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[EVENT]'); - $request = (new DeleteEventRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteEvent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteInputTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteInputTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteInputTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); - $request = (new DeleteInputRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteInput($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/DeleteInput', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInputTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteInputExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteInputTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); - $request = (new DeleteInputRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteInput($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInputTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getChannelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $activeInput = 'activeInput1758551377'; - $expectedResponse = new Channel(); - $expectedResponse->setName($name2); - $expectedResponse->setActiveInput($activeInput); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $request = (new GetChannelRequest()) - ->setName($formattedName); - $response = $gapicClient->getChannel($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/GetChannel', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getChannelExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $request = (new GetChannelRequest()) - ->setName($formattedName); - try { - $gapicClient->getChannel($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $executeNow = true; - $expectedResponse = new Event(); - $expectedResponse->setName($name2); - $expectedResponse->setExecuteNow($executeNow); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[EVENT]'); - $request = (new GetEventRequest()) - ->setName($formattedName); - $response = $gapicClient->getEvent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/GetEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[EVENT]'); - $request = (new GetEventRequest()) - ->setName($formattedName); - try { - $gapicClient->getEvent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInputTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uri = 'uri116076'; - $expectedResponse = new Input(); - $expectedResponse->setName($name2); - $expectedResponse->setUri($uri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); - $request = (new GetInputRequest()) - ->setName($formattedName); - $response = $gapicClient->getInput($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/GetInput', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInputExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); - $request = (new GetInputRequest()) - ->setName($formattedName); - try { - $gapicClient->getInput($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listChannelsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $channelsElement = new Channel(); - $channels = [ - $channelsElement, - ]; - $expectedResponse = new ListChannelsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setChannels($channels); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListChannelsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listChannels($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getChannels()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/ListChannels', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listChannelsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListChannelsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listChannels($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEventsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $eventsElement = new Event(); - $events = [ - $eventsElement, - ]; - $expectedResponse = new ListEventsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEvents($events); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $request = (new ListEventsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listEvents($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEvents()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/ListEvents', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEventsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $request = (new ListEventsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listEvents($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInputsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $inputsElement = new Input(); - $inputs = [ - $inputsElement, - ]; - $expectedResponse = new ListInputsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setInputs($inputs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInputsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listInputs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getInputs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/ListInputs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInputsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInputsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listInputs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function startChannelTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ChannelOperationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/startChannelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $request = (new StartChannelRequest()) - ->setName($formattedName); - $response = $gapicClient->startChannel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/StartChannel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startChannelTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function startChannelExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $request = (new StartChannelRequest()) - ->setName($formattedName); - $response = $gapicClient->startChannel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startChannelTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function stopChannelTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/stopChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ChannelOperationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/stopChannelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $request = (new StopChannelRequest()) - ->setName($formattedName); - $response = $gapicClient->stopChannel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/StopChannel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopChannelTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function stopChannelExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/stopChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $request = (new StopChannelRequest()) - ->setName($formattedName); - $response = $gapicClient->stopChannel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopChannelTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateChannelTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $activeInput = 'activeInput1758551377'; - $expectedResponse = new Channel(); - $expectedResponse->setName($name); - $expectedResponse->setActiveInput($activeInput); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateChannelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $channel = new Channel(); - $channelOutput = new Output(); - $channel->setOutput($channelOutput); - $request = (new UpdateChannelRequest()) - ->setChannel($channel); - $response = $gapicClient->updateChannel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/UpdateChannel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getChannel(); - $this->assertProtobufEquals($channel, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateChannelTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateChannelExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $channel = new Channel(); - $channelOutput = new Output(); - $channel->setOutput($channelOutput); - $request = (new UpdateChannelRequest()) - ->setChannel($channel); - $response = $gapicClient->updateChannel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateChannelTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateInputTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateInputTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uri = 'uri116076'; - $expectedResponse = new Input(); - $expectedResponse->setName($name); - $expectedResponse->setUri($uri); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateInputTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $input = new Input(); - $request = (new UpdateInputRequest()) - ->setInput($input); - $response = $gapicClient->updateInput($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/UpdateInput', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getInput(); - $this->assertProtobufEquals($input, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInputTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateInputExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateInputTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $input = new Input(); - $request = (new UpdateInputRequest()) - ->setInput($input); - $response = $gapicClient->updateInput($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInputTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createChannelAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $activeInput = 'activeInput1758551377'; - $expectedResponse = new Channel(); - $expectedResponse->setName($name); - $expectedResponse->setActiveInput($activeInput); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createChannelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $channel = new Channel(); - $channelOutput = new Output(); - $channel->setOutput($channelOutput); - $channelId = 'channelId-1930808873'; - $request = (new CreateChannelRequest()) - ->setParent($formattedParent) - ->setChannel($channel) - ->setChannelId($channelId); - $response = $gapicClient->createChannelAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/CreateChannel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getChannel(); - $this->assertProtobufEquals($channel, $actualValue); - $actualValue = $actualApiRequestObject->getChannelId(); - $this->assertProtobufEquals($channelId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createChannelTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/VideoLiveStream/v1/tests/Unit/V1/LivestreamServiceClientTest.php b/owl-bot-staging/VideoLiveStream/v1/tests/Unit/V1/LivestreamServiceClientTest.php deleted file mode 100644 index 32b45d6d6b7a..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/tests/Unit/V1/LivestreamServiceClientTest.php +++ /dev/null @@ -1,1693 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return LivestreamServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new LivestreamServiceClient($options); - } - - /** @test */ - public function createChannelTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $activeInput = 'activeInput1758551377'; - $expectedResponse = new Channel(); - $expectedResponse->setName($name); - $expectedResponse->setActiveInput($activeInput); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createChannelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $channel = new Channel(); - $channelOutput = new Output(); - $channel->setOutput($channelOutput); - $channelId = 'channelId-1930808873'; - $response = $gapicClient->createChannel($formattedParent, $channel, $channelId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/CreateChannel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getChannel(); - $this->assertProtobufEquals($channel, $actualValue); - $actualValue = $actualApiRequestObject->getChannelId(); - $this->assertProtobufEquals($channelId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createChannelTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createChannelExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $channel = new Channel(); - $channelOutput = new Output(); - $channel->setOutput($channelOutput); - $channelId = 'channelId-1930808873'; - $response = $gapicClient->createChannel($formattedParent, $channel, $channelId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createChannelTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $executeNow = true; - $expectedResponse = new Event(); - $expectedResponse->setName($name); - $expectedResponse->setExecuteNow($executeNow); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $event = new Event(); - $eventInputSwitch = new InputSwitchTask(); - $event->setInputSwitch($eventInputSwitch); - $eventId = 'eventId278118624'; - $response = $gapicClient->createEvent($formattedParent, $event, $eventId); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/CreateEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEvent(); - $this->assertProtobufEquals($event, $actualValue); - $actualValue = $actualRequestObject->getEventId(); - $this->assertProtobufEquals($eventId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $event = new Event(); - $eventInputSwitch = new InputSwitchTask(); - $event->setInputSwitch($eventInputSwitch); - $eventId = 'eventId278118624'; - try { - $gapicClient->createEvent($formattedParent, $event, $eventId); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createInputTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createInputTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uri = 'uri116076'; - $expectedResponse = new Input(); - $expectedResponse->setName($name); - $expectedResponse->setUri($uri); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createInputTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $input = new Input(); - $inputId = 'inputId470715824'; - $response = $gapicClient->createInput($formattedParent, $input, $inputId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/CreateInput', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getInput(); - $this->assertProtobufEquals($input, $actualValue); - $actualValue = $actualApiRequestObject->getInputId(); - $this->assertProtobufEquals($inputId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInputTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createInputExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createInputTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $input = new Input(); - $inputId = 'inputId470715824'; - $response = $gapicClient->createInput($formattedParent, $input, $inputId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInputTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteChannelTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteChannelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $response = $gapicClient->deleteChannel($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/DeleteChannel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteChannelTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteChannelExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $response = $gapicClient->deleteChannel($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteChannelTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[EVENT]'); - $gapicClient->deleteEvent($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/DeleteEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[EVENT]'); - try { - $gapicClient->deleteEvent($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteInputTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteInputTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteInputTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); - $response = $gapicClient->deleteInput($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/DeleteInput', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInputTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteInputExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteInputTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); - $response = $gapicClient->deleteInput($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInputTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getChannelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $activeInput = 'activeInput1758551377'; - $expectedResponse = new Channel(); - $expectedResponse->setName($name2); - $expectedResponse->setActiveInput($activeInput); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $response = $gapicClient->getChannel($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/GetChannel', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getChannelExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - try { - $gapicClient->getChannel($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $executeNow = true; - $expectedResponse = new Event(); - $expectedResponse->setName($name2); - $expectedResponse->setExecuteNow($executeNow); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[EVENT]'); - $response = $gapicClient->getEvent($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/GetEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[EVENT]'); - try { - $gapicClient->getEvent($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInputTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uri = 'uri116076'; - $expectedResponse = new Input(); - $expectedResponse->setName($name2); - $expectedResponse->setUri($uri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); - $response = $gapicClient->getInput($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/GetInput', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInputExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); - try { - $gapicClient->getInput($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listChannelsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $channelsElement = new Channel(); - $channels = [ - $channelsElement, - ]; - $expectedResponse = new ListChannelsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setChannels($channels); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listChannels($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getChannels()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/ListChannels', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listChannelsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listChannels($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEventsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $eventsElement = new Event(); - $events = [ - $eventsElement, - ]; - $expectedResponse = new ListEventsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEvents($events); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $response = $gapicClient->listEvents($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEvents()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/ListEvents', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEventsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - try { - $gapicClient->listEvents($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInputsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $inputsElement = new Input(); - $inputs = [ - $inputsElement, - ]; - $expectedResponse = new ListInputsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setInputs($inputs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listInputs($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getInputs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/ListInputs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInputsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listInputs($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function startChannelTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ChannelOperationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/startChannelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $response = $gapicClient->startChannel($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/StartChannel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startChannelTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function startChannelExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $response = $gapicClient->startChannel($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startChannelTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function stopChannelTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/stopChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ChannelOperationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/stopChannelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $response = $gapicClient->stopChannel($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/StopChannel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopChannelTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function stopChannelExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/stopChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $response = $gapicClient->stopChannel($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopChannelTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateChannelTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $activeInput = 'activeInput1758551377'; - $expectedResponse = new Channel(); - $expectedResponse->setName($name); - $expectedResponse->setActiveInput($activeInput); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateChannelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $channel = new Channel(); - $channelOutput = new Output(); - $channel->setOutput($channelOutput); - $response = $gapicClient->updateChannel($channel); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/UpdateChannel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getChannel(); - $this->assertProtobufEquals($channel, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateChannelTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateChannelExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $channel = new Channel(); - $channelOutput = new Output(); - $channel->setOutput($channelOutput); - $response = $gapicClient->updateChannel($channel); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateChannelTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateInputTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateInputTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uri = 'uri116076'; - $expectedResponse = new Input(); - $expectedResponse->setName($name); - $expectedResponse->setUri($uri); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateInputTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $input = new Input(); - $response = $gapicClient->updateInput($input); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/UpdateInput', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getInput(); - $this->assertProtobufEquals($input, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInputTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateInputExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateInputTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $input = new Input(); - $response = $gapicClient->updateInput($input); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInputTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/AdTagDetails.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/AdTagDetails.php deleted file mode 100644 index c8f68cb7b757..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/AdTagDetails.php +++ /dev/null @@ -1,52 +0,0 @@ -internalAddGeneratedFile( - ' -� -3google/cloud/video/stitcher/v1/ad_tag_details.protogoogle.cloud.video.stitcher.v1google/protobuf/duration.protogoogle/protobuf/struct.proto"� -LiveAdTagDetail -name ( > - ad_requests ( 2).google.cloud.video.stitcher.v1.AdRequest:��A� -,videostitcher.googleapis.com/LiveAdTagDetailiprojects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}"� -VodAdTagDetail -name ( > - ad_requests ( 2).google.cloud.video.stitcher.v1.AdRequest:��A� -+videostitcher.googleapis.com/VodAdTagDetaileprojects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail}"� - AdRequest -uri ( I -request_metadata ( 2/.google.cloud.video.stitcher.v1.RequestMetadataK -response_metadata ( 20.google.cloud.video.stitcher.v1.ResponseMetadata"; -RequestMetadata( -headers ( 2.google.protobuf.Struct"� -ResponseMetadata -error ( ( -headers ( 2.google.protobuf.Struct - status_code (  - -size_bytes (+ -duration ( 2.google.protobuf.Duration -body ( By -"com.google.cloud.video.stitcher.v1BAdTagDetailsProtoPZ>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/CdnKeys.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/CdnKeys.php deleted file mode 100644 index 7da4b85eafa55c3385195c29b404ae160afce63a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1437 zcmb7E&rcIU7!?EpLnWjKgC5LSh?EGsK~F4#X{l6VkVXjyvq_!Ker-p#JDZu=CP@0f zdiL&F=f`$w1Vnn-FO%tC96 zVn(r4MCs2OlWmqT#YoJ)>xK4km&6kE?DgJmmQclbg3Z85LZP~W9j57BOSu+c506>3 zj3!!-@F-Cr5)y|EkW{c#anaJPLC^zLC}~cr8~L>cj&*U>aSVcMB=@iq8BE@eu>h5c zWY_XG0HdM`Z_uokvha{W9Mz#uhK!3KxZ3Ip{^8SIrA?IX3Sb;P5e>gQeRp2zxqX9&W6fpA^=H*>l)#AIa$Ely~0pDXGLRrKa}C|xf(Wu(n^YwF9s zGvL@RTDl(p`!&<5>IZEsb=ujzDm!ypSH)ki7lGJx!Jc>rZhZr6r%UPxjS%_+cht~z diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Companions.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Companions.php deleted file mode 100644 index 8295feed69ccba158eb9cedccdd643e741abc7b5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1738 zcmb7_?@!u57{^8Y#e+YvW*gg!c|(nuY-PG^FK}o;(6J~mP!pFXO=%CgthC+rin_%& z`v>>e?ES7+D4^SLyy0?p&*z?>-@e~>+77ItBWz)+F>Ijb4PtGK9BMOLw@uXaS}jbG zZg(7FVk#q4tfETw6qSnQ(-+*-wLPliEV{JqOA}{w)Ao!^ml)X2xQsBpjcKO4o$&#h zMQqEJ1slN9I@onI9iyXK;RG|y(3qwi35;^!W0Z3rqcnOL<$QY=KsPnlMF$}cz60Vv z$7`BIM=sMC|63=nN-V;NW|D6_svK%*ri;1x{ktvC(iwLQ`36->$LTE;F#Wshj?J@> zLw(0;eqwl1l(NMzwKP*HVppfcVK%MttJ&-&W??%0o%B}kSszDQC>{8i&E9h|hZyzn z@aqUs%sguC3cr28ZMae%o;Ib_#TIk3*+GZ{qKNR-9_huCH;mBzLtgT9_@Mv%Cj6X( z%zxHedL9_aqB&&I9CE)o$70ny2q$sdr5Z5ua8wjK;koq_ZR=o+jR%Z=J`{z9#nKAn~8rIS+S zR6VOSYNdnnVYyUHOh~g3%^x2pB4SawNK8s|Fjc8mN{MLdR}^BQ=TZeE(xQAuRL$Ty z2*xZ4JOS~Y*W-LG3(LGw@7aBr@OeSwjqu_R<2A%sjqpA~qRl$y2yI@_SR0eeHdCEzUZqHST1vp&6){-b--(KyC$Pi?0W)=QbxIsO z0|{Sq%`vbsbT%!{9>Zc_6vAf2{!>^EZNj5jaU=ooLb#^QRAMCO_+CtU3o}?uRx&1f zXk%RDVh#%n5Fe^(Y6BKWGa{`(T;#S_bieCksZ~haEvpoVs7FbVuGBk7+^y5d1&OCw zrmb*uoSkYD>Sec`Mej*bAK4^4i|>I($DM4)xSUNPIGs# eY|e-;!JExcVO|CTIHZ?<)k<+Q5V2dh1^5k&5GSkv diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Events.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Events.php deleted file mode 100644 index 03acc1702d6098ac4cea9bc04a2c82f73708dc97..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1464 zcmb7EU2oeq6kTG+jjxlG5zxZzfPu?8)ImEL>97}P>EOtWL&UZ;Np?SAK#*nH5uiwd zL>cIYJnRqb&+QM5q++L7*ADZ8d_|pmc<#N2{P~ykI)(3WpT#WmIh*6z2h6V-PP2q3 zK@#Cvu~@JS2gywuMl91Y?wNRGx|sB+`>jaLlOhXP2QQOk8L@T{CB?kG3g;|o=RD-W zHOtzolQvtinCH6U1&I9{mZyHeaNjx~GVafP?oa!QVroc==|oaYojZ!@Fa6ocmn-JqvR$j6)v!QTUsv<_s_VC}$$|Q|zLM10E(ZmI-DYu+}jy zIVJX4nuzMp@LH558zP!9r7>q&>_^ic%Y!UTd6HQI+UYDA-?UM#w2tq#m2}|(w@Qtj z&L<+zFwYA1@$MLBj2Bsas&q?&+f6k6mzHhR^$IaYQBbV9rdC2!D{R)-zO?b zT%iM1iwr&Y(l*EaOY~4C+2josVo@18;~_zZGK<)@X(J&BYUHie6_7`zlEI*B3F^ls zwJE};hG5Sah|n9*5$W3Ki4^8sQ42lQ9>HPPFo@-PbTpx^=%whz*GDVZ7tUQ~EYC|{ z=+NNd4fF1XDDCm3A!>KW84H#kI?v%qTxkD+J#Q#YxjI|c*8A5b z=h~{tO?#RA^P=<9P~3HE&!@A~`*2oM9{ln7=8(NCkNrot#Aj~^g)GnUE!+b94M)+c A@c;k- diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/LiveConfigs.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/LiveConfigs.php deleted file mode 100644 index 5521f68d8b359f049b59d35f385d2e732cc93213..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2066 zcmb7FQFGfw5GHn$CY!c#H9(yfn8RcyZih-Fyg4L{Y$?V=8hdOdGi5ZRIZJ2fh%5=| zWC)%71^x;n4P)itP z?gfdp`JU#}IdR-Dn9ymWN_2n#&qxwsm!R&T{faQ`VTSFl1hP8<$UYZ9_9zFk&-V@h zTpuS1I^lqw3=iG_;(t*(_Nj{!h8h32LlcJvlu_){-+5w(XoCHOaQ}DTPSU_-Gz^e% z=m#!oK1Ug*c)JsYoQOkIL^crIa9-?Qz(^cm-!@3%#x!DKJm61Tttnv(M#W9@dHz`e zM<=M6#n@`S6XYRcaY~lIj!;Zk8V3h5ZUJz;IN9&vO^>L3Oo{Kc$pxO%FmAQVtV)pE zT!$nt=zsQF&|#!pLY&3-e^9dc@`&b~>7KWs=$I?3xkyT+xC?&*?EP;^DPLqRs#KvW zRj3v!ROfq7w{u7wQ7z6h&D8ibch#ged37}}PbafC{#XMjHK#m=dqTeT6|~aaXjlKz ztI89Aj5{ZdX}wYyDvAPtJ%{0`G*pE_Ifkt%o;gcxQNPCxoBJ=-59gqE@oXs$16GBY zNPU%iKidE1F7MJ+9SOfIbOSa;gfVt6X)vv?Nvs!lVdI8n&E`KrDyV`<$L%ZN zV7)Umb*p#Ut*s~qELI0%JdHojl z7HoFTET?le9Ga&VhZh(9R|Ae}I=WG-w8Fo2AMD)^(p<8n=v?SO6PG30oBVXG`JpR2 znBNsgepwD$eqE07>&65g-DF7l819n*kA33F##k?O@hqRj4p&)Beo0BfoT9&Er)=(T z7sV(VP%Y+31H;3cqThxG0b##}@g*;)x736cYX1&L2gzVV6Ah~%Zk9yBXf9e4r`V6Z_waMF0!~~0<~*p z36g-YI;G7VQ&_56a_sO;Yyl?qY;~oo$h&rE}}TkuS5g Ja1GZ0{{j__ltusm diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Sessions.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Sessions.php deleted file mode 100644 index dff4bef886265800238cd24b071e0ef861091019..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3688 zcmb_f-EJF26vlQF>f^dj7ZuzHp~bYSOIxpEssc_^>c2!TO>8Bl2xMtB-W@wb);p`+ zu~DcZ@hV*N2;A@}T$eZC0&!;lyh-b9B9WWydggp{{=V<*Jo&~sbl@{}huYL7f|}~+ zSQUpAn0EO+7wy4cbsAoKGyO85W^ zx}{2kzHQLzJvG3Tdv7}&Gq9ybZVhBoFd@U9EvRb~YuKTl;W9^XcYs?PjR_TTD&;TL zd*QJXj*Zo7;A5llmXlkmaA!1mx~jTV%v^iZ_gey-#81O_B(3SN;Wnd|*`kMJ&bZrX zETUR~EHmAwVI?nYwWLbJHueg!Ww9^r!7{AwoZ8}lzI zxnUUto~>&sCrMrhwF(XHrx;MbAmQeXl+6}qT{nWXhbCbxnlA&$CCvr>*C-&b?!)>fKZi(qR_ z^Cg+=N`PJBbZy}tW3X#etk0NwLg$X`L9d+m(8K& zcvWt}HJgf`xqF1oWG0#+t9%G~Pq-A1#;9Z?_)U^se+0@qvRQ!K5j_r?Nh!k0oLDm& zm^HFrWg7fV(}Lk$pJ6e1F?;)X93_*?XNqRr!m z#-H&8^W;y%lge)yD4uFetVbT}F~XRRJoHrd(8k5n*fd+xQh5%g@C?a6fg&2xht)GR{5V$`8TZ6q+8Qk{>-$Usbu6vT6C@(6C=hlndqSxEsr&#Lmr z6)4C#dX6?H1vO@4PC0;LQXakXs$aY(X~j#NmJmm8xim^$E7UJ7jk{;mtK`Fcc^UVT zdWDjjn0)0mM9a4{l*xaZ_tNA=hKvo0A1dp2POIQ4sf*`fcD)X33#kiplO}ZTnE*;j8nC~G#+rgQXE&FLm~01d<^COey6*y5Be{9 z?H}~-_6`Q!c5l1a?X10r6D8j~Xm|HIy}g~ajB*{I(~aM=mB&yz>+%Osh+G~yGVn}w z1?^Vlm@@*Y%(rGxK?O~TqE(FYj>;nVAoJtXKv|=&A{<>4e)eL9Q%&B@!Yh_D+FU%2 gRmHQ4%+rrMDS>XK?2@ffIoL0499Dc>n+a diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Slates.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Slates.php deleted file mode 100644 index b64766ec3512..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Slates.php +++ /dev/null @@ -1,37 +0,0 @@ -internalAddGeneratedFile( - ' -� -+google/cloud/video/stitcher/v1/slates.protogoogle.cloud.video.stitcher.v1google/api/resource.proto"� -Slate -name ( B�A -uri ( A - gam_slate ( 2..google.cloud.video.stitcher.v1.Slate.GamSlate@ -GamSlate - network_code ( B�A - gam_slate_id (B�A:_�A\\ -"videostitcher.googleapis.com/Slate6projects/{project}/locations/{location}/slates/{slate}Bs -"com.google.cloud.video.stitcher.v1B SlatesProtoPZ>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/StitchDetails.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/StitchDetails.php deleted file mode 100644 index 27b7f5f709f0..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/StitchDetails.php +++ /dev/null @@ -1,45 +0,0 @@ -internalAddGeneratedFile( - ' -� -3google/cloud/video/stitcher/v1/stitch_details.protogoogle.cloud.video.stitcher.v1google/api/resource.protogoogle/protobuf/duration.protogoogle/protobuf/struct.proto"� -VodStitchDetail -name ( I -ad_stitch_details ( 2..google.cloud.video.stitcher.v1.AdStitchDetail:��A� -,videostitcher.googleapis.com/VodStitchDetailfprojects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail}"� -AdStitchDetail - ad_break_id ( B�A -ad_id ( B�A6 -ad_time_offset ( 2.google.protobuf.DurationB�A - skip_reason ( B�AM -media ( 29.google.cloud.video.stitcher.v1.AdStitchDetail.MediaEntryB�AD - -MediaEntry -key ( % -value ( 2.google.protobuf.Value:8Bz -"com.google.cloud.video.stitcher.v1BStitchDetailsProtoPZ>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/VideoStitcherService.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/VideoStitcherService.php deleted file mode 100644 index 957e02bd90cd..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/VideoStitcherService.php +++ /dev/null @@ -1,200 +0,0 @@ -internalAddGeneratedFile( - ' -�O -;google/cloud/video/stitcher/v1/video_stitcher_service.protogoogle.cloud.video.stitcher.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto3google/cloud/video/stitcher/v1/ad_tag_details.proto-google/cloud/video/stitcher/v1/cdn_keys.proto1google/cloud/video/stitcher/v1/live_configs.proto-google/cloud/video/stitcher/v1/sessions.proto+google/cloud/video/stitcher/v1/slates.proto3google/cloud/video/stitcher/v1/stitch_details.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"� -CreateCdnKeyRequest; -parent ( B+�A�A%#videostitcher.googleapis.com/CdnKey< -cdn_key ( 2&.google.cloud.video.stitcher.v1.CdnKeyB�A - -cdn_key_id ( B�A"� -ListCdnKeysRequest; -parent ( B+�A�A%#videostitcher.googleapis.com/CdnKey - page_size ( - -page_token (  -filter (  -order_by ( "} -ListCdnKeysResponse8 -cdn_keys ( 2&.google.cloud.video.stitcher.v1.CdnKey -next_page_token (  - unreachable ( "M -GetCdnKeyRequest9 -name ( B+�A�A% -#videostitcher.googleapis.com/CdnKey"P -DeleteCdnKeyRequest9 -name ( B+�A�A% -#videostitcher.googleapis.com/CdnKey"� -UpdateCdnKeyRequest< -cdn_key ( 2&.google.cloud.video.stitcher.v1.CdnKeyB�A4 - update_mask ( 2.google.protobuf.FieldMaskB�A"� -CreateVodSessionRequest? -parent ( B/�A�A)\'videostitcher.googleapis.com/VodSessionD - vod_session ( 2*.google.cloud.video.stitcher.v1.VodSessionB�A"U -GetVodSessionRequest= -name ( B/�A�A) -\'videostitcher.googleapis.com/VodSession"� -ListVodStitchDetailsRequestD -parent ( B4�A�A.,videostitcher.googleapis.com/VodStitchDetail - page_size ( - -page_token ( "� -ListVodStitchDetailsResponseK -vod_stitch_details ( 2/.google.cloud.video.stitcher.v1.VodStitchDetail -next_page_token ( "_ -GetVodStitchDetailRequestB -name ( B4�A�A. -,videostitcher.googleapis.com/VodStitchDetail"� -ListVodAdTagDetailsRequestC -parent ( B3�A�A-+videostitcher.googleapis.com/VodAdTagDetail - page_size ( - -page_token ( "� -ListVodAdTagDetailsResponseJ -vod_ad_tag_details ( 2..google.cloud.video.stitcher.v1.VodAdTagDetail -next_page_token ( "] -GetVodAdTagDetailRequestA -name ( B3�A�A- -+videostitcher.googleapis.com/VodAdTagDetail"� -ListLiveAdTagDetailsRequestD -parent ( B4�A�A.,videostitcher.googleapis.com/LiveAdTagDetail - page_size ( - -page_token ( "� -ListLiveAdTagDetailsResponseL -live_ad_tag_details ( 2/.google.cloud.video.stitcher.v1.LiveAdTagDetail -next_page_token ( "_ -GetLiveAdTagDetailRequestB -name ( B4�A�A. -,videostitcher.googleapis.com/LiveAdTagDetail"� -CreateSlateRequest: -parent ( B*�A�A$"videostitcher.googleapis.com/Slate -slate_id ( B�A9 -slate ( 2%.google.cloud.video.stitcher.v1.SlateB�A - -request_id ( "K -GetSlateRequest8 -name ( B*�A�A$ -"videostitcher.googleapis.com/Slate"� -ListSlatesRequest: -parent ( B*�A�A$"videostitcher.googleapis.com/Slate - page_size ( - -page_token (  -filter (  -order_by ( "y -ListSlatesResponse5 -slates ( 2%.google.cloud.video.stitcher.v1.Slate -next_page_token (  - unreachable ( "� -UpdateSlateRequest9 -slate ( 2%.google.cloud.video.stitcher.v1.SlateB�A4 - update_mask ( 2.google.protobuf.FieldMaskB�A"N -DeleteSlateRequest8 -name ( B*�A�A$ -"videostitcher.googleapis.com/Slate"� -CreateLiveSessionRequest@ -parent ( B0�A�A* -(videostitcher.googleapis.com/LiveSessionF - live_session ( 2+.google.cloud.video.stitcher.v1.LiveSessionB�A"W -GetLiveSessionRequest> -name ( B0�A�A* -(videostitcher.googleapis.com/LiveSession"� -CreateLiveConfigRequest? -parent ( B/�A�A)\'videostitcher.googleapis.com/LiveConfig -live_config_id ( B�AD - live_config ( 2*.google.cloud.video.stitcher.v1.LiveConfigB�A - -request_id ( "� -ListLiveConfigsRequest? -parent ( B/�A�A)\'videostitcher.googleapis.com/LiveConfig - page_size ( - -page_token (  -filter ( B�A -order_by ( B�A"� -ListLiveConfigsResponse@ - live_configs ( 2*.google.cloud.video.stitcher.v1.LiveConfig -next_page_token (  - unreachable ( "U -GetLiveConfigRequest= -name ( B/�A�A) -\'videostitcher.googleapis.com/LiveConfig"X -DeleteLiveConfigRequest= -name ( B/�A�A) -\'videostitcher.googleapis.com/LiveConfig"� -OperationMetadata/ - create_time ( 2.google.protobuf.Timestamp, -end_time ( 2.google.protobuf.Timestamp -target (  -verb ( 2�* -VideoStitcherService� - CreateCdnKey3.google.cloud.video.stitcher.v1.CreateCdnKeyRequest.google.longrunning.Operation"����6"+/v1/{parent=projects/*/locations/*}/cdnKeys:cdn_key�Aparent,cdn_key,cdn_key_id�AY -%google.cloud.video.stitcher.v1.CdnKey0google.cloud.video.stitcher.v1.OperationMetadata� - ListCdnKeys2.google.cloud.video.stitcher.v1.ListCdnKeysRequest3.google.cloud.video.stitcher.v1.ListCdnKeysResponse"<���-+/v1/{parent=projects/*/locations/*}/cdnKeys�Aparent� - GetCdnKey0.google.cloud.video.stitcher.v1.GetCdnKeyRequest&.google.cloud.video.stitcher.v1.CdnKey":���-+/v1/{name=projects/*/locations/*/cdnKeys/*}�Aname� - DeleteCdnKey3.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest.google.longrunning.Operation"����-*+/v1/{name=projects/*/locations/*/cdnKeys/*}�Aname�AI -google.protobuf.Empty0google.cloud.video.stitcher.v1.OperationMetadata� - UpdateCdnKey3.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest.google.longrunning.Operation"����>23/v1/{cdn_key.name=projects/*/locations/*/cdnKeys/*}:cdn_key�Acdn_key,update_mask�AY -%google.cloud.video.stitcher.v1.CdnKey0google.cloud.video.stitcher.v1.OperationMetadata� -CreateVodSession7.google.cloud.video.stitcher.v1.CreateVodSessionRequest*.google.cloud.video.stitcher.v1.VodSession"Y���>"//v1/{parent=projects/*/locations/*}/vodSessions: vod_session�Aparent,vod_session� - GetVodSession4.google.cloud.video.stitcher.v1.GetVodSessionRequest*.google.cloud.video.stitcher.v1.VodSession">���1//v1/{name=projects/*/locations/*/vodSessions/*}�Aname� -ListVodStitchDetails;.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest<.google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse"S���DB/v1/{parent=projects/*/locations/*/vodSessions/*}/vodStitchDetails�Aparent� -GetVodStitchDetail9.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest/.google.cloud.video.stitcher.v1.VodStitchDetail"Q���DB/v1/{name=projects/*/locations/*/vodSessions/*/vodStitchDetails/*}�Aname� -ListVodAdTagDetails:.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest;.google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse"R���CA/v1/{parent=projects/*/locations/*/vodSessions/*}/vodAdTagDetails�Aparent� -GetVodAdTagDetail8.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest..google.cloud.video.stitcher.v1.VodAdTagDetail"P���CA/v1/{name=projects/*/locations/*/vodSessions/*/vodAdTagDetails/*}�Aname� -ListLiveAdTagDetails;.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest<.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse"T���EC/v1/{parent=projects/*/locations/*/liveSessions/*}/liveAdTagDetails�Aparent� -GetLiveAdTagDetail9.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest/.google.cloud.video.stitcher.v1.LiveAdTagDetail"R���EC/v1/{name=projects/*/locations/*/liveSessions/*/liveAdTagDetails/*}�Aname� - CreateSlate2.google.cloud.video.stitcher.v1.CreateSlateRequest.google.longrunning.Operation"����3"*/v1/{parent=projects/*/locations/*}/slates:slate�Aparent,slate,slate_id�AX -$google.cloud.video.stitcher.v1.Slate0google.cloud.video.stitcher.v1.OperationMetadata� - -ListSlates1.google.cloud.video.stitcher.v1.ListSlatesRequest2.google.cloud.video.stitcher.v1.ListSlatesResponse";���,*/v1/{parent=projects/*/locations/*}/slates�Aparent� -GetSlate/.google.cloud.video.stitcher.v1.GetSlateRequest%.google.cloud.video.stitcher.v1.Slate"9���,*/v1/{name=projects/*/locations/*/slates/*}�Aname� - UpdateSlate2.google.cloud.video.stitcher.v1.UpdateSlateRequest.google.longrunning.Operation"����920/v1/{slate.name=projects/*/locations/*/slates/*}:slate�Aslate,update_mask�AX -$google.cloud.video.stitcher.v1.Slate0google.cloud.video.stitcher.v1.OperationMetadata� - DeleteSlate2.google.cloud.video.stitcher.v1.DeleteSlateRequest.google.longrunning.Operation"����,**/v1/{name=projects/*/locations/*/slates/*}�Aname�AI -google.protobuf.Empty0google.cloud.video.stitcher.v1.OperationMetadata� -CreateLiveSession8.google.cloud.video.stitcher.v1.CreateLiveSessionRequest+.google.cloud.video.stitcher.v1.LiveSession"\\���@"0/v1/{parent=projects/*/locations/*}/liveSessions: live_session�Aparent,live_session� -GetLiveSession5.google.cloud.video.stitcher.v1.GetLiveSessionRequest+.google.cloud.video.stitcher.v1.LiveSession"?���20/v1/{name=projects/*/locations/*/liveSessions/*}�Aname� -CreateLiveConfig7.google.cloud.video.stitcher.v1.CreateLiveConfigRequest.google.longrunning.Operation"����>"//v1/{parent=projects/*/locations/*}/liveConfigs: live_config�A!parent,live_config,live_config_id�A] -)google.cloud.video.stitcher.v1.LiveConfig0google.cloud.video.stitcher.v1.OperationMetadata� -ListLiveConfigs6.google.cloud.video.stitcher.v1.ListLiveConfigsRequest7.google.cloud.video.stitcher.v1.ListLiveConfigsResponse"@���1//v1/{parent=projects/*/locations/*}/liveConfigs�Aparent� - GetLiveConfig4.google.cloud.video.stitcher.v1.GetLiveConfigRequest*.google.cloud.video.stitcher.v1.LiveConfig">���1//v1/{name=projects/*/locations/*/liveConfigs/*}�Aname� -DeleteLiveConfig7.google.cloud.video.stitcher.v1.DeleteLiveConfigRequest.google.longrunning.Operation"����1*//v1/{name=projects/*/locations/*/liveConfigs/*}�Aname�AI -google.protobuf.Empty0google.cloud.video.stitcher.v1.OperationMetadataP�Avideostitcher.googleapis.com�A.https://www.googleapis.com/auth/cloud-platformB� -"com.google.cloud.video.stitcher.v1BVideoStitcherServiceProtoPZ>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdRequest.php deleted file mode 100644 index 37e899db9a19..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.video.stitcher.v1.AdRequest - */ -class AdRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The ad tag URI processed with integrated macros. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - /** - * The request metadata used to make the ad request. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.RequestMetadata request_metadata = 2; - */ - protected $request_metadata = null; - /** - * The response metadata received from the ad request. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ResponseMetadata response_metadata = 3; - */ - protected $response_metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * The ad tag URI processed with integrated macros. - * @type \Google\Cloud\Video\Stitcher\V1\RequestMetadata $request_metadata - * The request metadata used to make the ad request. - * @type \Google\Cloud\Video\Stitcher\V1\ResponseMetadata $response_metadata - * The response metadata received from the ad request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\AdTagDetails::initOnce(); - parent::__construct($data); - } - - /** - * The ad tag URI processed with integrated macros. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * The ad tag URI processed with integrated macros. - * - * Generated from protobuf field string uri = 1; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * The request metadata used to make the ad request. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.RequestMetadata request_metadata = 2; - * @return \Google\Cloud\Video\Stitcher\V1\RequestMetadata|null - */ - public function getRequestMetadata() - { - return $this->request_metadata; - } - - public function hasRequestMetadata() - { - return isset($this->request_metadata); - } - - public function clearRequestMetadata() - { - unset($this->request_metadata); - } - - /** - * The request metadata used to make the ad request. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.RequestMetadata request_metadata = 2; - * @param \Google\Cloud\Video\Stitcher\V1\RequestMetadata $var - * @return $this - */ - public function setRequestMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\RequestMetadata::class); - $this->request_metadata = $var; - - return $this; - } - - /** - * The response metadata received from the ad request. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ResponseMetadata response_metadata = 3; - * @return \Google\Cloud\Video\Stitcher\V1\ResponseMetadata|null - */ - public function getResponseMetadata() - { - return $this->response_metadata; - } - - public function hasResponseMetadata() - { - return isset($this->response_metadata); - } - - public function clearResponseMetadata() - { - unset($this->response_metadata); - } - - /** - * The response metadata received from the ad request. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ResponseMetadata response_metadata = 3; - * @param \Google\Cloud\Video\Stitcher\V1\ResponseMetadata $var - * @return $this - */ - public function setResponseMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\ResponseMetadata::class); - $this->response_metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdStitchDetail.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdStitchDetail.php deleted file mode 100644 index 33dc179495cb..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdStitchDetail.php +++ /dev/null @@ -1,213 +0,0 @@ -google.cloud.video.stitcher.v1.AdStitchDetail - */ -class AdStitchDetail extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ad break ID of the processed ad. - * - * Generated from protobuf field string ad_break_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ad_break_id = ''; - /** - * Required. The ad ID of the processed ad. - * - * Generated from protobuf field string ad_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ad_id = ''; - /** - * Required. The time offset of the processed ad. - * - * Generated from protobuf field .google.protobuf.Duration ad_time_offset = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ad_time_offset = null; - /** - * Optional. Indicates the reason why the ad has been skipped. - * - * Generated from protobuf field string skip_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $skip_reason = ''; - /** - * Optional. The metadata of the chosen media file for the ad. - * - * Generated from protobuf field map media = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $media; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ad_break_id - * Required. The ad break ID of the processed ad. - * @type string $ad_id - * Required. The ad ID of the processed ad. - * @type \Google\Protobuf\Duration $ad_time_offset - * Required. The time offset of the processed ad. - * @type string $skip_reason - * Optional. Indicates the reason why the ad has been skipped. - * @type array|\Google\Protobuf\Internal\MapField $media - * Optional. The metadata of the chosen media file for the ad. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\StitchDetails::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ad break ID of the processed ad. - * - * Generated from protobuf field string ad_break_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAdBreakId() - { - return $this->ad_break_id; - } - - /** - * Required. The ad break ID of the processed ad. - * - * Generated from protobuf field string ad_break_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAdBreakId($var) - { - GPBUtil::checkString($var, True); - $this->ad_break_id = $var; - - return $this; - } - - /** - * Required. The ad ID of the processed ad. - * - * Generated from protobuf field string ad_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAdId() - { - return $this->ad_id; - } - - /** - * Required. The ad ID of the processed ad. - * - * Generated from protobuf field string ad_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAdId($var) - { - GPBUtil::checkString($var, True); - $this->ad_id = $var; - - return $this; - } - - /** - * Required. The time offset of the processed ad. - * - * Generated from protobuf field .google.protobuf.Duration ad_time_offset = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getAdTimeOffset() - { - return $this->ad_time_offset; - } - - public function hasAdTimeOffset() - { - return isset($this->ad_time_offset); - } - - public function clearAdTimeOffset() - { - unset($this->ad_time_offset); - } - - /** - * Required. The time offset of the processed ad. - * - * Generated from protobuf field .google.protobuf.Duration ad_time_offset = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setAdTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->ad_time_offset = $var; - - return $this; - } - - /** - * Optional. Indicates the reason why the ad has been skipped. - * - * Generated from protobuf field string skip_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSkipReason() - { - return $this->skip_reason; - } - - /** - * Optional. Indicates the reason why the ad has been skipped. - * - * Generated from protobuf field string skip_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSkipReason($var) - { - GPBUtil::checkString($var, True); - $this->skip_reason = $var; - - return $this; - } - - /** - * Optional. The metadata of the chosen media file for the ad. - * - * Generated from protobuf field map media = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMedia() - { - return $this->media; - } - - /** - * Optional. The metadata of the chosen media file for the ad. - * - * Generated from protobuf field map media = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMedia($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); - $this->media = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdTracking.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdTracking.php deleted file mode 100644 index aa08c7d30db3..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdTracking.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.video.stitcher.v1.AdTracking - */ -class AdTracking -{ - /** - * The ad tracking policy is not specified. - * - * Generated from protobuf enum AD_TRACKING_UNSPECIFIED = 0; - */ - const AD_TRACKING_UNSPECIFIED = 0; - /** - * Client-side ad tracking is specified. The client player is expected to - * trigger playback and activity events itself. - * - * Generated from protobuf enum CLIENT = 1; - */ - const CLIENT = 1; - /** - * The Video Stitcher API will trigger playback events on behalf of - * the client player. - * - * Generated from protobuf enum SERVER = 2; - */ - const SERVER = 2; - - private static $valueToName = [ - self::AD_TRACKING_UNSPECIFIED => 'AD_TRACKING_UNSPECIFIED', - self::CLIENT => 'CLIENT', - self::SERVER => 'SERVER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AkamaiCdnKey.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AkamaiCdnKey.php deleted file mode 100644 index 910d74fe0864..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AkamaiCdnKey.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.video.stitcher.v1.AkamaiCdnKey - */ -class AkamaiCdnKey extends \Google\Protobuf\Internal\Message -{ - /** - * Input only. Token key for the Akamai CDN edge configuration. - * - * Generated from protobuf field bytes token_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $token_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $token_key - * Input only. Token key for the Akamai CDN edge configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\CdnKeys::initOnce(); - parent::__construct($data); - } - - /** - * Input only. Token key for the Akamai CDN edge configuration. - * - * Generated from protobuf field bytes token_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getTokenKey() - { - return $this->token_key; - } - - /** - * Input only. Token key for the Akamai CDN edge configuration. - * - * Generated from protobuf field bytes token_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTokenKey($var) - { - GPBUtil::checkString($var, False); - $this->token_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CdnKey.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CdnKey.php deleted file mode 100644 index c5c9fc8a7033..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CdnKey.php +++ /dev/null @@ -1,219 +0,0 @@ -google.cloud.video.stitcher.v1.CdnKey - */ -class CdnKey extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the CDN key, in the form of - * `projects/{project}/locations/{location}/cdnKeys/{id}`. - * The name is ignored when creating a CDN key. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The hostname this key applies to. - * - * Generated from protobuf field string hostname = 4; - */ - protected $hostname = ''; - protected $cdn_key_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Stitcher\V1\GoogleCdnKey $google_cdn_key - * The configuration for a Google Cloud CDN key. - * @type \Google\Cloud\Video\Stitcher\V1\AkamaiCdnKey $akamai_cdn_key - * The configuration for an Akamai CDN key. - * @type \Google\Cloud\Video\Stitcher\V1\MediaCdnKey $media_cdn_key - * The configuration for a Media CDN key. - * @type string $name - * The resource name of the CDN key, in the form of - * `projects/{project}/locations/{location}/cdnKeys/{id}`. - * The name is ignored when creating a CDN key. - * @type string $hostname - * The hostname this key applies to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\CdnKeys::initOnce(); - parent::__construct($data); - } - - /** - * The configuration for a Google Cloud CDN key. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.GoogleCdnKey google_cdn_key = 5; - * @return \Google\Cloud\Video\Stitcher\V1\GoogleCdnKey|null - */ - public function getGoogleCdnKey() - { - return $this->readOneof(5); - } - - public function hasGoogleCdnKey() - { - return $this->hasOneof(5); - } - - /** - * The configuration for a Google Cloud CDN key. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.GoogleCdnKey google_cdn_key = 5; - * @param \Google\Cloud\Video\Stitcher\V1\GoogleCdnKey $var - * @return $this - */ - public function setGoogleCdnKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\GoogleCdnKey::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * The configuration for an Akamai CDN key. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.AkamaiCdnKey akamai_cdn_key = 6; - * @return \Google\Cloud\Video\Stitcher\V1\AkamaiCdnKey|null - */ - public function getAkamaiCdnKey() - { - return $this->readOneof(6); - } - - public function hasAkamaiCdnKey() - { - return $this->hasOneof(6); - } - - /** - * The configuration for an Akamai CDN key. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.AkamaiCdnKey akamai_cdn_key = 6; - * @param \Google\Cloud\Video\Stitcher\V1\AkamaiCdnKey $var - * @return $this - */ - public function setAkamaiCdnKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\AkamaiCdnKey::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * The configuration for a Media CDN key. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.MediaCdnKey media_cdn_key = 8; - * @return \Google\Cloud\Video\Stitcher\V1\MediaCdnKey|null - */ - public function getMediaCdnKey() - { - return $this->readOneof(8); - } - - public function hasMediaCdnKey() - { - return $this->hasOneof(8); - } - - /** - * The configuration for a Media CDN key. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.MediaCdnKey media_cdn_key = 8; - * @param \Google\Cloud\Video\Stitcher\V1\MediaCdnKey $var - * @return $this - */ - public function setMediaCdnKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\MediaCdnKey::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * The resource name of the CDN key, in the form of - * `projects/{project}/locations/{location}/cdnKeys/{id}`. - * The name is ignored when creating a CDN key. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the CDN key, in the form of - * `projects/{project}/locations/{location}/cdnKeys/{id}`. - * The name is ignored when creating a CDN key. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The hostname this key applies to. - * - * Generated from protobuf field string hostname = 4; - * @return string - */ - public function getHostname() - { - return $this->hostname; - } - - /** - * The hostname this key applies to. - * - * Generated from protobuf field string hostname = 4; - * @param string $var - * @return $this - */ - public function setHostname($var) - { - GPBUtil::checkString($var, True); - $this->hostname = $var; - - return $this; - } - - /** - * @return string - */ - public function getCdnKeyConfig() - { - return $this->whichOneof("cdn_key_config"); - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Companion.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Companion.php deleted file mode 100644 index 6acf2dce062b..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Companion.php +++ /dev/null @@ -1,455 +0,0 @@ -google.cloud.video.stitcher.v1.Companion - */ -class Companion extends \Google\Protobuf\Internal\Message -{ - /** - * The API necessary to communicate with the creative if available. - * - * Generated from protobuf field string api_framework = 1; - */ - protected $api_framework = ''; - /** - * The pixel height of the placement slot for the intended creative. - * - * Generated from protobuf field int32 height_px = 2; - */ - protected $height_px = 0; - /** - * The pixel width of the placement slot for the intended creative. - * - * Generated from protobuf field int32 width_px = 3; - */ - protected $width_px = 0; - /** - * The pixel height of the creative. - * - * Generated from protobuf field int32 asset_height_px = 4; - */ - protected $asset_height_px = 0; - /** - * The maximum pixel height of the creative in its expanded state. - * - * Generated from protobuf field int32 expanded_height_px = 5; - */ - protected $expanded_height_px = 0; - /** - * The pixel width of the creative. - * - * Generated from protobuf field int32 asset_width_px = 6; - */ - protected $asset_width_px = 0; - /** - * The maximum pixel width of the creative in its expanded state. - * - * Generated from protobuf field int32 expanded_width_px = 7; - */ - protected $expanded_width_px = 0; - /** - * The ID used to identify the desired placement on a publisher's page. - * Values to be used should be discussed between publishers and - * advertisers. - * - * Generated from protobuf field string ad_slot_id = 8; - */ - protected $ad_slot_id = ''; - /** - * The list of tracking events for the companion. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 9; - */ - private $events; - protected $ad_resource; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Stitcher\V1\IframeAdResource $iframe_ad_resource - * The IFrame ad resource associated with the companion ad. - * @type \Google\Cloud\Video\Stitcher\V1\StaticAdResource $static_ad_resource - * The static ad resource associated with the companion ad. - * @type \Google\Cloud\Video\Stitcher\V1\HtmlAdResource $html_ad_resource - * The HTML ad resource associated with the companion ad. - * @type string $api_framework - * The API necessary to communicate with the creative if available. - * @type int $height_px - * The pixel height of the placement slot for the intended creative. - * @type int $width_px - * The pixel width of the placement slot for the intended creative. - * @type int $asset_height_px - * The pixel height of the creative. - * @type int $expanded_height_px - * The maximum pixel height of the creative in its expanded state. - * @type int $asset_width_px - * The pixel width of the creative. - * @type int $expanded_width_px - * The maximum pixel width of the creative in its expanded state. - * @type string $ad_slot_id - * The ID used to identify the desired placement on a publisher's page. - * Values to be used should be discussed between publishers and - * advertisers. - * @type array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $events - * The list of tracking events for the companion. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Companions::initOnce(); - parent::__construct($data); - } - - /** - * The IFrame ad resource associated with the companion ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.IframeAdResource iframe_ad_resource = 10; - * @return \Google\Cloud\Video\Stitcher\V1\IframeAdResource|null - */ - public function getIframeAdResource() - { - return $this->readOneof(10); - } - - public function hasIframeAdResource() - { - return $this->hasOneof(10); - } - - /** - * The IFrame ad resource associated with the companion ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.IframeAdResource iframe_ad_resource = 10; - * @param \Google\Cloud\Video\Stitcher\V1\IframeAdResource $var - * @return $this - */ - public function setIframeAdResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\IframeAdResource::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * The static ad resource associated with the companion ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.StaticAdResource static_ad_resource = 11; - * @return \Google\Cloud\Video\Stitcher\V1\StaticAdResource|null - */ - public function getStaticAdResource() - { - return $this->readOneof(11); - } - - public function hasStaticAdResource() - { - return $this->hasOneof(11); - } - - /** - * The static ad resource associated with the companion ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.StaticAdResource static_ad_resource = 11; - * @param \Google\Cloud\Video\Stitcher\V1\StaticAdResource $var - * @return $this - */ - public function setStaticAdResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\StaticAdResource::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * The HTML ad resource associated with the companion ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.HtmlAdResource html_ad_resource = 12; - * @return \Google\Cloud\Video\Stitcher\V1\HtmlAdResource|null - */ - public function getHtmlAdResource() - { - return $this->readOneof(12); - } - - public function hasHtmlAdResource() - { - return $this->hasOneof(12); - } - - /** - * The HTML ad resource associated with the companion ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.HtmlAdResource html_ad_resource = 12; - * @param \Google\Cloud\Video\Stitcher\V1\HtmlAdResource $var - * @return $this - */ - public function setHtmlAdResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\HtmlAdResource::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * The API necessary to communicate with the creative if available. - * - * Generated from protobuf field string api_framework = 1; - * @return string - */ - public function getApiFramework() - { - return $this->api_framework; - } - - /** - * The API necessary to communicate with the creative if available. - * - * Generated from protobuf field string api_framework = 1; - * @param string $var - * @return $this - */ - public function setApiFramework($var) - { - GPBUtil::checkString($var, True); - $this->api_framework = $var; - - return $this; - } - - /** - * The pixel height of the placement slot for the intended creative. - * - * Generated from protobuf field int32 height_px = 2; - * @return int - */ - public function getHeightPx() - { - return $this->height_px; - } - - /** - * The pixel height of the placement slot for the intended creative. - * - * Generated from protobuf field int32 height_px = 2; - * @param int $var - * @return $this - */ - public function setHeightPx($var) - { - GPBUtil::checkInt32($var); - $this->height_px = $var; - - return $this; - } - - /** - * The pixel width of the placement slot for the intended creative. - * - * Generated from protobuf field int32 width_px = 3; - * @return int - */ - public function getWidthPx() - { - return $this->width_px; - } - - /** - * The pixel width of the placement slot for the intended creative. - * - * Generated from protobuf field int32 width_px = 3; - * @param int $var - * @return $this - */ - public function setWidthPx($var) - { - GPBUtil::checkInt32($var); - $this->width_px = $var; - - return $this; - } - - /** - * The pixel height of the creative. - * - * Generated from protobuf field int32 asset_height_px = 4; - * @return int - */ - public function getAssetHeightPx() - { - return $this->asset_height_px; - } - - /** - * The pixel height of the creative. - * - * Generated from protobuf field int32 asset_height_px = 4; - * @param int $var - * @return $this - */ - public function setAssetHeightPx($var) - { - GPBUtil::checkInt32($var); - $this->asset_height_px = $var; - - return $this; - } - - /** - * The maximum pixel height of the creative in its expanded state. - * - * Generated from protobuf field int32 expanded_height_px = 5; - * @return int - */ - public function getExpandedHeightPx() - { - return $this->expanded_height_px; - } - - /** - * The maximum pixel height of the creative in its expanded state. - * - * Generated from protobuf field int32 expanded_height_px = 5; - * @param int $var - * @return $this - */ - public function setExpandedHeightPx($var) - { - GPBUtil::checkInt32($var); - $this->expanded_height_px = $var; - - return $this; - } - - /** - * The pixel width of the creative. - * - * Generated from protobuf field int32 asset_width_px = 6; - * @return int - */ - public function getAssetWidthPx() - { - return $this->asset_width_px; - } - - /** - * The pixel width of the creative. - * - * Generated from protobuf field int32 asset_width_px = 6; - * @param int $var - * @return $this - */ - public function setAssetWidthPx($var) - { - GPBUtil::checkInt32($var); - $this->asset_width_px = $var; - - return $this; - } - - /** - * The maximum pixel width of the creative in its expanded state. - * - * Generated from protobuf field int32 expanded_width_px = 7; - * @return int - */ - public function getExpandedWidthPx() - { - return $this->expanded_width_px; - } - - /** - * The maximum pixel width of the creative in its expanded state. - * - * Generated from protobuf field int32 expanded_width_px = 7; - * @param int $var - * @return $this - */ - public function setExpandedWidthPx($var) - { - GPBUtil::checkInt32($var); - $this->expanded_width_px = $var; - - return $this; - } - - /** - * The ID used to identify the desired placement on a publisher's page. - * Values to be used should be discussed between publishers and - * advertisers. - * - * Generated from protobuf field string ad_slot_id = 8; - * @return string - */ - public function getAdSlotId() - { - return $this->ad_slot_id; - } - - /** - * The ID used to identify the desired placement on a publisher's page. - * Values to be used should be discussed between publishers and - * advertisers. - * - * Generated from protobuf field string ad_slot_id = 8; - * @param string $var - * @return $this - */ - public function setAdSlotId($var) - { - GPBUtil::checkString($var, True); - $this->ad_slot_id = $var; - - return $this; - } - - /** - * The list of tracking events for the companion. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEvents() - { - return $this->events; - } - - /** - * The list of tracking events for the companion. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 9; - * @param array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\Event::class); - $this->events = $arr; - - return $this; - } - - /** - * @return string - */ - public function getAdResource() - { - return $this->whichOneof("ad_resource"); - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds.php deleted file mode 100644 index 19875411f716..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.video.stitcher.v1.CompanionAds - */ -class CompanionAds extends \Google\Protobuf\Internal\Message -{ - /** - * Indicates how many of the companions should be displayed with the ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement display_requirement = 1; - */ - protected $display_requirement = 0; - /** - * List of companion ads. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Companion companions = 2; - */ - private $companions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $display_requirement - * Indicates how many of the companions should be displayed with the ad. - * @type array<\Google\Cloud\Video\Stitcher\V1\Companion>|\Google\Protobuf\Internal\RepeatedField $companions - * List of companion ads. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Companions::initOnce(); - parent::__construct($data); - } - - /** - * Indicates how many of the companions should be displayed with the ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement display_requirement = 1; - * @return int - */ - public function getDisplayRequirement() - { - return $this->display_requirement; - } - - /** - * Indicates how many of the companions should be displayed with the ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement display_requirement = 1; - * @param int $var - * @return $this - */ - public function setDisplayRequirement($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\CompanionAds\DisplayRequirement::class); - $this->display_requirement = $var; - - return $this; - } - - /** - * List of companion ads. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Companion companions = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCompanions() - { - return $this->companions; - } - - /** - * List of companion ads. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Companion companions = 2; - * @param array<\Google\Cloud\Video\Stitcher\V1\Companion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCompanions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\Companion::class); - $this->companions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds/DisplayRequirement.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds/DisplayRequirement.php deleted file mode 100644 index edcd46145e33..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds/DisplayRequirement.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement - */ -class DisplayRequirement -{ - /** - * Required companions are not specified. The default is ALL. - * - * Generated from protobuf enum DISPLAY_REQUIREMENT_UNSPECIFIED = 0; - */ - const DISPLAY_REQUIREMENT_UNSPECIFIED = 0; - /** - * All companions are required to be displayed. - * - * Generated from protobuf enum ALL = 1; - */ - const ALL = 1; - /** - * At least one of companions needs to be displayed. - * - * Generated from protobuf enum ANY = 2; - */ - const ANY = 2; - /** - * All companions are optional for display. - * - * Generated from protobuf enum NONE = 3; - */ - const NONE = 3; - - private static $valueToName = [ - self::DISPLAY_REQUIREMENT_UNSPECIFIED => 'DISPLAY_REQUIREMENT_UNSPECIFIED', - self::ALL => 'ALL', - self::ANY => 'ANY', - self::NONE => 'NONE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DisplayRequirement::class, \Google\Cloud\Video\Stitcher\V1\CompanionAds_DisplayRequirement::class); - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateCdnKeyRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateCdnKeyRequest.php deleted file mode 100644 index 86b5b6d68253..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateCdnKeyRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.video.stitcher.v1.CreateCdnKeyRequest - */ -class CreateCdnKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project in which the CDN key should be created, in the form - * of `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The CDN key resource to create. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cdn_key = null; - /** - * Required. The ID to use for the CDN key, which will become the final - * component of the CDN key's resource name. - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * - * Generated from protobuf field string cdn_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cdn_key_id = ''; - - /** - * @param string $parent Required. The project in which the CDN key should be created, in the form - * of `projects/{project_number}/locations/{location}`. Please see - * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Video\Stitcher\V1\CdnKey $cdnKey Required. The CDN key resource to create. - * @param string $cdnKeyId Required. The ID to use for the CDN key, which will become the final - * component of the CDN key's resource name. - * - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * - * @return \Google\Cloud\Video\Stitcher\V1\CreateCdnKeyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\Stitcher\V1\CdnKey $cdnKey, string $cdnKeyId): self - { - return (new self()) - ->setParent($parent) - ->setCdnKey($cdnKey) - ->setCdnKeyId($cdnKeyId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project in which the CDN key should be created, in the form - * of `projects/{project_number}/locations/{location}`. - * @type \Google\Cloud\Video\Stitcher\V1\CdnKey $cdn_key - * Required. The CDN key resource to create. - * @type string $cdn_key_id - * Required. The ID to use for the CDN key, which will become the final - * component of the CDN key's resource name. - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project in which the CDN key should be created, in the form - * of `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project in which the CDN key should be created, in the form - * of `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The CDN key resource to create. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\Stitcher\V1\CdnKey|null - */ - public function getCdnKey() - { - return $this->cdn_key; - } - - public function hasCdnKey() - { - return isset($this->cdn_key); - } - - public function clearCdnKey() - { - unset($this->cdn_key); - } - - /** - * Required. The CDN key resource to create. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\Stitcher\V1\CdnKey $var - * @return $this - */ - public function setCdnKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\CdnKey::class); - $this->cdn_key = $var; - - return $this; - } - - /** - * Required. The ID to use for the CDN key, which will become the final - * component of the CDN key's resource name. - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * - * Generated from protobuf field string cdn_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCdnKeyId() - { - return $this->cdn_key_id; - } - - /** - * Required. The ID to use for the CDN key, which will become the final - * component of the CDN key's resource name. - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * - * Generated from protobuf field string cdn_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCdnKeyId($var) - { - GPBUtil::checkString($var, True); - $this->cdn_key_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveConfigRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveConfigRequest.php deleted file mode 100644 index 2e55e807afd3..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveConfigRequest.php +++ /dev/null @@ -1,242 +0,0 @@ -google.cloud.video.stitcher.v1.CreateLiveConfigRequest - */ -class CreateLiveConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project in which the live config should be created, in - * the form of `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The unique identifier ID to use for the live config. - * - * Generated from protobuf field string live_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $live_config_id = ''; - /** - * Required. The live config resource to create. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig live_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $live_config = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 4; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The project in which the live config should be created, in - * the form of `projects/{project_number}/locations/{location}`. Please see - * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Video\Stitcher\V1\LiveConfig $liveConfig Required. The live config resource to create. - * @param string $liveConfigId Required. The unique identifier ID to use for the live config. - * - * @return \Google\Cloud\Video\Stitcher\V1\CreateLiveConfigRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\Stitcher\V1\LiveConfig $liveConfig, string $liveConfigId): self - { - return (new self()) - ->setParent($parent) - ->setLiveConfig($liveConfig) - ->setLiveConfigId($liveConfigId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project in which the live config should be created, in - * the form of `projects/{project_number}/locations/{location}`. - * @type string $live_config_id - * Required. The unique identifier ID to use for the live config. - * @type \Google\Cloud\Video\Stitcher\V1\LiveConfig $live_config - * Required. The live config resource to create. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project in which the live config should be created, in - * the form of `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project in which the live config should be created, in - * the form of `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The unique identifier ID to use for the live config. - * - * Generated from protobuf field string live_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLiveConfigId() - { - return $this->live_config_id; - } - - /** - * Required. The unique identifier ID to use for the live config. - * - * Generated from protobuf field string live_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setLiveConfigId($var) - { - GPBUtil::checkString($var, True); - $this->live_config_id = $var; - - return $this; - } - - /** - * Required. The live config resource to create. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig live_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\Stitcher\V1\LiveConfig|null - */ - public function getLiveConfig() - { - return $this->live_config; - } - - public function hasLiveConfig() - { - return isset($this->live_config); - } - - public function clearLiveConfig() - { - unset($this->live_config); - } - - /** - * Required. The live config resource to create. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig live_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\Stitcher\V1\LiveConfig $var - * @return $this - */ - public function setLiveConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\LiveConfig::class); - $this->live_config = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 4; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 4; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveSessionRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveSessionRequest.php deleted file mode 100644 index 0b123c8f3e10..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveSessionRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.video.stitcher.v1.CreateLiveSessionRequest - */ -class CreateLiveSessionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location in which the live session should be - * created, in the form of `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Parameters for creating a live session. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession live_session = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $live_session = null; - - /** - * @param string $parent Required. The project and location in which the live session should be - * created, in the form of `projects/{project_number}/locations/{location}`. Please see - * {@see VideoStitcherServiceClient::liveSessionName()} for help formatting this field. - * @param \Google\Cloud\Video\Stitcher\V1\LiveSession $liveSession Required. Parameters for creating a live session. - * - * @return \Google\Cloud\Video\Stitcher\V1\CreateLiveSessionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\Stitcher\V1\LiveSession $liveSession): self - { - return (new self()) - ->setParent($parent) - ->setLiveSession($liveSession); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location in which the live session should be - * created, in the form of `projects/{project_number}/locations/{location}`. - * @type \Google\Cloud\Video\Stitcher\V1\LiveSession $live_session - * Required. Parameters for creating a live session. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location in which the live session should be - * created, in the form of `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project and location in which the live session should be - * created, in the form of `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Parameters for creating a live session. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession live_session = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\Stitcher\V1\LiveSession|null - */ - public function getLiveSession() - { - return $this->live_session; - } - - public function hasLiveSession() - { - return isset($this->live_session); - } - - public function clearLiveSession() - { - unset($this->live_session); - } - - /** - * Required. Parameters for creating a live session. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession live_session = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\Stitcher\V1\LiveSession $var - * @return $this - */ - public function setLiveSession($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\LiveSession::class); - $this->live_session = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateSlateRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateSlateRequest.php deleted file mode 100644 index f1cd04f9e2da..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateSlateRequest.php +++ /dev/null @@ -1,257 +0,0 @@ -google.cloud.video.stitcher.v1.CreateSlateRequest - */ -class CreateSlateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project in which the slate should be created, in the form of - * `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The unique identifier for the slate. - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * - * Generated from protobuf field string slate_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $slate_id = ''; - /** - * Required. The slate to create. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $slate = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 4; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The project in which the slate should be created, in the form of - * `projects/{project_number}/locations/{location}`. Please see - * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Video\Stitcher\V1\Slate $slate Required. The slate to create. - * @param string $slateId Required. The unique identifier for the slate. - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * - * @return \Google\Cloud\Video\Stitcher\V1\CreateSlateRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\Stitcher\V1\Slate $slate, string $slateId): self - { - return (new self()) - ->setParent($parent) - ->setSlate($slate) - ->setSlateId($slateId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project in which the slate should be created, in the form of - * `projects/{project_number}/locations/{location}`. - * @type string $slate_id - * Required. The unique identifier for the slate. - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * @type \Google\Cloud\Video\Stitcher\V1\Slate $slate - * Required. The slate to create. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project in which the slate should be created, in the form of - * `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project in which the slate should be created, in the form of - * `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The unique identifier for the slate. - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * - * Generated from protobuf field string slate_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSlateId() - { - return $this->slate_id; - } - - /** - * Required. The unique identifier for the slate. - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * - * Generated from protobuf field string slate_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSlateId($var) - { - GPBUtil::checkString($var, True); - $this->slate_id = $var; - - return $this; - } - - /** - * Required. The slate to create. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\Stitcher\V1\Slate|null - */ - public function getSlate() - { - return $this->slate; - } - - public function hasSlate() - { - return isset($this->slate); - } - - public function clearSlate() - { - unset($this->slate); - } - - /** - * Required. The slate to create. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\Stitcher\V1\Slate $var - * @return $this - */ - public function setSlate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\Slate::class); - $this->slate = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 4; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * - * Generated from protobuf field string request_id = 4; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodSessionRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodSessionRequest.php deleted file mode 100644 index 14e94a02e824..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodSessionRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.video.stitcher.v1.CreateVodSessionRequest - */ -class CreateVodSessionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location in which the VOD session should be - * created, in the form of `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Parameters for creating a session. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession vod_session = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $vod_session = null; - - /** - * @param string $parent Required. The project and location in which the VOD session should be - * created, in the form of `projects/{project_number}/locations/{location}`. Please see - * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Video\Stitcher\V1\VodSession $vodSession Required. Parameters for creating a session. - * - * @return \Google\Cloud\Video\Stitcher\V1\CreateVodSessionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\Stitcher\V1\VodSession $vodSession): self - { - return (new self()) - ->setParent($parent) - ->setVodSession($vodSession); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location in which the VOD session should be - * created, in the form of `projects/{project_number}/locations/{location}`. - * @type \Google\Cloud\Video\Stitcher\V1\VodSession $vod_session - * Required. Parameters for creating a session. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location in which the VOD session should be - * created, in the form of `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project and location in which the VOD session should be - * created, in the form of `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Parameters for creating a session. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession vod_session = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\Stitcher\V1\VodSession|null - */ - public function getVodSession() - { - return $this->vod_session; - } - - public function hasVodSession() - { - return isset($this->vod_session); - } - - public function clearVodSession() - { - unset($this->vod_session); - } - - /** - * Required. Parameters for creating a session. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession vod_session = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\Stitcher\V1\VodSession $var - * @return $this - */ - public function setVodSession($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\VodSession::class); - $this->vod_session = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteCdnKeyRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteCdnKeyRequest.php deleted file mode 100644 index 7e1f8d4d0f91..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteCdnKeyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.stitcher.v1.DeleteCdnKeyRequest - */ -class DeleteCdnKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the CDN key to be deleted, in the form of - * `projects/{project_number}/locations/{location}/cdnKeys/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the CDN key to be deleted, in the form of - * `projects/{project_number}/locations/{location}/cdnKeys/{id}`. Please see - * {@see VideoStitcherServiceClient::cdnKeyName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\DeleteCdnKeyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the CDN key to be deleted, in the form of - * `projects/{project_number}/locations/{location}/cdnKeys/{id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the CDN key to be deleted, in the form of - * `projects/{project_number}/locations/{location}/cdnKeys/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the CDN key to be deleted, in the form of - * `projects/{project_number}/locations/{location}/cdnKeys/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteLiveConfigRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteLiveConfigRequest.php deleted file mode 100644 index c0b9429e5375..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteLiveConfigRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.stitcher.v1.DeleteLiveConfigRequest - */ -class DeleteLiveConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the live config to be deleted, in the form of - * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the live config to be deleted, in the form of - * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. Please see - * {@see VideoStitcherServiceClient::liveConfigName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\DeleteLiveConfigRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the live config to be deleted, in the form of - * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the live config to be deleted, in the form of - * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the live config to be deleted, in the form of - * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteSlateRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteSlateRequest.php deleted file mode 100644 index 6cdc43bb27e4..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteSlateRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.stitcher.v1.DeleteSlateRequest - */ -class DeleteSlateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the slate to be deleted, in the form of - * `projects/{project_number}/locations/{location}/slates/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the slate to be deleted, in the form of - * `projects/{project_number}/locations/{location}/slates/{id}`. Please see - * {@see VideoStitcherServiceClient::slateName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\DeleteSlateRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the slate to be deleted, in the form of - * `projects/{project_number}/locations/{location}/slates/{id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the slate to be deleted, in the form of - * `projects/{project_number}/locations/{location}/slates/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the slate to be deleted, in the form of - * `projects/{project_number}/locations/{location}/slates/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event.php deleted file mode 100644 index c9ea208c2db7..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.video.stitcher.v1.Event - */ -class Event extends \Google\Protobuf\Internal\Message -{ - /** - * Describes the event that occurred. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Event.EventType type = 1; - */ - protected $type = 0; - /** - * The URI to trigger for this event. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * The ID of the event. - * - * Generated from protobuf field string id = 3; - */ - protected $id = ''; - /** - * The offset in seconds if the event type is `PROGRESS`. - * - * Generated from protobuf field .google.protobuf.Duration offset = 4; - */ - protected $offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Describes the event that occurred. - * @type string $uri - * The URI to trigger for this event. - * @type string $id - * The ID of the event. - * @type \Google\Protobuf\Duration $offset - * The offset in seconds if the event type is `PROGRESS`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Events::initOnce(); - parent::__construct($data); - } - - /** - * Describes the event that occurred. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Event.EventType type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Describes the event that occurred. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Event.EventType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\Event\EventType::class); - $this->type = $var; - - return $this; - } - - /** - * The URI to trigger for this event. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * The URI to trigger for this event. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * The ID of the event. - * - * Generated from protobuf field string id = 3; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * The ID of the event. - * - * Generated from protobuf field string id = 3; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The offset in seconds if the event type is `PROGRESS`. - * - * Generated from protobuf field .google.protobuf.Duration offset = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getOffset() - { - return $this->offset; - } - - public function hasOffset() - { - return isset($this->offset); - } - - public function clearOffset() - { - unset($this->offset); - } - - /** - * The offset in seconds if the event type is `PROGRESS`. - * - * Generated from protobuf field .google.protobuf.Duration offset = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event/EventType.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event/EventType.php deleted file mode 100644 index 5d323e3ef361..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event/EventType.php +++ /dev/null @@ -1,218 +0,0 @@ -google.cloud.video.stitcher.v1.Event.EventType - */ -class EventType -{ - /** - * The event type is unspecified. - * - * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; - */ - const EVENT_TYPE_UNSPECIFIED = 0; - /** - * First frame of creative ad viewed. - * - * Generated from protobuf enum CREATIVE_VIEW = 1; - */ - const CREATIVE_VIEW = 1; - /** - * Creative ad started. - * - * Generated from protobuf enum START = 2; - */ - const START = 2; - /** - * Start of an ad break. - * - * Generated from protobuf enum BREAK_START = 3; - */ - const BREAK_START = 3; - /** - * End of an ad break. - * - * Generated from protobuf enum BREAK_END = 4; - */ - const BREAK_END = 4; - /** - * Impression. - * - * Generated from protobuf enum IMPRESSION = 5; - */ - const IMPRESSION = 5; - /** - * First quartile progress. - * - * Generated from protobuf enum FIRST_QUARTILE = 6; - */ - const FIRST_QUARTILE = 6; - /** - * Midpoint progress. - * - * Generated from protobuf enum MIDPOINT = 7; - */ - const MIDPOINT = 7; - /** - * Third quartile progress. - * - * Generated from protobuf enum THIRD_QUARTILE = 8; - */ - const THIRD_QUARTILE = 8; - /** - * Ad progress completed. - * - * Generated from protobuf enum COMPLETE = 9; - */ - const COMPLETE = 9; - /** - * Specific progress event with an offset. - * - * Generated from protobuf enum PROGRESS = 10; - */ - const PROGRESS = 10; - /** - * Player muted. - * - * Generated from protobuf enum MUTE = 11; - */ - const MUTE = 11; - /** - * Player unmuted. - * - * Generated from protobuf enum UNMUTE = 12; - */ - const UNMUTE = 12; - /** - * Player paused. - * - * Generated from protobuf enum PAUSE = 13; - */ - const PAUSE = 13; - /** - * Click event. - * - * Generated from protobuf enum CLICK = 14; - */ - const CLICK = 14; - /** - * Click-through event. - * - * Generated from protobuf enum CLICK_THROUGH = 15; - */ - const CLICK_THROUGH = 15; - /** - * Player rewinding. - * - * Generated from protobuf enum REWIND = 16; - */ - const REWIND = 16; - /** - * Player resumed. - * - * Generated from protobuf enum RESUME = 17; - */ - const RESUME = 17; - /** - * Error event. - * - * Generated from protobuf enum ERROR = 18; - */ - const ERROR = 18; - /** - * Ad expanded to a larger size. - * - * Generated from protobuf enum EXPAND = 21; - */ - const EXPAND = 21; - /** - * Ad collapsed to a smaller size. - * - * Generated from protobuf enum COLLAPSE = 22; - */ - const COLLAPSE = 22; - /** - * Non-linear ad closed. - * - * Generated from protobuf enum CLOSE = 24; - */ - const CLOSE = 24; - /** - * Linear ad closed. - * - * Generated from protobuf enum CLOSE_LINEAR = 25; - */ - const CLOSE_LINEAR = 25; - /** - * Ad skipped. - * - * Generated from protobuf enum SKIP = 26; - */ - const SKIP = 26; - /** - * Accept invitation event. - * - * Generated from protobuf enum ACCEPT_INVITATION = 27; - */ - const ACCEPT_INVITATION = 27; - - private static $valueToName = [ - self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', - self::CREATIVE_VIEW => 'CREATIVE_VIEW', - self::START => 'START', - self::BREAK_START => 'BREAK_START', - self::BREAK_END => 'BREAK_END', - self::IMPRESSION => 'IMPRESSION', - self::FIRST_QUARTILE => 'FIRST_QUARTILE', - self::MIDPOINT => 'MIDPOINT', - self::THIRD_QUARTILE => 'THIRD_QUARTILE', - self::COMPLETE => 'COMPLETE', - self::PROGRESS => 'PROGRESS', - self::MUTE => 'MUTE', - self::UNMUTE => 'UNMUTE', - self::PAUSE => 'PAUSE', - self::CLICK => 'CLICK', - self::CLICK_THROUGH => 'CLICK_THROUGH', - self::REWIND => 'REWIND', - self::RESUME => 'RESUME', - self::ERROR => 'ERROR', - self::EXPAND => 'EXPAND', - self::COLLAPSE => 'COLLAPSE', - self::CLOSE => 'CLOSE', - self::CLOSE_LINEAR => 'CLOSE_LINEAR', - self::SKIP => 'SKIP', - self::ACCEPT_INVITATION => 'ACCEPT_INVITATION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EventType::class, \Google\Cloud\Video\Stitcher\V1\Event_EventType::class); - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamLiveConfig.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamLiveConfig.php deleted file mode 100644 index 74a1dd80906a..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamLiveConfig.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.video.stitcher.v1.GamLiveConfig - */ -class GamLiveConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Ad Manager network code to associate with the live config. - * - * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network_code = ''; - /** - * Output only. The asset key identifier generated for the live config. - * - * Generated from protobuf field string asset_key = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $asset_key = ''; - /** - * Output only. The custom asset key identifier generated for the live config. - * - * Generated from protobuf field string custom_asset_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $custom_asset_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network_code - * Required. Ad Manager network code to associate with the live config. - * @type string $asset_key - * Output only. The asset key identifier generated for the live config. - * @type string $custom_asset_key - * Output only. The custom asset key identifier generated for the live config. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\LiveConfigs::initOnce(); - parent::__construct($data); - } - - /** - * Required. Ad Manager network code to associate with the live config. - * - * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNetworkCode() - { - return $this->network_code; - } - - /** - * Required. Ad Manager network code to associate with the live config. - * - * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNetworkCode($var) - { - GPBUtil::checkString($var, True); - $this->network_code = $var; - - return $this; - } - - /** - * Output only. The asset key identifier generated for the live config. - * - * Generated from protobuf field string asset_key = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAssetKey() - { - return $this->asset_key; - } - - /** - * Output only. The asset key identifier generated for the live config. - * - * Generated from protobuf field string asset_key = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAssetKey($var) - { - GPBUtil::checkString($var, True); - $this->asset_key = $var; - - return $this; - } - - /** - * Output only. The custom asset key identifier generated for the live config. - * - * Generated from protobuf field string custom_asset_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCustomAssetKey() - { - return $this->custom_asset_key; - } - - /** - * Output only. The custom asset key identifier generated for the live config. - * - * Generated from protobuf field string custom_asset_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCustomAssetKey($var) - { - GPBUtil::checkString($var, True); - $this->custom_asset_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetCdnKeyRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetCdnKeyRequest.php deleted file mode 100644 index 60883c4c2bcb..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetCdnKeyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.stitcher.v1.GetCdnKeyRequest - */ -class GetCdnKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the CDN key to be retrieved, in the form of - * `projects/{project}/locations/{location}/cdnKeys/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the CDN key to be retrieved, in the form of - * `projects/{project}/locations/{location}/cdnKeys/{id}`. Please see - * {@see VideoStitcherServiceClient::cdnKeyName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\GetCdnKeyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the CDN key to be retrieved, in the form of - * `projects/{project}/locations/{location}/cdnKeys/{id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the CDN key to be retrieved, in the form of - * `projects/{project}/locations/{location}/cdnKeys/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the CDN key to be retrieved, in the form of - * `projects/{project}/locations/{location}/cdnKeys/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveAdTagDetailRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveAdTagDetailRequest.php deleted file mode 100644 index 0bb9510c90d2..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveAdTagDetailRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest - */ -class GetLiveAdTagDetailRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. Please see - * {@see VideoStitcherServiceClient::liveAdTagDetailName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\GetLiveAdTagDetailRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveConfigRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveConfigRequest.php deleted file mode 100644 index 903077856948..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveConfigRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.video.stitcher.v1.GetLiveConfigRequest - */ -class GetLiveConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the live config to be retrieved, in the form - * of - * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the live config to be retrieved, in the form - * of - * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. Please see - * {@see VideoStitcherServiceClient::liveConfigName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\GetLiveConfigRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the live config to be retrieved, in the form - * of - * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the live config to be retrieved, in the form - * of - * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the live config to be retrieved, in the form - * of - * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveSessionRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveSessionRequest.php deleted file mode 100644 index a3ba9f66b9a9..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveSessionRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.stitcher.v1.GetLiveSessionRequest - */ -class GetLiveSessionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the live session, in the form of - * `projects/{project_number}/locations/{location}/liveSessions/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the live session, in the form of - * `projects/{project_number}/locations/{location}/liveSessions/{id}`. Please see - * {@see VideoStitcherServiceClient::liveSessionName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\GetLiveSessionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the live session, in the form of - * `projects/{project_number}/locations/{location}/liveSessions/{id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the live session, in the form of - * `projects/{project_number}/locations/{location}/liveSessions/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the live session, in the form of - * `projects/{project_number}/locations/{location}/liveSessions/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetSlateRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetSlateRequest.php deleted file mode 100644 index 220a34dfa77c..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetSlateRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.stitcher.v1.GetSlateRequest - */ -class GetSlateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the slate to be retrieved, of the slate, in the form - * of `projects/{project_number}/locations/{location}/slates/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the slate to be retrieved, of the slate, in the form - * of `projects/{project_number}/locations/{location}/slates/{id}`. Please see - * {@see VideoStitcherServiceClient::slateName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\GetSlateRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the slate to be retrieved, of the slate, in the form - * of `projects/{project_number}/locations/{location}/slates/{id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the slate to be retrieved, of the slate, in the form - * of `projects/{project_number}/locations/{location}/slates/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the slate to be retrieved, of the slate, in the form - * of `projects/{project_number}/locations/{location}/slates/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodAdTagDetailRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodAdTagDetailRequest.php deleted file mode 100644 index b3f841410af0..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodAdTagDetailRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest - */ -class GetVodAdTagDetailRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the ad tag detail for the specified VOD session, in - * the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the ad tag detail for the specified VOD session, in - * the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. Please see - * {@see VideoStitcherServiceClient::vodAdTagDetailName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\GetVodAdTagDetailRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the ad tag detail for the specified VOD session, in - * the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the ad tag detail for the specified VOD session, in - * the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the ad tag detail for the specified VOD session, in - * the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodSessionRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodSessionRequest.php deleted file mode 100644 index 523db81a33c9..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodSessionRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.stitcher.v1.GetVodSessionRequest - */ -class GetVodSessionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the VOD session to be retrieved, in the form of - * `projects/{project_number}/locations/{location}/vodSessions/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the VOD session to be retrieved, in the form of - * `projects/{project_number}/locations/{location}/vodSessions/{id}`. Please see - * {@see VideoStitcherServiceClient::vodSessionName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\GetVodSessionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the VOD session to be retrieved, in the form of - * `projects/{project_number}/locations/{location}/vodSessions/{id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the VOD session to be retrieved, in the form of - * `projects/{project_number}/locations/{location}/vodSessions/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the VOD session to be retrieved, in the form of - * `projects/{project_number}/locations/{location}/vodSessions/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodStitchDetailRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodStitchDetailRequest.php deleted file mode 100644 index 019ccfb7cd94..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodStitchDetailRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.video.stitcher.v1.GetVodStitchDetailRequest - */ -class GetVodStitchDetailRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the stitch detail in the specified VOD session, in - * the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the stitch detail in the specified VOD session, in - * the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. Please see - * {@see VideoStitcherServiceClient::vodStitchDetailName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\GetVodStitchDetailRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the stitch detail in the specified VOD session, in - * the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the stitch detail in the specified VOD session, in - * the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the stitch detail in the specified VOD session, in - * the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GoogleCdnKey.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GoogleCdnKey.php deleted file mode 100644 index afa7b822bf12..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GoogleCdnKey.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.video.stitcher.v1.GoogleCdnKey - */ -class GoogleCdnKey extends \Google\Protobuf\Internal\Message -{ - /** - * Input only. Secret for this Google Cloud CDN key. - * - * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $private_key = ''; - /** - * The public name of the Google Cloud CDN key. - * - * Generated from protobuf field string key_name = 2; - */ - protected $key_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $private_key - * Input only. Secret for this Google Cloud CDN key. - * @type string $key_name - * The public name of the Google Cloud CDN key. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\CdnKeys::initOnce(); - parent::__construct($data); - } - - /** - * Input only. Secret for this Google Cloud CDN key. - * - * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getPrivateKey() - { - return $this->private_key; - } - - /** - * Input only. Secret for this Google Cloud CDN key. - * - * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPrivateKey($var) - { - GPBUtil::checkString($var, False); - $this->private_key = $var; - - return $this; - } - - /** - * The public name of the Google Cloud CDN key. - * - * Generated from protobuf field string key_name = 2; - * @return string - */ - public function getKeyName() - { - return $this->key_name; - } - - /** - * The public name of the Google Cloud CDN key. - * - * Generated from protobuf field string key_name = 2; - * @param string $var - * @return $this - */ - public function setKeyName($var) - { - GPBUtil::checkString($var, True); - $this->key_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/HtmlAdResource.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/HtmlAdResource.php deleted file mode 100644 index 3e45e33af960..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/HtmlAdResource.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.video.stitcher.v1.HtmlAdResource - */ -class HtmlAdResource extends \Google\Protobuf\Internal\Message -{ - /** - * The HTML to display for the ad resource. - * - * Generated from protobuf field string html_source = 1; - */ - protected $html_source = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $html_source - * The HTML to display for the ad resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Companions::initOnce(); - parent::__construct($data); - } - - /** - * The HTML to display for the ad resource. - * - * Generated from protobuf field string html_source = 1; - * @return string - */ - public function getHtmlSource() - { - return $this->html_source; - } - - /** - * The HTML to display for the ad resource. - * - * Generated from protobuf field string html_source = 1; - * @param string $var - * @return $this - */ - public function setHtmlSource($var) - { - GPBUtil::checkString($var, True); - $this->html_source = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/IframeAdResource.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/IframeAdResource.php deleted file mode 100644 index 3251ce7c39b3..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/IframeAdResource.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.video.stitcher.v1.IframeAdResource - */ -class IframeAdResource extends \Google\Protobuf\Internal\Message -{ - /** - * URI source for an IFrame to display for the ad resource. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * URI source for an IFrame to display for the ad resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Companions::initOnce(); - parent::__construct($data); - } - - /** - * URI source for an IFrame to display for the ad resource. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI source for an IFrame to display for the ad resource. - * - * Generated from protobuf field string uri = 1; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Interstitials.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Interstitials.php deleted file mode 100644 index 11acfce74a28..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Interstitials.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.video.stitcher.v1.Interstitials - */ -class Interstitials extends \Google\Protobuf\Internal\Message -{ - /** - * List of ad breaks ordered by time. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAdBreak ad_breaks = 1; - */ - private $ad_breaks; - /** - * Information related to the content of the VOD session. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSessionContent session_content = 2; - */ - protected $session_content = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Video\Stitcher\V1\VodSessionAdBreak>|\Google\Protobuf\Internal\RepeatedField $ad_breaks - * List of ad breaks ordered by time. - * @type \Google\Cloud\Video\Stitcher\V1\VodSessionContent $session_content - * Information related to the content of the VOD session. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * List of ad breaks ordered by time. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAdBreak ad_breaks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdBreaks() - { - return $this->ad_breaks; - } - - /** - * List of ad breaks ordered by time. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAdBreak ad_breaks = 1; - * @param array<\Google\Cloud\Video\Stitcher\V1\VodSessionAdBreak>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdBreaks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\VodSessionAdBreak::class); - $this->ad_breaks = $arr; - - return $this; - } - - /** - * Information related to the content of the VOD session. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSessionContent session_content = 2; - * @return \Google\Cloud\Video\Stitcher\V1\VodSessionContent|null - */ - public function getSessionContent() - { - return $this->session_content; - } - - public function hasSessionContent() - { - return isset($this->session_content); - } - - public function clearSessionContent() - { - unset($this->session_content); - } - - /** - * Information related to the content of the VOD session. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSessionContent session_content = 2; - * @param \Google\Cloud\Video\Stitcher\V1\VodSessionContent $var - * @return $this - */ - public function setSessionContent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\VodSessionContent::class); - $this->session_content = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysRequest.php deleted file mode 100644 index 18c76416ec3f..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysRequest.php +++ /dev/null @@ -1,226 +0,0 @@ -google.cloud.video.stitcher.v1.ListCdnKeysRequest - */ -class ListCdnKeysRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project that contains the list of CDN keys, in the form of - * `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Hint for how to order the results - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The project that contains the list of CDN keys, in the form of - * `projects/{project_number}/locations/{location}`. Please see - * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\ListCdnKeysRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project that contains the list of CDN keys, in the form of - * `projects/{project_number}/locations/{location}`. - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type string $filter - * Filtering results - * @type string $order_by - * Hint for how to order the results - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project that contains the list of CDN keys, in the form of - * `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project that contains the list of CDN keys, in the form of - * `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filtering results - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Hint for how to order the results - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Hint for how to order the results - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysResponse.php deleted file mode 100644 index fdb7d35e26a0..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.video.stitcher.v1.ListCdnKeysResponse - */ -class ListCdnKeysResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of CDN keys. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.CdnKey cdn_keys = 1; - */ - private $cdn_keys; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Video\Stitcher\V1\CdnKey>|\Google\Protobuf\Internal\RepeatedField $cdn_keys - * List of CDN keys. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * List of CDN keys. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.CdnKey cdn_keys = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCdnKeys() - { - return $this->cdn_keys; - } - - /** - * List of CDN keys. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.CdnKey cdn_keys = 1; - * @param array<\Google\Cloud\Video\Stitcher\V1\CdnKey>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCdnKeys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\CdnKey::class); - $this->cdn_keys = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsRequest.php deleted file mode 100644 index d14bea8f5f75..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsRequest.php +++ /dev/null @@ -1,154 +0,0 @@ -google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest - */ -class ListLiveAdTagDetailsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource parent in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The pagination token returned from a previous List request. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource parent in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}`. Please see - * {@see VideoStitcherServiceClient::liveSessionName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\ListLiveAdTagDetailsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource parent in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}`. - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The pagination token returned from a previous List request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource parent in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource parent in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The pagination token returned from a previous List request. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The pagination token returned from a previous List request. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsResponse.php deleted file mode 100644 index 934491dee650..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse - */ -class ListLiveAdTagDetailsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of live session ad tag details. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveAdTagDetail live_ad_tag_details = 1; - */ - private $live_ad_tag_details; - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail>|\Google\Protobuf\Internal\RepeatedField $live_ad_tag_details - * A list of live session ad tag details. - * @type string $next_page_token - * The pagination token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * A list of live session ad tag details. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveAdTagDetail live_ad_tag_details = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLiveAdTagDetails() - { - return $this->live_ad_tag_details; - } - - /** - * A list of live session ad tag details. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveAdTagDetail live_ad_tag_details = 1; - * @param array<\Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLiveAdTagDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail::class); - $this->live_ad_tag_details = $arr; - - return $this; - } - - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsRequest.php deleted file mode 100644 index d45ae42d9d2d..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsRequest.php +++ /dev/null @@ -1,234 +0,0 @@ -google.cloud.video.stitcher.v1.ListLiveConfigsRequest - */ -class ListLiveConfigsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project that contains the list of live configs, in the - * form of `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Optional. The filter to apply to list results (see - * [Filtering](https://google.aip.dev/160)). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Specifies the ordering of results following - * [Cloud API - * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The project that contains the list of live configs, in the - * form of `projects/{project_number}/locations/{location}`. Please see - * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\ListLiveConfigsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project that contains the list of live configs, in the - * form of `projects/{project_number}/locations/{location}`. - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * @type string $filter - * Optional. The filter to apply to list results (see - * [Filtering](https://google.aip.dev/160)). - * @type string $order_by - * Optional. Specifies the ordering of results following - * [Cloud API - * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project that contains the list of live configs, in the - * form of `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project that contains the list of live configs, in the - * form of `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter to apply to list results (see - * [Filtering](https://google.aip.dev/160)). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter to apply to list results (see - * [Filtering](https://google.aip.dev/160)). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Specifies the ordering of results following - * [Cloud API - * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Specifies the ordering of results following - * [Cloud API - * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsResponse.php deleted file mode 100644 index 1eae2969f2b1..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.video.stitcher.v1.ListLiveConfigsResponse - */ -class ListLiveConfigsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of live configs. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveConfig live_configs = 1; - */ - private $live_configs; - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Video\Stitcher\V1\LiveConfig>|\Google\Protobuf\Internal\RepeatedField $live_configs - * List of live configs. - * @type string $next_page_token - * The pagination token. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * List of live configs. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveConfig live_configs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLiveConfigs() - { - return $this->live_configs; - } - - /** - * List of live configs. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveConfig live_configs = 1; - * @param array<\Google\Cloud\Video\Stitcher\V1\LiveConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLiveConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\LiveConfig::class); - $this->live_configs = $arr; - - return $this; - } - - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesRequest.php deleted file mode 100644 index 7c24832d2b8a..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesRequest.php +++ /dev/null @@ -1,226 +0,0 @@ -google.cloud.video.stitcher.v1.ListSlatesRequest - */ -class ListSlatesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project to list slates, in the form of - * `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Hint for how to order the results - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The project to list slates, in the form of - * `projects/{project_number}/locations/{location}`. Please see - * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\ListSlatesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project to list slates, in the form of - * `projects/{project_number}/locations/{location}`. - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type string $filter - * Filtering results - * @type string $order_by - * Hint for how to order the results - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project to list slates, in the form of - * `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project to list slates, in the form of - * `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filtering results - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Hint for how to order the results - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Hint for how to order the results - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesResponse.php deleted file mode 100644 index d66e458e1618..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.video.stitcher.v1.ListSlatesResponse - */ -class ListSlatesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of slates - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Slate slates = 1; - */ - private $slates; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Video\Stitcher\V1\Slate>|\Google\Protobuf\Internal\RepeatedField $slates - * The list of slates - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * The list of slates - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Slate slates = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSlates() - { - return $this->slates; - } - - /** - * The list of slates - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Slate slates = 1; - * @param array<\Google\Cloud\Video\Stitcher\V1\Slate>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSlates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\Slate::class); - $this->slates = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsRequest.php deleted file mode 100644 index a2f4d620fe34..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsRequest.php +++ /dev/null @@ -1,154 +0,0 @@ -google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest - */ -class ListVodAdTagDetailsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The VOD session which the ad tag details belong to, in the form - * of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The VOD session which the ad tag details belong to, in the form - * of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. Please see - * {@see VideoStitcherServiceClient::vodSessionName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\ListVodAdTagDetailsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The VOD session which the ad tag details belong to, in the form - * of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The VOD session which the ad tag details belong to, in the form - * of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The VOD session which the ad tag details belong to, in the form - * of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsResponse.php deleted file mode 100644 index 47ccb4edaccb..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse - */ -class ListVodAdTagDetailsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A List of ad tag details. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodAdTagDetail vod_ad_tag_details = 1; - */ - private $vod_ad_tag_details; - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Video\Stitcher\V1\VodAdTagDetail>|\Google\Protobuf\Internal\RepeatedField $vod_ad_tag_details - * A List of ad tag details. - * @type string $next_page_token - * The pagination token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * A List of ad tag details. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodAdTagDetail vod_ad_tag_details = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVodAdTagDetails() - { - return $this->vod_ad_tag_details; - } - - /** - * A List of ad tag details. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodAdTagDetail vod_ad_tag_details = 1; - * @param array<\Google\Cloud\Video\Stitcher\V1\VodAdTagDetail>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVodAdTagDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\VodAdTagDetail::class); - $this->vod_ad_tag_details = $arr; - - return $this; - } - - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsRequest.php deleted file mode 100644 index 03a33b3b21dc..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsRequest.php +++ /dev/null @@ -1,154 +0,0 @@ -google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest - */ -class ListVodStitchDetailsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The VOD session where the stitch details belong to, in the form - * of `projects/{project}/locations/{location}/vodSessions/{id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The VOD session where the stitch details belong to, in the form - * of `projects/{project}/locations/{location}/vodSessions/{id}`. Please see - * {@see VideoStitcherServiceClient::vodSessionName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\ListVodStitchDetailsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The VOD session where the stitch details belong to, in the form - * of `projects/{project}/locations/{location}/vodSessions/{id}`. - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The VOD session where the stitch details belong to, in the form - * of `projects/{project}/locations/{location}/vodSessions/{id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The VOD session where the stitch details belong to, in the form - * of `projects/{project}/locations/{location}/vodSessions/{id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsResponse.php deleted file mode 100644 index 202317ab5600..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse - */ -class ListVodStitchDetailsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A List of stitch Details. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodStitchDetail vod_stitch_details = 1; - */ - private $vod_stitch_details; - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Video\Stitcher\V1\VodStitchDetail>|\Google\Protobuf\Internal\RepeatedField $vod_stitch_details - * A List of stitch Details. - * @type string $next_page_token - * The pagination token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * A List of stitch Details. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodStitchDetail vod_stitch_details = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVodStitchDetails() - { - return $this->vod_stitch_details; - } - - /** - * A List of stitch Details. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodStitchDetail vod_stitch_details = 1; - * @param array<\Google\Cloud\Video\Stitcher\V1\VodStitchDetail>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVodStitchDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\VodStitchDetail::class); - $this->vod_stitch_details = $arr; - - return $this; - } - - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveAdTagDetail.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveAdTagDetail.php deleted file mode 100644 index b594a4e0305f..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveAdTagDetail.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.video.stitcher.v1.LiveAdTagDetail - */ -class LiveAdTagDetail extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{id}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * A list of ad requests. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; - */ - private $ad_requests; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{id}`. - * @type array<\Google\Cloud\Video\Stitcher\V1\AdRequest>|\Google\Protobuf\Internal\RepeatedField $ad_requests - * A list of ad requests. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\AdTagDetails::initOnce(); - parent::__construct($data); - } - - /** - * The resource name in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{id}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{id}`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * A list of ad requests. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdRequests() - { - return $this->ad_requests; - } - - /** - * A list of ad requests. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; - * @param array<\Google\Cloud\Video\Stitcher\V1\AdRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\AdRequest::class); - $this->ad_requests = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig.php deleted file mode 100644 index 9a8c8479448f..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig.php +++ /dev/null @@ -1,391 +0,0 @@ -google.cloud.video.stitcher.v1.LiveConfig - */ -class LiveConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the live config, in the form of - * `projects/{project}/locations/{location}/liveConfigs/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Required. Source URI for the live stream manifest. - * - * Generated from protobuf field string source_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source_uri = ''; - /** - * The default ad tag associated with this live stream config. - * - * Generated from protobuf field string ad_tag_uri = 3; - */ - protected $ad_tag_uri = ''; - /** - * Additional metadata used to register a live stream with Google Ad Manager - * (GAM) - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.GamLiveConfig gam_live_config = 4; - */ - protected $gam_live_config = null; - /** - * Output only. State of the live config. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Required. Determines how the ads are tracked. If - * [gam_live_config][google.cloud.video.stitcher.v1.LiveConfig.gam_live_config] - * is set, the value must be `CLIENT` because the IMA SDK handles ad tracking. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ad_tracking = 0; - /** - * This must refer to a slate in the same - * project. If Google Ad Manager (GAM) is used for ads, this string sets the - * value of `slateCreativeId` in - * https://developers.google.com/ad-manager/api/reference/v202211/LiveStreamEventService.LiveStreamEvent#slateCreativeId - * - * Generated from protobuf field string default_slate = 7 [(.google.api.resource_reference) = { - */ - protected $default_slate = ''; - /** - * Defines the stitcher behavior in case an ad does not align exactly with - * the ad break boundaries. If not specified, the default is `CUT_CURRENT`. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy stitching_policy = 8; - */ - protected $stitching_policy = 0; - /** - * The configuration for prefetching ads. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.PrefetchConfig prefetch_config = 10; - */ - protected $prefetch_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the live config, in the form of - * `projects/{project}/locations/{location}/liveConfigs/{id}`. - * @type string $source_uri - * Required. Source URI for the live stream manifest. - * @type string $ad_tag_uri - * The default ad tag associated with this live stream config. - * @type \Google\Cloud\Video\Stitcher\V1\GamLiveConfig $gam_live_config - * Additional metadata used to register a live stream with Google Ad Manager - * (GAM) - * @type int $state - * Output only. State of the live config. - * @type int $ad_tracking - * Required. Determines how the ads are tracked. If - * [gam_live_config][google.cloud.video.stitcher.v1.LiveConfig.gam_live_config] - * is set, the value must be `CLIENT` because the IMA SDK handles ad tracking. - * @type string $default_slate - * This must refer to a slate in the same - * project. If Google Ad Manager (GAM) is used for ads, this string sets the - * value of `slateCreativeId` in - * https://developers.google.com/ad-manager/api/reference/v202211/LiveStreamEventService.LiveStreamEvent#slateCreativeId - * @type int $stitching_policy - * Defines the stitcher behavior in case an ad does not align exactly with - * the ad break boundaries. If not specified, the default is `CUT_CURRENT`. - * @type \Google\Cloud\Video\Stitcher\V1\PrefetchConfig $prefetch_config - * The configuration for prefetching ads. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\LiveConfigs::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the live config, in the form of - * `projects/{project}/locations/{location}/liveConfigs/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of the live config, in the form of - * `projects/{project}/locations/{location}/liveConfigs/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Source URI for the live stream manifest. - * - * Generated from protobuf field string source_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSourceUri() - { - return $this->source_uri; - } - - /** - * Required. Source URI for the live stream manifest. - * - * Generated from protobuf field string source_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSourceUri($var) - { - GPBUtil::checkString($var, True); - $this->source_uri = $var; - - return $this; - } - - /** - * The default ad tag associated with this live stream config. - * - * Generated from protobuf field string ad_tag_uri = 3; - * @return string - */ - public function getAdTagUri() - { - return $this->ad_tag_uri; - } - - /** - * The default ad tag associated with this live stream config. - * - * Generated from protobuf field string ad_tag_uri = 3; - * @param string $var - * @return $this - */ - public function setAdTagUri($var) - { - GPBUtil::checkString($var, True); - $this->ad_tag_uri = $var; - - return $this; - } - - /** - * Additional metadata used to register a live stream with Google Ad Manager - * (GAM) - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.GamLiveConfig gam_live_config = 4; - * @return \Google\Cloud\Video\Stitcher\V1\GamLiveConfig|null - */ - public function getGamLiveConfig() - { - return $this->gam_live_config; - } - - public function hasGamLiveConfig() - { - return isset($this->gam_live_config); - } - - public function clearGamLiveConfig() - { - unset($this->gam_live_config); - } - - /** - * Additional metadata used to register a live stream with Google Ad Manager - * (GAM) - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.GamLiveConfig gam_live_config = 4; - * @param \Google\Cloud\Video\Stitcher\V1\GamLiveConfig $var - * @return $this - */ - public function setGamLiveConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\GamLiveConfig::class); - $this->gam_live_config = $var; - - return $this; - } - - /** - * Output only. State of the live config. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the live config. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\LiveConfig\State::class); - $this->state = $var; - - return $this; - } - - /** - * Required. Determines how the ads are tracked. If - * [gam_live_config][google.cloud.video.stitcher.v1.LiveConfig.gam_live_config] - * is set, the value must be `CLIENT` because the IMA SDK handles ad tracking. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getAdTracking() - { - return $this->ad_tracking; - } - - /** - * Required. Determines how the ads are tracked. If - * [gam_live_config][google.cloud.video.stitcher.v1.LiveConfig.gam_live_config] - * is set, the value must be `CLIENT` because the IMA SDK handles ad tracking. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setAdTracking($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\AdTracking::class); - $this->ad_tracking = $var; - - return $this; - } - - /** - * This must refer to a slate in the same - * project. If Google Ad Manager (GAM) is used for ads, this string sets the - * value of `slateCreativeId` in - * https://developers.google.com/ad-manager/api/reference/v202211/LiveStreamEventService.LiveStreamEvent#slateCreativeId - * - * Generated from protobuf field string default_slate = 7 [(.google.api.resource_reference) = { - * @return string - */ - public function getDefaultSlate() - { - return $this->default_slate; - } - - /** - * This must refer to a slate in the same - * project. If Google Ad Manager (GAM) is used for ads, this string sets the - * value of `slateCreativeId` in - * https://developers.google.com/ad-manager/api/reference/v202211/LiveStreamEventService.LiveStreamEvent#slateCreativeId - * - * Generated from protobuf field string default_slate = 7 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDefaultSlate($var) - { - GPBUtil::checkString($var, True); - $this->default_slate = $var; - - return $this; - } - - /** - * Defines the stitcher behavior in case an ad does not align exactly with - * the ad break boundaries. If not specified, the default is `CUT_CURRENT`. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy stitching_policy = 8; - * @return int - */ - public function getStitchingPolicy() - { - return $this->stitching_policy; - } - - /** - * Defines the stitcher behavior in case an ad does not align exactly with - * the ad break boundaries. If not specified, the default is `CUT_CURRENT`. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy stitching_policy = 8; - * @param int $var - * @return $this - */ - public function setStitchingPolicy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\LiveConfig\StitchingPolicy::class); - $this->stitching_policy = $var; - - return $this; - } - - /** - * The configuration for prefetching ads. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.PrefetchConfig prefetch_config = 10; - * @return \Google\Cloud\Video\Stitcher\V1\PrefetchConfig|null - */ - public function getPrefetchConfig() - { - return $this->prefetch_config; - } - - public function hasPrefetchConfig() - { - return isset($this->prefetch_config); - } - - public function clearPrefetchConfig() - { - unset($this->prefetch_config); - } - - /** - * The configuration for prefetching ads. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.PrefetchConfig prefetch_config = 10; - * @param \Google\Cloud\Video\Stitcher\V1\PrefetchConfig $var - * @return $this - */ - public function setPrefetchConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\PrefetchConfig::class); - $this->prefetch_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/State.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/State.php deleted file mode 100644 index 3defb74d973d..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.video.stitcher.v1.LiveConfig.State - */ -class State -{ - /** - * State is not specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Live config is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Live config is ready for use. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * Live config is queued up for deletion. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::DELETING => 'DELETING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Video\Stitcher\V1\LiveConfig_State::class); - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/StitchingPolicy.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/StitchingPolicy.php deleted file mode 100644 index 02f98376c110..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/StitchingPolicy.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy - */ -class StitchingPolicy -{ - /** - * Stitching policy is not specified. - * - * Generated from protobuf enum STITCHING_POLICY_UNSPECIFIED = 0; - */ - const STITCHING_POLICY_UNSPECIFIED = 0; - /** - * Cuts an ad short and returns to content in the middle of the ad. - * - * Generated from protobuf enum CUT_CURRENT = 1; - */ - const CUT_CURRENT = 1; - /** - * Finishes stitching the current ad before returning to content. - * - * Generated from protobuf enum COMPLETE_AD = 2; - */ - const COMPLETE_AD = 2; - - private static $valueToName = [ - self::STITCHING_POLICY_UNSPECIFIED => 'STITCHING_POLICY_UNSPECIFIED', - self::CUT_CURRENT => 'CUT_CURRENT', - self::COMPLETE_AD => 'COMPLETE_AD', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StitchingPolicy::class, \Google\Cloud\Video\Stitcher\V1\LiveConfig_StitchingPolicy::class); - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession.php deleted file mode 100644 index f5a498fc5b6d..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession.php +++ /dev/null @@ -1,302 +0,0 @@ -google.cloud.video.stitcher.v1.LiveSession - */ -class LiveSession extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the live session, in the form of - * `projects/{project}/locations/{location}/liveSessions/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The URI to play the live session's ad-stitched stream. - * - * Generated from protobuf field string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $play_uri = ''; - /** - * Key value pairs for ad tag macro replacement. If the - * specified ad tag URI has macros, this field provides the mapping - * to the value that will replace the macro in the ad tag URI. - * Macros are designated by square brackets. - * For example: - * Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]" - * Ad tag macros: `{"geoId": "123"}` - * Fully qualified ad tag: - * `"https://doubleclick.google.com/ad/1?geo_id=123"` - * - * Generated from protobuf field map ad_tag_macros = 6; - */ - private $ad_tag_macros; - /** - * Additional options that affect the output of the manifest. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10; - */ - protected $manifest_options = null; - /** - * This field should be set with appropriate values if GAM is being used for - * ads. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession.GamSettings gam_settings = 15; - */ - protected $gam_settings = null; - /** - * Required. The resource name of the live config for this session, in the - * form of `projects/{project}/locations/{location}/liveConfigs/{id}`. - * - * Generated from protobuf field string live_config = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $live_config = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the live session, in the form of - * `projects/{project}/locations/{location}/liveSessions/{id}`. - * @type string $play_uri - * Output only. The URI to play the live session's ad-stitched stream. - * @type array|\Google\Protobuf\Internal\MapField $ad_tag_macros - * Key value pairs for ad tag macro replacement. If the - * specified ad tag URI has macros, this field provides the mapping - * to the value that will replace the macro in the ad tag URI. - * Macros are designated by square brackets. - * For example: - * Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]" - * Ad tag macros: `{"geoId": "123"}` - * Fully qualified ad tag: - * `"https://doubleclick.google.com/ad/1?geo_id=123"` - * @type \Google\Cloud\Video\Stitcher\V1\ManifestOptions $manifest_options - * Additional options that affect the output of the manifest. - * @type \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings $gam_settings - * This field should be set with appropriate values if GAM is being used for - * ads. - * @type string $live_config - * Required. The resource name of the live config for this session, in the - * form of `projects/{project}/locations/{location}/liveConfigs/{id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the live session, in the form of - * `projects/{project}/locations/{location}/liveSessions/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the live session, in the form of - * `projects/{project}/locations/{location}/liveSessions/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The URI to play the live session's ad-stitched stream. - * - * Generated from protobuf field string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPlayUri() - { - return $this->play_uri; - } - - /** - * Output only. The URI to play the live session's ad-stitched stream. - * - * Generated from protobuf field string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPlayUri($var) - { - GPBUtil::checkString($var, True); - $this->play_uri = $var; - - return $this; - } - - /** - * Key value pairs for ad tag macro replacement. If the - * specified ad tag URI has macros, this field provides the mapping - * to the value that will replace the macro in the ad tag URI. - * Macros are designated by square brackets. - * For example: - * Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]" - * Ad tag macros: `{"geoId": "123"}` - * Fully qualified ad tag: - * `"https://doubleclick.google.com/ad/1?geo_id=123"` - * - * Generated from protobuf field map ad_tag_macros = 6; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAdTagMacros() - { - return $this->ad_tag_macros; - } - - /** - * Key value pairs for ad tag macro replacement. If the - * specified ad tag URI has macros, this field provides the mapping - * to the value that will replace the macro in the ad tag URI. - * Macros are designated by square brackets. - * For example: - * Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]" - * Ad tag macros: `{"geoId": "123"}` - * Fully qualified ad tag: - * `"https://doubleclick.google.com/ad/1?geo_id=123"` - * - * Generated from protobuf field map ad_tag_macros = 6; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAdTagMacros($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->ad_tag_macros = $arr; - - return $this; - } - - /** - * Additional options that affect the output of the manifest. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10; - * @return \Google\Cloud\Video\Stitcher\V1\ManifestOptions|null - */ - public function getManifestOptions() - { - return $this->manifest_options; - } - - public function hasManifestOptions() - { - return isset($this->manifest_options); - } - - public function clearManifestOptions() - { - unset($this->manifest_options); - } - - /** - * Additional options that affect the output of the manifest. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10; - * @param \Google\Cloud\Video\Stitcher\V1\ManifestOptions $var - * @return $this - */ - public function setManifestOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\ManifestOptions::class); - $this->manifest_options = $var; - - return $this; - } - - /** - * This field should be set with appropriate values if GAM is being used for - * ads. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession.GamSettings gam_settings = 15; - * @return \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings|null - */ - public function getGamSettings() - { - return $this->gam_settings; - } - - public function hasGamSettings() - { - return isset($this->gam_settings); - } - - public function clearGamSettings() - { - unset($this->gam_settings); - } - - /** - * This field should be set with appropriate values if GAM is being used for - * ads. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession.GamSettings gam_settings = 15; - * @param \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings $var - * @return $this - */ - public function setGamSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings::class); - $this->gam_settings = $var; - - return $this; - } - - /** - * Required. The resource name of the live config for this session, in the - * form of `projects/{project}/locations/{location}/liveConfigs/{id}`. - * - * Generated from protobuf field string live_config = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getLiveConfig() - { - return $this->live_config; - } - - /** - * Required. The resource name of the live config for this session, in the - * form of `projects/{project}/locations/{location}/liveConfigs/{id}`. - * - * Generated from protobuf field string live_config = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLiveConfig($var) - { - GPBUtil::checkString($var, True); - $this->live_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession/GamSettings.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession/GamSettings.php deleted file mode 100644 index 93b56bd1e47d..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession/GamSettings.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.video.stitcher.v1.LiveSession.GamSettings - */ -class GamSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The stream ID generated by Ad Manager. - * - * Generated from protobuf field string stream_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $stream_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $stream_id - * Required. The stream ID generated by Ad Manager. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The stream ID generated by Ad Manager. - * - * Generated from protobuf field string stream_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getStreamId() - { - return $this->stream_id; - } - - /** - * Required. The stream ID generated by Ad Manager. - * - * Generated from protobuf field string stream_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setStreamId($var) - { - GPBUtil::checkString($var, True); - $this->stream_id = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GamSettings::class, \Google\Cloud\Video\Stitcher\V1\LiveSession_GamSettings::class); - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions.php deleted file mode 100644 index 27590ff366b0..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.video.stitcher.v1.ManifestOptions - */ -class ManifestOptions extends \Google\Protobuf\Internal\Message -{ - /** - * If specified, the output manifest will only return renditions matching the - * specified filters. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.RenditionFilter include_renditions = 1; - */ - private $include_renditions; - /** - * If specified, the output manifest will orders the video and muxed - * renditions by bitrate according to the ordering policy. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy bitrate_order = 2; - */ - protected $bitrate_order = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Video\Stitcher\V1\RenditionFilter>|\Google\Protobuf\Internal\RepeatedField $include_renditions - * If specified, the output manifest will only return renditions matching the - * specified filters. - * @type int $bitrate_order - * If specified, the output manifest will orders the video and muxed - * renditions by bitrate according to the ordering policy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * If specified, the output manifest will only return renditions matching the - * specified filters. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.RenditionFilter include_renditions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIncludeRenditions() - { - return $this->include_renditions; - } - - /** - * If specified, the output manifest will only return renditions matching the - * specified filters. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.RenditionFilter include_renditions = 1; - * @param array<\Google\Cloud\Video\Stitcher\V1\RenditionFilter>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIncludeRenditions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\RenditionFilter::class); - $this->include_renditions = $arr; - - return $this; - } - - /** - * If specified, the output manifest will orders the video and muxed - * renditions by bitrate according to the ordering policy. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy bitrate_order = 2; - * @return int - */ - public function getBitrateOrder() - { - return $this->bitrate_order; - } - - /** - * If specified, the output manifest will orders the video and muxed - * renditions by bitrate according to the ordering policy. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy bitrate_order = 2; - * @param int $var - * @return $this - */ - public function setBitrateOrder($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\ManifestOptions\OrderPolicy::class); - $this->bitrate_order = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions/OrderPolicy.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions/OrderPolicy.php deleted file mode 100644 index 5808fe871d5b..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions/OrderPolicy.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy - */ -class OrderPolicy -{ - /** - * Ordering policy is not specified. - * - * Generated from protobuf enum ORDER_POLICY_UNSPECIFIED = 0; - */ - const ORDER_POLICY_UNSPECIFIED = 0; - /** - * Order by ascending. - * - * Generated from protobuf enum ASCENDING = 1; - */ - const ASCENDING = 1; - /** - * Order by descending. - * - * Generated from protobuf enum DESCENDING = 2; - */ - const DESCENDING = 2; - - private static $valueToName = [ - self::ORDER_POLICY_UNSPECIFIED => 'ORDER_POLICY_UNSPECIFIED', - self::ASCENDING => 'ASCENDING', - self::DESCENDING => 'DESCENDING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OrderPolicy::class, \Google\Cloud\Video\Stitcher\V1\ManifestOptions_OrderPolicy::class); - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey.php deleted file mode 100644 index cd8cfd6dff7a..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.video.stitcher.v1.MediaCdnKey - */ -class MediaCdnKey extends \Google\Protobuf\Internal\Message -{ - /** - * Input only. 64-byte ed25519 private key for this Media CDN key. - * - * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $private_key = ''; - /** - * The keyset name of the Media CDN key. - * - * Generated from protobuf field string key_name = 2; - */ - protected $key_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $private_key - * Input only. 64-byte ed25519 private key for this Media CDN key. - * @type string $key_name - * The keyset name of the Media CDN key. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\CdnKeys::initOnce(); - parent::__construct($data); - } - - /** - * Input only. 64-byte ed25519 private key for this Media CDN key. - * - * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getPrivateKey() - { - return $this->private_key; - } - - /** - * Input only. 64-byte ed25519 private key for this Media CDN key. - * - * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPrivateKey($var) - { - GPBUtil::checkString($var, False); - $this->private_key = $var; - - return $this; - } - - /** - * The keyset name of the Media CDN key. - * - * Generated from protobuf field string key_name = 2; - * @return string - */ - public function getKeyName() - { - return $this->key_name; - } - - /** - * The keyset name of the Media CDN key. - * - * Generated from protobuf field string key_name = 2; - * @param string $var - * @return $this - */ - public function setKeyName($var) - { - GPBUtil::checkString($var, True); - $this->key_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/OperationMetadata.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/OperationMetadata.php deleted file mode 100644 index 59afa335e40b..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/OperationMetadata.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.video.stitcher.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3; - */ - protected $target = ''; - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - */ - protected $verb = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * The time the operation finished running. - * @type string $target - * Server-defined resource path for the target of the operation. - * @type string $verb - * Name of the verb executed by the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/PrefetchConfig.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/PrefetchConfig.php deleted file mode 100644 index 5a3e14be9089..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/PrefetchConfig.php +++ /dev/null @@ -1,131 +0,0 @@ -google.cloud.video.stitcher.v1.PrefetchConfig - */ -class PrefetchConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Indicates whether the option to prefetch ad requests is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $enabled = false; - /** - * The duration in seconds of the part of the break to be prefetched. - * This field is only relevant if prefetch is enabled. - * You should set this duration to as long as possible to increase the - * benefits of prefetching, but not longer than the shortest ad break - * expected. For example, for a live event with 30s and 60s ad breaks, the - * initial duration should be set to 30s. - * - * Generated from protobuf field .google.protobuf.Duration initial_ad_request_duration = 2; - */ - protected $initial_ad_request_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * Required. Indicates whether the option to prefetch ad requests is enabled. - * @type \Google\Protobuf\Duration $initial_ad_request_duration - * The duration in seconds of the part of the break to be prefetched. - * This field is only relevant if prefetch is enabled. - * You should set this duration to as long as possible to increase the - * benefits of prefetching, but not longer than the shortest ad break - * expected. For example, for a live event with 30s and 60s ad breaks, the - * initial duration should be set to 30s. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\LiveConfigs::initOnce(); - parent::__construct($data); - } - - /** - * Required. Indicates whether the option to prefetch ad requests is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Required. Indicates whether the option to prefetch ad requests is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * The duration in seconds of the part of the break to be prefetched. - * This field is only relevant if prefetch is enabled. - * You should set this duration to as long as possible to increase the - * benefits of prefetching, but not longer than the shortest ad break - * expected. For example, for a live event with 30s and 60s ad breaks, the - * initial duration should be set to 30s. - * - * Generated from protobuf field .google.protobuf.Duration initial_ad_request_duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getInitialAdRequestDuration() - { - return $this->initial_ad_request_duration; - } - - public function hasInitialAdRequestDuration() - { - return isset($this->initial_ad_request_duration); - } - - public function clearInitialAdRequestDuration() - { - unset($this->initial_ad_request_duration); - } - - /** - * The duration in seconds of the part of the break to be prefetched. - * This field is only relevant if prefetch is enabled. - * You should set this duration to as long as possible to increase the - * benefits of prefetching, but not longer than the shortest ad break - * expected. For example, for a live event with 30s and 60s ad breaks, the - * initial duration should be set to 30s. - * - * Generated from protobuf field .google.protobuf.Duration initial_ad_request_duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setInitialAdRequestDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->initial_ad_request_duration = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ProgressEvent.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ProgressEvent.php deleted file mode 100644 index e1b9852ccb27..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ProgressEvent.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.video.stitcher.v1.ProgressEvent - */ -class ProgressEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The time when the following tracking events occurs. The time is in - * seconds relative to the start of the VOD asset. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 1; - */ - protected $time_offset = null; - /** - * The list of progress tracking events for the ad break. These can be of - * the following IAB types: `BREAK_START`, `BREAK_END`, `IMPRESSION`, - * `CREATIVE_VIEW`, `START`, `FIRST_QUARTILE`, `MIDPOINT`, `THIRD_QUARTILE`, - * `COMPLETE`, `PROGRESS`. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 2; - */ - private $events; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $time_offset - * The time when the following tracking events occurs. The time is in - * seconds relative to the start of the VOD asset. - * @type array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $events - * The list of progress tracking events for the ad break. These can be of - * the following IAB types: `BREAK_START`, `BREAK_END`, `IMPRESSION`, - * `CREATIVE_VIEW`, `START`, `FIRST_QUARTILE`, `MIDPOINT`, `THIRD_QUARTILE`, - * `COMPLETE`, `PROGRESS`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Events::initOnce(); - parent::__construct($data); - } - - /** - * The time when the following tracking events occurs. The time is in - * seconds relative to the start of the VOD asset. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeOffset() - { - return $this->time_offset; - } - - public function hasTimeOffset() - { - return isset($this->time_offset); - } - - public function clearTimeOffset() - { - unset($this->time_offset); - } - - /** - * The time when the following tracking events occurs. The time is in - * seconds relative to the start of the VOD asset. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->time_offset = $var; - - return $this; - } - - /** - * The list of progress tracking events for the ad break. These can be of - * the following IAB types: `BREAK_START`, `BREAK_END`, `IMPRESSION`, - * `CREATIVE_VIEW`, `START`, `FIRST_QUARTILE`, `MIDPOINT`, `THIRD_QUARTILE`, - * `COMPLETE`, `PROGRESS`. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEvents() - { - return $this->events; - } - - /** - * The list of progress tracking events for the ad break. These can be of - * the following IAB types: `BREAK_START`, `BREAK_END`, `IMPRESSION`, - * `CREATIVE_VIEW`, `START`, `FIRST_QUARTILE`, `MIDPOINT`, `THIRD_QUARTILE`, - * `COMPLETE`, `PROGRESS`. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 2; - * @param array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\Event::class); - $this->events = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RenditionFilter.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RenditionFilter.php deleted file mode 100644 index 0d12d8ea104e..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RenditionFilter.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.video.stitcher.v1.RenditionFilter - */ -class RenditionFilter extends \Google\Protobuf\Internal\Message -{ - /** - * Bitrate in bits per second for the rendition. If set, only renditions with - * the exact bitrate will match. - * - * Generated from protobuf field int32 bitrate_bps = 1; - */ - protected $bitrate_bps = 0; - /** - * Codecs for the rendition. If set, only renditions with the exact value - * will match. - * - * Generated from protobuf field string codecs = 2; - */ - protected $codecs = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $bitrate_bps - * Bitrate in bits per second for the rendition. If set, only renditions with - * the exact bitrate will match. - * @type string $codecs - * Codecs for the rendition. If set, only renditions with the exact value - * will match. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * Bitrate in bits per second for the rendition. If set, only renditions with - * the exact bitrate will match. - * - * Generated from protobuf field int32 bitrate_bps = 1; - * @return int - */ - public function getBitrateBps() - { - return $this->bitrate_bps; - } - - /** - * Bitrate in bits per second for the rendition. If set, only renditions with - * the exact bitrate will match. - * - * Generated from protobuf field int32 bitrate_bps = 1; - * @param int $var - * @return $this - */ - public function setBitrateBps($var) - { - GPBUtil::checkInt32($var); - $this->bitrate_bps = $var; - - return $this; - } - - /** - * Codecs for the rendition. If set, only renditions with the exact value - * will match. - * - * Generated from protobuf field string codecs = 2; - * @return string - */ - public function getCodecs() - { - return $this->codecs; - } - - /** - * Codecs for the rendition. If set, only renditions with the exact value - * will match. - * - * Generated from protobuf field string codecs = 2; - * @param string $var - * @return $this - */ - public function setCodecs($var) - { - GPBUtil::checkString($var, True); - $this->codecs = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RequestMetadata.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RequestMetadata.php deleted file mode 100644 index cf958970e04e..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RequestMetadata.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.video.stitcher.v1.RequestMetadata - */ -class RequestMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The HTTP headers of the ad request. - * - * Generated from protobuf field .google.protobuf.Struct headers = 1; - */ - protected $headers = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Struct $headers - * The HTTP headers of the ad request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\AdTagDetails::initOnce(); - parent::__construct($data); - } - - /** - * The HTTP headers of the ad request. - * - * Generated from protobuf field .google.protobuf.Struct headers = 1; - * @return \Google\Protobuf\Struct|null - */ - public function getHeaders() - { - return $this->headers; - } - - public function hasHeaders() - { - return isset($this->headers); - } - - public function clearHeaders() - { - unset($this->headers); - } - - /** - * The HTTP headers of the ad request. - * - * Generated from protobuf field .google.protobuf.Struct headers = 1; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setHeaders($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->headers = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ResponseMetadata.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ResponseMetadata.php deleted file mode 100644 index 9996433d98a0..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ResponseMetadata.php +++ /dev/null @@ -1,257 +0,0 @@ -google.cloud.video.stitcher.v1.ResponseMetadata - */ -class ResponseMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Error message received when making the ad request. - * - * Generated from protobuf field string error = 1; - */ - protected $error = ''; - /** - * Headers from the response. - * - * Generated from protobuf field .google.protobuf.Struct headers = 2; - */ - protected $headers = null; - /** - * Status code for the response. - * - * Generated from protobuf field string status_code = 3; - */ - protected $status_code = ''; - /** - * Size in bytes of the response. - * - * Generated from protobuf field int32 size_bytes = 4; - */ - protected $size_bytes = 0; - /** - * Total time elapsed for the response. - * - * Generated from protobuf field .google.protobuf.Duration duration = 5; - */ - protected $duration = null; - /** - * The body of the response. - * - * Generated from protobuf field string body = 6; - */ - protected $body = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $error - * Error message received when making the ad request. - * @type \Google\Protobuf\Struct $headers - * Headers from the response. - * @type string $status_code - * Status code for the response. - * @type int $size_bytes - * Size in bytes of the response. - * @type \Google\Protobuf\Duration $duration - * Total time elapsed for the response. - * @type string $body - * The body of the response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\AdTagDetails::initOnce(); - parent::__construct($data); - } - - /** - * Error message received when making the ad request. - * - * Generated from protobuf field string error = 1; - * @return string - */ - public function getError() - { - return $this->error; - } - - /** - * Error message received when making the ad request. - * - * Generated from protobuf field string error = 1; - * @param string $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkString($var, True); - $this->error = $var; - - return $this; - } - - /** - * Headers from the response. - * - * Generated from protobuf field .google.protobuf.Struct headers = 2; - * @return \Google\Protobuf\Struct|null - */ - public function getHeaders() - { - return $this->headers; - } - - public function hasHeaders() - { - return isset($this->headers); - } - - public function clearHeaders() - { - unset($this->headers); - } - - /** - * Headers from the response. - * - * Generated from protobuf field .google.protobuf.Struct headers = 2; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setHeaders($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->headers = $var; - - return $this; - } - - /** - * Status code for the response. - * - * Generated from protobuf field string status_code = 3; - * @return string - */ - public function getStatusCode() - { - return $this->status_code; - } - - /** - * Status code for the response. - * - * Generated from protobuf field string status_code = 3; - * @param string $var - * @return $this - */ - public function setStatusCode($var) - { - GPBUtil::checkString($var, True); - $this->status_code = $var; - - return $this; - } - - /** - * Size in bytes of the response. - * - * Generated from protobuf field int32 size_bytes = 4; - * @return int - */ - public function getSizeBytes() - { - return $this->size_bytes; - } - - /** - * Size in bytes of the response. - * - * Generated from protobuf field int32 size_bytes = 4; - * @param int $var - * @return $this - */ - public function setSizeBytes($var) - { - GPBUtil::checkInt32($var); - $this->size_bytes = $var; - - return $this; - } - - /** - * Total time elapsed for the response. - * - * Generated from protobuf field .google.protobuf.Duration duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Total time elapsed for the response. - * - * Generated from protobuf field .google.protobuf.Duration duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - - /** - * The body of the response. - * - * Generated from protobuf field string body = 6; - * @return string - */ - public function getBody() - { - return $this->body; - } - - /** - * The body of the response. - * - * Generated from protobuf field string body = 6; - * @param string $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkString($var, True); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate.php deleted file mode 100644 index ffa5a67fc3f1..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.video.stitcher.v1.Slate - */ -class Slate extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the slate, in the form of - * `projects/{project_number}/locations/{location}/slates/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The URI to fetch the source content for the slate. This URI must return an - * MP4 video with at least one audio track. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * gam_slate has all the GAM-related attributes of slates. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate.GamSlate gam_slate = 3; - */ - protected $gam_slate = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the slate, in the form of - * `projects/{project_number}/locations/{location}/slates/{id}`. - * @type string $uri - * The URI to fetch the source content for the slate. This URI must return an - * MP4 video with at least one audio track. - * @type \Google\Cloud\Video\Stitcher\V1\Slate\GamSlate $gam_slate - * gam_slate has all the GAM-related attributes of slates. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Slates::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the slate, in the form of - * `projects/{project_number}/locations/{location}/slates/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the slate, in the form of - * `projects/{project_number}/locations/{location}/slates/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The URI to fetch the source content for the slate. This URI must return an - * MP4 video with at least one audio track. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * The URI to fetch the source content for the slate. This URI must return an - * MP4 video with at least one audio track. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * gam_slate has all the GAM-related attributes of slates. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate.GamSlate gam_slate = 3; - * @return \Google\Cloud\Video\Stitcher\V1\Slate\GamSlate|null - */ - public function getGamSlate() - { - return $this->gam_slate; - } - - public function hasGamSlate() - { - return isset($this->gam_slate); - } - - public function clearGamSlate() - { - unset($this->gam_slate); - } - - /** - * gam_slate has all the GAM-related attributes of slates. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate.GamSlate gam_slate = 3; - * @param \Google\Cloud\Video\Stitcher\V1\Slate\GamSlate $var - * @return $this - */ - public function setGamSlate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\Slate\GamSlate::class); - $this->gam_slate = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate/GamSlate.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate/GamSlate.php deleted file mode 100644 index e4991ab67127..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate/GamSlate.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.video.stitcher.v1.Slate.GamSlate - */ -class GamSlate extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Ad Manager network code to associate with the live config. - * - * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network_code = ''; - /** - * Output only. The identifier generated for the slate by GAM. - * - * Generated from protobuf field int64 gam_slate_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $gam_slate_id = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network_code - * Required. Ad Manager network code to associate with the live config. - * @type int|string $gam_slate_id - * Output only. The identifier generated for the slate by GAM. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Slates::initOnce(); - parent::__construct($data); - } - - /** - * Required. Ad Manager network code to associate with the live config. - * - * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNetworkCode() - { - return $this->network_code; - } - - /** - * Required. Ad Manager network code to associate with the live config. - * - * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNetworkCode($var) - { - GPBUtil::checkString($var, True); - $this->network_code = $var; - - return $this; - } - - /** - * Output only. The identifier generated for the slate by GAM. - * - * Generated from protobuf field int64 gam_slate_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getGamSlateId() - { - return $this->gam_slate_id; - } - - /** - * Output only. The identifier generated for the slate by GAM. - * - * Generated from protobuf field int64 gam_slate_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setGamSlateId($var) - { - GPBUtil::checkInt64($var); - $this->gam_slate_id = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GamSlate::class, \Google\Cloud\Video\Stitcher\V1\Slate_GamSlate::class); - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/StaticAdResource.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/StaticAdResource.php deleted file mode 100644 index c52ed06d37cf..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/StaticAdResource.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.video.stitcher.v1.StaticAdResource - */ -class StaticAdResource extends \Google\Protobuf\Internal\Message -{ - /** - * URI to the static file for the ad resource. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - /** - * Describes the MIME type of the ad resource. - * - * Generated from protobuf field string creative_type = 2; - */ - protected $creative_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * URI to the static file for the ad resource. - * @type string $creative_type - * Describes the MIME type of the ad resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Companions::initOnce(); - parent::__construct($data); - } - - /** - * URI to the static file for the ad resource. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI to the static file for the ad resource. - * - * Generated from protobuf field string uri = 1; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Describes the MIME type of the ad resource. - * - * Generated from protobuf field string creative_type = 2; - * @return string - */ - public function getCreativeType() - { - return $this->creative_type; - } - - /** - * Describes the MIME type of the ad resource. - * - * Generated from protobuf field string creative_type = 2; - * @param string $var - * @return $this - */ - public function setCreativeType($var) - { - GPBUtil::checkString($var, True); - $this->creative_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateCdnKeyRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateCdnKeyRequest.php deleted file mode 100644 index b3f90236908c..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateCdnKeyRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.video.stitcher.v1.UpdateCdnKeyRequest - */ -class UpdateCdnKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The CDN key resource which replaces the resource on the server. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cdn_key = null; - /** - * Required. The update mask applies to the resource. - * For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Video\Stitcher\V1\CdnKey $cdnKey Required. The CDN key resource which replaces the resource on the server. - * @param \Google\Protobuf\FieldMask $updateMask Required. The update mask applies to the resource. - * For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * @return \Google\Cloud\Video\Stitcher\V1\UpdateCdnKeyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Video\Stitcher\V1\CdnKey $cdnKey, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setCdnKey($cdnKey) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Stitcher\V1\CdnKey $cdn_key - * Required. The CDN key resource which replaces the resource on the server. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The update mask applies to the resource. - * For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The CDN key resource which replaces the resource on the server. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\Stitcher\V1\CdnKey|null - */ - public function getCdnKey() - { - return $this->cdn_key; - } - - public function hasCdnKey() - { - return isset($this->cdn_key); - } - - public function clearCdnKey() - { - unset($this->cdn_key); - } - - /** - * Required. The CDN key resource which replaces the resource on the server. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\Stitcher\V1\CdnKey $var - * @return $this - */ - public function setCdnKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\CdnKey::class); - $this->cdn_key = $var; - - return $this; - } - - /** - * Required. The update mask applies to the resource. - * For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The update mask applies to the resource. - * For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateSlateRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateSlateRequest.php deleted file mode 100644 index 6e415aa29b8e..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateSlateRequest.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.video.stitcher.v1.UpdateSlateRequest - */ -class UpdateSlateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource with updated fields. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $slate = null; - /** - * Required. The update mask which specifies fields which should be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Video\Stitcher\V1\Slate $slate Required. The resource with updated fields. - * @param \Google\Protobuf\FieldMask $updateMask Required. The update mask which specifies fields which should be updated. - * - * @return \Google\Cloud\Video\Stitcher\V1\UpdateSlateRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Video\Stitcher\V1\Slate $slate, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSlate($slate) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Stitcher\V1\Slate $slate - * Required. The resource with updated fields. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The update mask which specifies fields which should be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource with updated fields. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\Stitcher\V1\Slate|null - */ - public function getSlate() - { - return $this->slate; - } - - public function hasSlate() - { - return isset($this->slate); - } - - public function clearSlate() - { - unset($this->slate); - } - - /** - * Required. The resource with updated fields. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\Stitcher\V1\Slate $var - * @return $this - */ - public function setSlate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\Slate::class); - $this->slate = $var; - - return $this; - } - - /** - * Required. The update mask which specifies fields which should be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The update mask which specifies fields which should be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VideoStitcherServiceGrpcClient.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VideoStitcherServiceGrpcClient.php deleted file mode 100644 index 07927b286718..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VideoStitcherServiceGrpcClient.php +++ /dev/null @@ -1,406 +0,0 @@ -_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateCdnKey', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists all CDN keys in the specified project and location. - * @param \Google\Cloud\Video\Stitcher\V1\ListCdnKeysRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListCdnKeys(\Google\Cloud\Video\Stitcher\V1\ListCdnKeysRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/ListCdnKeys', - $argument, - ['\Google\Cloud\Video\Stitcher\V1\ListCdnKeysResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns the specified CDN key. - * @param \Google\Cloud\Video\Stitcher\V1\GetCdnKeyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetCdnKey(\Google\Cloud\Video\Stitcher\V1\GetCdnKeyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/GetCdnKey', - $argument, - ['\Google\Cloud\Video\Stitcher\V1\CdnKey', 'decode'], - $metadata, $options); - } - - /** - * Deletes the specified CDN key. - * @param \Google\Cloud\Video\Stitcher\V1\DeleteCdnKeyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteCdnKey(\Google\Cloud\Video\Stitcher\V1\DeleteCdnKeyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/DeleteCdnKey', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates the specified CDN key. Only update fields specified - * in the call method body. - * @param \Google\Cloud\Video\Stitcher\V1\UpdateCdnKeyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateCdnKey(\Google\Cloud\Video\Stitcher\V1\UpdateCdnKeyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/UpdateCdnKey', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Creates a client side playback VOD session and returns the full - * tracking and playback metadata of the session. - * @param \Google\Cloud\Video\Stitcher\V1\CreateVodSessionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateVodSession(\Google\Cloud\Video\Stitcher\V1\CreateVodSessionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateVodSession', - $argument, - ['\Google\Cloud\Video\Stitcher\V1\VodSession', 'decode'], - $metadata, $options); - } - - /** - * Returns the full tracking, playback metadata, and relevant ad-ops - * logs for the specified VOD session. - * @param \Google\Cloud\Video\Stitcher\V1\GetVodSessionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetVodSession(\Google\Cloud\Video\Stitcher\V1\GetVodSessionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/GetVodSession', - $argument, - ['\Google\Cloud\Video\Stitcher\V1\VodSession', 'decode'], - $metadata, $options); - } - - /** - * Returns a list of detailed stitching information of the specified VOD - * session. - * @param \Google\Cloud\Video\Stitcher\V1\ListVodStitchDetailsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListVodStitchDetails(\Google\Cloud\Video\Stitcher\V1\ListVodStitchDetailsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/ListVodStitchDetails', - $argument, - ['\Google\Cloud\Video\Stitcher\V1\ListVodStitchDetailsResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns the specified stitching information for the specified VOD session. - * @param \Google\Cloud\Video\Stitcher\V1\GetVodStitchDetailRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetVodStitchDetail(\Google\Cloud\Video\Stitcher\V1\GetVodStitchDetailRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/GetVodStitchDetail', - $argument, - ['\Google\Cloud\Video\Stitcher\V1\VodStitchDetail', 'decode'], - $metadata, $options); - } - - /** - * Return the list of ad tag details for the specified VOD session. - * @param \Google\Cloud\Video\Stitcher\V1\ListVodAdTagDetailsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListVodAdTagDetails(\Google\Cloud\Video\Stitcher\V1\ListVodAdTagDetailsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/ListVodAdTagDetails', - $argument, - ['\Google\Cloud\Video\Stitcher\V1\ListVodAdTagDetailsResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns the specified ad tag detail for the specified VOD session. - * @param \Google\Cloud\Video\Stitcher\V1\GetVodAdTagDetailRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetVodAdTagDetail(\Google\Cloud\Video\Stitcher\V1\GetVodAdTagDetailRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/GetVodAdTagDetail', - $argument, - ['\Google\Cloud\Video\Stitcher\V1\VodAdTagDetail', 'decode'], - $metadata, $options); - } - - /** - * Return the list of ad tag details for the specified live session. - * @param \Google\Cloud\Video\Stitcher\V1\ListLiveAdTagDetailsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListLiveAdTagDetails(\Google\Cloud\Video\Stitcher\V1\ListLiveAdTagDetailsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/ListLiveAdTagDetails', - $argument, - ['\Google\Cloud\Video\Stitcher\V1\ListLiveAdTagDetailsResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns the specified ad tag detail for the specified live session. - * @param \Google\Cloud\Video\Stitcher\V1\GetLiveAdTagDetailRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetLiveAdTagDetail(\Google\Cloud\Video\Stitcher\V1\GetLiveAdTagDetailRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/GetLiveAdTagDetail', - $argument, - ['\Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail', 'decode'], - $metadata, $options); - } - - /** - * Creates a slate. - * @param \Google\Cloud\Video\Stitcher\V1\CreateSlateRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateSlate(\Google\Cloud\Video\Stitcher\V1\CreateSlateRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateSlate', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists all slates in the specified project and location. - * @param \Google\Cloud\Video\Stitcher\V1\ListSlatesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListSlates(\Google\Cloud\Video\Stitcher\V1\ListSlatesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/ListSlates', - $argument, - ['\Google\Cloud\Video\Stitcher\V1\ListSlatesResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns the specified slate. - * @param \Google\Cloud\Video\Stitcher\V1\GetSlateRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetSlate(\Google\Cloud\Video\Stitcher\V1\GetSlateRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/GetSlate', - $argument, - ['\Google\Cloud\Video\Stitcher\V1\Slate', 'decode'], - $metadata, $options); - } - - /** - * Updates the specified slate. - * @param \Google\Cloud\Video\Stitcher\V1\UpdateSlateRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateSlate(\Google\Cloud\Video\Stitcher\V1\UpdateSlateRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/UpdateSlate', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes the specified slate. - * @param \Google\Cloud\Video\Stitcher\V1\DeleteSlateRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteSlate(\Google\Cloud\Video\Stitcher\V1\DeleteSlateRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/DeleteSlate', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Creates a new live session. - * @param \Google\Cloud\Video\Stitcher\V1\CreateLiveSessionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateLiveSession(\Google\Cloud\Video\Stitcher\V1\CreateLiveSessionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateLiveSession', - $argument, - ['\Google\Cloud\Video\Stitcher\V1\LiveSession', 'decode'], - $metadata, $options); - } - - /** - * Returns the details for the specified live session. - * @param \Google\Cloud\Video\Stitcher\V1\GetLiveSessionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetLiveSession(\Google\Cloud\Video\Stitcher\V1\GetLiveSessionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/GetLiveSession', - $argument, - ['\Google\Cloud\Video\Stitcher\V1\LiveSession', 'decode'], - $metadata, $options); - } - - /** - * Registers the live config with the provided unique ID in - * the specified region. - * @param \Google\Cloud\Video\Stitcher\V1\CreateLiveConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateLiveConfig(\Google\Cloud\Video\Stitcher\V1\CreateLiveConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateLiveConfig', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists all live configs managed by the Video Stitcher that - * belong to the specified project and region. - * @param \Google\Cloud\Video\Stitcher\V1\ListLiveConfigsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListLiveConfigs(\Google\Cloud\Video\Stitcher\V1\ListLiveConfigsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/ListLiveConfigs', - $argument, - ['\Google\Cloud\Video\Stitcher\V1\ListLiveConfigsResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns the specified live config managed by the Video - * Stitcher service. - * @param \Google\Cloud\Video\Stitcher\V1\GetLiveConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetLiveConfig(\Google\Cloud\Video\Stitcher\V1\GetLiveConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/GetLiveConfig', - $argument, - ['\Google\Cloud\Video\Stitcher\V1\LiveConfig', 'decode'], - $metadata, $options); - } - - /** - * Deletes the specified live config. - * @param \Google\Cloud\Video\Stitcher\V1\DeleteLiveConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteLiveConfig(\Google\Cloud\Video\Stitcher\V1\DeleteLiveConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.stitcher.v1.VideoStitcherService/DeleteLiveConfig', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodAdTagDetail.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodAdTagDetail.php deleted file mode 100644 index 65915ceef1c0..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodAdTagDetail.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.video.stitcher.v1.VodAdTagDetail - */ -class VodAdTagDetail extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the ad tag detail for the specified VOD session, in the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{id}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * A list of ad requests for one ad tag. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; - */ - private $ad_requests; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the ad tag detail for the specified VOD session, in the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{id}`. - * @type array<\Google\Cloud\Video\Stitcher\V1\AdRequest>|\Google\Protobuf\Internal\RepeatedField $ad_requests - * A list of ad requests for one ad tag. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\AdTagDetails::initOnce(); - parent::__construct($data); - } - - /** - * The name of the ad tag detail for the specified VOD session, in the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{id}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the ad tag detail for the specified VOD session, in the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{id}`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * A list of ad requests for one ad tag. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdRequests() - { - return $this->ad_requests; - } - - /** - * A list of ad requests for one ad tag. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; - * @param array<\Google\Cloud\Video\Stitcher\V1\AdRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\AdRequest::class); - $this->ad_requests = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession.php deleted file mode 100644 index d34907f54e93..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession.php +++ /dev/null @@ -1,451 +0,0 @@ -google.cloud.video.stitcher.v1.VodSession - */ -class VodSession extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the VOD session, in the form of - * `projects/{project_number}/locations/{location}/vodSessions/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Metadata of what was stitched into the content. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Interstitials interstitials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $interstitials = null; - /** - * Output only. The playback URI of the stitched content. - * - * Generated from protobuf field string play_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $play_uri = ''; - /** - * Required. URI of the media to stitch. - * - * Generated from protobuf field string source_uri = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source_uri = ''; - /** - * Required. Ad tag URI. - * - * Generated from protobuf field string ad_tag_uri = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ad_tag_uri = ''; - /** - * Key value pairs for ad tag macro replacement. If the - * specified ad tag URI has macros, this field provides the mapping - * to the value that will replace the macro in the ad tag URI. - * Macros are designated by square brackets. - * For example: - * Ad tag URI: `"https://doubleclick.google.com/ad/1?geo_id=[geoId]"` - * Ad tag macro map: `{"geoId": "123"}` - * Fully qualified ad tag: - * `"`https://doubleclick.google.com/ad/1?geo_id=123"` - * - * Generated from protobuf field map ad_tag_macro_map = 7; - */ - private $ad_tag_macro_map; - /** - * Additional options that affect the output of the manifest. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 9; - */ - protected $manifest_options = null; - /** - * Output only. The generated ID of the VodSession's source media. - * - * Generated from protobuf field string asset_id = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $asset_id = ''; - /** - * Required. Determines how the ad should be tracked. If - * [gam_vod_config][google.cloud.video.stitcher.v1.VodSession.gam_vod_config] - * is set, the value must be `CLIENT` because the IMA SDK handles ad tracking. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 11 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ad_tracking = 0; - /** - * This field should be set with appropriate values if GAM is being used for - * ads. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession.GamSettings gam_settings = 13; - */ - protected $gam_settings = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the VOD session, in the form of - * `projects/{project_number}/locations/{location}/vodSessions/{id}`. - * @type \Google\Cloud\Video\Stitcher\V1\Interstitials $interstitials - * Output only. Metadata of what was stitched into the content. - * @type string $play_uri - * Output only. The playback URI of the stitched content. - * @type string $source_uri - * Required. URI of the media to stitch. - * @type string $ad_tag_uri - * Required. Ad tag URI. - * @type array|\Google\Protobuf\Internal\MapField $ad_tag_macro_map - * Key value pairs for ad tag macro replacement. If the - * specified ad tag URI has macros, this field provides the mapping - * to the value that will replace the macro in the ad tag URI. - * Macros are designated by square brackets. - * For example: - * Ad tag URI: `"https://doubleclick.google.com/ad/1?geo_id=[geoId]"` - * Ad tag macro map: `{"geoId": "123"}` - * Fully qualified ad tag: - * `"`https://doubleclick.google.com/ad/1?geo_id=123"` - * @type \Google\Cloud\Video\Stitcher\V1\ManifestOptions $manifest_options - * Additional options that affect the output of the manifest. - * @type string $asset_id - * Output only. The generated ID of the VodSession's source media. - * @type int $ad_tracking - * Required. Determines how the ad should be tracked. If - * [gam_vod_config][google.cloud.video.stitcher.v1.VodSession.gam_vod_config] - * is set, the value must be `CLIENT` because the IMA SDK handles ad tracking. - * @type \Google\Cloud\Video\Stitcher\V1\VodSession\GamSettings $gam_settings - * This field should be set with appropriate values if GAM is being used for - * ads. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the VOD session, in the form of - * `projects/{project_number}/locations/{location}/vodSessions/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the VOD session, in the form of - * `projects/{project_number}/locations/{location}/vodSessions/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Metadata of what was stitched into the content. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Interstitials interstitials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Video\Stitcher\V1\Interstitials|null - */ - public function getInterstitials() - { - return $this->interstitials; - } - - public function hasInterstitials() - { - return isset($this->interstitials); - } - - public function clearInterstitials() - { - unset($this->interstitials); - } - - /** - * Output only. Metadata of what was stitched into the content. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Interstitials interstitials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Video\Stitcher\V1\Interstitials $var - * @return $this - */ - public function setInterstitials($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\Interstitials::class); - $this->interstitials = $var; - - return $this; - } - - /** - * Output only. The playback URI of the stitched content. - * - * Generated from protobuf field string play_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPlayUri() - { - return $this->play_uri; - } - - /** - * Output only. The playback URI of the stitched content. - * - * Generated from protobuf field string play_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPlayUri($var) - { - GPBUtil::checkString($var, True); - $this->play_uri = $var; - - return $this; - } - - /** - * Required. URI of the media to stitch. - * - * Generated from protobuf field string source_uri = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSourceUri() - { - return $this->source_uri; - } - - /** - * Required. URI of the media to stitch. - * - * Generated from protobuf field string source_uri = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSourceUri($var) - { - GPBUtil::checkString($var, True); - $this->source_uri = $var; - - return $this; - } - - /** - * Required. Ad tag URI. - * - * Generated from protobuf field string ad_tag_uri = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAdTagUri() - { - return $this->ad_tag_uri; - } - - /** - * Required. Ad tag URI. - * - * Generated from protobuf field string ad_tag_uri = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAdTagUri($var) - { - GPBUtil::checkString($var, True); - $this->ad_tag_uri = $var; - - return $this; - } - - /** - * Key value pairs for ad tag macro replacement. If the - * specified ad tag URI has macros, this field provides the mapping - * to the value that will replace the macro in the ad tag URI. - * Macros are designated by square brackets. - * For example: - * Ad tag URI: `"https://doubleclick.google.com/ad/1?geo_id=[geoId]"` - * Ad tag macro map: `{"geoId": "123"}` - * Fully qualified ad tag: - * `"`https://doubleclick.google.com/ad/1?geo_id=123"` - * - * Generated from protobuf field map ad_tag_macro_map = 7; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAdTagMacroMap() - { - return $this->ad_tag_macro_map; - } - - /** - * Key value pairs for ad tag macro replacement. If the - * specified ad tag URI has macros, this field provides the mapping - * to the value that will replace the macro in the ad tag URI. - * Macros are designated by square brackets. - * For example: - * Ad tag URI: `"https://doubleclick.google.com/ad/1?geo_id=[geoId]"` - * Ad tag macro map: `{"geoId": "123"}` - * Fully qualified ad tag: - * `"`https://doubleclick.google.com/ad/1?geo_id=123"` - * - * Generated from protobuf field map ad_tag_macro_map = 7; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAdTagMacroMap($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->ad_tag_macro_map = $arr; - - return $this; - } - - /** - * Additional options that affect the output of the manifest. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 9; - * @return \Google\Cloud\Video\Stitcher\V1\ManifestOptions|null - */ - public function getManifestOptions() - { - return $this->manifest_options; - } - - public function hasManifestOptions() - { - return isset($this->manifest_options); - } - - public function clearManifestOptions() - { - unset($this->manifest_options); - } - - /** - * Additional options that affect the output of the manifest. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 9; - * @param \Google\Cloud\Video\Stitcher\V1\ManifestOptions $var - * @return $this - */ - public function setManifestOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\ManifestOptions::class); - $this->manifest_options = $var; - - return $this; - } - - /** - * Output only. The generated ID of the VodSession's source media. - * - * Generated from protobuf field string asset_id = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAssetId() - { - return $this->asset_id; - } - - /** - * Output only. The generated ID of the VodSession's source media. - * - * Generated from protobuf field string asset_id = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAssetId($var) - { - GPBUtil::checkString($var, True); - $this->asset_id = $var; - - return $this; - } - - /** - * Required. Determines how the ad should be tracked. If - * [gam_vod_config][google.cloud.video.stitcher.v1.VodSession.gam_vod_config] - * is set, the value must be `CLIENT` because the IMA SDK handles ad tracking. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 11 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getAdTracking() - { - return $this->ad_tracking; - } - - /** - * Required. Determines how the ad should be tracked. If - * [gam_vod_config][google.cloud.video.stitcher.v1.VodSession.gam_vod_config] - * is set, the value must be `CLIENT` because the IMA SDK handles ad tracking. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 11 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setAdTracking($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\AdTracking::class); - $this->ad_tracking = $var; - - return $this; - } - - /** - * This field should be set with appropriate values if GAM is being used for - * ads. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession.GamSettings gam_settings = 13; - * @return \Google\Cloud\Video\Stitcher\V1\VodSession\GamSettings|null - */ - public function getGamSettings() - { - return $this->gam_settings; - } - - public function hasGamSettings() - { - return isset($this->gam_settings); - } - - public function clearGamSettings() - { - unset($this->gam_settings); - } - - /** - * This field should be set with appropriate values if GAM is being used for - * ads. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession.GamSettings gam_settings = 13; - * @param \Google\Cloud\Video\Stitcher\V1\VodSession\GamSettings $var - * @return $this - */ - public function setGamSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\VodSession\GamSettings::class); - $this->gam_settings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession/GamSettings.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession/GamSettings.php deleted file mode 100644 index 8063ccb2beea..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession/GamSettings.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.video.stitcher.v1.VodSession.GamSettings - */ -class GamSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Ad Manager network code. - * - * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network_code = ''; - /** - * Required. The stream ID generated by Ad Manager. - * - * Generated from protobuf field string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $stream_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network_code - * Required. Ad Manager network code. - * @type string $stream_id - * Required. The stream ID generated by Ad Manager. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * Required. Ad Manager network code. - * - * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNetworkCode() - { - return $this->network_code; - } - - /** - * Required. Ad Manager network code. - * - * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNetworkCode($var) - { - GPBUtil::checkString($var, True); - $this->network_code = $var; - - return $this; - } - - /** - * Required. The stream ID generated by Ad Manager. - * - * Generated from protobuf field string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getStreamId() - { - return $this->stream_id; - } - - /** - * Required. The stream ID generated by Ad Manager. - * - * Generated from protobuf field string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setStreamId($var) - { - GPBUtil::checkString($var, True); - $this->stream_id = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GamSettings::class, \Google\Cloud\Video\Stitcher\V1\VodSession_GamSettings::class); - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAd.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAd.php deleted file mode 100644 index d1b8a1b44103..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAd.php +++ /dev/null @@ -1,171 +0,0 @@ -google.cloud.video.stitcher.v1.VodSessionAd - */ -class VodSessionAd extends \Google\Protobuf\Internal\Message -{ - /** - * Duration in seconds of the ad. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - */ - protected $duration = null; - /** - * Metadata of companion ads associated with the ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds companion_ads = 2; - */ - protected $companion_ads = null; - /** - * The list of progress tracking events for the ad break. These can be of - * the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`, - * `CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`, - * `EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`, - * `CLOSE_LINEAR`, `SKIP`. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event activity_events = 3; - */ - private $activity_events; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $duration - * Duration in seconds of the ad. - * @type \Google\Cloud\Video\Stitcher\V1\CompanionAds $companion_ads - * Metadata of companion ads associated with the ad. - * @type array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $activity_events - * The list of progress tracking events for the ad break. These can be of - * the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`, - * `CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`, - * `EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`, - * `CLOSE_LINEAR`, `SKIP`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * Duration in seconds of the ad. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Duration in seconds of the ad. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - - /** - * Metadata of companion ads associated with the ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds companion_ads = 2; - * @return \Google\Cloud\Video\Stitcher\V1\CompanionAds|null - */ - public function getCompanionAds() - { - return $this->companion_ads; - } - - public function hasCompanionAds() - { - return isset($this->companion_ads); - } - - public function clearCompanionAds() - { - unset($this->companion_ads); - } - - /** - * Metadata of companion ads associated with the ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds companion_ads = 2; - * @param \Google\Cloud\Video\Stitcher\V1\CompanionAds $var - * @return $this - */ - public function setCompanionAds($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\CompanionAds::class); - $this->companion_ads = $var; - - return $this; - } - - /** - * The list of progress tracking events for the ad break. These can be of - * the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`, - * `CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`, - * `EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`, - * `CLOSE_LINEAR`, `SKIP`. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event activity_events = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getActivityEvents() - { - return $this->activity_events; - } - - /** - * The list of progress tracking events for the ad break. These can be of - * the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`, - * `CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`, - * `EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`, - * `CLOSE_LINEAR`, `SKIP`. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event activity_events = 3; - * @param array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setActivityEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\Event::class); - $this->activity_events = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAdBreak.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAdBreak.php deleted file mode 100644 index 688d8754996b..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAdBreak.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.video.stitcher.v1.VodSessionAdBreak - */ -class VodSessionAdBreak extends \Google\Protobuf\Internal\Message -{ - /** - * List of events that are expected to be triggered, ordered by time. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.ProgressEvent progress_events = 1; - */ - private $progress_events; - /** - * Ordered list of ads stitched into the ad break. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAd ads = 2; - */ - private $ads; - /** - * Ad break end time in seconds relative to the start of the VOD asset. - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; - */ - protected $end_time_offset = null; - /** - * Ad break start time in seconds relative to the start of the VOD asset. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; - */ - protected $start_time_offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Video\Stitcher\V1\ProgressEvent>|\Google\Protobuf\Internal\RepeatedField $progress_events - * List of events that are expected to be triggered, ordered by time. - * @type array<\Google\Cloud\Video\Stitcher\V1\VodSessionAd>|\Google\Protobuf\Internal\RepeatedField $ads - * Ordered list of ads stitched into the ad break. - * @type \Google\Protobuf\Duration $end_time_offset - * Ad break end time in seconds relative to the start of the VOD asset. - * @type \Google\Protobuf\Duration $start_time_offset - * Ad break start time in seconds relative to the start of the VOD asset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * List of events that are expected to be triggered, ordered by time. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.ProgressEvent progress_events = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProgressEvents() - { - return $this->progress_events; - } - - /** - * List of events that are expected to be triggered, ordered by time. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.ProgressEvent progress_events = 1; - * @param array<\Google\Cloud\Video\Stitcher\V1\ProgressEvent>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProgressEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\ProgressEvent::class); - $this->progress_events = $arr; - - return $this; - } - - /** - * Ordered list of ads stitched into the ad break. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAd ads = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAds() - { - return $this->ads; - } - - /** - * Ordered list of ads stitched into the ad break. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAd ads = 2; - * @param array<\Google\Cloud\Video\Stitcher\V1\VodSessionAd>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\VodSessionAd::class); - $this->ads = $arr; - - return $this; - } - - /** - * Ad break end time in seconds relative to the start of the VOD asset. - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getEndTimeOffset() - { - return $this->end_time_offset; - } - - public function hasEndTimeOffset() - { - return isset($this->end_time_offset); - } - - public function clearEndTimeOffset() - { - unset($this->end_time_offset); - } - - /** - * Ad break end time in seconds relative to the start of the VOD asset. - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setEndTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->end_time_offset = $var; - - return $this; - } - - /** - * Ad break start time in seconds relative to the start of the VOD asset. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getStartTimeOffset() - { - return $this->start_time_offset; - } - - public function hasStartTimeOffset() - { - return isset($this->start_time_offset); - } - - public function clearStartTimeOffset() - { - unset($this->start_time_offset); - } - - /** - * Ad break start time in seconds relative to the start of the VOD asset. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setStartTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->start_time_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionContent.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionContent.php deleted file mode 100644 index d17cc36f962f..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionContent.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.video.stitcher.v1.VodSessionContent - */ -class VodSessionContent extends \Google\Protobuf\Internal\Message -{ - /** - * The total duration in seconds of the content including the ads stitched - * in. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - */ - protected $duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $duration - * The total duration in seconds of the content including the ads stitched - * in. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * The total duration in seconds of the content including the ads stitched - * in. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * The total duration in seconds of the content including the ads stitched - * in. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodStitchDetail.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodStitchDetail.php deleted file mode 100644 index 6567b5311feb..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodStitchDetail.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.video.stitcher.v1.VodStitchDetail - */ -class VodStitchDetail extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the stitch detail in the specified VOD session, in the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * A list of ad processing details for the fetched ad playlist. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdStitchDetail ad_stitch_details = 3; - */ - private $ad_stitch_details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the stitch detail in the specified VOD session, in the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. - * @type array<\Google\Cloud\Video\Stitcher\V1\AdStitchDetail>|\Google\Protobuf\Internal\RepeatedField $ad_stitch_details - * A list of ad processing details for the fetched ad playlist. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\StitchDetails::initOnce(); - parent::__construct($data); - } - - /** - * The name of the stitch detail in the specified VOD session, in the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the stitch detail in the specified VOD session, in the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * A list of ad processing details for the fetched ad playlist. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdStitchDetail ad_stitch_details = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdStitchDetails() - { - return $this->ad_stitch_details; - } - - /** - * A list of ad processing details for the fetched ad playlist. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdStitchDetail ad_stitch_details = 3; - * @param array<\Google\Cloud\Video\Stitcher\V1\AdStitchDetail>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdStitchDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\AdStitchDetail::class); - $this->ad_stitch_details = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_cdn_key.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_cdn_key.php deleted file mode 100644 index 20ab0dd66dd9..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_cdn_key.php +++ /dev/null @@ -1,94 +0,0 @@ -setParent($formattedParent) - ->setCdnKey($cdnKey) - ->setCdnKeyId($cdnKeyId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $videoStitcherServiceClient->createCdnKey($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CdnKey $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $cdnKeyId = '[CDN_KEY_ID]'; - - create_cdn_key_sample($formattedParent, $cdnKeyId); -} -// [END videostitcher_v1_generated_VideoStitcherService_CreateCdnKey_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_config.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_config.php deleted file mode 100644 index a6b9a87a31f1..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_config.php +++ /dev/null @@ -1,108 +0,0 @@ -setSourceUri($liveConfigSourceUri) - ->setAdTracking($liveConfigAdTracking); - $request = (new CreateLiveConfigRequest()) - ->setParent($formattedParent) - ->setLiveConfigId($liveConfigId) - ->setLiveConfig($liveConfig); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $videoStitcherServiceClient->createLiveConfig($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var LiveConfig $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $liveConfigId = '[LIVE_CONFIG_ID]'; - $liveConfigSourceUri = '[SOURCE_URI]'; - $liveConfigAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; - - create_live_config_sample( - $formattedParent, - $liveConfigId, - $liveConfigSourceUri, - $liveConfigAdTracking - ); -} -// [END videostitcher_v1_generated_VideoStitcherService_CreateLiveConfig_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_session.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_session.php deleted file mode 100644 index b8a88d5c02e5..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_session.php +++ /dev/null @@ -1,89 +0,0 @@ -setLiveConfig($formattedLiveSessionLiveConfig); - $request = (new CreateLiveSessionRequest()) - ->setParent($formattedParent) - ->setLiveSession($liveSession); - - // Call the API and handle any network failures. - try { - /** @var LiveSession $response */ - $response = $videoStitcherServiceClient->createLiveSession($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VideoStitcherServiceClient::liveSessionName( - '[PROJECT]', - '[LOCATION]', - '[LIVE_SESSION]' - ); - $formattedLiveSessionLiveConfig = VideoStitcherServiceClient::liveConfigName( - '[PROJECT]', - '[LOCATION]', - '[LIVE_CONFIG]' - ); - - create_live_session_sample($formattedParent, $formattedLiveSessionLiveConfig); -} -// [END videostitcher_v1_generated_VideoStitcherService_CreateLiveSession_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_slate.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_slate.php deleted file mode 100644 index f28cbe35dc30..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_slate.php +++ /dev/null @@ -1,92 +0,0 @@ -setParent($formattedParent) - ->setSlateId($slateId) - ->setSlate($slate); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $videoStitcherServiceClient->createSlate($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Slate $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $slateId = '[SLATE_ID]'; - - create_slate_sample($formattedParent, $slateId); -} -// [END videostitcher_v1_generated_VideoStitcherService_CreateSlate_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_session.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_session.php deleted file mode 100644 index 243d8b2e0b79..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_session.php +++ /dev/null @@ -1,96 +0,0 @@ -setSourceUri($vodSessionSourceUri) - ->setAdTagUri($vodSessionAdTagUri) - ->setAdTracking($vodSessionAdTracking); - $request = (new CreateVodSessionRequest()) - ->setParent($formattedParent) - ->setVodSession($vodSession); - - // Call the API and handle any network failures. - try { - /** @var VodSession $response */ - $response = $videoStitcherServiceClient->createVodSession($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $vodSessionSourceUri = '[SOURCE_URI]'; - $vodSessionAdTagUri = '[AD_TAG_URI]'; - $vodSessionAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; - - create_vod_session_sample( - $formattedParent, - $vodSessionSourceUri, - $vodSessionAdTagUri, - $vodSessionAdTracking - ); -} -// [END videostitcher_v1_generated_VideoStitcherService_CreateVodSession_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_cdn_key.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_cdn_key.php deleted file mode 100644 index dd398b33b4f5..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_cdn_key.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $videoStitcherServiceClient->deleteCdnKey($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VideoStitcherServiceClient::cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); - - delete_cdn_key_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_DeleteCdnKey_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_live_config.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_live_config.php deleted file mode 100644 index 143782006eee..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_live_config.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $videoStitcherServiceClient->deleteLiveConfig($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VideoStitcherServiceClient::liveConfigName( - '[PROJECT]', - '[LOCATION]', - '[LIVE_CONFIG]' - ); - - delete_live_config_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_DeleteLiveConfig_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_slate.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_slate.php deleted file mode 100644 index ebcfa6c3867c..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_slate.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $videoStitcherServiceClient->deleteSlate($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VideoStitcherServiceClient::slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); - - delete_slate_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_DeleteSlate_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_cdn_key.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_cdn_key.php deleted file mode 100644 index d79b6389a4ea..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_cdn_key.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var CdnKey $response */ - $response = $videoStitcherServiceClient->getCdnKey($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VideoStitcherServiceClient::cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); - - get_cdn_key_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_GetCdnKey_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_ad_tag_detail.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_ad_tag_detail.php deleted file mode 100644 index 618ea25d43e0..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_ad_tag_detail.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var LiveAdTagDetail $response */ - $response = $videoStitcherServiceClient->getLiveAdTagDetail($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VideoStitcherServiceClient::liveAdTagDetailName( - '[PROJECT]', - '[LOCATION]', - '[LIVE_SESSION]', - '[LIVE_AD_TAG_DETAIL]' - ); - - get_live_ad_tag_detail_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_GetLiveAdTagDetail_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_config.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_config.php deleted file mode 100644 index dafdbfc5d412..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_config.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var LiveConfig $response */ - $response = $videoStitcherServiceClient->getLiveConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VideoStitcherServiceClient::liveConfigName( - '[PROJECT]', - '[LOCATION]', - '[LIVE_CONFIG]' - ); - - get_live_config_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_GetLiveConfig_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_session.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_session.php deleted file mode 100644 index 2f37b81be58c..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_session.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var LiveSession $response */ - $response = $videoStitcherServiceClient->getLiveSession($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VideoStitcherServiceClient::liveSessionName( - '[PROJECT]', - '[LOCATION]', - '[LIVE_SESSION]' - ); - - get_live_session_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_GetLiveSession_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_slate.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_slate.php deleted file mode 100644 index 3789bac77ca5..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_slate.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Slate $response */ - $response = $videoStitcherServiceClient->getSlate($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VideoStitcherServiceClient::slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); - - get_slate_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_GetSlate_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_ad_tag_detail.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_ad_tag_detail.php deleted file mode 100644 index 8c03922d7492..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_ad_tag_detail.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var VodAdTagDetail $response */ - $response = $videoStitcherServiceClient->getVodAdTagDetail($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VideoStitcherServiceClient::vodAdTagDetailName( - '[PROJECT]', - '[LOCATION]', - '[VOD_SESSION]', - '[VOD_AD_TAG_DETAIL]' - ); - - get_vod_ad_tag_detail_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_GetVodAdTagDetail_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_session.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_session.php deleted file mode 100644 index 75283df4a35b..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_session.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var VodSession $response */ - $response = $videoStitcherServiceClient->getVodSession($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VideoStitcherServiceClient::vodSessionName( - '[PROJECT]', - '[LOCATION]', - '[VOD_SESSION]' - ); - - get_vod_session_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_GetVodSession_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_stitch_detail.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_stitch_detail.php deleted file mode 100644 index 9dc0ea9dd537..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_stitch_detail.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var VodStitchDetail $response */ - $response = $videoStitcherServiceClient->getVodStitchDetail($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VideoStitcherServiceClient::vodStitchDetailName( - '[PROJECT]', - '[LOCATION]', - '[VOD_SESSION]', - '[VOD_STITCH_DETAIL]' - ); - - get_vod_stitch_detail_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_GetVodStitchDetail_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_cdn_keys.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_cdn_keys.php deleted file mode 100644 index 5880dda14d56..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_cdn_keys.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $videoStitcherServiceClient->listCdnKeys($request); - - /** @var CdnKey $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_cdn_keys_sample($formattedParent); -} -// [END videostitcher_v1_generated_VideoStitcherService_ListCdnKeys_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_ad_tag_details.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_ad_tag_details.php deleted file mode 100644 index fe7c6a03a4b2..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_ad_tag_details.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $videoStitcherServiceClient->listLiveAdTagDetails($request); - - /** @var LiveAdTagDetail $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VideoStitcherServiceClient::liveSessionName( - '[PROJECT]', - '[LOCATION]', - '[LIVE_SESSION]' - ); - - list_live_ad_tag_details_sample($formattedParent); -} -// [END videostitcher_v1_generated_VideoStitcherService_ListLiveAdTagDetails_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_configs.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_configs.php deleted file mode 100644 index d0429815bf4b..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_configs.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $videoStitcherServiceClient->listLiveConfigs($request); - - /** @var LiveConfig $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_live_configs_sample($formattedParent); -} -// [END videostitcher_v1_generated_VideoStitcherService_ListLiveConfigs_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_slates.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_slates.php deleted file mode 100644 index aeb7d8878cba..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_slates.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $videoStitcherServiceClient->listSlates($request); - - /** @var Slate $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_slates_sample($formattedParent); -} -// [END videostitcher_v1_generated_VideoStitcherService_ListSlates_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_ad_tag_details.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_ad_tag_details.php deleted file mode 100644 index c2077b8312d1..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_ad_tag_details.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $videoStitcherServiceClient->listVodAdTagDetails($request); - - /** @var VodAdTagDetail $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VideoStitcherServiceClient::vodSessionName( - '[PROJECT]', - '[LOCATION]', - '[VOD_SESSION]' - ); - - list_vod_ad_tag_details_sample($formattedParent); -} -// [END videostitcher_v1_generated_VideoStitcherService_ListVodAdTagDetails_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_stitch_details.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_stitch_details.php deleted file mode 100644 index f0bd596de97f..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_stitch_details.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $videoStitcherServiceClient->listVodStitchDetails($request); - - /** @var VodStitchDetail $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VideoStitcherServiceClient::vodSessionName( - '[PROJECT]', - '[LOCATION]', - '[VOD_SESSION]' - ); - - list_vod_stitch_details_sample($formattedParent); -} -// [END videostitcher_v1_generated_VideoStitcherService_ListVodStitchDetails_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_cdn_key.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_cdn_key.php deleted file mode 100644 index 61ab173e2c2a..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_cdn_key.php +++ /dev/null @@ -1,75 +0,0 @@ -setCdnKey($cdnKey) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $videoStitcherServiceClient->updateCdnKey($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CdnKey $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END videostitcher_v1_generated_VideoStitcherService_UpdateCdnKey_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_slate.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_slate.php deleted file mode 100644 index b25604313c9f..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_slate.php +++ /dev/null @@ -1,74 +0,0 @@ -setSlate($slate) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $videoStitcherServiceClient->updateSlate($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Slate $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END videostitcher_v1_generated_VideoStitcherService_UpdateSlate_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/src/V1/Client/BaseClient/VideoStitcherServiceBaseClient.php b/owl-bot-staging/VideoStitcher/v1/src/V1/Client/BaseClient/VideoStitcherServiceBaseClient.php deleted file mode 100644 index d2727fa68c36..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/src/V1/Client/BaseClient/VideoStitcherServiceBaseClient.php +++ /dev/null @@ -1,1052 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/video_stitcher_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/video_stitcher_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/video_stitcher_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/video_stitcher_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a cdn_key - * resource. - * - * @param string $project - * @param string $location - * @param string $cdnKey - * - * @return string The formatted cdn_key resource. - */ - public static function cdnKeyName(string $project, string $location, string $cdnKey): string - { - return self::getPathTemplate('cdnKey')->render([ - 'project' => $project, - 'location' => $location, - 'cdn_key' => $cdnKey, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * live_ad_tag_detail resource. - * - * @param string $project - * @param string $location - * @param string $liveSession - * @param string $liveAdTagDetail - * - * @return string The formatted live_ad_tag_detail resource. - */ - public static function liveAdTagDetailName(string $project, string $location, string $liveSession, string $liveAdTagDetail): string - { - return self::getPathTemplate('liveAdTagDetail')->render([ - 'project' => $project, - 'location' => $location, - 'live_session' => $liveSession, - 'live_ad_tag_detail' => $liveAdTagDetail, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a live_config - * resource. - * - * @param string $project - * @param string $location - * @param string $liveConfig - * - * @return string The formatted live_config resource. - */ - public static function liveConfigName(string $project, string $location, string $liveConfig): string - { - return self::getPathTemplate('liveConfig')->render([ - 'project' => $project, - 'location' => $location, - 'live_config' => $liveConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a live_session - * resource. - * - * @param string $project - * @param string $location - * @param string $liveSession - * - * @return string The formatted live_session resource. - */ - public static function liveSessionName(string $project, string $location, string $liveSession): string - { - return self::getPathTemplate('liveSession')->render([ - 'project' => $project, - 'location' => $location, - 'live_session' => $liveSession, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a slate - * resource. - * - * @param string $project - * @param string $location - * @param string $slate - * - * @return string The formatted slate resource. - */ - public static function slateName(string $project, string $location, string $slate): string - { - return self::getPathTemplate('slate')->render([ - 'project' => $project, - 'location' => $location, - 'slate' => $slate, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * vod_ad_tag_detail resource. - * - * @param string $project - * @param string $location - * @param string $vodSession - * @param string $vodAdTagDetail - * - * @return string The formatted vod_ad_tag_detail resource. - */ - public static function vodAdTagDetailName(string $project, string $location, string $vodSession, string $vodAdTagDetail): string - { - return self::getPathTemplate('vodAdTagDetail')->render([ - 'project' => $project, - 'location' => $location, - 'vod_session' => $vodSession, - 'vod_ad_tag_detail' => $vodAdTagDetail, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a vod_session - * resource. - * - * @param string $project - * @param string $location - * @param string $vodSession - * - * @return string The formatted vod_session resource. - */ - public static function vodSessionName(string $project, string $location, string $vodSession): string - { - return self::getPathTemplate('vodSession')->render([ - 'project' => $project, - 'location' => $location, - 'vod_session' => $vodSession, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * vod_stitch_detail resource. - * - * @param string $project - * @param string $location - * @param string $vodSession - * @param string $vodStitchDetail - * - * @return string The formatted vod_stitch_detail resource. - */ - public static function vodStitchDetailName(string $project, string $location, string $vodSession, string $vodStitchDetail): string - { - return self::getPathTemplate('vodStitchDetail')->render([ - 'project' => $project, - 'location' => $location, - 'vod_session' => $vodSession, - 'vod_stitch_detail' => $vodStitchDetail, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - cdnKey: projects/{project}/locations/{location}/cdnKeys/{cdn_key} - * - liveAdTagDetail: projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail} - * - liveConfig: projects/{project}/locations/{location}/liveConfigs/{live_config} - * - liveSession: projects/{project}/locations/{location}/liveSessions/{live_session} - * - location: projects/{project}/locations/{location} - * - slate: projects/{project}/locations/{location}/slates/{slate} - * - vodAdTagDetail: projects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail} - * - vodSession: projects/{project}/locations/{location}/vodSessions/{vod_session} - * - vodStitchDetail: projects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'videostitcher.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new CDN key. - * - * The async variant is {@see self::createCdnKeyAsync()} . - * - * @param CreateCdnKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createCdnKey(CreateCdnKeyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateCdnKey', $request, $callOptions)->wait(); - } - - /** - * Registers the live config with the provided unique ID in - * the specified region. - * - * The async variant is {@see self::createLiveConfigAsync()} . - * - * @param CreateLiveConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createLiveConfig(CreateLiveConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateLiveConfig', $request, $callOptions)->wait(); - } - - /** - * Creates a new live session. - * - * The async variant is {@see self::createLiveSessionAsync()} . - * - * @param CreateLiveSessionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return LiveSession - * - * @throws ApiException Thrown if the API call fails. - */ - public function createLiveSession(CreateLiveSessionRequest $request, array $callOptions = []): LiveSession - { - return $this->startApiCall('CreateLiveSession', $request, $callOptions)->wait(); - } - - /** - * Creates a slate. - * - * The async variant is {@see self::createSlateAsync()} . - * - * @param CreateSlateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSlate(CreateSlateRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateSlate', $request, $callOptions)->wait(); - } - - /** - * Creates a client side playback VOD session and returns the full - * tracking and playback metadata of the session. - * - * The async variant is {@see self::createVodSessionAsync()} . - * - * @param CreateVodSessionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return VodSession - * - * @throws ApiException Thrown if the API call fails. - */ - public function createVodSession(CreateVodSessionRequest $request, array $callOptions = []): VodSession - { - return $this->startApiCall('CreateVodSession', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified CDN key. - * - * The async variant is {@see self::deleteCdnKeyAsync()} . - * - * @param DeleteCdnKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteCdnKey(DeleteCdnKeyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteCdnKey', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified live config. - * - * The async variant is {@see self::deleteLiveConfigAsync()} . - * - * @param DeleteLiveConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteLiveConfig(DeleteLiveConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteLiveConfig', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified slate. - * - * The async variant is {@see self::deleteSlateAsync()} . - * - * @param DeleteSlateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteSlate(DeleteSlateRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteSlate', $request, $callOptions)->wait(); - } - - /** - * Returns the specified CDN key. - * - * The async variant is {@see self::getCdnKeyAsync()} . - * - * @param GetCdnKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CdnKey - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCdnKey(GetCdnKeyRequest $request, array $callOptions = []): CdnKey - { - return $this->startApiCall('GetCdnKey', $request, $callOptions)->wait(); - } - - /** - * Returns the specified ad tag detail for the specified live session. - * - * The async variant is {@see self::getLiveAdTagDetailAsync()} . - * - * @param GetLiveAdTagDetailRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return LiveAdTagDetail - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLiveAdTagDetail(GetLiveAdTagDetailRequest $request, array $callOptions = []): LiveAdTagDetail - { - return $this->startApiCall('GetLiveAdTagDetail', $request, $callOptions)->wait(); - } - - /** - * Returns the specified live config managed by the Video - * Stitcher service. - * - * The async variant is {@see self::getLiveConfigAsync()} . - * - * @param GetLiveConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return LiveConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLiveConfig(GetLiveConfigRequest $request, array $callOptions = []): LiveConfig - { - return $this->startApiCall('GetLiveConfig', $request, $callOptions)->wait(); - } - - /** - * Returns the details for the specified live session. - * - * The async variant is {@see self::getLiveSessionAsync()} . - * - * @param GetLiveSessionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return LiveSession - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLiveSession(GetLiveSessionRequest $request, array $callOptions = []): LiveSession - { - return $this->startApiCall('GetLiveSession', $request, $callOptions)->wait(); - } - - /** - * Returns the specified slate. - * - * The async variant is {@see self::getSlateAsync()} . - * - * @param GetSlateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Slate - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSlate(GetSlateRequest $request, array $callOptions = []): Slate - { - return $this->startApiCall('GetSlate', $request, $callOptions)->wait(); - } - - /** - * Returns the specified ad tag detail for the specified VOD session. - * - * The async variant is {@see self::getVodAdTagDetailAsync()} . - * - * @param GetVodAdTagDetailRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return VodAdTagDetail - * - * @throws ApiException Thrown if the API call fails. - */ - public function getVodAdTagDetail(GetVodAdTagDetailRequest $request, array $callOptions = []): VodAdTagDetail - { - return $this->startApiCall('GetVodAdTagDetail', $request, $callOptions)->wait(); - } - - /** - * Returns the full tracking, playback metadata, and relevant ad-ops - * logs for the specified VOD session. - * - * The async variant is {@see self::getVodSessionAsync()} . - * - * @param GetVodSessionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return VodSession - * - * @throws ApiException Thrown if the API call fails. - */ - public function getVodSession(GetVodSessionRequest $request, array $callOptions = []): VodSession - { - return $this->startApiCall('GetVodSession', $request, $callOptions)->wait(); - } - - /** - * Returns the specified stitching information for the specified VOD session. - * - * The async variant is {@see self::getVodStitchDetailAsync()} . - * - * @param GetVodStitchDetailRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return VodStitchDetail - * - * @throws ApiException Thrown if the API call fails. - */ - public function getVodStitchDetail(GetVodStitchDetailRequest $request, array $callOptions = []): VodStitchDetail - { - return $this->startApiCall('GetVodStitchDetail', $request, $callOptions)->wait(); - } - - /** - * Lists all CDN keys in the specified project and location. - * - * The async variant is {@see self::listCdnKeysAsync()} . - * - * @param ListCdnKeysRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listCdnKeys(ListCdnKeysRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCdnKeys', $request, $callOptions); - } - - /** - * Return the list of ad tag details for the specified live session. - * - * The async variant is {@see self::listLiveAdTagDetailsAsync()} . - * - * @param ListLiveAdTagDetailsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLiveAdTagDetails(ListLiveAdTagDetailsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLiveAdTagDetails', $request, $callOptions); - } - - /** - * Lists all live configs managed by the Video Stitcher that - * belong to the specified project and region. - * - * The async variant is {@see self::listLiveConfigsAsync()} . - * - * @param ListLiveConfigsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLiveConfigs(ListLiveConfigsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLiveConfigs', $request, $callOptions); - } - - /** - * Lists all slates in the specified project and location. - * - * The async variant is {@see self::listSlatesAsync()} . - * - * @param ListSlatesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listSlates(ListSlatesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSlates', $request, $callOptions); - } - - /** - * Return the list of ad tag details for the specified VOD session. - * - * The async variant is {@see self::listVodAdTagDetailsAsync()} . - * - * @param ListVodAdTagDetailsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listVodAdTagDetails(ListVodAdTagDetailsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListVodAdTagDetails', $request, $callOptions); - } - - /** - * Returns a list of detailed stitching information of the specified VOD - * session. - * - * The async variant is {@see self::listVodStitchDetailsAsync()} . - * - * @param ListVodStitchDetailsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listVodStitchDetails(ListVodStitchDetailsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListVodStitchDetails', $request, $callOptions); - } - - /** - * Updates the specified CDN key. Only update fields specified - * in the call method body. - * - * The async variant is {@see self::updateCdnKeyAsync()} . - * - * @param UpdateCdnKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateCdnKey(UpdateCdnKeyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateCdnKey', $request, $callOptions)->wait(); - } - - /** - * Updates the specified slate. - * - * The async variant is {@see self::updateSlateAsync()} . - * - * @param UpdateSlateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSlate(UpdateSlateRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateSlate', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/VideoStitcher/v1/src/V1/Client/VideoStitcherServiceClient.php b/owl-bot-staging/VideoStitcher/v1/src/V1/Client/VideoStitcherServiceClient.php deleted file mode 100644 index 214ff555e8fc..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/src/V1/Client/VideoStitcherServiceClient.php +++ /dev/null @@ -1,40 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $cdnKey = new CdnKey(); - * $cdnKeyId = 'cdn_key_id'; - * $operationResponse = $videoStitcherServiceClient->createCdnKey($formattedParent, $cdnKey, $cdnKeyId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $videoStitcherServiceClient->createCdnKey($formattedParent, $cdnKey, $cdnKeyId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $videoStitcherServiceClient->resumeOperation($operationName, 'createCdnKey'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - */ -class VideoStitcherServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.video.stitcher.v1.VideoStitcherService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'videostitcher.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $cdnKeyNameTemplate; - - private static $liveAdTagDetailNameTemplate; - - private static $liveConfigNameTemplate; - - private static $liveSessionNameTemplate; - - private static $locationNameTemplate; - - private static $slateNameTemplate; - - private static $vodAdTagDetailNameTemplate; - - private static $vodSessionNameTemplate; - - private static $vodStitchDetailNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/video_stitcher_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/video_stitcher_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/video_stitcher_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/video_stitcher_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getCdnKeyNameTemplate() - { - if (self::$cdnKeyNameTemplate == null) { - self::$cdnKeyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/cdnKeys/{cdn_key}'); - } - - return self::$cdnKeyNameTemplate; - } - - private static function getLiveAdTagDetailNameTemplate() - { - if (self::$liveAdTagDetailNameTemplate == null) { - self::$liveAdTagDetailNameTemplate = new PathTemplate('projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}'); - } - - return self::$liveAdTagDetailNameTemplate; - } - - private static function getLiveConfigNameTemplate() - { - if (self::$liveConfigNameTemplate == null) { - self::$liveConfigNameTemplate = new PathTemplate('projects/{project}/locations/{location}/liveConfigs/{live_config}'); - } - - return self::$liveConfigNameTemplate; - } - - private static function getLiveSessionNameTemplate() - { - if (self::$liveSessionNameTemplate == null) { - self::$liveSessionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/liveSessions/{live_session}'); - } - - return self::$liveSessionNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getSlateNameTemplate() - { - if (self::$slateNameTemplate == null) { - self::$slateNameTemplate = new PathTemplate('projects/{project}/locations/{location}/slates/{slate}'); - } - - return self::$slateNameTemplate; - } - - private static function getVodAdTagDetailNameTemplate() - { - if (self::$vodAdTagDetailNameTemplate == null) { - self::$vodAdTagDetailNameTemplate = new PathTemplate('projects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail}'); - } - - return self::$vodAdTagDetailNameTemplate; - } - - private static function getVodSessionNameTemplate() - { - if (self::$vodSessionNameTemplate == null) { - self::$vodSessionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/vodSessions/{vod_session}'); - } - - return self::$vodSessionNameTemplate; - } - - private static function getVodStitchDetailNameTemplate() - { - if (self::$vodStitchDetailNameTemplate == null) { - self::$vodStitchDetailNameTemplate = new PathTemplate('projects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail}'); - } - - return self::$vodStitchDetailNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'cdnKey' => self::getCdnKeyNameTemplate(), - 'liveAdTagDetail' => self::getLiveAdTagDetailNameTemplate(), - 'liveConfig' => self::getLiveConfigNameTemplate(), - 'liveSession' => self::getLiveSessionNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'slate' => self::getSlateNameTemplate(), - 'vodAdTagDetail' => self::getVodAdTagDetailNameTemplate(), - 'vodSession' => self::getVodSessionNameTemplate(), - 'vodStitchDetail' => self::getVodStitchDetailNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a cdn_key - * resource. - * - * @param string $project - * @param string $location - * @param string $cdnKey - * - * @return string The formatted cdn_key resource. - */ - public static function cdnKeyName($project, $location, $cdnKey) - { - return self::getCdnKeyNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'cdn_key' => $cdnKey, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * live_ad_tag_detail resource. - * - * @param string $project - * @param string $location - * @param string $liveSession - * @param string $liveAdTagDetail - * - * @return string The formatted live_ad_tag_detail resource. - */ - public static function liveAdTagDetailName($project, $location, $liveSession, $liveAdTagDetail) - { - return self::getLiveAdTagDetailNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'live_session' => $liveSession, - 'live_ad_tag_detail' => $liveAdTagDetail, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a live_config - * resource. - * - * @param string $project - * @param string $location - * @param string $liveConfig - * - * @return string The formatted live_config resource. - */ - public static function liveConfigName($project, $location, $liveConfig) - { - return self::getLiveConfigNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'live_config' => $liveConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a live_session - * resource. - * - * @param string $project - * @param string $location - * @param string $liveSession - * - * @return string The formatted live_session resource. - */ - public static function liveSessionName($project, $location, $liveSession) - { - return self::getLiveSessionNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'live_session' => $liveSession, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a slate - * resource. - * - * @param string $project - * @param string $location - * @param string $slate - * - * @return string The formatted slate resource. - */ - public static function slateName($project, $location, $slate) - { - return self::getSlateNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'slate' => $slate, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * vod_ad_tag_detail resource. - * - * @param string $project - * @param string $location - * @param string $vodSession - * @param string $vodAdTagDetail - * - * @return string The formatted vod_ad_tag_detail resource. - */ - public static function vodAdTagDetailName($project, $location, $vodSession, $vodAdTagDetail) - { - return self::getVodAdTagDetailNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'vod_session' => $vodSession, - 'vod_ad_tag_detail' => $vodAdTagDetail, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a vod_session - * resource. - * - * @param string $project - * @param string $location - * @param string $vodSession - * - * @return string The formatted vod_session resource. - */ - public static function vodSessionName($project, $location, $vodSession) - { - return self::getVodSessionNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'vod_session' => $vodSession, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * vod_stitch_detail resource. - * - * @param string $project - * @param string $location - * @param string $vodSession - * @param string $vodStitchDetail - * - * @return string The formatted vod_stitch_detail resource. - */ - public static function vodStitchDetailName($project, $location, $vodSession, $vodStitchDetail) - { - return self::getVodStitchDetailNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'vod_session' => $vodSession, - 'vod_stitch_detail' => $vodStitchDetail, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - cdnKey: projects/{project}/locations/{location}/cdnKeys/{cdn_key} - * - liveAdTagDetail: projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail} - * - liveConfig: projects/{project}/locations/{location}/liveConfigs/{live_config} - * - liveSession: projects/{project}/locations/{location}/liveSessions/{live_session} - * - location: projects/{project}/locations/{location} - * - slate: projects/{project}/locations/{location}/slates/{slate} - * - vodAdTagDetail: projects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail} - * - vodSession: projects/{project}/locations/{location}/vodSessions/{vod_session} - * - vodStitchDetail: projects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'videostitcher.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a new CDN key. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $formattedParent = $videoStitcherServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $cdnKey = new CdnKey(); - * $cdnKeyId = 'cdn_key_id'; - * $operationResponse = $videoStitcherServiceClient->createCdnKey($formattedParent, $cdnKey, $cdnKeyId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $videoStitcherServiceClient->createCdnKey($formattedParent, $cdnKey, $cdnKeyId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $videoStitcherServiceClient->resumeOperation($operationName, 'createCdnKey'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The project in which the CDN key should be created, in the form - * of `projects/{project_number}/locations/{location}`. - * @param CdnKey $cdnKey Required. The CDN key resource to create. - * @param string $cdnKeyId Required. The ID to use for the CDN key, which will become the final - * component of the CDN key's resource name. - * - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createCdnKey($parent, $cdnKey, $cdnKeyId, array $optionalArgs = []) - { - $request = new CreateCdnKeyRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setCdnKey($cdnKey); - $request->setCdnKeyId($cdnKeyId); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateCdnKey', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Registers the live config with the provided unique ID in - * the specified region. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $formattedParent = $videoStitcherServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $liveConfigId = 'live_config_id'; - * $liveConfig = new LiveConfig(); - * $operationResponse = $videoStitcherServiceClient->createLiveConfig($formattedParent, $liveConfigId, $liveConfig); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $videoStitcherServiceClient->createLiveConfig($formattedParent, $liveConfigId, $liveConfig); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $videoStitcherServiceClient->resumeOperation($operationName, 'createLiveConfig'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The project in which the live config should be created, in - * the form of `projects/{project_number}/locations/{location}`. - * @param string $liveConfigId Required. The unique identifier ID to use for the live config. - * @param LiveConfig $liveConfig Required. The live config resource to create. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createLiveConfig($parent, $liveConfigId, $liveConfig, array $optionalArgs = []) - { - $request = new CreateLiveConfigRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setLiveConfigId($liveConfigId); - $request->setLiveConfig($liveConfig); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateLiveConfig', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a new live session. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $formattedParent = $videoStitcherServiceClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); - * $liveSession = new LiveSession(); - * $response = $videoStitcherServiceClient->createLiveSession($formattedParent, $liveSession); - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The project and location in which the live session should be - * created, in the form of `projects/{project_number}/locations/{location}`. - * @param LiveSession $liveSession Required. Parameters for creating a live session. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Video\Stitcher\V1\LiveSession - * - * @throws ApiException if the remote call fails - */ - public function createLiveSession($parent, $liveSession, array $optionalArgs = []) - { - $request = new CreateLiveSessionRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setLiveSession($liveSession); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateLiveSession', LiveSession::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a slate. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $formattedParent = $videoStitcherServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $slateId = 'slate_id'; - * $slate = new Slate(); - * $operationResponse = $videoStitcherServiceClient->createSlate($formattedParent, $slateId, $slate); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $videoStitcherServiceClient->createSlate($formattedParent, $slateId, $slate); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $videoStitcherServiceClient->resumeOperation($operationName, 'createSlate'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The project in which the slate should be created, in the form of - * `projects/{project_number}/locations/{location}`. - * @param string $slateId Required. The unique identifier for the slate. - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * @param Slate $slate Required. The slate to create. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported `(00000000-0000-0000-0000-000000000000)`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createSlate($parent, $slateId, $slate, array $optionalArgs = []) - { - $request = new CreateSlateRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setSlateId($slateId); - $request->setSlate($slate); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateSlate', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a client side playback VOD session and returns the full - * tracking and playback metadata of the session. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $formattedParent = $videoStitcherServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $vodSession = new VodSession(); - * $response = $videoStitcherServiceClient->createVodSession($formattedParent, $vodSession); - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The project and location in which the VOD session should be - * created, in the form of `projects/{project_number}/locations/{location}`. - * @param VodSession $vodSession Required. Parameters for creating a session. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Video\Stitcher\V1\VodSession - * - * @throws ApiException if the remote call fails - */ - public function createVodSession($parent, $vodSession, array $optionalArgs = []) - { - $request = new CreateVodSessionRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setVodSession($vodSession); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateVodSession', VodSession::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes the specified CDN key. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $formattedName = $videoStitcherServiceClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); - * $operationResponse = $videoStitcherServiceClient->deleteCdnKey($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $videoStitcherServiceClient->deleteCdnKey($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $videoStitcherServiceClient->resumeOperation($operationName, 'deleteCdnKey'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the CDN key to be deleted, in the form of - * `projects/{project_number}/locations/{location}/cdnKeys/{id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteCdnKey($name, array $optionalArgs = []) - { - $request = new DeleteCdnKeyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteCdnKey', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes the specified live config. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $formattedName = $videoStitcherServiceClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); - * $operationResponse = $videoStitcherServiceClient->deleteLiveConfig($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $videoStitcherServiceClient->deleteLiveConfig($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $videoStitcherServiceClient->resumeOperation($operationName, 'deleteLiveConfig'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the live config to be deleted, in the form of - * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteLiveConfig($name, array $optionalArgs = []) - { - $request = new DeleteLiveConfigRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteLiveConfig', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes the specified slate. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $formattedName = $videoStitcherServiceClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); - * $operationResponse = $videoStitcherServiceClient->deleteSlate($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $videoStitcherServiceClient->deleteSlate($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $videoStitcherServiceClient->resumeOperation($operationName, 'deleteSlate'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the slate to be deleted, in the form of - * `projects/{project_number}/locations/{location}/slates/{id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteSlate($name, array $optionalArgs = []) - { - $request = new DeleteSlateRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteSlate', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Returns the specified CDN key. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $formattedName = $videoStitcherServiceClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); - * $response = $videoStitcherServiceClient->getCdnKey($formattedName); - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the CDN key to be retrieved, in the form of - * `projects/{project}/locations/{location}/cdnKeys/{id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Video\Stitcher\V1\CdnKey - * - * @throws ApiException if the remote call fails - */ - public function getCdnKey($name, array $optionalArgs = []) - { - $request = new GetCdnKeyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetCdnKey', CdnKey::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the specified ad tag detail for the specified live session. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $formattedName = $videoStitcherServiceClient->liveAdTagDetailName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]', '[LIVE_AD_TAG_DETAIL]'); - * $response = $videoStitcherServiceClient->getLiveAdTagDetail($formattedName); - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail - * - * @throws ApiException if the remote call fails - */ - public function getLiveAdTagDetail($name, array $optionalArgs = []) - { - $request = new GetLiveAdTagDetailRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLiveAdTagDetail', LiveAdTagDetail::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the specified live config managed by the Video - * Stitcher service. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $formattedName = $videoStitcherServiceClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); - * $response = $videoStitcherServiceClient->getLiveConfig($formattedName); - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the live config to be retrieved, in the form - * of - * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Video\Stitcher\V1\LiveConfig - * - * @throws ApiException if the remote call fails - */ - public function getLiveConfig($name, array $optionalArgs = []) - { - $request = new GetLiveConfigRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLiveConfig', LiveConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the details for the specified live session. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $formattedName = $videoStitcherServiceClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); - * $response = $videoStitcherServiceClient->getLiveSession($formattedName); - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the live session, in the form of - * `projects/{project_number}/locations/{location}/liveSessions/{id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Video\Stitcher\V1\LiveSession - * - * @throws ApiException if the remote call fails - */ - public function getLiveSession($name, array $optionalArgs = []) - { - $request = new GetLiveSessionRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLiveSession', LiveSession::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the specified slate. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $formattedName = $videoStitcherServiceClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); - * $response = $videoStitcherServiceClient->getSlate($formattedName); - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the slate to be retrieved, of the slate, in the form - * of `projects/{project_number}/locations/{location}/slates/{id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Video\Stitcher\V1\Slate - * - * @throws ApiException if the remote call fails - */ - public function getSlate($name, array $optionalArgs = []) - { - $request = new GetSlateRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetSlate', Slate::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the specified ad tag detail for the specified VOD session. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $formattedName = $videoStitcherServiceClient->vodAdTagDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_AD_TAG_DETAIL]'); - * $response = $videoStitcherServiceClient->getVodAdTagDetail($formattedName); - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the ad tag detail for the specified VOD session, in - * the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Video\Stitcher\V1\VodAdTagDetail - * - * @throws ApiException if the remote call fails - */ - public function getVodAdTagDetail($name, array $optionalArgs = []) - { - $request = new GetVodAdTagDetailRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetVodAdTagDetail', VodAdTagDetail::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the full tracking, playback metadata, and relevant ad-ops - * logs for the specified VOD session. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $formattedName = $videoStitcherServiceClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); - * $response = $videoStitcherServiceClient->getVodSession($formattedName); - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the VOD session to be retrieved, in the form of - * `projects/{project_number}/locations/{location}/vodSessions/{id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Video\Stitcher\V1\VodSession - * - * @throws ApiException if the remote call fails - */ - public function getVodSession($name, array $optionalArgs = []) - { - $request = new GetVodSessionRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetVodSession', VodSession::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the specified stitching information for the specified VOD session. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $formattedName = $videoStitcherServiceClient->vodStitchDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_STITCH_DETAIL]'); - * $response = $videoStitcherServiceClient->getVodStitchDetail($formattedName); - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the stitch detail in the specified VOD session, in - * the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Video\Stitcher\V1\VodStitchDetail - * - * @throws ApiException if the remote call fails - */ - public function getVodStitchDetail($name, array $optionalArgs = []) - { - $request = new GetVodStitchDetailRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetVodStitchDetail', VodStitchDetail::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists all CDN keys in the specified project and location. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $formattedParent = $videoStitcherServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $videoStitcherServiceClient->listCdnKeys($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $videoStitcherServiceClient->listCdnKeys($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The project that contains the list of CDN keys, in the form of - * `projects/{project_number}/locations/{location}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Filtering results - * @type string $orderBy - * Hint for how to order the results - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listCdnKeys($parent, array $optionalArgs = []) - { - $request = new ListCdnKeysRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListCdnKeys', $optionalArgs, ListCdnKeysResponse::class, $request); - } - - /** - * Return the list of ad tag details for the specified live session. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $formattedParent = $videoStitcherServiceClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); - * // Iterate over pages of elements - * $pagedResponse = $videoStitcherServiceClient->listLiveAdTagDetails($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $videoStitcherServiceClient->listLiveAdTagDetails($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource parent in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLiveAdTagDetails($parent, array $optionalArgs = []) - { - $request = new ListLiveAdTagDetailsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLiveAdTagDetails', $optionalArgs, ListLiveAdTagDetailsResponse::class, $request); - } - - /** - * Lists all live configs managed by the Video Stitcher that - * belong to the specified project and region. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $formattedParent = $videoStitcherServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $videoStitcherServiceClient->listLiveConfigs($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $videoStitcherServiceClient->listLiveConfigs($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The project that contains the list of live configs, in the - * form of `projects/{project_number}/locations/{location}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. The filter to apply to list results (see - * [Filtering](https://google.aip.dev/160)). - * @type string $orderBy - * Optional. Specifies the ordering of results following - * [Cloud API - * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLiveConfigs($parent, array $optionalArgs = []) - { - $request = new ListLiveConfigsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLiveConfigs', $optionalArgs, ListLiveConfigsResponse::class, $request); - } - - /** - * Lists all slates in the specified project and location. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $formattedParent = $videoStitcherServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $videoStitcherServiceClient->listSlates($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $videoStitcherServiceClient->listSlates($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The project to list slates, in the form of - * `projects/{project_number}/locations/{location}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Filtering results - * @type string $orderBy - * Hint for how to order the results - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listSlates($parent, array $optionalArgs = []) - { - $request = new ListSlatesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListSlates', $optionalArgs, ListSlatesResponse::class, $request); - } - - /** - * Return the list of ad tag details for the specified VOD session. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $formattedParent = $videoStitcherServiceClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); - * // Iterate over pages of elements - * $pagedResponse = $videoStitcherServiceClient->listVodAdTagDetails($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $videoStitcherServiceClient->listVodAdTagDetails($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The VOD session which the ad tag details belong to, in the form - * of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listVodAdTagDetails($parent, array $optionalArgs = []) - { - $request = new ListVodAdTagDetailsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListVodAdTagDetails', $optionalArgs, ListVodAdTagDetailsResponse::class, $request); - } - - /** - * Returns a list of detailed stitching information of the specified VOD - * session. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $formattedParent = $videoStitcherServiceClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); - * // Iterate over pages of elements - * $pagedResponse = $videoStitcherServiceClient->listVodStitchDetails($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $videoStitcherServiceClient->listVodStitchDetails($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The VOD session where the stitch details belong to, in the form - * of `projects/{project}/locations/{location}/vodSessions/{id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listVodStitchDetails($parent, array $optionalArgs = []) - { - $request = new ListVodStitchDetailsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListVodStitchDetails', $optionalArgs, ListVodStitchDetailsResponse::class, $request); - } - - /** - * Updates the specified CDN key. Only update fields specified - * in the call method body. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $cdnKey = new CdnKey(); - * $updateMask = new FieldMask(); - * $operationResponse = $videoStitcherServiceClient->updateCdnKey($cdnKey, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $videoStitcherServiceClient->updateCdnKey($cdnKey, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $videoStitcherServiceClient->resumeOperation($operationName, 'updateCdnKey'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param CdnKey $cdnKey Required. The CDN key resource which replaces the resource on the server. - * @param FieldMask $updateMask Required. The update mask applies to the resource. - * For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateCdnKey($cdnKey, $updateMask, array $optionalArgs = []) - { - $request = new UpdateCdnKeyRequest(); - $requestParamHeaders = []; - $request->setCdnKey($cdnKey); - $request->setUpdateMask($updateMask); - $requestParamHeaders['cdn_key.name'] = $cdnKey->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateCdnKey', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates the specified slate. - * - * Sample code: - * ``` - * $videoStitcherServiceClient = new VideoStitcherServiceClient(); - * try { - * $slate = new Slate(); - * $updateMask = new FieldMask(); - * $operationResponse = $videoStitcherServiceClient->updateSlate($slate, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $videoStitcherServiceClient->updateSlate($slate, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $videoStitcherServiceClient->resumeOperation($operationName, 'updateSlate'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $videoStitcherServiceClient->close(); - * } - * ``` - * - * @param Slate $slate Required. The resource with updated fields. - * @param FieldMask $updateMask Required. The update mask which specifies fields which should be updated. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateSlate($slate, $updateMask, array $optionalArgs = []) - { - $request = new UpdateSlateRequest(); - $requestParamHeaders = []; - $request->setSlate($slate); - $request->setUpdateMask($updateMask); - $requestParamHeaders['slate.name'] = $slate->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateSlate', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } -} diff --git a/owl-bot-staging/VideoStitcher/v1/src/V1/VideoStitcherServiceClient.php b/owl-bot-staging/VideoStitcher/v1/src/V1/VideoStitcherServiceClient.php deleted file mode 100644 index e011efb2eb40..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/src/V1/VideoStitcherServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.video.stitcher.v1.VideoStitcherService' => [ - 'CreateCdnKey' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\CdnKey', - 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateLiveConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\LiveConfig', - 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSlate' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\Slate', - 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteCdnKey' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteLiveConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSlate' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateCdnKey' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\CdnKey', - 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'cdn_key.name', - 'fieldAccessors' => [ - 'getCdnKey', - 'getName', - ], - ], - ], - ], - 'UpdateSlate' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\Slate', - 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'slate.name', - 'fieldAccessors' => [ - 'getSlate', - 'getName', - ], - ], - ], - ], - 'CreateLiveSession' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\LiveSession', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateVodSession' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\VodSession', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetCdnKey' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\CdnKey', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLiveAdTagDetail' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLiveConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\LiveConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLiveSession' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\LiveSession', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSlate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\Slate', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetVodAdTagDetail' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\VodAdTagDetail', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetVodSession' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\VodSession', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetVodStitchDetail' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\VodStitchDetail', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListCdnKeys' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCdnKeys', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListCdnKeysResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListLiveAdTagDetails' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLiveAdTagDetails', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListLiveAdTagDetailsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListLiveConfigs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLiveConfigs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListLiveConfigsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSlates' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSlates', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListSlatesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListVodAdTagDetails' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getVodAdTagDetails', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListVodAdTagDetailsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListVodStitchDetails' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getVodStitchDetails', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListVodStitchDetailsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'cdnKey' => 'projects/{project}/locations/{location}/cdnKeys/{cdn_key}', - 'liveAdTagDetail' => 'projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}', - 'liveConfig' => 'projects/{project}/locations/{location}/liveConfigs/{live_config}', - 'liveSession' => 'projects/{project}/locations/{location}/liveSessions/{live_session}', - 'location' => 'projects/{project}/locations/{location}', - 'slate' => 'projects/{project}/locations/{location}/slates/{slate}', - 'vodAdTagDetail' => 'projects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail}', - 'vodSession' => 'projects/{project}/locations/{location}/vodSessions/{vod_session}', - 'vodStitchDetail' => 'projects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail}', - ], - ], - ], -]; diff --git a/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_rest_client_config.php b/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_rest_client_config.php deleted file mode 100644 index d6dd5bc244c6..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_rest_client_config.php +++ /dev/null @@ -1,344 +0,0 @@ - [ - 'google.cloud.video.stitcher.v1.VideoStitcherService' => [ - 'CreateCdnKey' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/cdnKeys', - 'body' => 'cdn_key', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'cdn_key_id', - ], - ], - 'CreateLiveConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/liveConfigs', - 'body' => 'live_config', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'live_config_id', - ], - ], - 'CreateLiveSession' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/liveSessions', - 'body' => 'live_session', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSlate' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/slates', - 'body' => 'slate', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'slate_id', - ], - ], - 'CreateVodSession' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/vodSessions', - 'body' => 'vod_session', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteCdnKey' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/cdnKeys/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteLiveConfig' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/liveConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSlate' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/slates/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCdnKey' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/cdnKeys/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetLiveAdTagDetail' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/liveSessions/*/liveAdTagDetails/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetLiveConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/liveConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetLiveSession' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/liveSessions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSlate' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/slates/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetVodAdTagDetail' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/vodSessions/*/vodAdTagDetails/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetVodSession' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/vodSessions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetVodStitchDetail' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/vodSessions/*/vodStitchDetails/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListCdnKeys' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/cdnKeys', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListLiveAdTagDetails' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/liveSessions/*}/liveAdTagDetails', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListLiveConfigs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/liveConfigs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSlates' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/slates', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListVodAdTagDetails' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/vodSessions/*}/vodAdTagDetails', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListVodStitchDetails' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/vodSessions/*}/vodStitchDetails', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateCdnKey' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{cdn_key.name=projects/*/locations/*/cdnKeys/*}', - 'body' => 'cdn_key', - 'placeholders' => [ - 'cdn_key.name' => [ - 'getters' => [ - 'getCdnKey', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateSlate' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{slate.name=projects/*/locations/*/slates/*}', - 'body' => 'slate', - 'placeholders' => [ - 'slate.name' => [ - 'getters' => [ - 'getSlate', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/VideoStitcher/v1/tests/Unit/V1/Client/VideoStitcherServiceClientTest.php b/owl-bot-staging/VideoStitcher/v1/tests/Unit/V1/Client/VideoStitcherServiceClientTest.php deleted file mode 100644 index d9f52614ce1e..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/tests/Unit/V1/Client/VideoStitcherServiceClientTest.php +++ /dev/null @@ -1,2363 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return VideoStitcherServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new VideoStitcherServiceClient($options); - } - - /** @test */ - public function createCdnKeyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCdnKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $hostname = 'hostname-299803597'; - $expectedResponse = new CdnKey(); - $expectedResponse->setName($name); - $expectedResponse->setHostname($hostname); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createCdnKeyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $cdnKey = new CdnKey(); - $cdnKeyId = 'cdnKeyId1672586061'; - $request = (new CreateCdnKeyRequest()) - ->setParent($formattedParent) - ->setCdnKey($cdnKey) - ->setCdnKeyId($cdnKeyId); - $response = $gapicClient->createCdnKey($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateCdnKey', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getCdnKey(); - $this->assertProtobufEquals($cdnKey, $actualValue); - $actualValue = $actualApiRequestObject->getCdnKeyId(); - $this->assertProtobufEquals($cdnKeyId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCdnKeyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createCdnKeyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCdnKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $cdnKey = new CdnKey(); - $cdnKeyId = 'cdnKeyId1672586061'; - $request = (new CreateCdnKeyRequest()) - ->setParent($formattedParent) - ->setCdnKey($cdnKey) - ->setCdnKeyId($cdnKeyId); - $response = $gapicClient->createCdnKey($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCdnKeyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createLiveConfigTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createLiveConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $sourceUri = 'sourceUri-1111107768'; - $adTagUri = 'adTagUri-1429194965'; - $defaultSlate = 'defaultSlate1316218395'; - $expectedResponse = new LiveConfig(); - $expectedResponse->setName($name); - $expectedResponse->setSourceUri($sourceUri); - $expectedResponse->setAdTagUri($adTagUri); - $expectedResponse->setDefaultSlate($defaultSlate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createLiveConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $liveConfigId = 'liveConfigId-558267483'; - $liveConfig = new LiveConfig(); - $liveConfigSourceUri = 'liveConfigSourceUri-20192349'; - $liveConfig->setSourceUri($liveConfigSourceUri); - $liveConfigAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; - $liveConfig->setAdTracking($liveConfigAdTracking); - $request = (new CreateLiveConfigRequest()) - ->setParent($formattedParent) - ->setLiveConfigId($liveConfigId) - ->setLiveConfig($liveConfig); - $response = $gapicClient->createLiveConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateLiveConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getLiveConfigId(); - $this->assertProtobufEquals($liveConfigId, $actualValue); - $actualValue = $actualApiRequestObject->getLiveConfig(); - $this->assertProtobufEquals($liveConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLiveConfigTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createLiveConfigExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createLiveConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $liveConfigId = 'liveConfigId-558267483'; - $liveConfig = new LiveConfig(); - $liveConfigSourceUri = 'liveConfigSourceUri-20192349'; - $liveConfig->setSourceUri($liveConfigSourceUri); - $liveConfigAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; - $liveConfig->setAdTracking($liveConfigAdTracking); - $request = (new CreateLiveConfigRequest()) - ->setParent($formattedParent) - ->setLiveConfigId($liveConfigId) - ->setLiveConfig($liveConfig); - $response = $gapicClient->createLiveConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLiveConfigTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createLiveSessionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $playUri = 'playUri1879098849'; - $liveConfig = 'liveConfig-1498665483'; - $expectedResponse = new LiveSession(); - $expectedResponse->setName($name); - $expectedResponse->setPlayUri($playUri); - $expectedResponse->setLiveConfig($liveConfig); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); - $liveSession = new LiveSession(); - $liveSessionLiveConfig = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); - $liveSession->setLiveConfig($liveSessionLiveConfig); - $request = (new CreateLiveSessionRequest()) - ->setParent($formattedParent) - ->setLiveSession($liveSession); - $response = $gapicClient->createLiveSession($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateLiveSession', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getLiveSession(); - $this->assertProtobufEquals($liveSession, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createLiveSessionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); - $liveSession = new LiveSession(); - $liveSessionLiveConfig = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); - $liveSession->setLiveConfig($liveSessionLiveConfig); - $request = (new CreateLiveSessionRequest()) - ->setParent($formattedParent) - ->setLiveSession($liveSession); - try { - $gapicClient->createLiveSession($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSlateTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSlateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uri = 'uri116076'; - $expectedResponse = new Slate(); - $expectedResponse->setName($name); - $expectedResponse->setUri($uri); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createSlateTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $slateId = 'slateId-1486865023'; - $slate = new Slate(); - $request = (new CreateSlateRequest()) - ->setParent($formattedParent) - ->setSlateId($slateId) - ->setSlate($slate); - $response = $gapicClient->createSlate($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateSlate', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSlateId(); - $this->assertProtobufEquals($slateId, $actualValue); - $actualValue = $actualApiRequestObject->getSlate(); - $this->assertProtobufEquals($slate, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSlateTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createSlateExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSlateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $slateId = 'slateId-1486865023'; - $slate = new Slate(); - $request = (new CreateSlateRequest()) - ->setParent($formattedParent) - ->setSlateId($slateId) - ->setSlate($slate); - $response = $gapicClient->createSlate($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSlateTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createVodSessionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $playUri = 'playUri1879098849'; - $sourceUri = 'sourceUri-1111107768'; - $adTagUri = 'adTagUri-1429194965'; - $assetId = 'assetId-373202742'; - $expectedResponse = new VodSession(); - $expectedResponse->setName($name); - $expectedResponse->setPlayUri($playUri); - $expectedResponse->setSourceUri($sourceUri); - $expectedResponse->setAdTagUri($adTagUri); - $expectedResponse->setAssetId($assetId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $vodSession = new VodSession(); - $vodSessionSourceUri = 'vodSessionSourceUri2085185606'; - $vodSession->setSourceUri($vodSessionSourceUri); - $vodSessionAdTagUri = 'vodSessionAdTagUri-600567328'; - $vodSession->setAdTagUri($vodSessionAdTagUri); - $vodSessionAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; - $vodSession->setAdTracking($vodSessionAdTracking); - $request = (new CreateVodSessionRequest()) - ->setParent($formattedParent) - ->setVodSession($vodSession); - $response = $gapicClient->createVodSession($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateVodSession', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getVodSession(); - $this->assertProtobufEquals($vodSession, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createVodSessionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $vodSession = new VodSession(); - $vodSessionSourceUri = 'vodSessionSourceUri2085185606'; - $vodSession->setSourceUri($vodSessionSourceUri); - $vodSessionAdTagUri = 'vodSessionAdTagUri-600567328'; - $vodSession->setAdTagUri($vodSessionAdTagUri); - $vodSessionAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; - $vodSession->setAdTracking($vodSessionAdTracking); - $request = (new CreateVodSessionRequest()) - ->setParent($formattedParent) - ->setVodSession($vodSession); - try { - $gapicClient->createVodSession($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteCdnKeyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteCdnKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteCdnKeyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); - $request = (new DeleteCdnKeyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCdnKey($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/DeleteCdnKey', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCdnKeyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteCdnKeyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteCdnKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); - $request = (new DeleteCdnKeyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCdnKey($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCdnKeyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteLiveConfigTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteLiveConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteLiveConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); - $request = (new DeleteLiveConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteLiveConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/DeleteLiveConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLiveConfigTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteLiveConfigExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteLiveConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); - $request = (new DeleteLiveConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteLiveConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLiveConfigTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteSlateTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSlateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteSlateTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); - $request = (new DeleteSlateRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSlate($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/DeleteSlate', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSlateTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteSlateExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSlateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); - $request = (new DeleteSlateRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSlate($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSlateTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getCdnKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $hostname = 'hostname-299803597'; - $expectedResponse = new CdnKey(); - $expectedResponse->setName($name2); - $expectedResponse->setHostname($hostname); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); - $request = (new GetCdnKeyRequest()) - ->setName($formattedName); - $response = $gapicClient->getCdnKey($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetCdnKey', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCdnKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); - $request = (new GetCdnKeyRequest()) - ->setName($formattedName); - try { - $gapicClient->getCdnKey($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLiveAdTagDetailTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new LiveAdTagDetail(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->liveAdTagDetailName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]', '[LIVE_AD_TAG_DETAIL]'); - $request = (new GetLiveAdTagDetailRequest()) - ->setName($formattedName); - $response = $gapicClient->getLiveAdTagDetail($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetLiveAdTagDetail', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLiveAdTagDetailExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->liveAdTagDetailName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]', '[LIVE_AD_TAG_DETAIL]'); - $request = (new GetLiveAdTagDetailRequest()) - ->setName($formattedName); - try { - $gapicClient->getLiveAdTagDetail($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLiveConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $sourceUri = 'sourceUri-1111107768'; - $adTagUri = 'adTagUri-1429194965'; - $defaultSlate = 'defaultSlate1316218395'; - $expectedResponse = new LiveConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setSourceUri($sourceUri); - $expectedResponse->setAdTagUri($adTagUri); - $expectedResponse->setDefaultSlate($defaultSlate); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); - $request = (new GetLiveConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getLiveConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetLiveConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLiveConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); - $request = (new GetLiveConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getLiveConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLiveSessionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $playUri = 'playUri1879098849'; - $liveConfig = 'liveConfig-1498665483'; - $expectedResponse = new LiveSession(); - $expectedResponse->setName($name2); - $expectedResponse->setPlayUri($playUri); - $expectedResponse->setLiveConfig($liveConfig); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); - $request = (new GetLiveSessionRequest()) - ->setName($formattedName); - $response = $gapicClient->getLiveSession($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetLiveSession', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLiveSessionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); - $request = (new GetLiveSessionRequest()) - ->setName($formattedName); - try { - $gapicClient->getLiveSession($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSlateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uri = 'uri116076'; - $expectedResponse = new Slate(); - $expectedResponse->setName($name2); - $expectedResponse->setUri($uri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); - $request = (new GetSlateRequest()) - ->setName($formattedName); - $response = $gapicClient->getSlate($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetSlate', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSlateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); - $request = (new GetSlateRequest()) - ->setName($formattedName); - try { - $gapicClient->getSlate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVodAdTagDetailTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new VodAdTagDetail(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->vodAdTagDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_AD_TAG_DETAIL]'); - $request = (new GetVodAdTagDetailRequest()) - ->setName($formattedName); - $response = $gapicClient->getVodAdTagDetail($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetVodAdTagDetail', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVodAdTagDetailExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->vodAdTagDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_AD_TAG_DETAIL]'); - $request = (new GetVodAdTagDetailRequest()) - ->setName($formattedName); - try { - $gapicClient->getVodAdTagDetail($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVodSessionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $playUri = 'playUri1879098849'; - $sourceUri = 'sourceUri-1111107768'; - $adTagUri = 'adTagUri-1429194965'; - $assetId = 'assetId-373202742'; - $expectedResponse = new VodSession(); - $expectedResponse->setName($name2); - $expectedResponse->setPlayUri($playUri); - $expectedResponse->setSourceUri($sourceUri); - $expectedResponse->setAdTagUri($adTagUri); - $expectedResponse->setAssetId($assetId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); - $request = (new GetVodSessionRequest()) - ->setName($formattedName); - $response = $gapicClient->getVodSession($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetVodSession', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVodSessionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); - $request = (new GetVodSessionRequest()) - ->setName($formattedName); - try { - $gapicClient->getVodSession($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVodStitchDetailTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new VodStitchDetail(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->vodStitchDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_STITCH_DETAIL]'); - $request = (new GetVodStitchDetailRequest()) - ->setName($formattedName); - $response = $gapicClient->getVodStitchDetail($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetVodStitchDetail', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVodStitchDetailExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->vodStitchDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_STITCH_DETAIL]'); - $request = (new GetVodStitchDetailRequest()) - ->setName($formattedName); - try { - $gapicClient->getVodStitchDetail($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCdnKeysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $cdnKeysElement = new CdnKey(); - $cdnKeys = [ - $cdnKeysElement, - ]; - $expectedResponse = new ListCdnKeysResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCdnKeys($cdnKeys); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListCdnKeysRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listCdnKeys($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCdnKeys()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListCdnKeys', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCdnKeysExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListCdnKeysRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listCdnKeys($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLiveAdTagDetailsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $liveAdTagDetailsElement = new LiveAdTagDetail(); - $liveAdTagDetails = [ - $liveAdTagDetailsElement, - ]; - $expectedResponse = new ListLiveAdTagDetailsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLiveAdTagDetails($liveAdTagDetails); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); - $request = (new ListLiveAdTagDetailsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listLiveAdTagDetails($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLiveAdTagDetails()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListLiveAdTagDetails', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLiveAdTagDetailsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); - $request = (new ListLiveAdTagDetailsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listLiveAdTagDetails($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLiveConfigsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $liveConfigsElement = new LiveConfig(); - $liveConfigs = [ - $liveConfigsElement, - ]; - $expectedResponse = new ListLiveConfigsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLiveConfigs($liveConfigs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListLiveConfigsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listLiveConfigs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLiveConfigs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListLiveConfigs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLiveConfigsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListLiveConfigsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listLiveConfigs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSlatesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $slatesElement = new Slate(); - $slates = [ - $slatesElement, - ]; - $expectedResponse = new ListSlatesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSlates($slates); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListSlatesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSlates($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSlates()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListSlates', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSlatesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListSlatesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSlates($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVodAdTagDetailsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $vodAdTagDetailsElement = new VodAdTagDetail(); - $vodAdTagDetails = [ - $vodAdTagDetailsElement, - ]; - $expectedResponse = new ListVodAdTagDetailsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setVodAdTagDetails($vodAdTagDetails); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); - $request = (new ListVodAdTagDetailsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listVodAdTagDetails($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getVodAdTagDetails()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListVodAdTagDetails', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVodAdTagDetailsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); - $request = (new ListVodAdTagDetailsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listVodAdTagDetails($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVodStitchDetailsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $vodStitchDetailsElement = new VodStitchDetail(); - $vodStitchDetails = [ - $vodStitchDetailsElement, - ]; - $expectedResponse = new ListVodStitchDetailsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setVodStitchDetails($vodStitchDetails); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); - $request = (new ListVodStitchDetailsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listVodStitchDetails($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getVodStitchDetails()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListVodStitchDetails', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVodStitchDetailsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); - $request = (new ListVodStitchDetailsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listVodStitchDetails($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCdnKeyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateCdnKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $hostname = 'hostname-299803597'; - $expectedResponse = new CdnKey(); - $expectedResponse->setName($name); - $expectedResponse->setHostname($hostname); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateCdnKeyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $cdnKey = new CdnKey(); - $updateMask = new FieldMask(); - $request = (new UpdateCdnKeyRequest()) - ->setCdnKey($cdnKey) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateCdnKey($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/UpdateCdnKey', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getCdnKey(); - $this->assertProtobufEquals($cdnKey, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateCdnKeyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateCdnKeyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateCdnKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $cdnKey = new CdnKey(); - $updateMask = new FieldMask(); - $request = (new UpdateCdnKeyRequest()) - ->setCdnKey($cdnKey) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateCdnKey($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateCdnKeyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateSlateTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSlateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uri = 'uri116076'; - $expectedResponse = new Slate(); - $expectedResponse->setName($name); - $expectedResponse->setUri($uri); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateSlateTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $slate = new Slate(); - $updateMask = new FieldMask(); - $request = (new UpdateSlateRequest()) - ->setSlate($slate) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateSlate($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/UpdateSlate', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getSlate(); - $this->assertProtobufEquals($slate, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSlateTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateSlateExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSlateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $slate = new Slate(); - $updateMask = new FieldMask(); - $request = (new UpdateSlateRequest()) - ->setSlate($slate) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateSlate($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSlateTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createCdnKeyAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCdnKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $hostname = 'hostname-299803597'; - $expectedResponse = new CdnKey(); - $expectedResponse->setName($name); - $expectedResponse->setHostname($hostname); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createCdnKeyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $cdnKey = new CdnKey(); - $cdnKeyId = 'cdnKeyId1672586061'; - $request = (new CreateCdnKeyRequest()) - ->setParent($formattedParent) - ->setCdnKey($cdnKey) - ->setCdnKeyId($cdnKeyId); - $response = $gapicClient->createCdnKeyAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateCdnKey', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getCdnKey(); - $this->assertProtobufEquals($cdnKey, $actualValue); - $actualValue = $actualApiRequestObject->getCdnKeyId(); - $this->assertProtobufEquals($cdnKeyId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCdnKeyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/VideoStitcher/v1/tests/Unit/V1/VideoStitcherServiceClientTest.php b/owl-bot-staging/VideoStitcher/v1/tests/Unit/V1/VideoStitcherServiceClientTest.php deleted file mode 100644 index 3c9cc76ac8f2..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/tests/Unit/V1/VideoStitcherServiceClientTest.php +++ /dev/null @@ -1,2147 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return VideoStitcherServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new VideoStitcherServiceClient($options); - } - - /** @test */ - public function createCdnKeyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCdnKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $hostname = 'hostname-299803597'; - $expectedResponse = new CdnKey(); - $expectedResponse->setName($name); - $expectedResponse->setHostname($hostname); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createCdnKeyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $cdnKey = new CdnKey(); - $cdnKeyId = 'cdnKeyId1672586061'; - $response = $gapicClient->createCdnKey($formattedParent, $cdnKey, $cdnKeyId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateCdnKey', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getCdnKey(); - $this->assertProtobufEquals($cdnKey, $actualValue); - $actualValue = $actualApiRequestObject->getCdnKeyId(); - $this->assertProtobufEquals($cdnKeyId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCdnKeyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createCdnKeyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCdnKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $cdnKey = new CdnKey(); - $cdnKeyId = 'cdnKeyId1672586061'; - $response = $gapicClient->createCdnKey($formattedParent, $cdnKey, $cdnKeyId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCdnKeyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createLiveConfigTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createLiveConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $sourceUri = 'sourceUri-1111107768'; - $adTagUri = 'adTagUri-1429194965'; - $defaultSlate = 'defaultSlate1316218395'; - $expectedResponse = new LiveConfig(); - $expectedResponse->setName($name); - $expectedResponse->setSourceUri($sourceUri); - $expectedResponse->setAdTagUri($adTagUri); - $expectedResponse->setDefaultSlate($defaultSlate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createLiveConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $liveConfigId = 'liveConfigId-558267483'; - $liveConfig = new LiveConfig(); - $liveConfigSourceUri = 'liveConfigSourceUri-20192349'; - $liveConfig->setSourceUri($liveConfigSourceUri); - $liveConfigAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; - $liveConfig->setAdTracking($liveConfigAdTracking); - $response = $gapicClient->createLiveConfig($formattedParent, $liveConfigId, $liveConfig); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateLiveConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getLiveConfigId(); - $this->assertProtobufEquals($liveConfigId, $actualValue); - $actualValue = $actualApiRequestObject->getLiveConfig(); - $this->assertProtobufEquals($liveConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLiveConfigTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createLiveConfigExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createLiveConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $liveConfigId = 'liveConfigId-558267483'; - $liveConfig = new LiveConfig(); - $liveConfigSourceUri = 'liveConfigSourceUri-20192349'; - $liveConfig->setSourceUri($liveConfigSourceUri); - $liveConfigAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; - $liveConfig->setAdTracking($liveConfigAdTracking); - $response = $gapicClient->createLiveConfig($formattedParent, $liveConfigId, $liveConfig); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLiveConfigTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createLiveSessionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $playUri = 'playUri1879098849'; - $liveConfig = 'liveConfig-1498665483'; - $expectedResponse = new LiveSession(); - $expectedResponse->setName($name); - $expectedResponse->setPlayUri($playUri); - $expectedResponse->setLiveConfig($liveConfig); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); - $liveSession = new LiveSession(); - $liveSessionLiveConfig = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); - $liveSession->setLiveConfig($liveSessionLiveConfig); - $response = $gapicClient->createLiveSession($formattedParent, $liveSession); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateLiveSession', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getLiveSession(); - $this->assertProtobufEquals($liveSession, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createLiveSessionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); - $liveSession = new LiveSession(); - $liveSessionLiveConfig = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); - $liveSession->setLiveConfig($liveSessionLiveConfig); - try { - $gapicClient->createLiveSession($formattedParent, $liveSession); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSlateTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSlateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uri = 'uri116076'; - $expectedResponse = new Slate(); - $expectedResponse->setName($name); - $expectedResponse->setUri($uri); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createSlateTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $slateId = 'slateId-1486865023'; - $slate = new Slate(); - $response = $gapicClient->createSlate($formattedParent, $slateId, $slate); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateSlate', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSlateId(); - $this->assertProtobufEquals($slateId, $actualValue); - $actualValue = $actualApiRequestObject->getSlate(); - $this->assertProtobufEquals($slate, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSlateTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createSlateExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSlateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $slateId = 'slateId-1486865023'; - $slate = new Slate(); - $response = $gapicClient->createSlate($formattedParent, $slateId, $slate); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSlateTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createVodSessionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $playUri = 'playUri1879098849'; - $sourceUri = 'sourceUri-1111107768'; - $adTagUri = 'adTagUri-1429194965'; - $assetId = 'assetId-373202742'; - $expectedResponse = new VodSession(); - $expectedResponse->setName($name); - $expectedResponse->setPlayUri($playUri); - $expectedResponse->setSourceUri($sourceUri); - $expectedResponse->setAdTagUri($adTagUri); - $expectedResponse->setAssetId($assetId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $vodSession = new VodSession(); - $vodSessionSourceUri = 'vodSessionSourceUri2085185606'; - $vodSession->setSourceUri($vodSessionSourceUri); - $vodSessionAdTagUri = 'vodSessionAdTagUri-600567328'; - $vodSession->setAdTagUri($vodSessionAdTagUri); - $vodSessionAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; - $vodSession->setAdTracking($vodSessionAdTracking); - $response = $gapicClient->createVodSession($formattedParent, $vodSession); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/CreateVodSession', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getVodSession(); - $this->assertProtobufEquals($vodSession, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createVodSessionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $vodSession = new VodSession(); - $vodSessionSourceUri = 'vodSessionSourceUri2085185606'; - $vodSession->setSourceUri($vodSessionSourceUri); - $vodSessionAdTagUri = 'vodSessionAdTagUri-600567328'; - $vodSession->setAdTagUri($vodSessionAdTagUri); - $vodSessionAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; - $vodSession->setAdTracking($vodSessionAdTracking); - try { - $gapicClient->createVodSession($formattedParent, $vodSession); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteCdnKeyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteCdnKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteCdnKeyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); - $response = $gapicClient->deleteCdnKey($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/DeleteCdnKey', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCdnKeyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteCdnKeyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteCdnKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); - $response = $gapicClient->deleteCdnKey($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCdnKeyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteLiveConfigTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteLiveConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteLiveConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); - $response = $gapicClient->deleteLiveConfig($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/DeleteLiveConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLiveConfigTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteLiveConfigExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteLiveConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); - $response = $gapicClient->deleteLiveConfig($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLiveConfigTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteSlateTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSlateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteSlateTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); - $response = $gapicClient->deleteSlate($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/DeleteSlate', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSlateTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteSlateExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSlateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); - $response = $gapicClient->deleteSlate($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSlateTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getCdnKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $hostname = 'hostname-299803597'; - $expectedResponse = new CdnKey(); - $expectedResponse->setName($name2); - $expectedResponse->setHostname($hostname); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); - $response = $gapicClient->getCdnKey($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetCdnKey', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCdnKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); - try { - $gapicClient->getCdnKey($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLiveAdTagDetailTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new LiveAdTagDetail(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->liveAdTagDetailName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]', '[LIVE_AD_TAG_DETAIL]'); - $response = $gapicClient->getLiveAdTagDetail($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetLiveAdTagDetail', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLiveAdTagDetailExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->liveAdTagDetailName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]', '[LIVE_AD_TAG_DETAIL]'); - try { - $gapicClient->getLiveAdTagDetail($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLiveConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $sourceUri = 'sourceUri-1111107768'; - $adTagUri = 'adTagUri-1429194965'; - $defaultSlate = 'defaultSlate1316218395'; - $expectedResponse = new LiveConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setSourceUri($sourceUri); - $expectedResponse->setAdTagUri($adTagUri); - $expectedResponse->setDefaultSlate($defaultSlate); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); - $response = $gapicClient->getLiveConfig($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetLiveConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLiveConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); - try { - $gapicClient->getLiveConfig($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLiveSessionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $playUri = 'playUri1879098849'; - $liveConfig = 'liveConfig-1498665483'; - $expectedResponse = new LiveSession(); - $expectedResponse->setName($name2); - $expectedResponse->setPlayUri($playUri); - $expectedResponse->setLiveConfig($liveConfig); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); - $response = $gapicClient->getLiveSession($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetLiveSession', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLiveSessionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); - try { - $gapicClient->getLiveSession($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSlateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uri = 'uri116076'; - $expectedResponse = new Slate(); - $expectedResponse->setName($name2); - $expectedResponse->setUri($uri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); - $response = $gapicClient->getSlate($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetSlate', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSlateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); - try { - $gapicClient->getSlate($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVodAdTagDetailTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new VodAdTagDetail(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->vodAdTagDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_AD_TAG_DETAIL]'); - $response = $gapicClient->getVodAdTagDetail($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetVodAdTagDetail', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVodAdTagDetailExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->vodAdTagDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_AD_TAG_DETAIL]'); - try { - $gapicClient->getVodAdTagDetail($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVodSessionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $playUri = 'playUri1879098849'; - $sourceUri = 'sourceUri-1111107768'; - $adTagUri = 'adTagUri-1429194965'; - $assetId = 'assetId-373202742'; - $expectedResponse = new VodSession(); - $expectedResponse->setName($name2); - $expectedResponse->setPlayUri($playUri); - $expectedResponse->setSourceUri($sourceUri); - $expectedResponse->setAdTagUri($adTagUri); - $expectedResponse->setAssetId($assetId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); - $response = $gapicClient->getVodSession($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetVodSession', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVodSessionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); - try { - $gapicClient->getVodSession($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVodStitchDetailTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new VodStitchDetail(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->vodStitchDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_STITCH_DETAIL]'); - $response = $gapicClient->getVodStitchDetail($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/GetVodStitchDetail', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVodStitchDetailExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->vodStitchDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_STITCH_DETAIL]'); - try { - $gapicClient->getVodStitchDetail($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCdnKeysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $cdnKeysElement = new CdnKey(); - $cdnKeys = [ - $cdnKeysElement, - ]; - $expectedResponse = new ListCdnKeysResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCdnKeys($cdnKeys); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listCdnKeys($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCdnKeys()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListCdnKeys', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCdnKeysExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listCdnKeys($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLiveAdTagDetailsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $liveAdTagDetailsElement = new LiveAdTagDetail(); - $liveAdTagDetails = [ - $liveAdTagDetailsElement, - ]; - $expectedResponse = new ListLiveAdTagDetailsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLiveAdTagDetails($liveAdTagDetails); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); - $response = $gapicClient->listLiveAdTagDetails($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLiveAdTagDetails()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListLiveAdTagDetails', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLiveAdTagDetailsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); - try { - $gapicClient->listLiveAdTagDetails($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLiveConfigsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $liveConfigsElement = new LiveConfig(); - $liveConfigs = [ - $liveConfigsElement, - ]; - $expectedResponse = new ListLiveConfigsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLiveConfigs($liveConfigs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listLiveConfigs($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLiveConfigs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListLiveConfigs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLiveConfigsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listLiveConfigs($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSlatesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $slatesElement = new Slate(); - $slates = [ - $slatesElement, - ]; - $expectedResponse = new ListSlatesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSlates($slates); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listSlates($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSlates()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListSlates', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSlatesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listSlates($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVodAdTagDetailsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $vodAdTagDetailsElement = new VodAdTagDetail(); - $vodAdTagDetails = [ - $vodAdTagDetailsElement, - ]; - $expectedResponse = new ListVodAdTagDetailsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setVodAdTagDetails($vodAdTagDetails); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); - $response = $gapicClient->listVodAdTagDetails($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getVodAdTagDetails()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListVodAdTagDetails', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVodAdTagDetailsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); - try { - $gapicClient->listVodAdTagDetails($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVodStitchDetailsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $vodStitchDetailsElement = new VodStitchDetail(); - $vodStitchDetails = [ - $vodStitchDetailsElement, - ]; - $expectedResponse = new ListVodStitchDetailsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setVodStitchDetails($vodStitchDetails); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); - $response = $gapicClient->listVodStitchDetails($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getVodStitchDetails()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListVodStitchDetails', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVodStitchDetailsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); - try { - $gapicClient->listVodStitchDetails($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCdnKeyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateCdnKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $hostname = 'hostname-299803597'; - $expectedResponse = new CdnKey(); - $expectedResponse->setName($name); - $expectedResponse->setHostname($hostname); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateCdnKeyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $cdnKey = new CdnKey(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateCdnKey($cdnKey, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/UpdateCdnKey', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getCdnKey(); - $this->assertProtobufEquals($cdnKey, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateCdnKeyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateCdnKeyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateCdnKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $cdnKey = new CdnKey(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateCdnKey($cdnKey, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateCdnKeyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateSlateTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSlateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uri = 'uri116076'; - $expectedResponse = new Slate(); - $expectedResponse->setName($name); - $expectedResponse->setUri($uri); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateSlateTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $slate = new Slate(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateSlate($slate, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/UpdateSlate', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getSlate(); - $this->assertProtobufEquals($slate, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSlateTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateSlateExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSlateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $slate = new Slate(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateSlate($slate, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSlateTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/GPBMetadata/Google/Cloud/Video/Transcoder/V1/Resources.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/GPBMetadata/Google/Cloud/Video/Transcoder/V1/Resources.php deleted file mode 100644 index 57dfc6ec596d49d17521be2a01e2ef1b4ea52fa9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9456 zcmeHNOK%(36%IvFA`c~58ruoYGzr6`joijmP3L7fPQsULI?#?+ily-wSrEExw*F8cMOxcgpWEAS=4#b? z^JOIU?7(fa?OfNkyC&Oen|7dY9T_^aw|rN#ytb_~ckAfpmdnIaufV|pEUnKxM{Bd( zy@T>D^EF-bwZnTH=deOJhmQ&8uo>YTKE8PeplxcNmwOoE!55Ije@@UcjdsrSH6Q=H zYIv$)8NQ*J#^-phySa{LdJL&guk8d@+c#`0M+Ey;n{8gt2~1l1s$-)Z?&dtxH{LU(j!L>7sbmKYc{36siS#x2x&l9aS_@XB%@?@M z7r4zAhBjX~x|zKuF*V1C>|dCF_C@)MI|G{2mM-Nd-@i2Z-VcQ&7d$5yxK4YE3@VV0 zmH+E9#2?r#Wd#<=#WJy6Y%`@i3n{~L0$&YWBeOt{%JILI7M14!?7$CS#D_1kkoH;M zF)=KthMrlB-rRpixeH5e+v*tIOadRLi$5s{X3iEx0XeF05+tuff;eWGBvP*x-<*rO zfR@%~o@ZEHQamH}7}kI6K)8FcfYfvM@n)3ji5#eL=K3AJI)nGD{aE zYx9x34A*?$RJ9I93YB80$;d@iT^o3rONfzBO0Z;VEoOR|^;{f9c{AkwOsgVM7Cz!M zHOqGg%8wwyT-SCp8=Na8L_o_Zkf;JroVpB)eT>GLE4XZ}_(r(w{EdcE-$mN&4M>k} zord_QY#>c+6%t3988Bg9+Y9f+@;$gT1mJ2@a`1zLhx?UUqfy_xr#70UW=(yx*EpzE z>O1vXb^RG74a*0$y(+$5kI|QhkM{QH%Yw2Bsm7y9rB4Jrh2+mq=Y{Blq20x~-QAwc970Y;?e8gVV%z?66jQYb|cew4Rii3dUtt(F|_@U__|uT$j2sFz~8;j5;)sb_<;ts`gNxFDzHp~I1#iA`FRjRP+Ij(_8#OpDJvPf~3Zp_ANaIywbDR&@g zA2HXY*beiaX`vdK^Y{_g2?&jNTLU$)WRF`S7Ax& zMDE3_h5VN>NJfS`#?o5kKI8!@r3jb8tf<mk-(6vx{$T2UN3t@$bNqb|MenToM zFw(`dsq*i`a%cfl0f_T+0e-Up>$OQQl858vjZ%XZUdBnM;(0AyoWl-yqawTt>l=j8 z0^P7f7!jW5fGH7G1XH03?AQ-cgq~jy#d>zyZX!_#Qoalur=m{&PccXh!@!t+Hz3u) z0$JsyBd-$`e1!SP*9>eDxpGrVc4{o65R_6rgmsT~DbA^A4d`TD3NECZIcl4RplnFO z{9n)zqkuEUn<#4^z@k5JM9HyMe0#QVLa;*kp^4;FA1x@E@qkK^nHR|m`43=abh+{Z zT-z<})pu%*rrP}YV6w2l0{s3*4J;s%uvjfMuwKaLVdHe%!Gg)R9iuJkr~JP$+m8km zbhVD{_BCJDSI8e%4Mu^EaXc*I7qF(fECbjRL-%{CV;oaONfwh3XL}j0$Q3v`MSpF=)Ie$L7vG!zSW}rm1J+EZ zr*TV*Wq%igOA+T(?Hg_70W2Jg2I0GJH#O{w;Ci;UU3ykR&HjD?QW1>u z2-daGY|*Jm`!a#vp5M$OIAK2My+4DsAuOp)+U^{&KGawQN~%N1eOMhrV)Y^`mbWgz zCJOKVGv)PB9?7aOV9XmW!?vf%|3K4~$B@<;Ph=)e!LbjbOjf!W zW7Q#0wgd^GUL25kIQ|iHS(z->AxXuYtMMK-wi#1!Rm-KCz{2U8jO5p0In*fB*XgC0dYPrQOr~?MO=jPPgir^9m_dh{aLGdtSx{THE%{1P zFfyKgV%l5I;4j)rcPAHclZL&^O@bH>Q!CHqO zIb6!ipzJRoPI~$8fd4TL=@Bg{zl6j<(~XYwc76xx)a0rTqj{ShJ1qJI{N5i&zz>O}Y zya>;Z_=BpMrrL4ol8C#1GW#KI7KzgK` z!(6f0E57xH)YAL2wKPIpxQ~<-oJF?7eugI>0(?`d<>>+6oCMs3_>ps42HZJHkWmI7 zJGUp`vj2+1#wotZVa8gE$mPb{3E^^hr@$4bQeiD3O4MPs3|?-lEk~$z*nIG&MU@>7 zHH<0DoEro|lMdgtO_f_1H6bb9l)4?&WJk>8p)-M39BXJZ7&2^!S!x$!JvA6fM7e}t zge^^U5;tLmUWIor^K=u>(ZGXSw*SOd9lVOpKt=KoW2&`%Mh{MVd{9z*ixuQKc1K{)w|j zm(28>=iw;s^E(%nhAyHvka0f?tKy9m22b_!-Se;}?ibYXC1nNq64lqmiKMEx_<>^i zf5ZTWlg~;0pcclDE2@M#MA8-)G4ISy@WV|C^f464q~!QSIg2&^=%VjSZgjCaF)CGV z4d<>=KBF{!o*&TU(6Dsl$k1^@hStvKwxSD2a^01G4X@&b=1j4a*TUb9cn37_KZyOj zDn``dPXq8)v}>RKX%JqS;;)0yFywEAoYtMuFD=Yg2zTqX=ocHWiyz61{H8_>8>al8 OhOZRAdO3j;fd2qoTupue diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/GPBMetadata/Google/Cloud/Video/Transcoder/V1/Services.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/GPBMetadata/Google/Cloud/Video/Transcoder/V1/Services.php deleted file mode 100644 index b9bd81111f46..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/GPBMetadata/Google/Cloud/Video/Transcoder/V1/Services.php +++ /dev/null @@ -1,90 +0,0 @@ -internalAddGeneratedFile( - ' -� -/google/cloud/video/transcoder/v1/services.proto google.cloud.video.transcoder.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto0google/cloud/video/transcoder/v1/resources.protogoogle/protobuf/empty.proto"� -CreateJobRequest9 -parent ( B)�A�A# -!locations.googleapis.com/Location7 -job ( 2%.google.cloud.video.transcoder.v1.JobB�A"� -ListJobsRequest9 -parent ( B)�A�A# -!locations.googleapis.com/Location - page_size ( - -page_token (  -filter (  -order_by ( "D - GetJobRequest3 -name ( B%�A�A -transcoder.googleapis.com/Job"^ -DeleteJobRequest3 -name ( B%�A�A -transcoder.googleapis.com/Job - allow_missing ("u -ListJobsResponse3 -jobs ( 2%.google.cloud.video.transcoder.v1.Job -next_page_token (  - unreachable ( "� -CreateJobTemplateRequest9 -parent ( B)�A�A# -!locations.googleapis.com/LocationH - job_template ( 2-.google.cloud.video.transcoder.v1.JobTemplateB�A -job_template_id ( B�A"� -ListJobTemplatesRequest9 -parent ( B)�A�A# -!locations.googleapis.com/Location - page_size ( - -page_token (  -filter (  -order_by ( "T -GetJobTemplateRequest; -name ( B-�A�A\' -%transcoder.googleapis.com/JobTemplate"n -DeleteJobTemplateRequest; -name ( B-�A�A\' -%transcoder.googleapis.com/JobTemplate - allow_missing ("� -ListJobTemplatesResponseD - job_templates ( 2-.google.cloud.video.transcoder.v1.JobTemplate -next_page_token (  - unreachable ( 2� -TranscoderService� - CreateJob2.google.cloud.video.transcoder.v1.CreateJobRequest%.google.cloud.video.transcoder.v1.Job"B���/"(/v1/{parent=projects/*/locations/*}/jobs:job�A -parent,job� -ListJobs1.google.cloud.video.transcoder.v1.ListJobsRequest2.google.cloud.video.transcoder.v1.ListJobsResponse"9���*(/v1/{parent=projects/*/locations/*}/jobs�Aparent� -GetJob/.google.cloud.video.transcoder.v1.GetJobRequest%.google.cloud.video.transcoder.v1.Job"7���*(/v1/{name=projects/*/locations/*/jobs/*}�Aname� - DeleteJob2.google.cloud.video.transcoder.v1.DeleteJobRequest.google.protobuf.Empty"7���**(/v1/{name=projects/*/locations/*/jobs/*}�Aname� -CreateJobTemplate:.google.cloud.video.transcoder.v1.CreateJobTemplateRequest-.google.cloud.video.transcoder.v1.JobTemplate"l���@"0/v1/{parent=projects/*/locations/*}/jobTemplates: job_template�A#parent,job_template,job_template_id� -ListJobTemplates9.google.cloud.video.transcoder.v1.ListJobTemplatesRequest:.google.cloud.video.transcoder.v1.ListJobTemplatesResponse"A���20/v1/{parent=projects/*/locations/*}/jobTemplates�Aparent� -GetJobTemplate7.google.cloud.video.transcoder.v1.GetJobTemplateRequest-.google.cloud.video.transcoder.v1.JobTemplate"?���20/v1/{name=projects/*/locations/*/jobTemplates/*}�Aname� -DeleteJobTemplate:.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest.google.protobuf.Empty"?���2*0/v1/{name=projects/*/locations/*/jobTemplates/*}�AnameM�Atranscoder.googleapis.com�A.https://www.googleapis.com/auth/cloud-platformB� -$com.google.cloud.video.transcoder.v1B ServicesProtoPZDcloud.google.com/go/video/transcoder/apiv1/transcoderpb;transcoderpb� Google.Cloud.Video.Transcoder.V1� Google\\Cloud\\Video\\Transcoder\\V1�$Google::Cloud::Video::Transcoder::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AdBreak.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AdBreak.php deleted file mode 100644 index 9cadeb444fd8..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AdBreak.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.video.transcoder.v1.AdBreak - */ -class AdBreak extends \Google\Protobuf\Internal\Message -{ - /** - * Start time in seconds for the ad break, relative to the output file - * timeline. The default is `0s`. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; - */ - protected $start_time_offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $start_time_offset - * Start time in seconds for the ad break, relative to the output file - * timeline. The default is `0s`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Start time in seconds for the ad break, relative to the output file - * timeline. The default is `0s`. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getStartTimeOffset() - { - return $this->start_time_offset; - } - - public function hasStartTimeOffset() - { - return isset($this->start_time_offset); - } - - public function clearStartTimeOffset() - { - unset($this->start_time_offset); - } - - /** - * Start time in seconds for the ad break, relative to the output file - * timeline. The default is `0s`. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setStartTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->start_time_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream.php deleted file mode 100644 index 7cf6be6554b6..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream.php +++ /dev/null @@ -1,389 +0,0 @@ -google.cloud.video.transcoder.v1.AudioStream - */ -class AudioStream extends \Google\Protobuf\Internal\Message -{ - /** - * The codec for this audio stream. The default is `aac`. - * Supported audio codecs: - * - `aac` - * - `aac-he` - * - `aac-he-v2` - * - `mp3` - * - `ac3` - * - `eac3` - * - * Generated from protobuf field string codec = 1; - */ - protected $codec = ''; - /** - * Required. Audio bitrate in bits per second. Must be between 1 and - * 10,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bitrate_bps = 0; - /** - * Number of audio channels. Must be between 1 and 6. The default is 2. - * - * Generated from protobuf field int32 channel_count = 3; - */ - protected $channel_count = 0; - /** - * A list of channel names specifying layout of the audio channels. - * This only affects the metadata embedded in the container headers, if - * supported by the specified format. The default is `["fl", "fr"]`. - * Supported channel names: - * - `fl` - Front left channel - * - `fr` - Front right channel - * - `sl` - Side left channel - * - `sr` - Side right channel - * - `fc` - Front center channel - * - `lfe` - Low frequency - * - * Generated from protobuf field repeated string channel_layout = 4; - */ - private $channel_layout; - /** - * The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AudioStream.AudioMapping mapping = 5; - */ - private $mapping; - /** - * The audio sample rate in Hertz. The default is 48000 Hertz. - * - * Generated from protobuf field int32 sample_rate_hertz = 6; - */ - protected $sample_rate_hertz = 0; - /** - * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more - * information, see - * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not - * supported in MP4 files. - * - * Generated from protobuf field string language_code = 7; - */ - protected $language_code = ''; - /** - * The name for this particular audio stream that - * will be added to the HLS/DASH manifest. Not supported in MP4 files. - * - * Generated from protobuf field string display_name = 8; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $codec - * The codec for this audio stream. The default is `aac`. - * Supported audio codecs: - * - `aac` - * - `aac-he` - * - `aac-he-v2` - * - `mp3` - * - `ac3` - * - `eac3` - * @type int $bitrate_bps - * Required. Audio bitrate in bits per second. Must be between 1 and - * 10,000,000. - * @type int $channel_count - * Number of audio channels. Must be between 1 and 6. The default is 2. - * @type array|\Google\Protobuf\Internal\RepeatedField $channel_layout - * A list of channel names specifying layout of the audio channels. - * This only affects the metadata embedded in the container headers, if - * supported by the specified format. The default is `["fl", "fr"]`. - * Supported channel names: - * - `fl` - Front left channel - * - `fr` - Front right channel - * - `sl` - Side left channel - * - `sr` - Side right channel - * - `fc` - Front center channel - * - `lfe` - Low frequency - * @type array<\Google\Cloud\Video\Transcoder\V1\AudioStream\AudioMapping>|\Google\Protobuf\Internal\RepeatedField $mapping - * The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. - * @type int $sample_rate_hertz - * The audio sample rate in Hertz. The default is 48000 Hertz. - * @type string $language_code - * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more - * information, see - * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not - * supported in MP4 files. - * @type string $display_name - * The name for this particular audio stream that - * will be added to the HLS/DASH manifest. Not supported in MP4 files. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The codec for this audio stream. The default is `aac`. - * Supported audio codecs: - * - `aac` - * - `aac-he` - * - `aac-he-v2` - * - `mp3` - * - `ac3` - * - `eac3` - * - * Generated from protobuf field string codec = 1; - * @return string - */ - public function getCodec() - { - return $this->codec; - } - - /** - * The codec for this audio stream. The default is `aac`. - * Supported audio codecs: - * - `aac` - * - `aac-he` - * - `aac-he-v2` - * - `mp3` - * - `ac3` - * - `eac3` - * - * Generated from protobuf field string codec = 1; - * @param string $var - * @return $this - */ - public function setCodec($var) - { - GPBUtil::checkString($var, True); - $this->codec = $var; - - return $this; - } - - /** - * Required. Audio bitrate in bits per second. Must be between 1 and - * 10,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getBitrateBps() - { - return $this->bitrate_bps; - } - - /** - * Required. Audio bitrate in bits per second. Must be between 1 and - * 10,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setBitrateBps($var) - { - GPBUtil::checkInt32($var); - $this->bitrate_bps = $var; - - return $this; - } - - /** - * Number of audio channels. Must be between 1 and 6. The default is 2. - * - * Generated from protobuf field int32 channel_count = 3; - * @return int - */ - public function getChannelCount() - { - return $this->channel_count; - } - - /** - * Number of audio channels. Must be between 1 and 6. The default is 2. - * - * Generated from protobuf field int32 channel_count = 3; - * @param int $var - * @return $this - */ - public function setChannelCount($var) - { - GPBUtil::checkInt32($var); - $this->channel_count = $var; - - return $this; - } - - /** - * A list of channel names specifying layout of the audio channels. - * This only affects the metadata embedded in the container headers, if - * supported by the specified format. The default is `["fl", "fr"]`. - * Supported channel names: - * - `fl` - Front left channel - * - `fr` - Front right channel - * - `sl` - Side left channel - * - `sr` - Side right channel - * - `fc` - Front center channel - * - `lfe` - Low frequency - * - * Generated from protobuf field repeated string channel_layout = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getChannelLayout() - { - return $this->channel_layout; - } - - /** - * A list of channel names specifying layout of the audio channels. - * This only affects the metadata embedded in the container headers, if - * supported by the specified format. The default is `["fl", "fr"]`. - * Supported channel names: - * - `fl` - Front left channel - * - `fr` - Front right channel - * - `sl` - Side left channel - * - `sr` - Side right channel - * - `fc` - Front center channel - * - `lfe` - Low frequency - * - * Generated from protobuf field repeated string channel_layout = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setChannelLayout($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->channel_layout = $arr; - - return $this; - } - - /** - * The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AudioStream.AudioMapping mapping = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMapping() - { - return $this->mapping; - } - - /** - * The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AudioStream.AudioMapping mapping = 5; - * @param array<\Google\Cloud\Video\Transcoder\V1\AudioStream\AudioMapping>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMapping($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\AudioStream\AudioMapping::class); - $this->mapping = $arr; - - return $this; - } - - /** - * The audio sample rate in Hertz. The default is 48000 Hertz. - * - * Generated from protobuf field int32 sample_rate_hertz = 6; - * @return int - */ - public function getSampleRateHertz() - { - return $this->sample_rate_hertz; - } - - /** - * The audio sample rate in Hertz. The default is 48000 Hertz. - * - * Generated from protobuf field int32 sample_rate_hertz = 6; - * @param int $var - * @return $this - */ - public function setSampleRateHertz($var) - { - GPBUtil::checkInt32($var); - $this->sample_rate_hertz = $var; - - return $this; - } - - /** - * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more - * information, see - * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not - * supported in MP4 files. - * - * Generated from protobuf field string language_code = 7; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more - * information, see - * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not - * supported in MP4 files. - * - * Generated from protobuf field string language_code = 7; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * The name for this particular audio stream that - * will be added to the HLS/DASH manifest. Not supported in MP4 files. - * - * Generated from protobuf field string display_name = 8; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The name for this particular audio stream that - * will be added to the HLS/DASH manifest. Not supported in MP4 files. - * - * Generated from protobuf field string display_name = 8; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream/AudioMapping.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream/AudioMapping.php deleted file mode 100644 index ee7b36b6e3d4..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream/AudioMapping.php +++ /dev/null @@ -1,248 +0,0 @@ -google.cloud.video.transcoder.v1.AudioStream.AudioMapping - */ -class AudioMapping extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `EditAtom.key` that references the atom with audio inputs - * in the `Job.edit_list`. - * - * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $atom_key = ''; - /** - * Required. The `Input.key` that identifies the input file. - * - * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_key = ''; - /** - * Required. The zero-based index of the track in the input file. - * - * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_track = 0; - /** - * Required. The zero-based index of the channel in the input audio stream. - * - * Generated from protobuf field int32 input_channel = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_channel = 0; - /** - * Required. The zero-based index of the channel in the output audio stream. - * - * Generated from protobuf field int32 output_channel = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $output_channel = 0; - /** - * Audio volume control in dB. Negative values decrease volume, - * positive values increase. The default is 0. - * - * Generated from protobuf field double gain_db = 6; - */ - protected $gain_db = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $atom_key - * Required. The `EditAtom.key` that references the atom with audio inputs - * in the `Job.edit_list`. - * @type string $input_key - * Required. The `Input.key` that identifies the input file. - * @type int $input_track - * Required. The zero-based index of the track in the input file. - * @type int $input_channel - * Required. The zero-based index of the channel in the input audio stream. - * @type int $output_channel - * Required. The zero-based index of the channel in the output audio stream. - * @type float $gain_db - * Audio volume control in dB. Negative values decrease volume, - * positive values increase. The default is 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `EditAtom.key` that references the atom with audio inputs - * in the `Job.edit_list`. - * - * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAtomKey() - { - return $this->atom_key; - } - - /** - * Required. The `EditAtom.key` that references the atom with audio inputs - * in the `Job.edit_list`. - * - * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAtomKey($var) - { - GPBUtil::checkString($var, True); - $this->atom_key = $var; - - return $this; - } - - /** - * Required. The `Input.key` that identifies the input file. - * - * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInputKey() - { - return $this->input_key; - } - - /** - * Required. The `Input.key` that identifies the input file. - * - * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInputKey($var) - { - GPBUtil::checkString($var, True); - $this->input_key = $var; - - return $this; - } - - /** - * Required. The zero-based index of the track in the input file. - * - * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getInputTrack() - { - return $this->input_track; - } - - /** - * Required. The zero-based index of the track in the input file. - * - * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setInputTrack($var) - { - GPBUtil::checkInt32($var); - $this->input_track = $var; - - return $this; - } - - /** - * Required. The zero-based index of the channel in the input audio stream. - * - * Generated from protobuf field int32 input_channel = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getInputChannel() - { - return $this->input_channel; - } - - /** - * Required. The zero-based index of the channel in the input audio stream. - * - * Generated from protobuf field int32 input_channel = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setInputChannel($var) - { - GPBUtil::checkInt32($var); - $this->input_channel = $var; - - return $this; - } - - /** - * Required. The zero-based index of the channel in the output audio stream. - * - * Generated from protobuf field int32 output_channel = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getOutputChannel() - { - return $this->output_channel; - } - - /** - * Required. The zero-based index of the channel in the output audio stream. - * - * Generated from protobuf field int32 output_channel = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setOutputChannel($var) - { - GPBUtil::checkInt32($var); - $this->output_channel = $var; - - return $this; - } - - /** - * Audio volume control in dB. Negative values decrease volume, - * positive values increase. The default is 0. - * - * Generated from protobuf field double gain_db = 6; - * @return float - */ - public function getGainDb() - { - return $this->gain_db; - } - - /** - * Audio volume control in dB. Negative values decrease volume, - * positive values increase. The default is 0. - * - * Generated from protobuf field double gain_db = 6; - * @param float $var - * @return $this - */ - public function setGainDb($var) - { - GPBUtil::checkDouble($var); - $this->gain_db = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AudioMapping::class, \Google\Cloud\Video\Transcoder\V1\AudioStream_AudioMapping::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobRequest.php deleted file mode 100644 index e6d90c39b24b..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.video.transcoder.v1.CreateJobRequest - */ -class CreateJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location to create and process this job. - * Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Parameters for creating transcoding job. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job = null; - - /** - * @param string $parent Required. The parent location to create and process this job. - * Format: `projects/{project}/locations/{location}` - * Please see {@see TranscoderServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Video\Transcoder\V1\Job $job Required. Parameters for creating transcoding job. - * - * @return \Google\Cloud\Video\Transcoder\V1\CreateJobRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\Transcoder\V1\Job $job): self - { - return (new self()) - ->setParent($parent) - ->setJob($job); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location to create and process this job. - * Format: `projects/{project}/locations/{location}` - * @type \Google\Cloud\Video\Transcoder\V1\Job $job - * Required. Parameters for creating transcoding job. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location to create and process this job. - * Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent location to create and process this job. - * Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Parameters for creating transcoding job. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\Transcoder\V1\Job|null - */ - public function getJob() - { - return $this->job; - } - - public function hasJob() - { - return isset($this->job); - } - - public function clearJob() - { - unset($this->job); - } - - /** - * Required. Parameters for creating transcoding job. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\Transcoder\V1\Job $var - * @return $this - */ - public function setJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Job::class); - $this->job = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobTemplateRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobTemplateRequest.php deleted file mode 100644 index 2259a64b8917..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobTemplateRequest.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.video.transcoder.v1.CreateJobTemplateRequest - */ -class CreateJobTemplateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location to create this job template. - * Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Parameters for creating job template. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.JobTemplate job_template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job_template = null; - /** - * Required. The ID to use for the job template, which will become the final - * component of the job template's resource name. - * This value should be 4-63 characters, and valid characters must match the - * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. - * - * Generated from protobuf field string job_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job_template_id = ''; - - /** - * @param string $parent Required. The parent location to create this job template. - * Format: `projects/{project}/locations/{location}` - * Please see {@see TranscoderServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Video\Transcoder\V1\JobTemplate $jobTemplate Required. Parameters for creating job template. - * @param string $jobTemplateId Required. The ID to use for the job template, which will become the final - * component of the job template's resource name. - * - * This value should be 4-63 characters, and valid characters must match the - * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. - * - * @return \Google\Cloud\Video\Transcoder\V1\CreateJobTemplateRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\Transcoder\V1\JobTemplate $jobTemplate, string $jobTemplateId): self - { - return (new self()) - ->setParent($parent) - ->setJobTemplate($jobTemplate) - ->setJobTemplateId($jobTemplateId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location to create this job template. - * Format: `projects/{project}/locations/{location}` - * @type \Google\Cloud\Video\Transcoder\V1\JobTemplate $job_template - * Required. Parameters for creating job template. - * @type string $job_template_id - * Required. The ID to use for the job template, which will become the final - * component of the job template's resource name. - * This value should be 4-63 characters, and valid characters must match the - * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location to create this job template. - * Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent location to create this job template. - * Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Parameters for creating job template. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.JobTemplate job_template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\Transcoder\V1\JobTemplate|null - */ - public function getJobTemplate() - { - return $this->job_template; - } - - public function hasJobTemplate() - { - return isset($this->job_template); - } - - public function clearJobTemplate() - { - unset($this->job_template); - } - - /** - * Required. Parameters for creating job template. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.JobTemplate job_template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\Transcoder\V1\JobTemplate $var - * @return $this - */ - public function setJobTemplate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\JobTemplate::class); - $this->job_template = $var; - - return $this; - } - - /** - * Required. The ID to use for the job template, which will become the final - * component of the job template's resource name. - * This value should be 4-63 characters, and valid characters must match the - * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. - * - * Generated from protobuf field string job_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getJobTemplateId() - { - return $this->job_template_id; - } - - /** - * Required. The ID to use for the job template, which will become the final - * component of the job template's resource name. - * This value should be 4-63 characters, and valid characters must match the - * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. - * - * Generated from protobuf field string job_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setJobTemplateId($var) - { - GPBUtil::checkString($var, True); - $this->job_template_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobRequest.php deleted file mode 100644 index 56bf79ae59c4..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.video.transcoder.v1.DeleteJobRequest - */ -class DeleteJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the job to delete. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If set to true, and the job is not found, the request will succeed but no - * action will be taken on the server. - * - * Generated from protobuf field bool allow_missing = 2; - */ - protected $allow_missing = false; - - /** - * @param string $name Required. The name of the job to delete. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * Please see {@see TranscoderServiceClient::jobName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Transcoder\V1\DeleteJobRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the job to delete. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * @type bool $allow_missing - * If set to true, and the job is not found, the request will succeed but no - * action will be taken on the server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the job to delete. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the job to delete. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * If set to true, and the job is not found, the request will succeed but no - * action will be taken on the server. - * - * Generated from protobuf field bool allow_missing = 2; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If set to true, and the job is not found, the request will succeed but no - * action will be taken on the server. - * - * Generated from protobuf field bool allow_missing = 2; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobTemplateRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobTemplateRequest.php deleted file mode 100644 index a7db529776b4..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobTemplateRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.video.transcoder.v1.DeleteJobTemplateRequest - */ -class DeleteJobTemplateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the job template to delete. - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If set to true, and the job template is not found, the request will succeed - * but no action will be taken on the server. - * - * Generated from protobuf field bool allow_missing = 2; - */ - protected $allow_missing = false; - - /** - * @param string $name Required. The name of the job template to delete. - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * Please see {@see TranscoderServiceClient::jobTemplateName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Transcoder\V1\DeleteJobTemplateRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the job template to delete. - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * @type bool $allow_missing - * If set to true, and the job template is not found, the request will succeed - * but no action will be taken on the server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the job template to delete. - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the job template to delete. - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * If set to true, and the job template is not found, the request will succeed - * but no action will be taken on the server. - * - * Generated from protobuf field bool allow_missing = 2; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If set to true, and the job template is not found, the request will succeed - * but no action will be taken on the server. - * - * Generated from protobuf field bool allow_missing = 2; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/EditAtom.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/EditAtom.php deleted file mode 100644 index 42921c0de759..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/EditAtom.php +++ /dev/null @@ -1,209 +0,0 @@ -google.cloud.video.transcoder.v1.EditAtom - */ -class EditAtom extends \Google\Protobuf\Internal\Message -{ - /** - * A unique key for this atom. Must be specified when using advanced - * mapping. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * List of `Input.key`s identifying files that should be used in this atom. - * The listed `inputs` must have the same timeline. - * - * Generated from protobuf field repeated string inputs = 2; - */ - private $inputs; - /** - * End time in seconds for the atom, relative to the input file timeline. - * When `end_time_offset` is not specified, the `inputs` are used until - * the end of the atom. - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; - */ - protected $end_time_offset = null; - /** - * Start time in seconds for the atom, relative to the input file timeline. - * The default is `0s`. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; - */ - protected $start_time_offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * A unique key for this atom. Must be specified when using advanced - * mapping. - * @type array|\Google\Protobuf\Internal\RepeatedField $inputs - * List of `Input.key`s identifying files that should be used in this atom. - * The listed `inputs` must have the same timeline. - * @type \Google\Protobuf\Duration $end_time_offset - * End time in seconds for the atom, relative to the input file timeline. - * When `end_time_offset` is not specified, the `inputs` are used until - * the end of the atom. - * @type \Google\Protobuf\Duration $start_time_offset - * Start time in seconds for the atom, relative to the input file timeline. - * The default is `0s`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * A unique key for this atom. Must be specified when using advanced - * mapping. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * A unique key for this atom. Must be specified when using advanced - * mapping. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * List of `Input.key`s identifying files that should be used in this atom. - * The listed `inputs` must have the same timeline. - * - * Generated from protobuf field repeated string inputs = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInputs() - { - return $this->inputs; - } - - /** - * List of `Input.key`s identifying files that should be used in this atom. - * The listed `inputs` must have the same timeline. - * - * Generated from protobuf field repeated string inputs = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInputs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->inputs = $arr; - - return $this; - } - - /** - * End time in seconds for the atom, relative to the input file timeline. - * When `end_time_offset` is not specified, the `inputs` are used until - * the end of the atom. - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getEndTimeOffset() - { - return $this->end_time_offset; - } - - public function hasEndTimeOffset() - { - return isset($this->end_time_offset); - } - - public function clearEndTimeOffset() - { - unset($this->end_time_offset); - } - - /** - * End time in seconds for the atom, relative to the input file timeline. - * When `end_time_offset` is not specified, the `inputs` are used until - * the end of the atom. - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setEndTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->end_time_offset = $var; - - return $this; - } - - /** - * Start time in seconds for the atom, relative to the input file timeline. - * The default is `0s`. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getStartTimeOffset() - { - return $this->start_time_offset; - } - - public function hasStartTimeOffset() - { - return isset($this->start_time_offset); - } - - public function clearStartTimeOffset() - { - unset($this->start_time_offset); - } - - /** - * Start time in seconds for the atom, relative to the input file timeline. - * The default is `0s`. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setStartTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->start_time_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ElementaryStream.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ElementaryStream.php deleted file mode 100644 index 6660485d8e24..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ElementaryStream.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.video.transcoder.v1.ElementaryStream - */ -class ElementaryStream extends \Google\Protobuf\Internal\Message -{ - /** - * A unique key for this elementary stream. - * - * Generated from protobuf field string key = 4; - */ - protected $key = ''; - protected $elementary_stream; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * A unique key for this elementary stream. - * @type \Google\Cloud\Video\Transcoder\V1\VideoStream $video_stream - * Encoding of a video stream. - * @type \Google\Cloud\Video\Transcoder\V1\AudioStream $audio_stream - * Encoding of an audio stream. - * @type \Google\Cloud\Video\Transcoder\V1\TextStream $text_stream - * Encoding of a text stream. For example, closed captions or subtitles. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * A unique key for this elementary stream. - * - * Generated from protobuf field string key = 4; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * A unique key for this elementary stream. - * - * Generated from protobuf field string key = 4; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * Encoding of a video stream. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream video_stream = 1; - * @return \Google\Cloud\Video\Transcoder\V1\VideoStream|null - */ - public function getVideoStream() - { - return $this->readOneof(1); - } - - public function hasVideoStream() - { - return $this->hasOneof(1); - } - - /** - * Encoding of a video stream. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream video_stream = 1; - * @param \Google\Cloud\Video\Transcoder\V1\VideoStream $var - * @return $this - */ - public function setVideoStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\VideoStream::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Encoding of an audio stream. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.AudioStream audio_stream = 2; - * @return \Google\Cloud\Video\Transcoder\V1\AudioStream|null - */ - public function getAudioStream() - { - return $this->readOneof(2); - } - - public function hasAudioStream() - { - return $this->hasOneof(2); - } - - /** - * Encoding of an audio stream. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.AudioStream audio_stream = 2; - * @param \Google\Cloud\Video\Transcoder\V1\AudioStream $var - * @return $this - */ - public function setAudioStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\AudioStream::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Encoding of a text stream. For example, closed captions or subtitles. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.TextStream text_stream = 3; - * @return \Google\Cloud\Video\Transcoder\V1\TextStream|null - */ - public function getTextStream() - { - return $this->readOneof(3); - } - - public function hasTextStream() - { - return $this->hasOneof(3); - } - - /** - * Encoding of a text stream. For example, closed captions or subtitles. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.TextStream text_stream = 3; - * @param \Google\Cloud\Video\Transcoder\V1\TextStream $var - * @return $this - */ - public function setTextStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\TextStream::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getElementaryStream() - { - return $this->whichOneof("elementary_stream"); - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobRequest.php deleted file mode 100644 index d84bf513d425..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.transcoder.v1.GetJobRequest - */ -class GetJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the job to retrieve. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the job to retrieve. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * Please see {@see TranscoderServiceClient::jobName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Transcoder\V1\GetJobRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the job to retrieve. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the job to retrieve. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the job to retrieve. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobTemplateRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobTemplateRequest.php deleted file mode 100644 index e9a034eaf217..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobTemplateRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.video.transcoder.v1.GetJobTemplateRequest - */ -class GetJobTemplateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the job template to retrieve. - * Format: - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the job template to retrieve. - * Format: - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * Please see {@see TranscoderServiceClient::jobTemplateName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Transcoder\V1\GetJobTemplateRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the job template to retrieve. - * Format: - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the job template to retrieve. - * Format: - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the job template to retrieve. - * Format: - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Input.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Input.php deleted file mode 100644 index 3c19c7ccc6a5..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Input.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.video.transcoder.v1.Input - */ -class Input extends \Google\Protobuf\Internal\Message -{ - /** - * A unique key for this input. Must be specified when using advanced - * mapping and edit lists. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * URI of the media. Input files must be at least 5 seconds in duration and - * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). - * If empty, the value is populated from `Job.input_uri`. See - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Preprocessing configurations. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig preprocessing_config = 3; - */ - protected $preprocessing_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * A unique key for this input. Must be specified when using advanced - * mapping and edit lists. - * @type string $uri - * URI of the media. Input files must be at least 5 seconds in duration and - * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). - * If empty, the value is populated from `Job.input_uri`. See - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig $preprocessing_config - * Preprocessing configurations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * A unique key for this input. Must be specified when using advanced - * mapping and edit lists. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * A unique key for this input. Must be specified when using advanced - * mapping and edit lists. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * URI of the media. Input files must be at least 5 seconds in duration and - * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). - * If empty, the value is populated from `Job.input_uri`. See - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of the media. Input files must be at least 5 seconds in duration and - * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). - * If empty, the value is populated from `Job.input_uri`. See - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Preprocessing configurations. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig preprocessing_config = 3; - * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig|null - */ - public function getPreprocessingConfig() - { - return $this->preprocessing_config; - } - - public function hasPreprocessingConfig() - { - return isset($this->preprocessing_config); - } - - public function clearPreprocessingConfig() - { - unset($this->preprocessing_config); - } - - /** - * Preprocessing configurations. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig preprocessing_config = 3; - * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig $var - * @return $this - */ - public function setPreprocessingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig::class); - $this->preprocessing_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job.php deleted file mode 100644 index 3b4f22494e94..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job.php +++ /dev/null @@ -1,588 +0,0 @@ -google.cloud.video.transcoder.v1.Job - */ -class Job extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the job. - * Format: `projects/{project_number}/locations/{location}/jobs/{job}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Input only. Specify the `input_uri` to populate empty `uri` fields in each - * element of `Job.config.inputs` or `JobTemplate.config.inputs` when using - * template. URI of the media. Input files must be at least 5 seconds in - * duration and stored in Cloud Storage (for example, - * `gs://bucket/inputs/file.mp4`). See [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * Generated from protobuf field string input_uri = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $input_uri = ''; - /** - * Input only. Specify the `output_uri` to populate an empty - * `Job.config.output.uri` or `JobTemplate.config.output.uri` when using - * template. URI for the output file(s). For example, - * `gs://my-bucket/outputs/`. See [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * Generated from protobuf field string output_uri = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $output_uri = ''; - /** - * Output only. The current state of the job. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time the job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the transcoding started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. The time the transcoding finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Job time to live value in days, which will be effective after job - * completion. Job should be deleted automatically after the given TTL. Enter - * a value between 1 and 90. The default is 30. - * - * Generated from protobuf field int32 ttl_after_completion_days = 15; - */ - protected $ttl_after_completion_days = 0; - /** - * The labels associated with this job. You can use these to organize and - * group your jobs. - * - * Generated from protobuf field map labels = 16; - */ - private $labels; - /** - * Output only. An error object that describes the reason for the failure. - * This property is always present when `state` is `FAILED`. - * - * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - /** - * The processing mode of the job. - * The default is `PROCESSING_MODE_INTERACTIVE`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingMode mode = 20; - */ - protected $mode = 0; - protected $job_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the job. - * Format: `projects/{project_number}/locations/{location}/jobs/{job}` - * @type string $input_uri - * Input only. Specify the `input_uri` to populate empty `uri` fields in each - * element of `Job.config.inputs` or `JobTemplate.config.inputs` when using - * template. URI of the media. Input files must be at least 5 seconds in - * duration and stored in Cloud Storage (for example, - * `gs://bucket/inputs/file.mp4`). See [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * @type string $output_uri - * Input only. Specify the `output_uri` to populate an empty - * `Job.config.output.uri` or `JobTemplate.config.output.uri` when using - * template. URI for the output file(s). For example, - * `gs://my-bucket/outputs/`. See [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * @type string $template_id - * Input only. Specify the `template_id` to use for populating `Job.config`. - * The default is `preset/web-hd`, which is the only supported preset. - * User defined JobTemplate: `{job_template_id}` - * @type \Google\Cloud\Video\Transcoder\V1\JobConfig $config - * The configuration for this job. - * @type int $state - * Output only. The current state of the job. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the job was created. - * @type \Google\Protobuf\Timestamp $start_time - * Output only. The time the transcoding started. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the transcoding finished. - * @type int $ttl_after_completion_days - * Job time to live value in days, which will be effective after job - * completion. Job should be deleted automatically after the given TTL. Enter - * a value between 1 and 90. The default is 30. - * @type array|\Google\Protobuf\Internal\MapField $labels - * The labels associated with this job. You can use these to organize and - * group your jobs. - * @type \Google\Rpc\Status $error - * Output only. An error object that describes the reason for the failure. - * This property is always present when `state` is `FAILED`. - * @type int $mode - * The processing mode of the job. - * The default is `PROCESSING_MODE_INTERACTIVE`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the job. - * Format: `projects/{project_number}/locations/{location}/jobs/{job}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the job. - * Format: `projects/{project_number}/locations/{location}/jobs/{job}` - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Input only. Specify the `input_uri` to populate empty `uri` fields in each - * element of `Job.config.inputs` or `JobTemplate.config.inputs` when using - * template. URI of the media. Input files must be at least 5 seconds in - * duration and stored in Cloud Storage (for example, - * `gs://bucket/inputs/file.mp4`). See [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * Generated from protobuf field string input_uri = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getInputUri() - { - return $this->input_uri; - } - - /** - * Input only. Specify the `input_uri` to populate empty `uri` fields in each - * element of `Job.config.inputs` or `JobTemplate.config.inputs` when using - * template. URI of the media. Input files must be at least 5 seconds in - * duration and stored in Cloud Storage (for example, - * `gs://bucket/inputs/file.mp4`). See [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * Generated from protobuf field string input_uri = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setInputUri($var) - { - GPBUtil::checkString($var, True); - $this->input_uri = $var; - - return $this; - } - - /** - * Input only. Specify the `output_uri` to populate an empty - * `Job.config.output.uri` or `JobTemplate.config.output.uri` when using - * template. URI for the output file(s). For example, - * `gs://my-bucket/outputs/`. See [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * Generated from protobuf field string output_uri = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getOutputUri() - { - return $this->output_uri; - } - - /** - * Input only. Specify the `output_uri` to populate an empty - * `Job.config.output.uri` or `JobTemplate.config.output.uri` when using - * template. URI for the output file(s). For example, - * `gs://my-bucket/outputs/`. See [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * Generated from protobuf field string output_uri = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOutputUri($var) - { - GPBUtil::checkString($var, True); - $this->output_uri = $var; - - return $this; - } - - /** - * Input only. Specify the `template_id` to use for populating `Job.config`. - * The default is `preset/web-hd`, which is the only supported preset. - * User defined JobTemplate: `{job_template_id}` - * - * Generated from protobuf field string template_id = 4 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getTemplateId() - { - return $this->readOneof(4); - } - - public function hasTemplateId() - { - return $this->hasOneof(4); - } - - /** - * Input only. Specify the `template_id` to use for populating `Job.config`. - * The default is `preset/web-hd`, which is the only supported preset. - * User defined JobTemplate: `{job_template_id}` - * - * Generated from protobuf field string template_id = 4 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTemplateId($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * The configuration for this job. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.JobConfig config = 5; - * @return \Google\Cloud\Video\Transcoder\V1\JobConfig|null - */ - public function getConfig() - { - return $this->readOneof(5); - } - - public function hasConfig() - { - return $this->hasOneof(5); - } - - /** - * The configuration for this job. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.JobConfig config = 5; - * @param \Google\Cloud\Video\Transcoder\V1\JobConfig $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\JobConfig::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Output only. The current state of the job. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the job. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Transcoder\V1\Job\ProcessingState::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time the job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the transcoding started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Output only. The time the transcoding started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Output only. The time the transcoding finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the transcoding finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Job time to live value in days, which will be effective after job - * completion. Job should be deleted automatically after the given TTL. Enter - * a value between 1 and 90. The default is 30. - * - * Generated from protobuf field int32 ttl_after_completion_days = 15; - * @return int - */ - public function getTtlAfterCompletionDays() - { - return $this->ttl_after_completion_days; - } - - /** - * Job time to live value in days, which will be effective after job - * completion. Job should be deleted automatically after the given TTL. Enter - * a value between 1 and 90. The default is 30. - * - * Generated from protobuf field int32 ttl_after_completion_days = 15; - * @param int $var - * @return $this - */ - public function setTtlAfterCompletionDays($var) - { - GPBUtil::checkInt32($var); - $this->ttl_after_completion_days = $var; - - return $this; - } - - /** - * The labels associated with this job. You can use these to organize and - * group your jobs. - * - * Generated from protobuf field map labels = 16; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * The labels associated with this job. You can use these to organize and - * group your jobs. - * - * Generated from protobuf field map labels = 16; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. An error object that describes the reason for the failure. - * This property is always present when `state` is `FAILED`. - * - * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. An error object that describes the reason for the failure. - * This property is always present when `state` is `FAILED`. - * - * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * The processing mode of the job. - * The default is `PROCESSING_MODE_INTERACTIVE`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingMode mode = 20; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * The processing mode of the job. - * The default is `PROCESSING_MODE_INTERACTIVE`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingMode mode = 20; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Transcoder\V1\Job\ProcessingMode::class); - $this->mode = $var; - - return $this; - } - - /** - * @return string - */ - public function getJobConfig() - { - return $this->whichOneof("job_config"); - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingMode.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingMode.php deleted file mode 100644 index 4ada220e2b33..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingMode.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.video.transcoder.v1.Job.ProcessingMode - */ -class ProcessingMode -{ - /** - * The job processing mode is not specified. - * - * Generated from protobuf enum PROCESSING_MODE_UNSPECIFIED = 0; - */ - const PROCESSING_MODE_UNSPECIFIED = 0; - /** - * The job processing mode is interactive mode. - * Interactive job will either be ran or rejected if quota does not allow - * for it. - * - * Generated from protobuf enum PROCESSING_MODE_INTERACTIVE = 1; - */ - const PROCESSING_MODE_INTERACTIVE = 1; - /** - * The job processing mode is batch mode. - * Batch mode allows queuing of jobs. - * - * Generated from protobuf enum PROCESSING_MODE_BATCH = 2; - */ - const PROCESSING_MODE_BATCH = 2; - - private static $valueToName = [ - self::PROCESSING_MODE_UNSPECIFIED => 'PROCESSING_MODE_UNSPECIFIED', - self::PROCESSING_MODE_INTERACTIVE => 'PROCESSING_MODE_INTERACTIVE', - self::PROCESSING_MODE_BATCH => 'PROCESSING_MODE_BATCH', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ProcessingMode::class, \Google\Cloud\Video\Transcoder\V1\Job_ProcessingMode::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingState.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingState.php deleted file mode 100644 index 28e9b85c5afc..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingState.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.video.transcoder.v1.Job.ProcessingState - */ -class ProcessingState -{ - /** - * The processing state is not specified. - * - * Generated from protobuf enum PROCESSING_STATE_UNSPECIFIED = 0; - */ - const PROCESSING_STATE_UNSPECIFIED = 0; - /** - * The job is enqueued and will be picked up for processing soon. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The job is being processed. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The job has been completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 3; - */ - const SUCCEEDED = 3; - /** - * The job has failed. For additional information, see `failure_reason` and - * `failure_details` - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - - private static $valueToName = [ - self::PROCESSING_STATE_UNSPECIFIED => 'PROCESSING_STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::RUNNING => 'RUNNING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ProcessingState::class, \Google\Cloud\Video\Transcoder\V1\Job_ProcessingState::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobConfig.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobConfig.php deleted file mode 100644 index 2f471a68adc0..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobConfig.php +++ /dev/null @@ -1,405 +0,0 @@ -google.cloud.video.transcoder.v1.JobConfig - */ -class JobConfig extends \Google\Protobuf\Internal\Message -{ - /** - * List of input assets stored in Cloud Storage. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Input inputs = 1; - */ - private $inputs; - /** - * List of `Edit atom`s. Defines the ultimate timeline of the resulting - * file or manifest. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.EditAtom edit_list = 2; - */ - private $edit_list; - /** - * List of elementary streams. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.ElementaryStream elementary_streams = 3; - */ - private $elementary_streams; - /** - * List of multiplexing settings for output streams. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.MuxStream mux_streams = 4; - */ - private $mux_streams; - /** - * List of output manifests. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Manifest manifests = 5; - */ - private $manifests; - /** - * Output configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Output output = 6; - */ - protected $output = null; - /** - * List of ad breaks. Specifies where to insert ad break tags in the output - * manifests. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AdBreak ad_breaks = 7; - */ - private $ad_breaks; - /** - * Destination on Pub/Sub. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PubsubDestination pubsub_destination = 8; - */ - protected $pubsub_destination = null; - /** - * List of output sprite sheets. - * Spritesheets require at least one VideoStream in the Jobconfig. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; - */ - private $sprite_sheets; - /** - * List of overlays on the output video, in descending Z-order. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay overlays = 10; - */ - private $overlays; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Video\Transcoder\V1\Input>|\Google\Protobuf\Internal\RepeatedField $inputs - * List of input assets stored in Cloud Storage. - * @type array<\Google\Cloud\Video\Transcoder\V1\EditAtom>|\Google\Protobuf\Internal\RepeatedField $edit_list - * List of `Edit atom`s. Defines the ultimate timeline of the resulting - * file or manifest. - * @type array<\Google\Cloud\Video\Transcoder\V1\ElementaryStream>|\Google\Protobuf\Internal\RepeatedField $elementary_streams - * List of elementary streams. - * @type array<\Google\Cloud\Video\Transcoder\V1\MuxStream>|\Google\Protobuf\Internal\RepeatedField $mux_streams - * List of multiplexing settings for output streams. - * @type array<\Google\Cloud\Video\Transcoder\V1\Manifest>|\Google\Protobuf\Internal\RepeatedField $manifests - * List of output manifests. - * @type \Google\Cloud\Video\Transcoder\V1\Output $output - * Output configuration. - * @type array<\Google\Cloud\Video\Transcoder\V1\AdBreak>|\Google\Protobuf\Internal\RepeatedField $ad_breaks - * List of ad breaks. Specifies where to insert ad break tags in the output - * manifests. - * @type \Google\Cloud\Video\Transcoder\V1\PubsubDestination $pubsub_destination - * Destination on Pub/Sub. - * @type array<\Google\Cloud\Video\Transcoder\V1\SpriteSheet>|\Google\Protobuf\Internal\RepeatedField $sprite_sheets - * List of output sprite sheets. - * Spritesheets require at least one VideoStream in the Jobconfig. - * @type array<\Google\Cloud\Video\Transcoder\V1\Overlay>|\Google\Protobuf\Internal\RepeatedField $overlays - * List of overlays on the output video, in descending Z-order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * List of input assets stored in Cloud Storage. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Input inputs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInputs() - { - return $this->inputs; - } - - /** - * List of input assets stored in Cloud Storage. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Input inputs = 1; - * @param array<\Google\Cloud\Video\Transcoder\V1\Input>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInputs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\Input::class); - $this->inputs = $arr; - - return $this; - } - - /** - * List of `Edit atom`s. Defines the ultimate timeline of the resulting - * file or manifest. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.EditAtom edit_list = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEditList() - { - return $this->edit_list; - } - - /** - * List of `Edit atom`s. Defines the ultimate timeline of the resulting - * file or manifest. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.EditAtom edit_list = 2; - * @param array<\Google\Cloud\Video\Transcoder\V1\EditAtom>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEditList($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\EditAtom::class); - $this->edit_list = $arr; - - return $this; - } - - /** - * List of elementary streams. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.ElementaryStream elementary_streams = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getElementaryStreams() - { - return $this->elementary_streams; - } - - /** - * List of elementary streams. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.ElementaryStream elementary_streams = 3; - * @param array<\Google\Cloud\Video\Transcoder\V1\ElementaryStream>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setElementaryStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\ElementaryStream::class); - $this->elementary_streams = $arr; - - return $this; - } - - /** - * List of multiplexing settings for output streams. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.MuxStream mux_streams = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMuxStreams() - { - return $this->mux_streams; - } - - /** - * List of multiplexing settings for output streams. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.MuxStream mux_streams = 4; - * @param array<\Google\Cloud\Video\Transcoder\V1\MuxStream>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMuxStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\MuxStream::class); - $this->mux_streams = $arr; - - return $this; - } - - /** - * List of output manifests. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Manifest manifests = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getManifests() - { - return $this->manifests; - } - - /** - * List of output manifests. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Manifest manifests = 5; - * @param array<\Google\Cloud\Video\Transcoder\V1\Manifest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setManifests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\Manifest::class); - $this->manifests = $arr; - - return $this; - } - - /** - * Output configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Output output = 6; - * @return \Google\Cloud\Video\Transcoder\V1\Output|null - */ - public function getOutput() - { - return $this->output; - } - - public function hasOutput() - { - return isset($this->output); - } - - public function clearOutput() - { - unset($this->output); - } - - /** - * Output configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Output output = 6; - * @param \Google\Cloud\Video\Transcoder\V1\Output $var - * @return $this - */ - public function setOutput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Output::class); - $this->output = $var; - - return $this; - } - - /** - * List of ad breaks. Specifies where to insert ad break tags in the output - * manifests. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AdBreak ad_breaks = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdBreaks() - { - return $this->ad_breaks; - } - - /** - * List of ad breaks. Specifies where to insert ad break tags in the output - * manifests. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AdBreak ad_breaks = 7; - * @param array<\Google\Cloud\Video\Transcoder\V1\AdBreak>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdBreaks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\AdBreak::class); - $this->ad_breaks = $arr; - - return $this; - } - - /** - * Destination on Pub/Sub. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PubsubDestination pubsub_destination = 8; - * @return \Google\Cloud\Video\Transcoder\V1\PubsubDestination|null - */ - public function getPubsubDestination() - { - return $this->pubsub_destination; - } - - public function hasPubsubDestination() - { - return isset($this->pubsub_destination); - } - - public function clearPubsubDestination() - { - unset($this->pubsub_destination); - } - - /** - * Destination on Pub/Sub. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PubsubDestination pubsub_destination = 8; - * @param \Google\Cloud\Video\Transcoder\V1\PubsubDestination $var - * @return $this - */ - public function setPubsubDestination($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PubsubDestination::class); - $this->pubsub_destination = $var; - - return $this; - } - - /** - * List of output sprite sheets. - * Spritesheets require at least one VideoStream in the Jobconfig. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSpriteSheets() - { - return $this->sprite_sheets; - } - - /** - * List of output sprite sheets. - * Spritesheets require at least one VideoStream in the Jobconfig. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; - * @param array<\Google\Cloud\Video\Transcoder\V1\SpriteSheet>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpriteSheets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\SpriteSheet::class); - $this->sprite_sheets = $arr; - - return $this; - } - - /** - * List of overlays on the output video, in descending Z-order. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay overlays = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOverlays() - { - return $this->overlays; - } - - /** - * List of overlays on the output video, in descending Z-order. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay overlays = 10; - * @param array<\Google\Cloud\Video\Transcoder\V1\Overlay>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOverlays($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\Overlay::class); - $this->overlays = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobTemplate.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobTemplate.php deleted file mode 100644 index 1cf56319089e..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobTemplate.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.video.transcoder.v1.JobTemplate - */ -class JobTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the job template. - * Format: - * `projects/{project_number}/locations/{location}/jobTemplates/{job_template}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The configuration for this template. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.JobConfig config = 2; - */ - protected $config = null; - /** - * The labels associated with this job template. You can use these to organize - * and group your job templates. - * - * Generated from protobuf field map labels = 3; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the job template. - * Format: - * `projects/{project_number}/locations/{location}/jobTemplates/{job_template}` - * @type \Google\Cloud\Video\Transcoder\V1\JobConfig $config - * The configuration for this template. - * @type array|\Google\Protobuf\Internal\MapField $labels - * The labels associated with this job template. You can use these to organize - * and group your job templates. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the job template. - * Format: - * `projects/{project_number}/locations/{location}/jobTemplates/{job_template}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the job template. - * Format: - * `projects/{project_number}/locations/{location}/jobTemplates/{job_template}` - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The configuration for this template. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.JobConfig config = 2; - * @return \Google\Cloud\Video\Transcoder\V1\JobConfig|null - */ - public function getConfig() - { - return $this->config; - } - - public function hasConfig() - { - return isset($this->config); - } - - public function clearConfig() - { - unset($this->config); - } - - /** - * The configuration for this template. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.JobConfig config = 2; - * @param \Google\Cloud\Video\Transcoder\V1\JobConfig $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\JobConfig::class); - $this->config = $var; - - return $this; - } - - /** - * The labels associated with this job template. You can use these to organize - * and group your job templates. - * - * Generated from protobuf field map labels = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * The labels associated with this job template. You can use these to organize - * and group your job templates. - * - * Generated from protobuf field map labels = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesRequest.php deleted file mode 100644 index 9a3f102490be..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesRequest.php +++ /dev/null @@ -1,234 +0,0 @@ -google.cloud.video.transcoder.v1.ListJobTemplatesRequest - */ -class ListJobTemplatesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location from which to retrieve the collection of job - * templates. Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The `next_page_token` value returned from a previous List request, if - * any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent location from which to retrieve the collection of job - * templates. Format: `projects/{project}/locations/{location}` - * Please see {@see TranscoderServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Transcoder\V1\ListJobTemplatesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location from which to retrieve the collection of job - * templates. Format: `projects/{project}/locations/{location}` - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The `next_page_token` value returned from a previous List request, if - * any. - * @type string $filter - * The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * @type string $order_by - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location from which to retrieve the collection of job - * templates. Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent location from which to retrieve the collection of job - * templates. Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The `next_page_token` value returned from a previous List request, if - * any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `next_page_token` value returned from a previous List request, if - * any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesResponse.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesResponse.php deleted file mode 100644 index 3162f2362bd5..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.video.transcoder.v1.ListJobTemplatesResponse - */ -class ListJobTemplatesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of job templates in the specified region. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.JobTemplate job_templates = 1; - */ - private $job_templates; - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * List of regions that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Video\Transcoder\V1\JobTemplate>|\Google\Protobuf\Internal\RepeatedField $job_templates - * List of job templates in the specified region. - * @type string $next_page_token - * The pagination token. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * List of regions that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); - parent::__construct($data); - } - - /** - * List of job templates in the specified region. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.JobTemplate job_templates = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobTemplates() - { - return $this->job_templates; - } - - /** - * List of job templates in the specified region. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.JobTemplate job_templates = 1; - * @param array<\Google\Cloud\Video\Transcoder\V1\JobTemplate>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobTemplates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\JobTemplate::class); - $this->job_templates = $arr; - - return $this; - } - - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * List of regions that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * List of regions that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsRequest.php deleted file mode 100644 index 62bf0d1d56a7..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.video.transcoder.v1.ListJobsRequest - */ -class ListJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The `next_page_token` value returned from a previous List request, if - * any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Format: `projects/{project}/locations/{location}` - * Please see {@see TranscoderServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Transcoder\V1\ListJobsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Format: `projects/{project}/locations/{location}` - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The `next_page_token` value returned from a previous List request, if - * any. - * @type string $filter - * The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * @type string $order_by - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The `next_page_token` value returned from a previous List request, if - * any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `next_page_token` value returned from a previous List request, if - * any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsResponse.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsResponse.php deleted file mode 100644 index 0049a9825e28..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.video.transcoder.v1.ListJobsResponse - */ -class ListJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of jobs in the specified region. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Job jobs = 1; - */ - private $jobs; - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * List of regions that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Video\Transcoder\V1\Job>|\Google\Protobuf\Internal\RepeatedField $jobs - * List of jobs in the specified region. - * @type string $next_page_token - * The pagination token. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * List of regions that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); - parent::__construct($data); - } - - /** - * List of jobs in the specified region. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Job jobs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobs() - { - return $this->jobs; - } - - /** - * List of jobs in the specified region. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Job jobs = 1; - * @param array<\Google\Cloud\Video\Transcoder\V1\Job>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\Job::class); - $this->jobs = $arr; - - return $this; - } - - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * List of regions that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * List of regions that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest.php deleted file mode 100644 index d33527a0efff..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.video.transcoder.v1.Manifest - */ -class Manifest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the generated file. The default is `manifest` with the - * extension suffix corresponding to the `Manifest.type`. - * - * Generated from protobuf field string file_name = 1; - */ - protected $file_name = ''; - /** - * Required. Type of the manifest, can be `HLS` or `DASH`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Required. List of user given `MuxStream.key`s that should appear in this - * manifest. - * When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` - * and `.m3u8` extension is generated for each element of the - * `Manifest.mux_streams`. - * - * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $mux_streams; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $file_name - * The name of the generated file. The default is `manifest` with the - * extension suffix corresponding to the `Manifest.type`. - * @type int $type - * Required. Type of the manifest, can be `HLS` or `DASH`. - * @type array|\Google\Protobuf\Internal\RepeatedField $mux_streams - * Required. List of user given `MuxStream.key`s that should appear in this - * manifest. - * When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` - * and `.m3u8` extension is generated for each element of the - * `Manifest.mux_streams`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The name of the generated file. The default is `manifest` with the - * extension suffix corresponding to the `Manifest.type`. - * - * Generated from protobuf field string file_name = 1; - * @return string - */ - public function getFileName() - { - return $this->file_name; - } - - /** - * The name of the generated file. The default is `manifest` with the - * extension suffix corresponding to the `Manifest.type`. - * - * Generated from protobuf field string file_name = 1; - * @param string $var - * @return $this - */ - public function setFileName($var) - { - GPBUtil::checkString($var, True); - $this->file_name = $var; - - return $this; - } - - /** - * Required. Type of the manifest, can be `HLS` or `DASH`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. Type of the manifest, can be `HLS` or `DASH`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Transcoder\V1\Manifest\ManifestType::class); - $this->type = $var; - - return $this; - } - - /** - * Required. List of user given `MuxStream.key`s that should appear in this - * manifest. - * When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` - * and `.m3u8` extension is generated for each element of the - * `Manifest.mux_streams`. - * - * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMuxStreams() - { - return $this->mux_streams; - } - - /** - * Required. List of user given `MuxStream.key`s that should appear in this - * manifest. - * When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` - * and `.m3u8` extension is generated for each element of the - * `Manifest.mux_streams`. - * - * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMuxStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->mux_streams = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/ManifestType.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/ManifestType.php deleted file mode 100644 index a779accd4401..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/ManifestType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.video.transcoder.v1.Manifest.ManifestType - */ -class ManifestType -{ - /** - * The manifest type is not specified. - * - * Generated from protobuf enum MANIFEST_TYPE_UNSPECIFIED = 0; - */ - const MANIFEST_TYPE_UNSPECIFIED = 0; - /** - * Create `HLS` manifest. The corresponding file extension is `.m3u8`. - * - * Generated from protobuf enum HLS = 1; - */ - const HLS = 1; - /** - * Create `DASH` manifest. The corresponding file extension is `.mpd`. - * - * Generated from protobuf enum DASH = 2; - */ - const DASH = 2; - - private static $valueToName = [ - self::MANIFEST_TYPE_UNSPECIFIED => 'MANIFEST_TYPE_UNSPECIFIED', - self::HLS => 'HLS', - self::DASH => 'DASH', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ManifestType::class, \Google\Cloud\Video\Transcoder\V1\Manifest_ManifestType::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/MuxStream.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/MuxStream.php deleted file mode 100644 index e189d8a7c578..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/MuxStream.php +++ /dev/null @@ -1,261 +0,0 @@ -google.cloud.video.transcoder.v1.MuxStream - */ -class MuxStream extends \Google\Protobuf\Internal\Message -{ - /** - * A unique key for this multiplexed stream. HLS media manifests will be - * named `MuxStream.key` with the `.m3u8` extension suffix. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * The name of the generated file. The default is `MuxStream.key` with the - * extension suffix corresponding to the `MuxStream.container`. - * Individual segments also have an incremental 10-digit zero-padded suffix - * starting from 0 before the extension, such as `mux_stream0000000123.ts`. - * - * Generated from protobuf field string file_name = 2; - */ - protected $file_name = ''; - /** - * The container format. The default is `mp4` - * Supported container formats: - * - `ts` - * - `fmp4`- the corresponding file extension is `.m4s` - * - `mp4` - * - `vtt` - * See also: - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) - * - * Generated from protobuf field string container = 3; - */ - protected $container = ''; - /** - * List of `ElementaryStream.key`s multiplexed in this stream. - * - * Generated from protobuf field repeated string elementary_streams = 4; - */ - private $elementary_streams; - /** - * Segment settings for `ts`, `fmp4` and `vtt`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.SegmentSettings segment_settings = 5; - */ - protected $segment_settings = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * A unique key for this multiplexed stream. HLS media manifests will be - * named `MuxStream.key` with the `.m3u8` extension suffix. - * @type string $file_name - * The name of the generated file. The default is `MuxStream.key` with the - * extension suffix corresponding to the `MuxStream.container`. - * Individual segments also have an incremental 10-digit zero-padded suffix - * starting from 0 before the extension, such as `mux_stream0000000123.ts`. - * @type string $container - * The container format. The default is `mp4` - * Supported container formats: - * - `ts` - * - `fmp4`- the corresponding file extension is `.m4s` - * - `mp4` - * - `vtt` - * See also: - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) - * @type array|\Google\Protobuf\Internal\RepeatedField $elementary_streams - * List of `ElementaryStream.key`s multiplexed in this stream. - * @type \Google\Cloud\Video\Transcoder\V1\SegmentSettings $segment_settings - * Segment settings for `ts`, `fmp4` and `vtt`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * A unique key for this multiplexed stream. HLS media manifests will be - * named `MuxStream.key` with the `.m3u8` extension suffix. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * A unique key for this multiplexed stream. HLS media manifests will be - * named `MuxStream.key` with the `.m3u8` extension suffix. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * The name of the generated file. The default is `MuxStream.key` with the - * extension suffix corresponding to the `MuxStream.container`. - * Individual segments also have an incremental 10-digit zero-padded suffix - * starting from 0 before the extension, such as `mux_stream0000000123.ts`. - * - * Generated from protobuf field string file_name = 2; - * @return string - */ - public function getFileName() - { - return $this->file_name; - } - - /** - * The name of the generated file. The default is `MuxStream.key` with the - * extension suffix corresponding to the `MuxStream.container`. - * Individual segments also have an incremental 10-digit zero-padded suffix - * starting from 0 before the extension, such as `mux_stream0000000123.ts`. - * - * Generated from protobuf field string file_name = 2; - * @param string $var - * @return $this - */ - public function setFileName($var) - { - GPBUtil::checkString($var, True); - $this->file_name = $var; - - return $this; - } - - /** - * The container format. The default is `mp4` - * Supported container formats: - * - `ts` - * - `fmp4`- the corresponding file extension is `.m4s` - * - `mp4` - * - `vtt` - * See also: - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) - * - * Generated from protobuf field string container = 3; - * @return string - */ - public function getContainer() - { - return $this->container; - } - - /** - * The container format. The default is `mp4` - * Supported container formats: - * - `ts` - * - `fmp4`- the corresponding file extension is `.m4s` - * - `mp4` - * - `vtt` - * See also: - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) - * - * Generated from protobuf field string container = 3; - * @param string $var - * @return $this - */ - public function setContainer($var) - { - GPBUtil::checkString($var, True); - $this->container = $var; - - return $this; - } - - /** - * List of `ElementaryStream.key`s multiplexed in this stream. - * - * Generated from protobuf field repeated string elementary_streams = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getElementaryStreams() - { - return $this->elementary_streams; - } - - /** - * List of `ElementaryStream.key`s multiplexed in this stream. - * - * Generated from protobuf field repeated string elementary_streams = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setElementaryStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->elementary_streams = $arr; - - return $this; - } - - /** - * Segment settings for `ts`, `fmp4` and `vtt`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.SegmentSettings segment_settings = 5; - * @return \Google\Cloud\Video\Transcoder\V1\SegmentSettings|null - */ - public function getSegmentSettings() - { - return $this->segment_settings; - } - - public function hasSegmentSettings() - { - return isset($this->segment_settings); - } - - public function clearSegmentSettings() - { - unset($this->segment_settings); - } - - /** - * Segment settings for `ts`, `fmp4` and `vtt`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.SegmentSettings segment_settings = 5; - * @param \Google\Cloud\Video\Transcoder\V1\SegmentSettings $var - * @return $this - */ - public function setSegmentSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\SegmentSettings::class); - $this->segment_settings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Output.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Output.php deleted file mode 100644 index e3203d1eb0bf..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Output.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.video.transcoder.v1.Output - */ -class Output extends \Google\Protobuf\Internal\Message -{ - /** - * URI for the output file(s). For example, `gs://my-bucket/outputs/`. - * If empty, the value is populated from `Job.output_uri`. See - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * URI for the output file(s). For example, `gs://my-bucket/outputs/`. - * If empty, the value is populated from `Job.output_uri`. See - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * URI for the output file(s). For example, `gs://my-bucket/outputs/`. - * If empty, the value is populated from `Job.output_uri`. See - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI for the output file(s). For example, `gs://my-bucket/outputs/`. - * If empty, the value is populated from `Job.output_uri`. See - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * Generated from protobuf field string uri = 1; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay.php deleted file mode 100644 index fa19100a1a1e..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.video.transcoder.v1.Overlay - */ -class Overlay extends \Google\Protobuf\Internal\Message -{ - /** - * Image overlay. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.Image image = 1; - */ - protected $image = null; - /** - * List of Animations. The list should be chronological, without any time - * overlap. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay.Animation animations = 2; - */ - private $animations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Transcoder\V1\Overlay\Image $image - * Image overlay. - * @type array<\Google\Cloud\Video\Transcoder\V1\Overlay\Animation>|\Google\Protobuf\Internal\RepeatedField $animations - * List of Animations. The list should be chronological, without any time - * overlap. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Image overlay. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.Image image = 1; - * @return \Google\Cloud\Video\Transcoder\V1\Overlay\Image|null - */ - public function getImage() - { - return $this->image; - } - - public function hasImage() - { - return isset($this->image); - } - - public function clearImage() - { - unset($this->image); - } - - /** - * Image overlay. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.Image image = 1; - * @param \Google\Cloud\Video\Transcoder\V1\Overlay\Image $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\Image::class); - $this->image = $var; - - return $this; - } - - /** - * List of Animations. The list should be chronological, without any time - * overlap. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay.Animation animations = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAnimations() - { - return $this->animations; - } - - /** - * List of Animations. The list should be chronological, without any time - * overlap. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay.Animation animations = 2; - * @param array<\Google\Cloud\Video\Transcoder\V1\Overlay\Animation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAnimations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\Overlay\Animation::class); - $this->animations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Animation.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Animation.php deleted file mode 100644 index 721b5ff9f161..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Animation.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.video.transcoder.v1.Overlay.Animation - */ -class Animation extends \Google\Protobuf\Internal\Message -{ - protected $animation_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationStatic $animation_static - * Display static overlay object. - * @type \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationFade $animation_fade - * Display overlay object with fade animation. - * @type \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationEnd $animation_end - * End previous animation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Display static overlay object. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationStatic animation_static = 1; - * @return \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationStatic|null - */ - public function getAnimationStatic() - { - return $this->readOneof(1); - } - - public function hasAnimationStatic() - { - return $this->hasOneof(1); - } - - /** - * Display static overlay object. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationStatic animation_static = 1; - * @param \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationStatic $var - * @return $this - */ - public function setAnimationStatic($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationStatic::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Display overlay object with fade animation. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationFade animation_fade = 2; - * @return \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationFade|null - */ - public function getAnimationFade() - { - return $this->readOneof(2); - } - - public function hasAnimationFade() - { - return $this->hasOneof(2); - } - - /** - * Display overlay object with fade animation. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationFade animation_fade = 2; - * @param \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationFade $var - * @return $this - */ - public function setAnimationFade($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationFade::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * End previous animation. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationEnd animation_end = 3; - * @return \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationEnd|null - */ - public function getAnimationEnd() - { - return $this->readOneof(3); - } - - public function hasAnimationEnd() - { - return $this->hasOneof(3); - } - - /** - * End previous animation. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationEnd animation_end = 3; - * @param \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationEnd $var - * @return $this - */ - public function setAnimationEnd($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationEnd::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getAnimationType() - { - return $this->whichOneof("animation_type"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Animation::class, \Google\Cloud\Video\Transcoder\V1\Overlay_Animation::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationEnd.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationEnd.php deleted file mode 100644 index 38f7c28a1751..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationEnd.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.video.transcoder.v1.Overlay.AnimationEnd - */ -class AnimationEnd extends \Google\Protobuf\Internal\Message -{ - /** - * The time to end overlay object, in seconds. Default: 0 - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; - */ - protected $start_time_offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $start_time_offset - * The time to end overlay object, in seconds. Default: 0 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The time to end overlay object, in seconds. Default: 0 - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getStartTimeOffset() - { - return $this->start_time_offset; - } - - public function hasStartTimeOffset() - { - return isset($this->start_time_offset); - } - - public function clearStartTimeOffset() - { - unset($this->start_time_offset); - } - - /** - * The time to end overlay object, in seconds. Default: 0 - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setStartTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->start_time_offset = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AnimationEnd::class, \Google\Cloud\Video\Transcoder\V1\Overlay_AnimationEnd::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationFade.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationFade.php deleted file mode 100644 index f6a10418cbdb..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationFade.php +++ /dev/null @@ -1,222 +0,0 @@ -google.cloud.video.transcoder.v1.Overlay.AnimationFade - */ -class AnimationFade extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.FadeType fade_type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $fade_type = 0; - /** - * Normalized coordinates based on output video resolution. Valid - * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay - * object. For example, use the x and y coordinates {0,0} to position the - * top-left corner of the overlay animation in the top-left corner of the - * output video. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 2; - */ - protected $xy = null; - /** - * The time to start the fade animation, in seconds. Default: 0 - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 3; - */ - protected $start_time_offset = null; - /** - * The time to end the fade animation, in seconds. Default: - * `start_time_offset` + 1s - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 4; - */ - protected $end_time_offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $fade_type - * Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. - * @type \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $xy - * Normalized coordinates based on output video resolution. Valid - * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay - * object. For example, use the x and y coordinates {0,0} to position the - * top-left corner of the overlay animation in the top-left corner of the - * output video. - * @type \Google\Protobuf\Duration $start_time_offset - * The time to start the fade animation, in seconds. Default: 0 - * @type \Google\Protobuf\Duration $end_time_offset - * The time to end the fade animation, in seconds. Default: - * `start_time_offset` + 1s - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.FadeType fade_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getFadeType() - { - return $this->fade_type; - } - - /** - * Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.FadeType fade_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setFadeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Transcoder\V1\Overlay\FadeType::class); - $this->fade_type = $var; - - return $this; - } - - /** - * Normalized coordinates based on output video resolution. Valid - * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay - * object. For example, use the x and y coordinates {0,0} to position the - * top-left corner of the overlay animation in the top-left corner of the - * output video. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 2; - * @return \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate|null - */ - public function getXy() - { - return $this->xy; - } - - public function hasXy() - { - return isset($this->xy); - } - - public function clearXy() - { - unset($this->xy); - } - - /** - * Normalized coordinates based on output video resolution. Valid - * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay - * object. For example, use the x and y coordinates {0,0} to position the - * top-left corner of the overlay animation in the top-left corner of the - * output video. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 2; - * @param \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $var - * @return $this - */ - public function setXy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate::class); - $this->xy = $var; - - return $this; - } - - /** - * The time to start the fade animation, in seconds. Default: 0 - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getStartTimeOffset() - { - return $this->start_time_offset; - } - - public function hasStartTimeOffset() - { - return isset($this->start_time_offset); - } - - public function clearStartTimeOffset() - { - unset($this->start_time_offset); - } - - /** - * The time to start the fade animation, in seconds. Default: 0 - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setStartTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->start_time_offset = $var; - - return $this; - } - - /** - * The time to end the fade animation, in seconds. Default: - * `start_time_offset` + 1s - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getEndTimeOffset() - { - return $this->end_time_offset; - } - - public function hasEndTimeOffset() - { - return isset($this->end_time_offset); - } - - public function clearEndTimeOffset() - { - unset($this->end_time_offset); - } - - /** - * The time to end the fade animation, in seconds. Default: - * `start_time_offset` + 1s - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setEndTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->end_time_offset = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AnimationFade::class, \Google\Cloud\Video\Transcoder\V1\Overlay_AnimationFade::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationStatic.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationStatic.php deleted file mode 100644 index 8829a32fef8d..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationStatic.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.video.transcoder.v1.Overlay.AnimationStatic - */ -class AnimationStatic extends \Google\Protobuf\Internal\Message -{ - /** - * Normalized coordinates based on output video resolution. Valid - * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay - * object. For example, use the x and y coordinates {0,0} to position the - * top-left corner of the overlay animation in the top-left corner of the - * output video. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 1; - */ - protected $xy = null; - /** - * The time to start displaying the overlay object, in seconds. Default: 0 - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 2; - */ - protected $start_time_offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $xy - * Normalized coordinates based on output video resolution. Valid - * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay - * object. For example, use the x and y coordinates {0,0} to position the - * top-left corner of the overlay animation in the top-left corner of the - * output video. - * @type \Google\Protobuf\Duration $start_time_offset - * The time to start displaying the overlay object, in seconds. Default: 0 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Normalized coordinates based on output video resolution. Valid - * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay - * object. For example, use the x and y coordinates {0,0} to position the - * top-left corner of the overlay animation in the top-left corner of the - * output video. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 1; - * @return \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate|null - */ - public function getXy() - { - return $this->xy; - } - - public function hasXy() - { - return isset($this->xy); - } - - public function clearXy() - { - unset($this->xy); - } - - /** - * Normalized coordinates based on output video resolution. Valid - * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay - * object. For example, use the x and y coordinates {0,0} to position the - * top-left corner of the overlay animation in the top-left corner of the - * output video. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 1; - * @param \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $var - * @return $this - */ - public function setXy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate::class); - $this->xy = $var; - - return $this; - } - - /** - * The time to start displaying the overlay object, in seconds. Default: 0 - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getStartTimeOffset() - { - return $this->start_time_offset; - } - - public function hasStartTimeOffset() - { - return isset($this->start_time_offset); - } - - public function clearStartTimeOffset() - { - unset($this->start_time_offset); - } - - /** - * The time to start displaying the overlay object, in seconds. Default: 0 - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setStartTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->start_time_offset = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AnimationStatic::class, \Google\Cloud\Video\Transcoder\V1\Overlay_AnimationStatic::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/FadeType.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/FadeType.php deleted file mode 100644 index 00d84b08ab33..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/FadeType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.video.transcoder.v1.Overlay.FadeType - */ -class FadeType -{ - /** - * The fade type is not specified. - * - * Generated from protobuf enum FADE_TYPE_UNSPECIFIED = 0; - */ - const FADE_TYPE_UNSPECIFIED = 0; - /** - * Fade the overlay object into view. - * - * Generated from protobuf enum FADE_IN = 1; - */ - const FADE_IN = 1; - /** - * Fade the overlay object out of view. - * - * Generated from protobuf enum FADE_OUT = 2; - */ - const FADE_OUT = 2; - - private static $valueToName = [ - self::FADE_TYPE_UNSPECIFIED => 'FADE_TYPE_UNSPECIFIED', - self::FADE_IN => 'FADE_IN', - self::FADE_OUT => 'FADE_OUT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FadeType::class, \Google\Cloud\Video\Transcoder\V1\Overlay_FadeType::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Image.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Image.php deleted file mode 100644 index 88bcf10bc53f..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Image.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.video.transcoder.v1.Overlay.Image - */ -class Image extends \Google\Protobuf\Internal\Message -{ - /** - * Required. URI of the image in Cloud Storage. For example, - * `gs://bucket/inputs/image.png`. Only PNG and JPEG images are supported. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - /** - * Normalized image resolution, based on output video resolution. Valid - * values: `0.0`–`1.0`. To respect the original image aspect ratio, set - * either `x` or `y` to `0.0`. To use the original image resolution, set - * both `x` and `y` to `0.0`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate resolution = 2; - */ - protected $resolution = null; - /** - * Target image opacity. Valid values are from `1.0` (solid, default) to - * `0.0` (transparent), exclusive. Set this to a value greater than `0.0`. - * - * Generated from protobuf field double alpha = 3; - */ - protected $alpha = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Required. URI of the image in Cloud Storage. For example, - * `gs://bucket/inputs/image.png`. Only PNG and JPEG images are supported. - * @type \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $resolution - * Normalized image resolution, based on output video resolution. Valid - * values: `0.0`–`1.0`. To respect the original image aspect ratio, set - * either `x` or `y` to `0.0`. To use the original image resolution, set - * both `x` and `y` to `0.0`. - * @type float $alpha - * Target image opacity. Valid values are from `1.0` (solid, default) to - * `0.0` (transparent), exclusive. Set this to a value greater than `0.0`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. URI of the image in Cloud Storage. For example, - * `gs://bucket/inputs/image.png`. Only PNG and JPEG images are supported. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. URI of the image in Cloud Storage. For example, - * `gs://bucket/inputs/image.png`. Only PNG and JPEG images are supported. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Normalized image resolution, based on output video resolution. Valid - * values: `0.0`–`1.0`. To respect the original image aspect ratio, set - * either `x` or `y` to `0.0`. To use the original image resolution, set - * both `x` and `y` to `0.0`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate resolution = 2; - * @return \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate|null - */ - public function getResolution() - { - return $this->resolution; - } - - public function hasResolution() - { - return isset($this->resolution); - } - - public function clearResolution() - { - unset($this->resolution); - } - - /** - * Normalized image resolution, based on output video resolution. Valid - * values: `0.0`–`1.0`. To respect the original image aspect ratio, set - * either `x` or `y` to `0.0`. To use the original image resolution, set - * both `x` and `y` to `0.0`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate resolution = 2; - * @param \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $var - * @return $this - */ - public function setResolution($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate::class); - $this->resolution = $var; - - return $this; - } - - /** - * Target image opacity. Valid values are from `1.0` (solid, default) to - * `0.0` (transparent), exclusive. Set this to a value greater than `0.0`. - * - * Generated from protobuf field double alpha = 3; - * @return float - */ - public function getAlpha() - { - return $this->alpha; - } - - /** - * Target image opacity. Valid values are from `1.0` (solid, default) to - * `0.0` (transparent), exclusive. Set this to a value greater than `0.0`. - * - * Generated from protobuf field double alpha = 3; - * @param float $var - * @return $this - */ - public function setAlpha($var) - { - GPBUtil::checkDouble($var); - $this->alpha = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Image::class, \Google\Cloud\Video\Transcoder\V1\Overlay_Image::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/NormalizedCoordinate.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/NormalizedCoordinate.php deleted file mode 100644 index 6212da72fc3e..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/NormalizedCoordinate.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate - */ -class NormalizedCoordinate extends \Google\Protobuf\Internal\Message -{ - /** - * Normalized x coordinate. - * - * Generated from protobuf field double x = 1; - */ - protected $x = 0.0; - /** - * Normalized y coordinate. - * - * Generated from protobuf field double y = 2; - */ - protected $y = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $x - * Normalized x coordinate. - * @type float $y - * Normalized y coordinate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Normalized x coordinate. - * - * Generated from protobuf field double x = 1; - * @return float - */ - public function getX() - { - return $this->x; - } - - /** - * Normalized x coordinate. - * - * Generated from protobuf field double x = 1; - * @param float $var - * @return $this - */ - public function setX($var) - { - GPBUtil::checkDouble($var); - $this->x = $var; - - return $this; - } - - /** - * Normalized y coordinate. - * - * Generated from protobuf field double y = 2; - * @return float - */ - public function getY() - { - return $this->y; - } - - /** - * Normalized y coordinate. - * - * Generated from protobuf field double y = 2; - * @param float $var - * @return $this - */ - public function setY($var) - { - GPBUtil::checkDouble($var); - $this->y = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NormalizedCoordinate::class, \Google\Cloud\Video\Transcoder\V1\Overlay_NormalizedCoordinate::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig.php deleted file mode 100644 index a89acfa1847b..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig.php +++ /dev/null @@ -1,341 +0,0 @@ -google.cloud.video.transcoder.v1.PreprocessingConfig - */ -class PreprocessingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Color preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Color color = 1; - */ - protected $color = null; - /** - * Denoise preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise denoise = 2; - */ - protected $denoise = null; - /** - * Deblock preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock deblock = 3; - */ - protected $deblock = null; - /** - * Audio preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Audio audio = 4; - */ - protected $audio = null; - /** - * Specify the video cropping configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Crop crop = 5; - */ - protected $crop = null; - /** - * Specify the video pad filter configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Pad pad = 6; - */ - protected $pad = null; - /** - * Specify the video deinterlace configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace deinterlace = 7; - */ - protected $deinterlace = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Color $color - * Color preprocessing configuration. - * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Denoise $denoise - * Denoise preprocessing configuration. - * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deblock $deblock - * Deblock preprocessing configuration. - * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Audio $audio - * Audio preprocessing configuration. - * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Crop $crop - * Specify the video cropping configuration. - * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Pad $pad - * Specify the video pad filter configuration. - * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace $deinterlace - * Specify the video deinterlace configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Color preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Color color = 1; - * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Color|null - */ - public function getColor() - { - return $this->color; - } - - public function hasColor() - { - return isset($this->color); - } - - public function clearColor() - { - unset($this->color); - } - - /** - * Color preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Color color = 1; - * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Color $var - * @return $this - */ - public function setColor($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Color::class); - $this->color = $var; - - return $this; - } - - /** - * Denoise preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise denoise = 2; - * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Denoise|null - */ - public function getDenoise() - { - return $this->denoise; - } - - public function hasDenoise() - { - return isset($this->denoise); - } - - public function clearDenoise() - { - unset($this->denoise); - } - - /** - * Denoise preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise denoise = 2; - * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Denoise $var - * @return $this - */ - public function setDenoise($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Denoise::class); - $this->denoise = $var; - - return $this; - } - - /** - * Deblock preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock deblock = 3; - * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deblock|null - */ - public function getDeblock() - { - return $this->deblock; - } - - public function hasDeblock() - { - return isset($this->deblock); - } - - public function clearDeblock() - { - unset($this->deblock); - } - - /** - * Deblock preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock deblock = 3; - * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deblock $var - * @return $this - */ - public function setDeblock($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deblock::class); - $this->deblock = $var; - - return $this; - } - - /** - * Audio preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Audio audio = 4; - * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Audio|null - */ - public function getAudio() - { - return $this->audio; - } - - public function hasAudio() - { - return isset($this->audio); - } - - public function clearAudio() - { - unset($this->audio); - } - - /** - * Audio preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Audio audio = 4; - * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Audio $var - * @return $this - */ - public function setAudio($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Audio::class); - $this->audio = $var; - - return $this; - } - - /** - * Specify the video cropping configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Crop crop = 5; - * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Crop|null - */ - public function getCrop() - { - return $this->crop; - } - - public function hasCrop() - { - return isset($this->crop); - } - - public function clearCrop() - { - unset($this->crop); - } - - /** - * Specify the video cropping configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Crop crop = 5; - * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Crop $var - * @return $this - */ - public function setCrop($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Crop::class); - $this->crop = $var; - - return $this; - } - - /** - * Specify the video pad filter configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Pad pad = 6; - * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Pad|null - */ - public function getPad() - { - return $this->pad; - } - - public function hasPad() - { - return isset($this->pad); - } - - public function clearPad() - { - unset($this->pad); - } - - /** - * Specify the video pad filter configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Pad pad = 6; - * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Pad $var - * @return $this - */ - public function setPad($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Pad::class); - $this->pad = $var; - - return $this; - } - - /** - * Specify the video deinterlace configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace deinterlace = 7; - * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace|null - */ - public function getDeinterlace() - { - return $this->deinterlace; - } - - public function hasDeinterlace() - { - return isset($this->deinterlace); - } - - public function clearDeinterlace() - { - unset($this->deinterlace); - } - - /** - * Specify the video deinterlace configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace deinterlace = 7; - * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace $var - * @return $this - */ - public function setDeinterlace($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace::class); - $this->deinterlace = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Audio.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Audio.php deleted file mode 100644 index 5527aa011f49..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Audio.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.video.transcoder.v1.PreprocessingConfig.Audio - */ -class Audio extends \Google\Protobuf\Internal\Message -{ - /** - * Specify audio loudness normalization in loudness units relative to full - * scale (LUFS). Enter a value between -24 and 0 (the default), where: - * * -24 is the Advanced Television Systems Committee (ATSC A/85) standard - * * -23 is the EU R128 broadcast standard - * * -19 is the prior standard for online mono audio - * * -18 is the ReplayGain standard - * * -16 is the prior standard for stereo audio - * * -14 is the new online audio standard recommended by Spotify, as well - * as Amazon Echo - * * 0 disables normalization - * - * Generated from protobuf field double lufs = 1; - */ - protected $lufs = 0.0; - /** - * Enable boosting high frequency components. The default is `false`. - * **Note:** This field is not supported. - * - * Generated from protobuf field bool high_boost = 2; - */ - protected $high_boost = false; - /** - * Enable boosting low frequency components. The default is `false`. - * **Note:** This field is not supported. - * - * Generated from protobuf field bool low_boost = 3; - */ - protected $low_boost = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $lufs - * Specify audio loudness normalization in loudness units relative to full - * scale (LUFS). Enter a value between -24 and 0 (the default), where: - * * -24 is the Advanced Television Systems Committee (ATSC A/85) standard - * * -23 is the EU R128 broadcast standard - * * -19 is the prior standard for online mono audio - * * -18 is the ReplayGain standard - * * -16 is the prior standard for stereo audio - * * -14 is the new online audio standard recommended by Spotify, as well - * as Amazon Echo - * * 0 disables normalization - * @type bool $high_boost - * Enable boosting high frequency components. The default is `false`. - * **Note:** This field is not supported. - * @type bool $low_boost - * Enable boosting low frequency components. The default is `false`. - * **Note:** This field is not supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Specify audio loudness normalization in loudness units relative to full - * scale (LUFS). Enter a value between -24 and 0 (the default), where: - * * -24 is the Advanced Television Systems Committee (ATSC A/85) standard - * * -23 is the EU R128 broadcast standard - * * -19 is the prior standard for online mono audio - * * -18 is the ReplayGain standard - * * -16 is the prior standard for stereo audio - * * -14 is the new online audio standard recommended by Spotify, as well - * as Amazon Echo - * * 0 disables normalization - * - * Generated from protobuf field double lufs = 1; - * @return float - */ - public function getLufs() - { - return $this->lufs; - } - - /** - * Specify audio loudness normalization in loudness units relative to full - * scale (LUFS). Enter a value between -24 and 0 (the default), where: - * * -24 is the Advanced Television Systems Committee (ATSC A/85) standard - * * -23 is the EU R128 broadcast standard - * * -19 is the prior standard for online mono audio - * * -18 is the ReplayGain standard - * * -16 is the prior standard for stereo audio - * * -14 is the new online audio standard recommended by Spotify, as well - * as Amazon Echo - * * 0 disables normalization - * - * Generated from protobuf field double lufs = 1; - * @param float $var - * @return $this - */ - public function setLufs($var) - { - GPBUtil::checkDouble($var); - $this->lufs = $var; - - return $this; - } - - /** - * Enable boosting high frequency components. The default is `false`. - * **Note:** This field is not supported. - * - * Generated from protobuf field bool high_boost = 2; - * @return bool - */ - public function getHighBoost() - { - return $this->high_boost; - } - - /** - * Enable boosting high frequency components. The default is `false`. - * **Note:** This field is not supported. - * - * Generated from protobuf field bool high_boost = 2; - * @param bool $var - * @return $this - */ - public function setHighBoost($var) - { - GPBUtil::checkBool($var); - $this->high_boost = $var; - - return $this; - } - - /** - * Enable boosting low frequency components. The default is `false`. - * **Note:** This field is not supported. - * - * Generated from protobuf field bool low_boost = 3; - * @return bool - */ - public function getLowBoost() - { - return $this->low_boost; - } - - /** - * Enable boosting low frequency components. The default is `false`. - * **Note:** This field is not supported. - * - * Generated from protobuf field bool low_boost = 3; - * @param bool $var - * @return $this - */ - public function setLowBoost($var) - { - GPBUtil::checkBool($var); - $this->low_boost = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Audio::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Audio::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Color.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Color.php deleted file mode 100644 index 7fcb9b376823..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Color.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.video.transcoder.v1.PreprocessingConfig.Color - */ -class Color extends \Google\Protobuf\Internal\Message -{ - /** - * Control color saturation of the video. Enter a value between -1 and 1, - * where -1 is fully desaturated and 1 is maximum saturation. 0 is no - * change. The default is 0. - * - * Generated from protobuf field double saturation = 1; - */ - protected $saturation = 0.0; - /** - * Control black and white contrast of the video. Enter a value between -1 - * and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no - * change. The default is 0. - * - * Generated from protobuf field double contrast = 2; - */ - protected $contrast = 0.0; - /** - * Control brightness of the video. Enter a value between -1 and 1, where -1 - * is minimum brightness and 1 is maximum brightness. 0 is no change. The - * default is 0. - * - * Generated from protobuf field double brightness = 3; - */ - protected $brightness = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $saturation - * Control color saturation of the video. Enter a value between -1 and 1, - * where -1 is fully desaturated and 1 is maximum saturation. 0 is no - * change. The default is 0. - * @type float $contrast - * Control black and white contrast of the video. Enter a value between -1 - * and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no - * change. The default is 0. - * @type float $brightness - * Control brightness of the video. Enter a value between -1 and 1, where -1 - * is minimum brightness and 1 is maximum brightness. 0 is no change. The - * default is 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Control color saturation of the video. Enter a value between -1 and 1, - * where -1 is fully desaturated and 1 is maximum saturation. 0 is no - * change. The default is 0. - * - * Generated from protobuf field double saturation = 1; - * @return float - */ - public function getSaturation() - { - return $this->saturation; - } - - /** - * Control color saturation of the video. Enter a value between -1 and 1, - * where -1 is fully desaturated and 1 is maximum saturation. 0 is no - * change. The default is 0. - * - * Generated from protobuf field double saturation = 1; - * @param float $var - * @return $this - */ - public function setSaturation($var) - { - GPBUtil::checkDouble($var); - $this->saturation = $var; - - return $this; - } - - /** - * Control black and white contrast of the video. Enter a value between -1 - * and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no - * change. The default is 0. - * - * Generated from protobuf field double contrast = 2; - * @return float - */ - public function getContrast() - { - return $this->contrast; - } - - /** - * Control black and white contrast of the video. Enter a value between -1 - * and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no - * change. The default is 0. - * - * Generated from protobuf field double contrast = 2; - * @param float $var - * @return $this - */ - public function setContrast($var) - { - GPBUtil::checkDouble($var); - $this->contrast = $var; - - return $this; - } - - /** - * Control brightness of the video. Enter a value between -1 and 1, where -1 - * is minimum brightness and 1 is maximum brightness. 0 is no change. The - * default is 0. - * - * Generated from protobuf field double brightness = 3; - * @return float - */ - public function getBrightness() - { - return $this->brightness; - } - - /** - * Control brightness of the video. Enter a value between -1 and 1, where -1 - * is minimum brightness and 1 is maximum brightness. 0 is no change. The - * default is 0. - * - * Generated from protobuf field double brightness = 3; - * @param float $var - * @return $this - */ - public function setBrightness($var) - { - GPBUtil::checkDouble($var); - $this->brightness = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Color::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Color::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Crop.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Crop.php deleted file mode 100644 index a4a924ad4860..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Crop.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.video.transcoder.v1.PreprocessingConfig.Crop - */ -class Crop extends \Google\Protobuf\Internal\Message -{ - /** - * The number of pixels to crop from the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - */ - protected $top_pixels = 0; - /** - * The number of pixels to crop from the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - */ - protected $bottom_pixels = 0; - /** - * The number of pixels to crop from the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - */ - protected $left_pixels = 0; - /** - * The number of pixels to crop from the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - */ - protected $right_pixels = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $top_pixels - * The number of pixels to crop from the top. The default is 0. - * @type int $bottom_pixels - * The number of pixels to crop from the bottom. The default is 0. - * @type int $left_pixels - * The number of pixels to crop from the left. The default is 0. - * @type int $right_pixels - * The number of pixels to crop from the right. The default is 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The number of pixels to crop from the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - * @return int - */ - public function getTopPixels() - { - return $this->top_pixels; - } - - /** - * The number of pixels to crop from the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - * @param int $var - * @return $this - */ - public function setTopPixels($var) - { - GPBUtil::checkInt32($var); - $this->top_pixels = $var; - - return $this; - } - - /** - * The number of pixels to crop from the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - * @return int - */ - public function getBottomPixels() - { - return $this->bottom_pixels; - } - - /** - * The number of pixels to crop from the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - * @param int $var - * @return $this - */ - public function setBottomPixels($var) - { - GPBUtil::checkInt32($var); - $this->bottom_pixels = $var; - - return $this; - } - - /** - * The number of pixels to crop from the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - * @return int - */ - public function getLeftPixels() - { - return $this->left_pixels; - } - - /** - * The number of pixels to crop from the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - * @param int $var - * @return $this - */ - public function setLeftPixels($var) - { - GPBUtil::checkInt32($var); - $this->left_pixels = $var; - - return $this; - } - - /** - * The number of pixels to crop from the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - * @return int - */ - public function getRightPixels() - { - return $this->right_pixels; - } - - /** - * The number of pixels to crop from the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - * @param int $var - * @return $this - */ - public function setRightPixels($var) - { - GPBUtil::checkInt32($var); - $this->right_pixels = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Crop::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Crop::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deblock.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deblock.php deleted file mode 100644 index a1c2d7c6a2a5..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deblock.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock - */ -class Deblock extends \Google\Protobuf\Internal\Message -{ - /** - * Set strength of the deblocker. Enter a value between 0 and 1. The higher - * the value, the stronger the block removal. 0 is no deblocking. The - * default is 0. - * - * Generated from protobuf field double strength = 1; - */ - protected $strength = 0.0; - /** - * Enable deblocker. The default is `false`. - * - * Generated from protobuf field bool enabled = 2; - */ - protected $enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $strength - * Set strength of the deblocker. Enter a value between 0 and 1. The higher - * the value, the stronger the block removal. 0 is no deblocking. The - * default is 0. - * @type bool $enabled - * Enable deblocker. The default is `false`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Set strength of the deblocker. Enter a value between 0 and 1. The higher - * the value, the stronger the block removal. 0 is no deblocking. The - * default is 0. - * - * Generated from protobuf field double strength = 1; - * @return float - */ - public function getStrength() - { - return $this->strength; - } - - /** - * Set strength of the deblocker. Enter a value between 0 and 1. The higher - * the value, the stronger the block removal. 0 is no deblocking. The - * default is 0. - * - * Generated from protobuf field double strength = 1; - * @param float $var - * @return $this - */ - public function setStrength($var) - { - GPBUtil::checkDouble($var); - $this->strength = $var; - - return $this; - } - - /** - * Enable deblocker. The default is `false`. - * - * Generated from protobuf field bool enabled = 2; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Enable deblocker. The default is `false`. - * - * Generated from protobuf field bool enabled = 2; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Deblock::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Deblock::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace.php deleted file mode 100644 index b770eda51e32..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace - */ -class Deinterlace extends \Google\Protobuf\Internal\Message -{ - protected $deinterlacing_filter; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\YadifConfig $yadif - * Specifies the Yet Another Deinterlacing Filter Configuration. - * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\BwdifConfig $bwdif - * Specifies the Bob Weaver Deinterlacing Filter Configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Specifies the Yet Another Deinterlacing Filter Configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.YadifConfig yadif = 1; - * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\YadifConfig|null - */ - public function getYadif() - { - return $this->readOneof(1); - } - - public function hasYadif() - { - return $this->hasOneof(1); - } - - /** - * Specifies the Yet Another Deinterlacing Filter Configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.YadifConfig yadif = 1; - * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\YadifConfig $var - * @return $this - */ - public function setYadif($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\YadifConfig::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Specifies the Bob Weaver Deinterlacing Filter Configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.BwdifConfig bwdif = 2; - * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\BwdifConfig|null - */ - public function getBwdif() - { - return $this->readOneof(2); - } - - public function hasBwdif() - { - return $this->hasOneof(2); - } - - /** - * Specifies the Bob Weaver Deinterlacing Filter Configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.BwdifConfig bwdif = 2; - * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\BwdifConfig $var - * @return $this - */ - public function setBwdif($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\BwdifConfig::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getDeinterlacingFilter() - { - return $this->whichOneof("deinterlacing_filter"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Deinterlace::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Deinterlace::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/BwdifConfig.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/BwdifConfig.php deleted file mode 100644 index ac4676c464e6..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/BwdifConfig.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.BwdifConfig - */ -class BwdifConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies the deinterlacing mode to adopt. - * The default is `send_frame`. - * Supported values: - * - `send_frame`: Output one frame for each frame - * - `send_field`: Output one frame for each field - * - * Generated from protobuf field string mode = 1; - */ - protected $mode = ''; - /** - * The picture field parity assumed for the input interlaced video. - * The default is `auto`. - * Supported values: - * - `tff`: Assume the top field is first - * - `bff`: Assume the bottom field is first - * - `auto`: Enable automatic detection of field parity - * - * Generated from protobuf field string parity = 2; - */ - protected $parity = ''; - /** - * Deinterlace all frames rather than just the frames identified as - * interlaced. The default is `false`. - * - * Generated from protobuf field bool deinterlace_all_frames = 3; - */ - protected $deinterlace_all_frames = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $mode - * Specifies the deinterlacing mode to adopt. - * The default is `send_frame`. - * Supported values: - * - `send_frame`: Output one frame for each frame - * - `send_field`: Output one frame for each field - * @type string $parity - * The picture field parity assumed for the input interlaced video. - * The default is `auto`. - * Supported values: - * - `tff`: Assume the top field is first - * - `bff`: Assume the bottom field is first - * - `auto`: Enable automatic detection of field parity - * @type bool $deinterlace_all_frames - * Deinterlace all frames rather than just the frames identified as - * interlaced. The default is `false`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Specifies the deinterlacing mode to adopt. - * The default is `send_frame`. - * Supported values: - * - `send_frame`: Output one frame for each frame - * - `send_field`: Output one frame for each field - * - * Generated from protobuf field string mode = 1; - * @return string - */ - public function getMode() - { - return $this->mode; - } - - /** - * Specifies the deinterlacing mode to adopt. - * The default is `send_frame`. - * Supported values: - * - `send_frame`: Output one frame for each frame - * - `send_field`: Output one frame for each field - * - * Generated from protobuf field string mode = 1; - * @param string $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkString($var, True); - $this->mode = $var; - - return $this; - } - - /** - * The picture field parity assumed for the input interlaced video. - * The default is `auto`. - * Supported values: - * - `tff`: Assume the top field is first - * - `bff`: Assume the bottom field is first - * - `auto`: Enable automatic detection of field parity - * - * Generated from protobuf field string parity = 2; - * @return string - */ - public function getParity() - { - return $this->parity; - } - - /** - * The picture field parity assumed for the input interlaced video. - * The default is `auto`. - * Supported values: - * - `tff`: Assume the top field is first - * - `bff`: Assume the bottom field is first - * - `auto`: Enable automatic detection of field parity - * - * Generated from protobuf field string parity = 2; - * @param string $var - * @return $this - */ - public function setParity($var) - { - GPBUtil::checkString($var, True); - $this->parity = $var; - - return $this; - } - - /** - * Deinterlace all frames rather than just the frames identified as - * interlaced. The default is `false`. - * - * Generated from protobuf field bool deinterlace_all_frames = 3; - * @return bool - */ - public function getDeinterlaceAllFrames() - { - return $this->deinterlace_all_frames; - } - - /** - * Deinterlace all frames rather than just the frames identified as - * interlaced. The default is `false`. - * - * Generated from protobuf field bool deinterlace_all_frames = 3; - * @param bool $var - * @return $this - */ - public function setDeinterlaceAllFrames($var) - { - GPBUtil::checkBool($var); - $this->deinterlace_all_frames = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BwdifConfig::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Deinterlace_BwdifConfig::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/YadifConfig.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/YadifConfig.php deleted file mode 100644 index 48e8862bebbb..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/YadifConfig.php +++ /dev/null @@ -1,216 +0,0 @@ -google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.YadifConfig - */ -class YadifConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies the deinterlacing mode to adopt. - * The default is `send_frame`. - * Supported values: - * - `send_frame`: Output one frame for each frame - * - `send_field`: Output one frame for each field - * - * Generated from protobuf field string mode = 1; - */ - protected $mode = ''; - /** - * Disable spacial interlacing. - * The default is `false`. - * - * Generated from protobuf field bool disable_spatial_interlacing = 2; - */ - protected $disable_spatial_interlacing = false; - /** - * The picture field parity assumed for the input interlaced video. - * The default is `auto`. - * Supported values: - * - `tff`: Assume the top field is first - * - `bff`: Assume the bottom field is first - * - `auto`: Enable automatic detection of field parity - * - * Generated from protobuf field string parity = 3; - */ - protected $parity = ''; - /** - * Deinterlace all frames rather than just the frames identified as - * interlaced. The default is `false`. - * - * Generated from protobuf field bool deinterlace_all_frames = 4; - */ - protected $deinterlace_all_frames = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $mode - * Specifies the deinterlacing mode to adopt. - * The default is `send_frame`. - * Supported values: - * - `send_frame`: Output one frame for each frame - * - `send_field`: Output one frame for each field - * @type bool $disable_spatial_interlacing - * Disable spacial interlacing. - * The default is `false`. - * @type string $parity - * The picture field parity assumed for the input interlaced video. - * The default is `auto`. - * Supported values: - * - `tff`: Assume the top field is first - * - `bff`: Assume the bottom field is first - * - `auto`: Enable automatic detection of field parity - * @type bool $deinterlace_all_frames - * Deinterlace all frames rather than just the frames identified as - * interlaced. The default is `false`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Specifies the deinterlacing mode to adopt. - * The default is `send_frame`. - * Supported values: - * - `send_frame`: Output one frame for each frame - * - `send_field`: Output one frame for each field - * - * Generated from protobuf field string mode = 1; - * @return string - */ - public function getMode() - { - return $this->mode; - } - - /** - * Specifies the deinterlacing mode to adopt. - * The default is `send_frame`. - * Supported values: - * - `send_frame`: Output one frame for each frame - * - `send_field`: Output one frame for each field - * - * Generated from protobuf field string mode = 1; - * @param string $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkString($var, True); - $this->mode = $var; - - return $this; - } - - /** - * Disable spacial interlacing. - * The default is `false`. - * - * Generated from protobuf field bool disable_spatial_interlacing = 2; - * @return bool - */ - public function getDisableSpatialInterlacing() - { - return $this->disable_spatial_interlacing; - } - - /** - * Disable spacial interlacing. - * The default is `false`. - * - * Generated from protobuf field bool disable_spatial_interlacing = 2; - * @param bool $var - * @return $this - */ - public function setDisableSpatialInterlacing($var) - { - GPBUtil::checkBool($var); - $this->disable_spatial_interlacing = $var; - - return $this; - } - - /** - * The picture field parity assumed for the input interlaced video. - * The default is `auto`. - * Supported values: - * - `tff`: Assume the top field is first - * - `bff`: Assume the bottom field is first - * - `auto`: Enable automatic detection of field parity - * - * Generated from protobuf field string parity = 3; - * @return string - */ - public function getParity() - { - return $this->parity; - } - - /** - * The picture field parity assumed for the input interlaced video. - * The default is `auto`. - * Supported values: - * - `tff`: Assume the top field is first - * - `bff`: Assume the bottom field is first - * - `auto`: Enable automatic detection of field parity - * - * Generated from protobuf field string parity = 3; - * @param string $var - * @return $this - */ - public function setParity($var) - { - GPBUtil::checkString($var, True); - $this->parity = $var; - - return $this; - } - - /** - * Deinterlace all frames rather than just the frames identified as - * interlaced. The default is `false`. - * - * Generated from protobuf field bool deinterlace_all_frames = 4; - * @return bool - */ - public function getDeinterlaceAllFrames() - { - return $this->deinterlace_all_frames; - } - - /** - * Deinterlace all frames rather than just the frames identified as - * interlaced. The default is `false`. - * - * Generated from protobuf field bool deinterlace_all_frames = 4; - * @param bool $var - * @return $this - */ - public function setDeinterlaceAllFrames($var) - { - GPBUtil::checkBool($var); - $this->deinterlace_all_frames = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(YadifConfig::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Deinterlace_YadifConfig::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Denoise.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Denoise.php deleted file mode 100644 index 8b261dd4c493..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Denoise.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise - */ -class Denoise extends \Google\Protobuf\Internal\Message -{ - /** - * Set strength of the denoise. Enter a value between 0 and 1. The higher - * the value, the smoother the image. 0 is no denoising. The default is 0. - * - * Generated from protobuf field double strength = 1; - */ - protected $strength = 0.0; - /** - * Set the denoiser mode. The default is `standard`. - * Supported denoiser modes: - * - `standard` - * - `grain` - * - * Generated from protobuf field string tune = 2; - */ - protected $tune = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $strength - * Set strength of the denoise. Enter a value between 0 and 1. The higher - * the value, the smoother the image. 0 is no denoising. The default is 0. - * @type string $tune - * Set the denoiser mode. The default is `standard`. - * Supported denoiser modes: - * - `standard` - * - `grain` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Set strength of the denoise. Enter a value between 0 and 1. The higher - * the value, the smoother the image. 0 is no denoising. The default is 0. - * - * Generated from protobuf field double strength = 1; - * @return float - */ - public function getStrength() - { - return $this->strength; - } - - /** - * Set strength of the denoise. Enter a value between 0 and 1. The higher - * the value, the smoother the image. 0 is no denoising. The default is 0. - * - * Generated from protobuf field double strength = 1; - * @param float $var - * @return $this - */ - public function setStrength($var) - { - GPBUtil::checkDouble($var); - $this->strength = $var; - - return $this; - } - - /** - * Set the denoiser mode. The default is `standard`. - * Supported denoiser modes: - * - `standard` - * - `grain` - * - * Generated from protobuf field string tune = 2; - * @return string - */ - public function getTune() - { - return $this->tune; - } - - /** - * Set the denoiser mode. The default is `standard`. - * Supported denoiser modes: - * - `standard` - * - `grain` - * - * Generated from protobuf field string tune = 2; - * @param string $var - * @return $this - */ - public function setTune($var) - { - GPBUtil::checkString($var, True); - $this->tune = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Denoise::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Denoise::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Pad.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Pad.php deleted file mode 100644 index 04d702ce9f94..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Pad.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.video.transcoder.v1.PreprocessingConfig.Pad - */ -class Pad extends \Google\Protobuf\Internal\Message -{ - /** - * The number of pixels to add to the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - */ - protected $top_pixels = 0; - /** - * The number of pixels to add to the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - */ - protected $bottom_pixels = 0; - /** - * The number of pixels to add to the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - */ - protected $left_pixels = 0; - /** - * The number of pixels to add to the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - */ - protected $right_pixels = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $top_pixels - * The number of pixels to add to the top. The default is 0. - * @type int $bottom_pixels - * The number of pixels to add to the bottom. The default is 0. - * @type int $left_pixels - * The number of pixels to add to the left. The default is 0. - * @type int $right_pixels - * The number of pixels to add to the right. The default is 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The number of pixels to add to the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - * @return int - */ - public function getTopPixels() - { - return $this->top_pixels; - } - - /** - * The number of pixels to add to the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - * @param int $var - * @return $this - */ - public function setTopPixels($var) - { - GPBUtil::checkInt32($var); - $this->top_pixels = $var; - - return $this; - } - - /** - * The number of pixels to add to the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - * @return int - */ - public function getBottomPixels() - { - return $this->bottom_pixels; - } - - /** - * The number of pixels to add to the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - * @param int $var - * @return $this - */ - public function setBottomPixels($var) - { - GPBUtil::checkInt32($var); - $this->bottom_pixels = $var; - - return $this; - } - - /** - * The number of pixels to add to the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - * @return int - */ - public function getLeftPixels() - { - return $this->left_pixels; - } - - /** - * The number of pixels to add to the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - * @param int $var - * @return $this - */ - public function setLeftPixels($var) - { - GPBUtil::checkInt32($var); - $this->left_pixels = $var; - - return $this; - } - - /** - * The number of pixels to add to the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - * @return int - */ - public function getRightPixels() - { - return $this->right_pixels; - } - - /** - * The number of pixels to add to the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - * @param int $var - * @return $this - */ - public function setRightPixels($var) - { - GPBUtil::checkInt32($var); - $this->right_pixels = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Pad::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Pad::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PubsubDestination.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PubsubDestination.php deleted file mode 100644 index 554c0dbf0125..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PubsubDestination.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.video.transcoder.v1.PubsubDestination - */ -class PubsubDestination extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the Pub/Sub topic to publish job completion notification - * to. For example: `projects/{project}/topics/{topic}`. - * - * Generated from protobuf field string topic = 1; - */ - protected $topic = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $topic - * The name of the Pub/Sub topic to publish job completion notification - * to. For example: `projects/{project}/topics/{topic}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The name of the Pub/Sub topic to publish job completion notification - * to. For example: `projects/{project}/topics/{topic}`. - * - * Generated from protobuf field string topic = 1; - * @return string - */ - public function getTopic() - { - return $this->topic; - } - - /** - * The name of the Pub/Sub topic to publish job completion notification - * to. For example: `projects/{project}/topics/{topic}`. - * - * Generated from protobuf field string topic = 1; - * @param string $var - * @return $this - */ - public function setTopic($var) - { - GPBUtil::checkString($var, True); - $this->topic = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SegmentSettings.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SegmentSettings.php deleted file mode 100644 index 9b21c31ca421..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SegmentSettings.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.video.transcoder.v1.SegmentSettings - */ -class SegmentSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Duration of the segments in seconds. The default is `6.0s`. Note that - * `segmentDuration` must be greater than or equal to - * [`gopDuration`](#videostream), and `segmentDuration` must be divisible by - * [`gopDuration`](#videostream). - * - * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; - */ - protected $segment_duration = null; - /** - * Required. Create an individual segment file. The default is `false`. - * - * Generated from protobuf field bool individual_segments = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $individual_segments = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $segment_duration - * Duration of the segments in seconds. The default is `6.0s`. Note that - * `segmentDuration` must be greater than or equal to - * [`gopDuration`](#videostream), and `segmentDuration` must be divisible by - * [`gopDuration`](#videostream). - * @type bool $individual_segments - * Required. Create an individual segment file. The default is `false`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Duration of the segments in seconds. The default is `6.0s`. Note that - * `segmentDuration` must be greater than or equal to - * [`gopDuration`](#videostream), and `segmentDuration` must be divisible by - * [`gopDuration`](#videostream). - * - * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getSegmentDuration() - { - return $this->segment_duration; - } - - public function hasSegmentDuration() - { - return isset($this->segment_duration); - } - - public function clearSegmentDuration() - { - unset($this->segment_duration); - } - - /** - * Duration of the segments in seconds. The default is `6.0s`. Note that - * `segmentDuration` must be greater than or equal to - * [`gopDuration`](#videostream), and `segmentDuration` must be divisible by - * [`gopDuration`](#videostream). - * - * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setSegmentDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->segment_duration = $var; - - return $this; - } - - /** - * Required. Create an individual segment file. The default is `false`. - * - * Generated from protobuf field bool individual_segments = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return bool - */ - public function getIndividualSegments() - { - return $this->individual_segments; - } - - /** - * Required. Create an individual segment file. The default is `false`. - * - * Generated from protobuf field bool individual_segments = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param bool $var - * @return $this - */ - public function setIndividualSegments($var) - { - GPBUtil::checkBool($var); - $this->individual_segments = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SpriteSheet.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SpriteSheet.php deleted file mode 100644 index b0b6c8cfeeca..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SpriteSheet.php +++ /dev/null @@ -1,575 +0,0 @@ -google.cloud.video.transcoder.v1.SpriteSheet - */ -class SpriteSheet extends \Google\Protobuf\Internal\Message -{ - /** - * Format type. The default is `jpeg`. - * Supported formats: - * - `jpeg` - * - * Generated from protobuf field string format = 1; - */ - protected $format = ''; - /** - * Required. File name prefix for the generated sprite sheets. - * Each sprite sheet has an incremental 10-digit zero-padded suffix starting - * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. - * - * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $file_prefix = ''; - /** - * Required. The width of sprite in pixels. Must be an even integer. To - * preserve the source aspect ratio, set the - * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] - * field or the - * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] - * field, but not both (the API will automatically calculate the missing - * field). - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $sprite_width_pixels = 0; - /** - * Required. The height of sprite in pixels. Must be an even integer. To - * preserve the source aspect ratio, set the - * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] - * field or the - * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] - * field, but not both (the API will automatically calculate the missing - * field). - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $sprite_height_pixels = 0; - /** - * The maximum number of sprites per row in a sprite sheet. The default is 0, - * which indicates no maximum limit. - * - * Generated from protobuf field int32 column_count = 5; - */ - protected $column_count = 0; - /** - * The maximum number of rows per sprite sheet. When the sprite sheet is full, - * a new sprite sheet is created. The default is 0, which indicates no maximum - * limit. - * - * Generated from protobuf field int32 row_count = 6; - */ - protected $row_count = 0; - /** - * Start time in seconds, relative to the output file timeline. Determines the - * first sprite to pick. The default is `0s`. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 7; - */ - protected $start_time_offset = null; - /** - * End time in seconds, relative to the output file timeline. When - * `end_time_offset` is not specified, the sprites are generated until the end - * of the output file. - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 8; - */ - protected $end_time_offset = null; - /** - * The quality of the generated sprite sheet. Enter a value between 1 - * and 100, where 1 is the lowest quality and 100 is the highest quality. - * The default is 100. A high quality value corresponds to a low image data - * compression ratio. - * - * Generated from protobuf field int32 quality = 11; - */ - protected $quality = 0; - protected $extraction_strategy; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $format - * Format type. The default is `jpeg`. - * Supported formats: - * - `jpeg` - * @type string $file_prefix - * Required. File name prefix for the generated sprite sheets. - * Each sprite sheet has an incremental 10-digit zero-padded suffix starting - * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. - * @type int $sprite_width_pixels - * Required. The width of sprite in pixels. Must be an even integer. To - * preserve the source aspect ratio, set the - * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] - * field or the - * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] - * field, but not both (the API will automatically calculate the missing - * field). - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * @type int $sprite_height_pixels - * Required. The height of sprite in pixels. Must be an even integer. To - * preserve the source aspect ratio, set the - * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] - * field or the - * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] - * field, but not both (the API will automatically calculate the missing - * field). - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * @type int $column_count - * The maximum number of sprites per row in a sprite sheet. The default is 0, - * which indicates no maximum limit. - * @type int $row_count - * The maximum number of rows per sprite sheet. When the sprite sheet is full, - * a new sprite sheet is created. The default is 0, which indicates no maximum - * limit. - * @type \Google\Protobuf\Duration $start_time_offset - * Start time in seconds, relative to the output file timeline. Determines the - * first sprite to pick. The default is `0s`. - * @type \Google\Protobuf\Duration $end_time_offset - * End time in seconds, relative to the output file timeline. When - * `end_time_offset` is not specified, the sprites are generated until the end - * of the output file. - * @type int $total_count - * Total number of sprites. Create the specified number of sprites - * distributed evenly across the timeline of the output media. The default - * is 100. - * @type \Google\Protobuf\Duration $interval - * Starting from `0s`, create sprites at regular intervals. Specify the - * interval value in seconds. - * @type int $quality - * The quality of the generated sprite sheet. Enter a value between 1 - * and 100, where 1 is the lowest quality and 100 is the highest quality. - * The default is 100. A high quality value corresponds to a low image data - * compression ratio. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Format type. The default is `jpeg`. - * Supported formats: - * - `jpeg` - * - * Generated from protobuf field string format = 1; - * @return string - */ - public function getFormat() - { - return $this->format; - } - - /** - * Format type. The default is `jpeg`. - * Supported formats: - * - `jpeg` - * - * Generated from protobuf field string format = 1; - * @param string $var - * @return $this - */ - public function setFormat($var) - { - GPBUtil::checkString($var, True); - $this->format = $var; - - return $this; - } - - /** - * Required. File name prefix for the generated sprite sheets. - * Each sprite sheet has an incremental 10-digit zero-padded suffix starting - * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. - * - * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFilePrefix() - { - return $this->file_prefix; - } - - /** - * Required. File name prefix for the generated sprite sheets. - * Each sprite sheet has an incremental 10-digit zero-padded suffix starting - * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. - * - * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFilePrefix($var) - { - GPBUtil::checkString($var, True); - $this->file_prefix = $var; - - return $this; - } - - /** - * Required. The width of sprite in pixels. Must be an even integer. To - * preserve the source aspect ratio, set the - * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] - * field or the - * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] - * field, but not both (the API will automatically calculate the missing - * field). - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getSpriteWidthPixels() - { - return $this->sprite_width_pixels; - } - - /** - * Required. The width of sprite in pixels. Must be an even integer. To - * preserve the source aspect ratio, set the - * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] - * field or the - * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] - * field, but not both (the API will automatically calculate the missing - * field). - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setSpriteWidthPixels($var) - { - GPBUtil::checkInt32($var); - $this->sprite_width_pixels = $var; - - return $this; - } - - /** - * Required. The height of sprite in pixels. Must be an even integer. To - * preserve the source aspect ratio, set the - * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] - * field or the - * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] - * field, but not both (the API will automatically calculate the missing - * field). - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getSpriteHeightPixels() - { - return $this->sprite_height_pixels; - } - - /** - * Required. The height of sprite in pixels. Must be an even integer. To - * preserve the source aspect ratio, set the - * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] - * field or the - * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] - * field, but not both (the API will automatically calculate the missing - * field). - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setSpriteHeightPixels($var) - { - GPBUtil::checkInt32($var); - $this->sprite_height_pixels = $var; - - return $this; - } - - /** - * The maximum number of sprites per row in a sprite sheet. The default is 0, - * which indicates no maximum limit. - * - * Generated from protobuf field int32 column_count = 5; - * @return int - */ - public function getColumnCount() - { - return $this->column_count; - } - - /** - * The maximum number of sprites per row in a sprite sheet. The default is 0, - * which indicates no maximum limit. - * - * Generated from protobuf field int32 column_count = 5; - * @param int $var - * @return $this - */ - public function setColumnCount($var) - { - GPBUtil::checkInt32($var); - $this->column_count = $var; - - return $this; - } - - /** - * The maximum number of rows per sprite sheet. When the sprite sheet is full, - * a new sprite sheet is created. The default is 0, which indicates no maximum - * limit. - * - * Generated from protobuf field int32 row_count = 6; - * @return int - */ - public function getRowCount() - { - return $this->row_count; - } - - /** - * The maximum number of rows per sprite sheet. When the sprite sheet is full, - * a new sprite sheet is created. The default is 0, which indicates no maximum - * limit. - * - * Generated from protobuf field int32 row_count = 6; - * @param int $var - * @return $this - */ - public function setRowCount($var) - { - GPBUtil::checkInt32($var); - $this->row_count = $var; - - return $this; - } - - /** - * Start time in seconds, relative to the output file timeline. Determines the - * first sprite to pick. The default is `0s`. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getStartTimeOffset() - { - return $this->start_time_offset; - } - - public function hasStartTimeOffset() - { - return isset($this->start_time_offset); - } - - public function clearStartTimeOffset() - { - unset($this->start_time_offset); - } - - /** - * Start time in seconds, relative to the output file timeline. Determines the - * first sprite to pick. The default is `0s`. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setStartTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->start_time_offset = $var; - - return $this; - } - - /** - * End time in seconds, relative to the output file timeline. When - * `end_time_offset` is not specified, the sprites are generated until the end - * of the output file. - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 8; - * @return \Google\Protobuf\Duration|null - */ - public function getEndTimeOffset() - { - return $this->end_time_offset; - } - - public function hasEndTimeOffset() - { - return isset($this->end_time_offset); - } - - public function clearEndTimeOffset() - { - unset($this->end_time_offset); - } - - /** - * End time in seconds, relative to the output file timeline. When - * `end_time_offset` is not specified, the sprites are generated until the end - * of the output file. - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 8; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setEndTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->end_time_offset = $var; - - return $this; - } - - /** - * Total number of sprites. Create the specified number of sprites - * distributed evenly across the timeline of the output media. The default - * is 100. - * - * Generated from protobuf field int32 total_count = 9; - * @return int - */ - public function getTotalCount() - { - return $this->readOneof(9); - } - - public function hasTotalCount() - { - return $this->hasOneof(9); - } - - /** - * Total number of sprites. Create the specified number of sprites - * distributed evenly across the timeline of the output media. The default - * is 100. - * - * Generated from protobuf field int32 total_count = 9; - * @param int $var - * @return $this - */ - public function setTotalCount($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Starting from `0s`, create sprites at regular intervals. Specify the - * interval value in seconds. - * - * Generated from protobuf field .google.protobuf.Duration interval = 10; - * @return \Google\Protobuf\Duration|null - */ - public function getInterval() - { - return $this->readOneof(10); - } - - public function hasInterval() - { - return $this->hasOneof(10); - } - - /** - * Starting from `0s`, create sprites at regular intervals. Specify the - * interval value in seconds. - * - * Generated from protobuf field .google.protobuf.Duration interval = 10; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setInterval($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * The quality of the generated sprite sheet. Enter a value between 1 - * and 100, where 1 is the lowest quality and 100 is the highest quality. - * The default is 100. A high quality value corresponds to a low image data - * compression ratio. - * - * Generated from protobuf field int32 quality = 11; - * @return int - */ - public function getQuality() - { - return $this->quality; - } - - /** - * The quality of the generated sprite sheet. Enter a value between 1 - * and 100, where 1 is the lowest quality and 100 is the highest quality. - * The default is 100. A high quality value corresponds to a low image data - * compression ratio. - * - * Generated from protobuf field int32 quality = 11; - * @param int $var - * @return $this - */ - public function setQuality($var) - { - GPBUtil::checkInt32($var); - $this->quality = $var; - - return $this; - } - - /** - * @return string - */ - public function getExtractionStrategy() - { - return $this->whichOneof("extraction_strategy"); - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream.php deleted file mode 100644 index e7f56aa9a086..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream.php +++ /dev/null @@ -1,209 +0,0 @@ -google.cloud.video.transcoder.v1.TextStream - */ -class TextStream extends \Google\Protobuf\Internal\Message -{ - /** - * The codec for this text stream. The default is `webvtt`. - * Supported text codecs: - * - `srt` - * - `ttml` - * - `cea608` - * - `cea708` - * - `webvtt` - * - * Generated from protobuf field string codec = 1; - */ - protected $codec = ''; - /** - * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more - * information, see - * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not - * supported in MP4 files. - * - * Generated from protobuf field string language_code = 2; - */ - protected $language_code = ''; - /** - * The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.TextStream.TextMapping mapping = 3; - */ - private $mapping; - /** - * The name for this particular text stream that - * will be added to the HLS/DASH manifest. Not supported in MP4 files. - * - * Generated from protobuf field string display_name = 4; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $codec - * The codec for this text stream. The default is `webvtt`. - * Supported text codecs: - * - `srt` - * - `ttml` - * - `cea608` - * - `cea708` - * - `webvtt` - * @type string $language_code - * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more - * information, see - * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not - * supported in MP4 files. - * @type array<\Google\Cloud\Video\Transcoder\V1\TextStream\TextMapping>|\Google\Protobuf\Internal\RepeatedField $mapping - * The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. - * @type string $display_name - * The name for this particular text stream that - * will be added to the HLS/DASH manifest. Not supported in MP4 files. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The codec for this text stream. The default is `webvtt`. - * Supported text codecs: - * - `srt` - * - `ttml` - * - `cea608` - * - `cea708` - * - `webvtt` - * - * Generated from protobuf field string codec = 1; - * @return string - */ - public function getCodec() - { - return $this->codec; - } - - /** - * The codec for this text stream. The default is `webvtt`. - * Supported text codecs: - * - `srt` - * - `ttml` - * - `cea608` - * - `cea708` - * - `webvtt` - * - * Generated from protobuf field string codec = 1; - * @param string $var - * @return $this - */ - public function setCodec($var) - { - GPBUtil::checkString($var, True); - $this->codec = $var; - - return $this; - } - - /** - * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more - * information, see - * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not - * supported in MP4 files. - * - * Generated from protobuf field string language_code = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more - * information, see - * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not - * supported in MP4 files. - * - * Generated from protobuf field string language_code = 2; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.TextStream.TextMapping mapping = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMapping() - { - return $this->mapping; - } - - /** - * The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.TextStream.TextMapping mapping = 3; - * @param array<\Google\Cloud\Video\Transcoder\V1\TextStream\TextMapping>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMapping($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\TextStream\TextMapping::class); - $this->mapping = $arr; - - return $this; - } - - /** - * The name for this particular text stream that - * will be added to the HLS/DASH manifest. Not supported in MP4 files. - * - * Generated from protobuf field string display_name = 4; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The name for this particular text stream that - * will be added to the HLS/DASH manifest. Not supported in MP4 files. - * - * Generated from protobuf field string display_name = 4; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream/TextMapping.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream/TextMapping.php deleted file mode 100644 index c8404457843c..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream/TextMapping.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.video.transcoder.v1.TextStream.TextMapping - */ -class TextMapping extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `EditAtom.key` that references atom with text inputs in the - * `Job.edit_list`. - * - * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $atom_key = ''; - /** - * Required. The `Input.key` that identifies the input file. - * - * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_key = ''; - /** - * Required. The zero-based index of the track in the input file. - * - * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_track = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $atom_key - * Required. The `EditAtom.key` that references atom with text inputs in the - * `Job.edit_list`. - * @type string $input_key - * Required. The `Input.key` that identifies the input file. - * @type int $input_track - * Required. The zero-based index of the track in the input file. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `EditAtom.key` that references atom with text inputs in the - * `Job.edit_list`. - * - * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAtomKey() - { - return $this->atom_key; - } - - /** - * Required. The `EditAtom.key` that references atom with text inputs in the - * `Job.edit_list`. - * - * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAtomKey($var) - { - GPBUtil::checkString($var, True); - $this->atom_key = $var; - - return $this; - } - - /** - * Required. The `Input.key` that identifies the input file. - * - * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInputKey() - { - return $this->input_key; - } - - /** - * Required. The `Input.key` that identifies the input file. - * - * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInputKey($var) - { - GPBUtil::checkString($var, True); - $this->input_key = $var; - - return $this; - } - - /** - * Required. The zero-based index of the track in the input file. - * - * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getInputTrack() - { - return $this->input_track; - } - - /** - * Required. The zero-based index of the track in the input file. - * - * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setInputTrack($var) - { - GPBUtil::checkInt32($var); - $this->input_track = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TextMapping::class, \Google\Cloud\Video\Transcoder\V1\TextStream_TextMapping::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TranscoderServiceGrpcClient.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TranscoderServiceGrpcClient.php deleted file mode 100644 index 4d596419e3fd..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TranscoderServiceGrpcClient.php +++ /dev/null @@ -1,160 +0,0 @@ -_simpleRequest('/google.cloud.video.transcoder.v1.TranscoderService/CreateJob', - $argument, - ['\Google\Cloud\Video\Transcoder\V1\Job', 'decode'], - $metadata, $options); - } - - /** - * Lists jobs in the specified region. - * @param \Google\Cloud\Video\Transcoder\V1\ListJobsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListJobs(\Google\Cloud\Video\Transcoder\V1\ListJobsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.transcoder.v1.TranscoderService/ListJobs', - $argument, - ['\Google\Cloud\Video\Transcoder\V1\ListJobsResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns the job data. - * @param \Google\Cloud\Video\Transcoder\V1\GetJobRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetJob(\Google\Cloud\Video\Transcoder\V1\GetJobRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.transcoder.v1.TranscoderService/GetJob', - $argument, - ['\Google\Cloud\Video\Transcoder\V1\Job', 'decode'], - $metadata, $options); - } - - /** - * Deletes a job. - * @param \Google\Cloud\Video\Transcoder\V1\DeleteJobRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteJob(\Google\Cloud\Video\Transcoder\V1\DeleteJobRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.transcoder.v1.TranscoderService/DeleteJob', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Creates a job template in the specified region. - * @param \Google\Cloud\Video\Transcoder\V1\CreateJobTemplateRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateJobTemplate(\Google\Cloud\Video\Transcoder\V1\CreateJobTemplateRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.transcoder.v1.TranscoderService/CreateJobTemplate', - $argument, - ['\Google\Cloud\Video\Transcoder\V1\JobTemplate', 'decode'], - $metadata, $options); - } - - /** - * Lists job templates in the specified region. - * @param \Google\Cloud\Video\Transcoder\V1\ListJobTemplatesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListJobTemplates(\Google\Cloud\Video\Transcoder\V1\ListJobTemplatesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.transcoder.v1.TranscoderService/ListJobTemplates', - $argument, - ['\Google\Cloud\Video\Transcoder\V1\ListJobTemplatesResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns the job template data. - * @param \Google\Cloud\Video\Transcoder\V1\GetJobTemplateRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetJobTemplate(\Google\Cloud\Video\Transcoder\V1\GetJobTemplateRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.transcoder.v1.TranscoderService/GetJobTemplate', - $argument, - ['\Google\Cloud\Video\Transcoder\V1\JobTemplate', 'decode'], - $metadata, $options); - } - - /** - * Deletes a job template. - * @param \Google\Cloud\Video\Transcoder\V1\DeleteJobTemplateRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteJobTemplate(\Google\Cloud\Video\Transcoder\V1\DeleteJobTemplateRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.video.transcoder.v1.TranscoderService/DeleteJobTemplate', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream.php deleted file mode 100644 index d3374d958e63..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.video.transcoder.v1.VideoStream - */ -class VideoStream extends \Google\Protobuf\Internal\Message -{ - protected $codec_settings; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Transcoder\V1\VideoStream\H264CodecSettings $h264 - * H264 codec settings. - * @type \Google\Cloud\Video\Transcoder\V1\VideoStream\H265CodecSettings $h265 - * H265 codec settings. - * @type \Google\Cloud\Video\Transcoder\V1\VideoStream\Vp9CodecSettings $vp9 - * VP9 codec settings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * H264 codec settings. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings h264 = 1; - * @return \Google\Cloud\Video\Transcoder\V1\VideoStream\H264CodecSettings|null - */ - public function getH264() - { - return $this->readOneof(1); - } - - public function hasH264() - { - return $this->hasOneof(1); - } - - /** - * H264 codec settings. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings h264 = 1; - * @param \Google\Cloud\Video\Transcoder\V1\VideoStream\H264CodecSettings $var - * @return $this - */ - public function setH264($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\VideoStream\H264CodecSettings::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * H265 codec settings. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings h265 = 2; - * @return \Google\Cloud\Video\Transcoder\V1\VideoStream\H265CodecSettings|null - */ - public function getH265() - { - return $this->readOneof(2); - } - - public function hasH265() - { - return $this->hasOneof(2); - } - - /** - * H265 codec settings. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings h265 = 2; - * @param \Google\Cloud\Video\Transcoder\V1\VideoStream\H265CodecSettings $var - * @return $this - */ - public function setH265($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\VideoStream\H265CodecSettings::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * VP9 codec settings. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings vp9 = 3; - * @return \Google\Cloud\Video\Transcoder\V1\VideoStream\Vp9CodecSettings|null - */ - public function getVp9() - { - return $this->readOneof(3); - } - - public function hasVp9() - { - return $this->hasOneof(3); - } - - /** - * VP9 codec settings. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings vp9 = 3; - * @param \Google\Cloud\Video\Transcoder\V1\VideoStream\Vp9CodecSettings $var - * @return $this - */ - public function setVp9($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\VideoStream\Vp9CodecSettings::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getCodecSettings() - { - return $this->whichOneof("codec_settings"); - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H264CodecSettings.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H264CodecSettings.php deleted file mode 100644 index 0474d647aed6..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H264CodecSettings.php +++ /dev/null @@ -1,994 +0,0 @@ -google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings - */ -class H264CodecSettings extends \Google\Protobuf\Internal\Message -{ - /** - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 width_pixels = 1; - */ - protected $width_pixels = 0; - /** - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 height_pixels = 2; - */ - protected $height_pixels = 0; - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $frame_rate = 0.0; - /** - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 800,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bitrate_bps = 0; - /** - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * - * Generated from protobuf field string pixel_format = 5; - */ - protected $pixel_format = ''; - /** - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * - `crf` - constant rate factor - * - * Generated from protobuf field string rate_control_mode = 6; - */ - protected $rate_control_mode = ''; - /** - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * - * Generated from protobuf field int32 crf_level = 7; - */ - protected $crf_level = 0; - /** - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * - * Generated from protobuf field bool allow_open_gop = 8; - */ - protected $allow_open_gop = false; - /** - * Use two-pass encoding strategy to achieve better video quality. - * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. - * - * Generated from protobuf field bool enable_two_pass = 11; - */ - protected $enable_two_pass = false; - /** - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to `VideoStream.bitrate_bps`. - * - * Generated from protobuf field int32 vbv_size_bits = 12; - */ - protected $vbv_size_bits = 0; - /** - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * `VideoStream.vbv_size_bits`. - * - * Generated from protobuf field int32 vbv_fullness_bits = 13; - */ - protected $vbv_fullness_bits = 0; - /** - * The entropy coder to use. The default is `cabac`. - * Supported entropy coders: - * - `cavlc` - * - `cabac` - * - * Generated from protobuf field string entropy_coder = 14; - */ - protected $entropy_coder = ''; - /** - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * - * Generated from protobuf field bool b_pyramid = 15; - */ - protected $b_pyramid = false; - /** - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than `VideoStream.gop_frame_count` if set. The default - * is 0. - * - * Generated from protobuf field int32 b_frame_count = 16; - */ - protected $b_frame_count = 0; - /** - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * - * Generated from protobuf field double aq_strength = 17; - */ - protected $aq_strength = 0.0; - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * `baseline` - * * `main` - * * `high` (default) - * The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * - * Generated from protobuf field string profile = 18; - */ - protected $profile = ''; - /** - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * - * Generated from protobuf field string tune = 19; - */ - protected $tune = ''; - /** - * Enforces the specified codec preset. The default is `veryfast`. The - * available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * - * Generated from protobuf field string preset = 20; - */ - protected $preset = ''; - protected $gop_mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $width_pixels - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * @type int $height_pixels - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * @type float $frame_rate - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * @type int $bitrate_bps - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 800,000,000. - * @type string $pixel_format - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * @type string $rate_control_mode - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * - `crf` - constant rate factor - * @type int $crf_level - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * @type bool $allow_open_gop - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * @type int $gop_frame_count - * Select the GOP size based on the specified frame count. Must be greater - * than zero. - * @type \Google\Protobuf\Duration $gop_duration - * Select the GOP size based on the specified duration. The default is - * `3s`. Note that `gopDuration` must be less than or equal to - * [`segmentDuration`](#SegmentSettings), and - * [`segmentDuration`](#SegmentSettings) must be divisible by - * `gopDuration`. - * @type bool $enable_two_pass - * Use two-pass encoding strategy to achieve better video quality. - * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. - * @type int $vbv_size_bits - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to `VideoStream.bitrate_bps`. - * @type int $vbv_fullness_bits - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * `VideoStream.vbv_size_bits`. - * @type string $entropy_coder - * The entropy coder to use. The default is `cabac`. - * Supported entropy coders: - * - `cavlc` - * - `cabac` - * @type bool $b_pyramid - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * @type int $b_frame_count - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than `VideoStream.gop_frame_count` if set. The default - * is 0. - * @type float $aq_strength - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * @type string $profile - * Enforces the specified codec profile. The following profiles are - * supported: - * * `baseline` - * * `main` - * * `high` (default) - * The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * @type string $tune - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * @type string $preset - * Enforces the specified codec preset. The default is `veryfast`. The - * available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 width_pixels = 1; - * @return int - */ - public function getWidthPixels() - { - return $this->width_pixels; - } - - /** - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 width_pixels = 1; - * @param int $var - * @return $this - */ - public function setWidthPixels($var) - { - GPBUtil::checkInt32($var); - $this->width_pixels = $var; - - return $this; - } - - /** - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 height_pixels = 2; - * @return int - */ - public function getHeightPixels() - { - return $this->height_pixels; - } - - /** - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 height_pixels = 2; - * @param int $var - * @return $this - */ - public function setHeightPixels($var) - { - GPBUtil::checkInt32($var); - $this->height_pixels = $var; - - return $this; - } - - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return float - */ - public function getFrameRate() - { - return $this->frame_rate; - } - - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param float $var - * @return $this - */ - public function setFrameRate($var) - { - GPBUtil::checkDouble($var); - $this->frame_rate = $var; - - return $this; - } - - /** - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 800,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getBitrateBps() - { - return $this->bitrate_bps; - } - - /** - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 800,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setBitrateBps($var) - { - GPBUtil::checkInt32($var); - $this->bitrate_bps = $var; - - return $this; - } - - /** - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * - * Generated from protobuf field string pixel_format = 5; - * @return string - */ - public function getPixelFormat() - { - return $this->pixel_format; - } - - /** - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * - * Generated from protobuf field string pixel_format = 5; - * @param string $var - * @return $this - */ - public function setPixelFormat($var) - { - GPBUtil::checkString($var, True); - $this->pixel_format = $var; - - return $this; - } - - /** - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * - `crf` - constant rate factor - * - * Generated from protobuf field string rate_control_mode = 6; - * @return string - */ - public function getRateControlMode() - { - return $this->rate_control_mode; - } - - /** - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * - `crf` - constant rate factor - * - * Generated from protobuf field string rate_control_mode = 6; - * @param string $var - * @return $this - */ - public function setRateControlMode($var) - { - GPBUtil::checkString($var, True); - $this->rate_control_mode = $var; - - return $this; - } - - /** - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * - * Generated from protobuf field int32 crf_level = 7; - * @return int - */ - public function getCrfLevel() - { - return $this->crf_level; - } - - /** - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * - * Generated from protobuf field int32 crf_level = 7; - * @param int $var - * @return $this - */ - public function setCrfLevel($var) - { - GPBUtil::checkInt32($var); - $this->crf_level = $var; - - return $this; - } - - /** - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * - * Generated from protobuf field bool allow_open_gop = 8; - * @return bool - */ - public function getAllowOpenGop() - { - return $this->allow_open_gop; - } - - /** - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * - * Generated from protobuf field bool allow_open_gop = 8; - * @param bool $var - * @return $this - */ - public function setAllowOpenGop($var) - { - GPBUtil::checkBool($var); - $this->allow_open_gop = $var; - - return $this; - } - - /** - * Select the GOP size based on the specified frame count. Must be greater - * than zero. - * - * Generated from protobuf field int32 gop_frame_count = 9; - * @return int - */ - public function getGopFrameCount() - { - return $this->readOneof(9); - } - - public function hasGopFrameCount() - { - return $this->hasOneof(9); - } - - /** - * Select the GOP size based on the specified frame count. Must be greater - * than zero. - * - * Generated from protobuf field int32 gop_frame_count = 9; - * @param int $var - * @return $this - */ - public function setGopFrameCount($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Select the GOP size based on the specified duration. The default is - * `3s`. Note that `gopDuration` must be less than or equal to - * [`segmentDuration`](#SegmentSettings), and - * [`segmentDuration`](#SegmentSettings) must be divisible by - * `gopDuration`. - * - * Generated from protobuf field .google.protobuf.Duration gop_duration = 10; - * @return \Google\Protobuf\Duration|null - */ - public function getGopDuration() - { - return $this->readOneof(10); - } - - public function hasGopDuration() - { - return $this->hasOneof(10); - } - - /** - * Select the GOP size based on the specified duration. The default is - * `3s`. Note that `gopDuration` must be less than or equal to - * [`segmentDuration`](#SegmentSettings), and - * [`segmentDuration`](#SegmentSettings) must be divisible by - * `gopDuration`. - * - * Generated from protobuf field .google.protobuf.Duration gop_duration = 10; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setGopDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Use two-pass encoding strategy to achieve better video quality. - * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. - * - * Generated from protobuf field bool enable_two_pass = 11; - * @return bool - */ - public function getEnableTwoPass() - { - return $this->enable_two_pass; - } - - /** - * Use two-pass encoding strategy to achieve better video quality. - * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. - * - * Generated from protobuf field bool enable_two_pass = 11; - * @param bool $var - * @return $this - */ - public function setEnableTwoPass($var) - { - GPBUtil::checkBool($var); - $this->enable_two_pass = $var; - - return $this; - } - - /** - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to `VideoStream.bitrate_bps`. - * - * Generated from protobuf field int32 vbv_size_bits = 12; - * @return int - */ - public function getVbvSizeBits() - { - return $this->vbv_size_bits; - } - - /** - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to `VideoStream.bitrate_bps`. - * - * Generated from protobuf field int32 vbv_size_bits = 12; - * @param int $var - * @return $this - */ - public function setVbvSizeBits($var) - { - GPBUtil::checkInt32($var); - $this->vbv_size_bits = $var; - - return $this; - } - - /** - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * `VideoStream.vbv_size_bits`. - * - * Generated from protobuf field int32 vbv_fullness_bits = 13; - * @return int - */ - public function getVbvFullnessBits() - { - return $this->vbv_fullness_bits; - } - - /** - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * `VideoStream.vbv_size_bits`. - * - * Generated from protobuf field int32 vbv_fullness_bits = 13; - * @param int $var - * @return $this - */ - public function setVbvFullnessBits($var) - { - GPBUtil::checkInt32($var); - $this->vbv_fullness_bits = $var; - - return $this; - } - - /** - * The entropy coder to use. The default is `cabac`. - * Supported entropy coders: - * - `cavlc` - * - `cabac` - * - * Generated from protobuf field string entropy_coder = 14; - * @return string - */ - public function getEntropyCoder() - { - return $this->entropy_coder; - } - - /** - * The entropy coder to use. The default is `cabac`. - * Supported entropy coders: - * - `cavlc` - * - `cabac` - * - * Generated from protobuf field string entropy_coder = 14; - * @param string $var - * @return $this - */ - public function setEntropyCoder($var) - { - GPBUtil::checkString($var, True); - $this->entropy_coder = $var; - - return $this; - } - - /** - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * - * Generated from protobuf field bool b_pyramid = 15; - * @return bool - */ - public function getBPyramid() - { - return $this->b_pyramid; - } - - /** - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * - * Generated from protobuf field bool b_pyramid = 15; - * @param bool $var - * @return $this - */ - public function setBPyramid($var) - { - GPBUtil::checkBool($var); - $this->b_pyramid = $var; - - return $this; - } - - /** - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than `VideoStream.gop_frame_count` if set. The default - * is 0. - * - * Generated from protobuf field int32 b_frame_count = 16; - * @return int - */ - public function getBFrameCount() - { - return $this->b_frame_count; - } - - /** - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than `VideoStream.gop_frame_count` if set. The default - * is 0. - * - * Generated from protobuf field int32 b_frame_count = 16; - * @param int $var - * @return $this - */ - public function setBFrameCount($var) - { - GPBUtil::checkInt32($var); - $this->b_frame_count = $var; - - return $this; - } - - /** - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * - * Generated from protobuf field double aq_strength = 17; - * @return float - */ - public function getAqStrength() - { - return $this->aq_strength; - } - - /** - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * - * Generated from protobuf field double aq_strength = 17; - * @param float $var - * @return $this - */ - public function setAqStrength($var) - { - GPBUtil::checkDouble($var); - $this->aq_strength = $var; - - return $this; - } - - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * `baseline` - * * `main` - * * `high` (default) - * The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * - * Generated from protobuf field string profile = 18; - * @return string - */ - public function getProfile() - { - return $this->profile; - } - - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * `baseline` - * * `main` - * * `high` (default) - * The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * - * Generated from protobuf field string profile = 18; - * @param string $var - * @return $this - */ - public function setProfile($var) - { - GPBUtil::checkString($var, True); - $this->profile = $var; - - return $this; - } - - /** - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * - * Generated from protobuf field string tune = 19; - * @return string - */ - public function getTune() - { - return $this->tune; - } - - /** - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * - * Generated from protobuf field string tune = 19; - * @param string $var - * @return $this - */ - public function setTune($var) - { - GPBUtil::checkString($var, True); - $this->tune = $var; - - return $this; - } - - /** - * Enforces the specified codec preset. The default is `veryfast`. The - * available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * - * Generated from protobuf field string preset = 20; - * @return string - */ - public function getPreset() - { - return $this->preset; - } - - /** - * Enforces the specified codec preset. The default is `veryfast`. The - * available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * - * Generated from protobuf field string preset = 20; - * @param string $var - * @return $this - */ - public function setPreset($var) - { - GPBUtil::checkString($var, True); - $this->preset = $var; - - return $this; - } - - /** - * @return string - */ - public function getGopMode() - { - return $this->whichOneof("gop_mode"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(H264CodecSettings::class, \Google\Cloud\Video\Transcoder\V1\VideoStream_H264CodecSettings::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H265CodecSettings.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H265CodecSettings.php deleted file mode 100644 index e19c5340e52e..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H265CodecSettings.php +++ /dev/null @@ -1,1008 +0,0 @@ -google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings - */ -class H265CodecSettings extends \Google\Protobuf\Internal\Message -{ - /** - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 width_pixels = 1; - */ - protected $width_pixels = 0; - /** - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 height_pixels = 2; - */ - protected $height_pixels = 0; - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $frame_rate = 0.0; - /** - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 800,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bitrate_bps = 0; - /** - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * - * Generated from protobuf field string pixel_format = 5; - */ - protected $pixel_format = ''; - /** - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * - `crf` - constant rate factor - * - * Generated from protobuf field string rate_control_mode = 6; - */ - protected $rate_control_mode = ''; - /** - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * - * Generated from protobuf field int32 crf_level = 7; - */ - protected $crf_level = 0; - /** - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * - * Generated from protobuf field bool allow_open_gop = 8; - */ - protected $allow_open_gop = false; - /** - * Use two-pass encoding strategy to achieve better video quality. - * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. - * - * Generated from protobuf field bool enable_two_pass = 11; - */ - protected $enable_two_pass = false; - /** - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to `VideoStream.bitrate_bps`. - * - * Generated from protobuf field int32 vbv_size_bits = 12; - */ - protected $vbv_size_bits = 0; - /** - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * `VideoStream.vbv_size_bits`. - * - * Generated from protobuf field int32 vbv_fullness_bits = 13; - */ - protected $vbv_fullness_bits = 0; - /** - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * - * Generated from protobuf field bool b_pyramid = 14; - */ - protected $b_pyramid = false; - /** - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than `VideoStream.gop_frame_count` if set. The default - * is 0. - * - * Generated from protobuf field int32 b_frame_count = 15; - */ - protected $b_frame_count = 0; - /** - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * - * Generated from protobuf field double aq_strength = 16; - */ - protected $aq_strength = 0.0; - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * 8-bit profiles - * * `main` (default) - * * `main-intra` - * * `mainstillpicture` - * * 10-bit profiles - * * `main10` (default) - * * `main10-intra` - * * `main422-10` - * * `main422-10-intra` - * * `main444-10` - * * `main444-10-intra` - * * 12-bit profiles - * * `main12` (default) - * * `main12-intra` - * * `main422-12` - * * `main422-12-intra` - * * `main444-12` - * * `main444-12-intra` - * The available options are - * [FFmpeg-compatible](https://x265.readthedocs.io/). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * - * Generated from protobuf field string profile = 17; - */ - protected $profile = ''; - /** - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * - * Generated from protobuf field string tune = 18; - */ - protected $tune = ''; - /** - * Enforces the specified codec preset. The default is `veryfast`. The - * available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * - * Generated from protobuf field string preset = 19; - */ - protected $preset = ''; - protected $gop_mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $width_pixels - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * @type int $height_pixels - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * @type float $frame_rate - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * @type int $bitrate_bps - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 800,000,000. - * @type string $pixel_format - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * @type string $rate_control_mode - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * - `crf` - constant rate factor - * @type int $crf_level - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * @type bool $allow_open_gop - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * @type int $gop_frame_count - * Select the GOP size based on the specified frame count. Must be greater - * than zero. - * @type \Google\Protobuf\Duration $gop_duration - * Select the GOP size based on the specified duration. The default is - * `3s`. Note that `gopDuration` must be less than or equal to - * [`segmentDuration`](#SegmentSettings), and - * [`segmentDuration`](#SegmentSettings) must be divisible by - * `gopDuration`. - * @type bool $enable_two_pass - * Use two-pass encoding strategy to achieve better video quality. - * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. - * @type int $vbv_size_bits - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to `VideoStream.bitrate_bps`. - * @type int $vbv_fullness_bits - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * `VideoStream.vbv_size_bits`. - * @type bool $b_pyramid - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * @type int $b_frame_count - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than `VideoStream.gop_frame_count` if set. The default - * is 0. - * @type float $aq_strength - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * @type string $profile - * Enforces the specified codec profile. The following profiles are - * supported: - * * 8-bit profiles - * * `main` (default) - * * `main-intra` - * * `mainstillpicture` - * * 10-bit profiles - * * `main10` (default) - * * `main10-intra` - * * `main422-10` - * * `main422-10-intra` - * * `main444-10` - * * `main444-10-intra` - * * 12-bit profiles - * * `main12` (default) - * * `main12-intra` - * * `main422-12` - * * `main422-12-intra` - * * `main444-12` - * * `main444-12-intra` - * The available options are - * [FFmpeg-compatible](https://x265.readthedocs.io/). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * @type string $tune - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * @type string $preset - * Enforces the specified codec preset. The default is `veryfast`. The - * available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 width_pixels = 1; - * @return int - */ - public function getWidthPixels() - { - return $this->width_pixels; - } - - /** - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 width_pixels = 1; - * @param int $var - * @return $this - */ - public function setWidthPixels($var) - { - GPBUtil::checkInt32($var); - $this->width_pixels = $var; - - return $this; - } - - /** - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 height_pixels = 2; - * @return int - */ - public function getHeightPixels() - { - return $this->height_pixels; - } - - /** - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 height_pixels = 2; - * @param int $var - * @return $this - */ - public function setHeightPixels($var) - { - GPBUtil::checkInt32($var); - $this->height_pixels = $var; - - return $this; - } - - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return float - */ - public function getFrameRate() - { - return $this->frame_rate; - } - - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param float $var - * @return $this - */ - public function setFrameRate($var) - { - GPBUtil::checkDouble($var); - $this->frame_rate = $var; - - return $this; - } - - /** - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 800,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getBitrateBps() - { - return $this->bitrate_bps; - } - - /** - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 800,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setBitrateBps($var) - { - GPBUtil::checkInt32($var); - $this->bitrate_bps = $var; - - return $this; - } - - /** - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * - * Generated from protobuf field string pixel_format = 5; - * @return string - */ - public function getPixelFormat() - { - return $this->pixel_format; - } - - /** - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * - * Generated from protobuf field string pixel_format = 5; - * @param string $var - * @return $this - */ - public function setPixelFormat($var) - { - GPBUtil::checkString($var, True); - $this->pixel_format = $var; - - return $this; - } - - /** - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * - `crf` - constant rate factor - * - * Generated from protobuf field string rate_control_mode = 6; - * @return string - */ - public function getRateControlMode() - { - return $this->rate_control_mode; - } - - /** - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * - `crf` - constant rate factor - * - * Generated from protobuf field string rate_control_mode = 6; - * @param string $var - * @return $this - */ - public function setRateControlMode($var) - { - GPBUtil::checkString($var, True); - $this->rate_control_mode = $var; - - return $this; - } - - /** - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * - * Generated from protobuf field int32 crf_level = 7; - * @return int - */ - public function getCrfLevel() - { - return $this->crf_level; - } - - /** - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * - * Generated from protobuf field int32 crf_level = 7; - * @param int $var - * @return $this - */ - public function setCrfLevel($var) - { - GPBUtil::checkInt32($var); - $this->crf_level = $var; - - return $this; - } - - /** - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * - * Generated from protobuf field bool allow_open_gop = 8; - * @return bool - */ - public function getAllowOpenGop() - { - return $this->allow_open_gop; - } - - /** - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * - * Generated from protobuf field bool allow_open_gop = 8; - * @param bool $var - * @return $this - */ - public function setAllowOpenGop($var) - { - GPBUtil::checkBool($var); - $this->allow_open_gop = $var; - - return $this; - } - - /** - * Select the GOP size based on the specified frame count. Must be greater - * than zero. - * - * Generated from protobuf field int32 gop_frame_count = 9; - * @return int - */ - public function getGopFrameCount() - { - return $this->readOneof(9); - } - - public function hasGopFrameCount() - { - return $this->hasOneof(9); - } - - /** - * Select the GOP size based on the specified frame count. Must be greater - * than zero. - * - * Generated from protobuf field int32 gop_frame_count = 9; - * @param int $var - * @return $this - */ - public function setGopFrameCount($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Select the GOP size based on the specified duration. The default is - * `3s`. Note that `gopDuration` must be less than or equal to - * [`segmentDuration`](#SegmentSettings), and - * [`segmentDuration`](#SegmentSettings) must be divisible by - * `gopDuration`. - * - * Generated from protobuf field .google.protobuf.Duration gop_duration = 10; - * @return \Google\Protobuf\Duration|null - */ - public function getGopDuration() - { - return $this->readOneof(10); - } - - public function hasGopDuration() - { - return $this->hasOneof(10); - } - - /** - * Select the GOP size based on the specified duration. The default is - * `3s`. Note that `gopDuration` must be less than or equal to - * [`segmentDuration`](#SegmentSettings), and - * [`segmentDuration`](#SegmentSettings) must be divisible by - * `gopDuration`. - * - * Generated from protobuf field .google.protobuf.Duration gop_duration = 10; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setGopDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Use two-pass encoding strategy to achieve better video quality. - * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. - * - * Generated from protobuf field bool enable_two_pass = 11; - * @return bool - */ - public function getEnableTwoPass() - { - return $this->enable_two_pass; - } - - /** - * Use two-pass encoding strategy to achieve better video quality. - * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. - * - * Generated from protobuf field bool enable_two_pass = 11; - * @param bool $var - * @return $this - */ - public function setEnableTwoPass($var) - { - GPBUtil::checkBool($var); - $this->enable_two_pass = $var; - - return $this; - } - - /** - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to `VideoStream.bitrate_bps`. - * - * Generated from protobuf field int32 vbv_size_bits = 12; - * @return int - */ - public function getVbvSizeBits() - { - return $this->vbv_size_bits; - } - - /** - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to `VideoStream.bitrate_bps`. - * - * Generated from protobuf field int32 vbv_size_bits = 12; - * @param int $var - * @return $this - */ - public function setVbvSizeBits($var) - { - GPBUtil::checkInt32($var); - $this->vbv_size_bits = $var; - - return $this; - } - - /** - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * `VideoStream.vbv_size_bits`. - * - * Generated from protobuf field int32 vbv_fullness_bits = 13; - * @return int - */ - public function getVbvFullnessBits() - { - return $this->vbv_fullness_bits; - } - - /** - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * `VideoStream.vbv_size_bits`. - * - * Generated from protobuf field int32 vbv_fullness_bits = 13; - * @param int $var - * @return $this - */ - public function setVbvFullnessBits($var) - { - GPBUtil::checkInt32($var); - $this->vbv_fullness_bits = $var; - - return $this; - } - - /** - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * - * Generated from protobuf field bool b_pyramid = 14; - * @return bool - */ - public function getBPyramid() - { - return $this->b_pyramid; - } - - /** - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * - * Generated from protobuf field bool b_pyramid = 14; - * @param bool $var - * @return $this - */ - public function setBPyramid($var) - { - GPBUtil::checkBool($var); - $this->b_pyramid = $var; - - return $this; - } - - /** - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than `VideoStream.gop_frame_count` if set. The default - * is 0. - * - * Generated from protobuf field int32 b_frame_count = 15; - * @return int - */ - public function getBFrameCount() - { - return $this->b_frame_count; - } - - /** - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than `VideoStream.gop_frame_count` if set. The default - * is 0. - * - * Generated from protobuf field int32 b_frame_count = 15; - * @param int $var - * @return $this - */ - public function setBFrameCount($var) - { - GPBUtil::checkInt32($var); - $this->b_frame_count = $var; - - return $this; - } - - /** - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * - * Generated from protobuf field double aq_strength = 16; - * @return float - */ - public function getAqStrength() - { - return $this->aq_strength; - } - - /** - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * - * Generated from protobuf field double aq_strength = 16; - * @param float $var - * @return $this - */ - public function setAqStrength($var) - { - GPBUtil::checkDouble($var); - $this->aq_strength = $var; - - return $this; - } - - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * 8-bit profiles - * * `main` (default) - * * `main-intra` - * * `mainstillpicture` - * * 10-bit profiles - * * `main10` (default) - * * `main10-intra` - * * `main422-10` - * * `main422-10-intra` - * * `main444-10` - * * `main444-10-intra` - * * 12-bit profiles - * * `main12` (default) - * * `main12-intra` - * * `main422-12` - * * `main422-12-intra` - * * `main444-12` - * * `main444-12-intra` - * The available options are - * [FFmpeg-compatible](https://x265.readthedocs.io/). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * - * Generated from protobuf field string profile = 17; - * @return string - */ - public function getProfile() - { - return $this->profile; - } - - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * 8-bit profiles - * * `main` (default) - * * `main-intra` - * * `mainstillpicture` - * * 10-bit profiles - * * `main10` (default) - * * `main10-intra` - * * `main422-10` - * * `main422-10-intra` - * * `main444-10` - * * `main444-10-intra` - * * 12-bit profiles - * * `main12` (default) - * * `main12-intra` - * * `main422-12` - * * `main422-12-intra` - * * `main444-12` - * * `main444-12-intra` - * The available options are - * [FFmpeg-compatible](https://x265.readthedocs.io/). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * - * Generated from protobuf field string profile = 17; - * @param string $var - * @return $this - */ - public function setProfile($var) - { - GPBUtil::checkString($var, True); - $this->profile = $var; - - return $this; - } - - /** - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * - * Generated from protobuf field string tune = 18; - * @return string - */ - public function getTune() - { - return $this->tune; - } - - /** - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * - * Generated from protobuf field string tune = 18; - * @param string $var - * @return $this - */ - public function setTune($var) - { - GPBUtil::checkString($var, True); - $this->tune = $var; - - return $this; - } - - /** - * Enforces the specified codec preset. The default is `veryfast`. The - * available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * - * Generated from protobuf field string preset = 19; - * @return string - */ - public function getPreset() - { - return $this->preset; - } - - /** - * Enforces the specified codec preset. The default is `veryfast`. The - * available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * - * Generated from protobuf field string preset = 19; - * @param string $var - * @return $this - */ - public function setPreset($var) - { - GPBUtil::checkString($var, True); - $this->preset = $var; - - return $this; - } - - /** - * @return string - */ - public function getGopMode() - { - return $this->whichOneof("gop_mode"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(H265CodecSettings::class, \Google\Cloud\Video\Transcoder\V1\VideoStream_H265CodecSettings::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/Vp9CodecSettings.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/Vp9CodecSettings.php deleted file mode 100644 index f062f31d7643..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/Vp9CodecSettings.php +++ /dev/null @@ -1,570 +0,0 @@ -google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings - */ -class Vp9CodecSettings extends \Google\Protobuf\Internal\Message -{ - /** - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 width_pixels = 1; - */ - protected $width_pixels = 0; - /** - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 height_pixels = 2; - */ - protected $height_pixels = 0; - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $frame_rate = 0.0; - /** - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 480,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bitrate_bps = 0; - /** - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * - * Generated from protobuf field string pixel_format = 5; - */ - protected $pixel_format = ''; - /** - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * - * Generated from protobuf field string rate_control_mode = 6; - */ - protected $rate_control_mode = ''; - /** - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * **Note:** This field is not supported. - * - * Generated from protobuf field int32 crf_level = 7; - */ - protected $crf_level = 0; - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * `profile0` (default) - * * `profile1` - * * `profile2` - * * `profile3` - * The available options are - * [WebM-compatible](https://www.webmproject.org/vp9/profiles/). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `Vp9CodecSettings` - * message. - * - * Generated from protobuf field string profile = 10; - */ - protected $profile = ''; - protected $gop_mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $width_pixels - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * @type int $height_pixels - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * @type float $frame_rate - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * @type int $bitrate_bps - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 480,000,000. - * @type string $pixel_format - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * @type string $rate_control_mode - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * @type int $crf_level - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * **Note:** This field is not supported. - * @type int $gop_frame_count - * Select the GOP size based on the specified frame count. Must be greater - * than zero. - * @type \Google\Protobuf\Duration $gop_duration - * Select the GOP size based on the specified duration. The default is - * `3s`. Note that `gopDuration` must be less than or equal to - * [`segmentDuration`](#SegmentSettings), and - * [`segmentDuration`](#SegmentSettings) must be divisible by - * `gopDuration`. - * @type string $profile - * Enforces the specified codec profile. The following profiles are - * supported: - * * `profile0` (default) - * * `profile1` - * * `profile2` - * * `profile3` - * The available options are - * [WebM-compatible](https://www.webmproject.org/vp9/profiles/). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `Vp9CodecSettings` - * message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 width_pixels = 1; - * @return int - */ - public function getWidthPixels() - { - return $this->width_pixels; - } - - /** - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 width_pixels = 1; - * @param int $var - * @return $this - */ - public function setWidthPixels($var) - { - GPBUtil::checkInt32($var); - $this->width_pixels = $var; - - return $this; - } - - /** - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 height_pixels = 2; - * @return int - */ - public function getHeightPixels() - { - return $this->height_pixels; - } - - /** - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 height_pixels = 2; - * @param int $var - * @return $this - */ - public function setHeightPixels($var) - { - GPBUtil::checkInt32($var); - $this->height_pixels = $var; - - return $this; - } - - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return float - */ - public function getFrameRate() - { - return $this->frame_rate; - } - - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param float $var - * @return $this - */ - public function setFrameRate($var) - { - GPBUtil::checkDouble($var); - $this->frame_rate = $var; - - return $this; - } - - /** - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 480,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getBitrateBps() - { - return $this->bitrate_bps; - } - - /** - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 480,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setBitrateBps($var) - { - GPBUtil::checkInt32($var); - $this->bitrate_bps = $var; - - return $this; - } - - /** - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * - * Generated from protobuf field string pixel_format = 5; - * @return string - */ - public function getPixelFormat() - { - return $this->pixel_format; - } - - /** - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * - * Generated from protobuf field string pixel_format = 5; - * @param string $var - * @return $this - */ - public function setPixelFormat($var) - { - GPBUtil::checkString($var, True); - $this->pixel_format = $var; - - return $this; - } - - /** - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * - * Generated from protobuf field string rate_control_mode = 6; - * @return string - */ - public function getRateControlMode() - { - return $this->rate_control_mode; - } - - /** - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * - * Generated from protobuf field string rate_control_mode = 6; - * @param string $var - * @return $this - */ - public function setRateControlMode($var) - { - GPBUtil::checkString($var, True); - $this->rate_control_mode = $var; - - return $this; - } - - /** - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * **Note:** This field is not supported. - * - * Generated from protobuf field int32 crf_level = 7; - * @return int - */ - public function getCrfLevel() - { - return $this->crf_level; - } - - /** - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * **Note:** This field is not supported. - * - * Generated from protobuf field int32 crf_level = 7; - * @param int $var - * @return $this - */ - public function setCrfLevel($var) - { - GPBUtil::checkInt32($var); - $this->crf_level = $var; - - return $this; - } - - /** - * Select the GOP size based on the specified frame count. Must be greater - * than zero. - * - * Generated from protobuf field int32 gop_frame_count = 8; - * @return int - */ - public function getGopFrameCount() - { - return $this->readOneof(8); - } - - public function hasGopFrameCount() - { - return $this->hasOneof(8); - } - - /** - * Select the GOP size based on the specified frame count. Must be greater - * than zero. - * - * Generated from protobuf field int32 gop_frame_count = 8; - * @param int $var - * @return $this - */ - public function setGopFrameCount($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Select the GOP size based on the specified duration. The default is - * `3s`. Note that `gopDuration` must be less than or equal to - * [`segmentDuration`](#SegmentSettings), and - * [`segmentDuration`](#SegmentSettings) must be divisible by - * `gopDuration`. - * - * Generated from protobuf field .google.protobuf.Duration gop_duration = 9; - * @return \Google\Protobuf\Duration|null - */ - public function getGopDuration() - { - return $this->readOneof(9); - } - - public function hasGopDuration() - { - return $this->hasOneof(9); - } - - /** - * Select the GOP size based on the specified duration. The default is - * `3s`. Note that `gopDuration` must be less than or equal to - * [`segmentDuration`](#SegmentSettings), and - * [`segmentDuration`](#SegmentSettings) must be divisible by - * `gopDuration`. - * - * Generated from protobuf field .google.protobuf.Duration gop_duration = 9; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setGopDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * `profile0` (default) - * * `profile1` - * * `profile2` - * * `profile3` - * The available options are - * [WebM-compatible](https://www.webmproject.org/vp9/profiles/). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `Vp9CodecSettings` - * message. - * - * Generated from protobuf field string profile = 10; - * @return string - */ - public function getProfile() - { - return $this->profile; - } - - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * `profile0` (default) - * * `profile1` - * * `profile2` - * * `profile3` - * The available options are - * [WebM-compatible](https://www.webmproject.org/vp9/profiles/). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `Vp9CodecSettings` - * message. - * - * Generated from protobuf field string profile = 10; - * @param string $var - * @return $this - */ - public function setProfile($var) - { - GPBUtil::checkString($var, True); - $this->profile = $var; - - return $this; - } - - /** - * @return string - */ - public function getGopMode() - { - return $this->whichOneof("gop_mode"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Vp9CodecSettings::class, \Google\Cloud\Video\Transcoder\V1\VideoStream_Vp9CodecSettings::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job.php deleted file mode 100644 index 238cc7c7d9c7..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job.php +++ /dev/null @@ -1,74 +0,0 @@ -setParent($formattedParent) - ->setJob($job); - - // Call the API and handle any network failures. - try { - /** @var Job $response */ - $response = $transcoderServiceClient->createJob($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = TranscoderServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - create_job_sample($formattedParent); -} -// [END transcoder_v1_generated_TranscoderService_CreateJob_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job_template.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job_template.php deleted file mode 100644 index 1a4dba30b856..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job_template.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent) - ->setJobTemplate($jobTemplate) - ->setJobTemplateId($jobTemplateId); - - // Call the API and handle any network failures. - try { - /** @var JobTemplate $response */ - $response = $transcoderServiceClient->createJobTemplate($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = TranscoderServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $jobTemplateId = '[JOB_TEMPLATE_ID]'; - - create_job_template_sample($formattedParent, $jobTemplateId); -} -// [END transcoder_v1_generated_TranscoderService_CreateJobTemplate_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job.php deleted file mode 100644 index 61307b20fa95..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job.php +++ /dev/null @@ -1,70 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $transcoderServiceClient->deleteJob($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = TranscoderServiceClient::jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - - delete_job_sample($formattedName); -} -// [END transcoder_v1_generated_TranscoderService_DeleteJob_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job_template.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job_template.php deleted file mode 100644 index 1f9c7b5b6fa4..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job_template.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $transcoderServiceClient->deleteJobTemplate($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = TranscoderServiceClient::jobTemplateName( - '[PROJECT]', - '[LOCATION]', - '[JOB_TEMPLATE]' - ); - - delete_job_template_sample($formattedName); -} -// [END transcoder_v1_generated_TranscoderService_DeleteJobTemplate_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job.php deleted file mode 100644 index d7430927c035..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Job $response */ - $response = $transcoderServiceClient->getJob($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = TranscoderServiceClient::jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - - get_job_sample($formattedName); -} -// [END transcoder_v1_generated_TranscoderService_GetJob_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job_template.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job_template.php deleted file mode 100644 index 79dbd4f3e2ba..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job_template.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var JobTemplate $response */ - $response = $transcoderServiceClient->getJobTemplate($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = TranscoderServiceClient::jobTemplateName( - '[PROJECT]', - '[LOCATION]', - '[JOB_TEMPLATE]' - ); - - get_job_template_sample($formattedName); -} -// [END transcoder_v1_generated_TranscoderService_GetJobTemplate_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_job_templates.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_job_templates.php deleted file mode 100644 index ccb2387f6261..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_job_templates.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $transcoderServiceClient->listJobTemplates($request); - - /** @var JobTemplate $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = TranscoderServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_job_templates_sample($formattedParent); -} -// [END transcoder_v1_generated_TranscoderService_ListJobTemplates_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_jobs.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_jobs.php deleted file mode 100644 index ec4e6c9ef217..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_jobs.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $transcoderServiceClient->listJobs($request); - - /** @var Job $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = TranscoderServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_jobs_sample($formattedParent); -} -// [END transcoder_v1_generated_TranscoderService_ListJobs_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/src/V1/Client/BaseClient/TranscoderServiceBaseClient.php b/owl-bot-staging/VideoTranscoder/v1/src/V1/Client/BaseClient/TranscoderServiceBaseClient.php deleted file mode 100644 index 5e0591ea4bea..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/src/V1/Client/BaseClient/TranscoderServiceBaseClient.php +++ /dev/null @@ -1,459 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/transcoder_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/transcoder_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/transcoder_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/transcoder_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a job - * resource. - * - * @param string $project - * @param string $location - * @param string $job - * - * @return string The formatted job resource. - */ - public static function jobName(string $project, string $location, string $job): string - { - return self::getPathTemplate('job')->render([ - 'project' => $project, - 'location' => $location, - 'job' => $job, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a job_template - * resource. - * - * @param string $project - * @param string $location - * @param string $jobTemplate - * - * @return string The formatted job_template resource. - */ - public static function jobTemplateName(string $project, string $location, string $jobTemplate): string - { - return self::getPathTemplate('jobTemplate')->render([ - 'project' => $project, - 'location' => $location, - 'job_template' => $jobTemplate, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - job: projects/{project}/locations/{location}/jobs/{job} - * - jobTemplate: projects/{project}/locations/{location}/jobTemplates/{job_template} - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'transcoder.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a job in the specified region. - * - * The async variant is {@see self::createJobAsync()} . - * - * @param CreateJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Job - * - * @throws ApiException Thrown if the API call fails. - */ - public function createJob(CreateJobRequest $request, array $callOptions = []): Job - { - return $this->startApiCall('CreateJob', $request, $callOptions)->wait(); - } - - /** - * Creates a job template in the specified region. - * - * The async variant is {@see self::createJobTemplateAsync()} . - * - * @param CreateJobTemplateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return JobTemplate - * - * @throws ApiException Thrown if the API call fails. - */ - public function createJobTemplate(CreateJobTemplateRequest $request, array $callOptions = []): JobTemplate - { - return $this->startApiCall('CreateJobTemplate', $request, $callOptions)->wait(); - } - - /** - * Deletes a job. - * - * The async variant is {@see self::deleteJobAsync()} . - * - * @param DeleteJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteJob(DeleteJobRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteJob', $request, $callOptions)->wait(); - } - - /** - * Deletes a job template. - * - * The async variant is {@see self::deleteJobTemplateAsync()} . - * - * @param DeleteJobTemplateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteJobTemplate(DeleteJobTemplateRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteJobTemplate', $request, $callOptions)->wait(); - } - - /** - * Returns the job data. - * - * The async variant is {@see self::getJobAsync()} . - * - * @param GetJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Job - * - * @throws ApiException Thrown if the API call fails. - */ - public function getJob(GetJobRequest $request, array $callOptions = []): Job - { - return $this->startApiCall('GetJob', $request, $callOptions)->wait(); - } - - /** - * Returns the job template data. - * - * The async variant is {@see self::getJobTemplateAsync()} . - * - * @param GetJobTemplateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return JobTemplate - * - * @throws ApiException Thrown if the API call fails. - */ - public function getJobTemplate(GetJobTemplateRequest $request, array $callOptions = []): JobTemplate - { - return $this->startApiCall('GetJobTemplate', $request, $callOptions)->wait(); - } - - /** - * Lists job templates in the specified region. - * - * The async variant is {@see self::listJobTemplatesAsync()} . - * - * @param ListJobTemplatesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listJobTemplates(ListJobTemplatesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListJobTemplates', $request, $callOptions); - } - - /** - * Lists jobs in the specified region. - * - * The async variant is {@see self::listJobsAsync()} . - * - * @param ListJobsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listJobs(ListJobsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListJobs', $request, $callOptions); - } -} diff --git a/owl-bot-staging/VideoTranscoder/v1/src/V1/Client/TranscoderServiceClient.php b/owl-bot-staging/VideoTranscoder/v1/src/V1/Client/TranscoderServiceClient.php deleted file mode 100644 index 5052e44f31e2..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/src/V1/Client/TranscoderServiceClient.php +++ /dev/null @@ -1,40 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $job = new Job(); - * $response = $transcoderServiceClient->createJob($formattedParent, $job); - * } finally { - * $transcoderServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - */ -class TranscoderServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.video.transcoder.v1.TranscoderService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'transcoder.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $jobNameTemplate; - - private static $jobTemplateNameTemplate; - - private static $locationNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/transcoder_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/transcoder_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/transcoder_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/transcoder_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getJobNameTemplate() - { - if (self::$jobNameTemplate == null) { - self::$jobNameTemplate = new PathTemplate('projects/{project}/locations/{location}/jobs/{job}'); - } - - return self::$jobNameTemplate; - } - - private static function getJobTemplateNameTemplate() - { - if (self::$jobTemplateNameTemplate == null) { - self::$jobTemplateNameTemplate = new PathTemplate('projects/{project}/locations/{location}/jobTemplates/{job_template}'); - } - - return self::$jobTemplateNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'job' => self::getJobNameTemplate(), - 'jobTemplate' => self::getJobTemplateNameTemplate(), - 'location' => self::getLocationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a job - * resource. - * - * @param string $project - * @param string $location - * @param string $job - * - * @return string The formatted job resource. - */ - public static function jobName($project, $location, $job) - { - return self::getJobNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'job' => $job, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a job_template - * resource. - * - * @param string $project - * @param string $location - * @param string $jobTemplate - * - * @return string The formatted job_template resource. - */ - public static function jobTemplateName($project, $location, $jobTemplate) - { - return self::getJobTemplateNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'job_template' => $jobTemplate, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - job: projects/{project}/locations/{location}/jobs/{job} - * - jobTemplate: projects/{project}/locations/{location}/jobTemplates/{job_template} - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'transcoder.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Creates a job in the specified region. - * - * Sample code: - * ``` - * $transcoderServiceClient = new TranscoderServiceClient(); - * try { - * $formattedParent = $transcoderServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $job = new Job(); - * $response = $transcoderServiceClient->createJob($formattedParent, $job); - * } finally { - * $transcoderServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent location to create and process this job. - * Format: `projects/{project}/locations/{location}` - * @param Job $job Required. Parameters for creating transcoding job. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Video\Transcoder\V1\Job - * - * @throws ApiException if the remote call fails - */ - public function createJob($parent, $job, array $optionalArgs = []) - { - $request = new CreateJobRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setJob($job); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateJob', Job::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a job template in the specified region. - * - * Sample code: - * ``` - * $transcoderServiceClient = new TranscoderServiceClient(); - * try { - * $formattedParent = $transcoderServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $jobTemplate = new JobTemplate(); - * $jobTemplateId = 'job_template_id'; - * $response = $transcoderServiceClient->createJobTemplate($formattedParent, $jobTemplate, $jobTemplateId); - * } finally { - * $transcoderServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent location to create this job template. - * Format: `projects/{project}/locations/{location}` - * @param JobTemplate $jobTemplate Required. Parameters for creating job template. - * @param string $jobTemplateId Required. The ID to use for the job template, which will become the final - * component of the job template's resource name. - * - * This value should be 4-63 characters, and valid characters must match the - * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Video\Transcoder\V1\JobTemplate - * - * @throws ApiException if the remote call fails - */ - public function createJobTemplate($parent, $jobTemplate, $jobTemplateId, array $optionalArgs = []) - { - $request = new CreateJobTemplateRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setJobTemplate($jobTemplate); - $request->setJobTemplateId($jobTemplateId); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateJobTemplate', JobTemplate::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a job. - * - * Sample code: - * ``` - * $transcoderServiceClient = new TranscoderServiceClient(); - * try { - * $formattedName = $transcoderServiceClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - * $transcoderServiceClient->deleteJob($formattedName); - * } finally { - * $transcoderServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the job to delete. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * @param array $optionalArgs { - * Optional. - * - * @type bool $allowMissing - * If set to true, and the job is not found, the request will succeed but no - * action will be taken on the server. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteJob($name, array $optionalArgs = []) - { - $request = new DeleteJobRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['allowMissing'])) { - $request->setAllowMissing($optionalArgs['allowMissing']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteJob', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a job template. - * - * Sample code: - * ``` - * $transcoderServiceClient = new TranscoderServiceClient(); - * try { - * $formattedName = $transcoderServiceClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); - * $transcoderServiceClient->deleteJobTemplate($formattedName); - * } finally { - * $transcoderServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the job template to delete. - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * @param array $optionalArgs { - * Optional. - * - * @type bool $allowMissing - * If set to true, and the job template is not found, the request will succeed - * but no action will be taken on the server. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteJobTemplate($name, array $optionalArgs = []) - { - $request = new DeleteJobTemplateRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['allowMissing'])) { - $request->setAllowMissing($optionalArgs['allowMissing']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteJobTemplate', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the job data. - * - * Sample code: - * ``` - * $transcoderServiceClient = new TranscoderServiceClient(); - * try { - * $formattedName = $transcoderServiceClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - * $response = $transcoderServiceClient->getJob($formattedName); - * } finally { - * $transcoderServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the job to retrieve. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Video\Transcoder\V1\Job - * - * @throws ApiException if the remote call fails - */ - public function getJob($name, array $optionalArgs = []) - { - $request = new GetJobRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetJob', Job::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the job template data. - * - * Sample code: - * ``` - * $transcoderServiceClient = new TranscoderServiceClient(); - * try { - * $formattedName = $transcoderServiceClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); - * $response = $transcoderServiceClient->getJobTemplate($formattedName); - * } finally { - * $transcoderServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the job template to retrieve. - * Format: - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Video\Transcoder\V1\JobTemplate - * - * @throws ApiException if the remote call fails - */ - public function getJobTemplate($name, array $optionalArgs = []) - { - $request = new GetJobTemplateRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetJobTemplate', JobTemplate::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists job templates in the specified region. - * - * Sample code: - * ``` - * $transcoderServiceClient = new TranscoderServiceClient(); - * try { - * $formattedParent = $transcoderServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $transcoderServiceClient->listJobTemplates($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $transcoderServiceClient->listJobTemplates($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $transcoderServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent location from which to retrieve the collection of job - * templates. Format: `projects/{project}/locations/{location}` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * @type string $orderBy - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listJobTemplates($parent, array $optionalArgs = []) - { - $request = new ListJobTemplatesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListJobTemplates', $optionalArgs, ListJobTemplatesResponse::class, $request); - } - - /** - * Lists jobs in the specified region. - * - * Sample code: - * ``` - * $transcoderServiceClient = new TranscoderServiceClient(); - * try { - * $formattedParent = $transcoderServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $transcoderServiceClient->listJobs($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $transcoderServiceClient->listJobs($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $transcoderServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Format: `projects/{project}/locations/{location}` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * @type string $orderBy - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listJobs($parent, array $optionalArgs = []) - { - $request = new ListJobsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListJobs', $optionalArgs, ListJobsResponse::class, $request); - } -} diff --git a/owl-bot-staging/VideoTranscoder/v1/src/V1/TranscoderServiceClient.php b/owl-bot-staging/VideoTranscoder/v1/src/V1/TranscoderServiceClient.php deleted file mode 100644 index 87d6476cd589..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/src/V1/TranscoderServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.video.transcoder.v1.TranscoderService' => [ - 'CreateJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Transcoder\V1\Job', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateJobTemplate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Transcoder\V1\JobTemplate', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteJobTemplate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Transcoder\V1\Job', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetJobTemplate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Transcoder\V1\JobTemplate', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListJobTemplates' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getJobTemplates', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\Transcoder\V1\ListJobTemplatesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListJobs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getJobs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\Transcoder\V1\ListJobsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'job' => 'projects/{project}/locations/{location}/jobs/{job}', - 'jobTemplate' => 'projects/{project}/locations/{location}/jobTemplates/{job_template}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_rest_client_config.php b/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_rest_client_config.php deleted file mode 100644 index bedf0d6bda0e..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_rest_client_config.php +++ /dev/null @@ -1,102 +0,0 @@ - [ - 'google.cloud.video.transcoder.v1.TranscoderService' => [ - 'CreateJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobs', - 'body' => 'job', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateJobTemplate' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobTemplates', - 'body' => 'job_template', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'job_template_id', - ], - ], - 'DeleteJob' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteJobTemplate' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobTemplates/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetJob' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetJobTemplate' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobTemplates/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListJobTemplates' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobTemplates', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListJobs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/Client/TranscoderServiceClientTest.php b/owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/Client/TranscoderServiceClientTest.php deleted file mode 100644 index 548cd320c092..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/Client/TranscoderServiceClientTest.php +++ /dev/null @@ -1,670 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return TranscoderServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new TranscoderServiceClient($options); - } - - /** @test */ - public function createJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $inputUri = 'inputUri1707300727'; - $outputUri = 'outputUri-1273518802'; - $templateId = 'templateId1769642752'; - $ttlAfterCompletionDays = 107576420; - $expectedResponse = new Job(); - $expectedResponse->setName($name); - $expectedResponse->setInputUri($inputUri); - $expectedResponse->setOutputUri($outputUri); - $expectedResponse->setTemplateId($templateId); - $expectedResponse->setTtlAfterCompletionDays($ttlAfterCompletionDays); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $job = new Job(); - $request = (new CreateJobRequest()) - ->setParent($formattedParent) - ->setJob($job); - $response = $gapicClient->createJob($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/CreateJob', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getJob(); - $this->assertProtobufEquals($job, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $job = new Job(); - $request = (new CreateJobRequest()) - ->setParent($formattedParent) - ->setJob($job); - try { - $gapicClient->createJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createJobTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new JobTemplate(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $jobTemplate = new JobTemplate(); - $jobTemplateId = 'jobTemplateId-1231822466'; - $request = (new CreateJobTemplateRequest()) - ->setParent($formattedParent) - ->setJobTemplate($jobTemplate) - ->setJobTemplateId($jobTemplateId); - $response = $gapicClient->createJobTemplate($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/CreateJobTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getJobTemplate(); - $this->assertProtobufEquals($jobTemplate, $actualValue); - $actualValue = $actualRequestObject->getJobTemplateId(); - $this->assertProtobufEquals($jobTemplateId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createJobTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $jobTemplate = new JobTemplate(); - $jobTemplateId = 'jobTemplateId-1231822466'; - $request = (new CreateJobTemplateRequest()) - ->setParent($formattedParent) - ->setJobTemplate($jobTemplate) - ->setJobTemplateId($jobTemplateId); - try { - $gapicClient->createJobTemplate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - $request = (new DeleteJobRequest()) - ->setName($formattedName); - $gapicClient->deleteJob($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/DeleteJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - $request = (new DeleteJobRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteJobTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); - $request = (new DeleteJobTemplateRequest()) - ->setName($formattedName); - $gapicClient->deleteJobTemplate($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/DeleteJobTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteJobTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); - $request = (new DeleteJobTemplateRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteJobTemplate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $inputUri = 'inputUri1707300727'; - $outputUri = 'outputUri-1273518802'; - $templateId = 'templateId1769642752'; - $ttlAfterCompletionDays = 107576420; - $expectedResponse = new Job(); - $expectedResponse->setName($name2); - $expectedResponse->setInputUri($inputUri); - $expectedResponse->setOutputUri($outputUri); - $expectedResponse->setTemplateId($templateId); - $expectedResponse->setTtlAfterCompletionDays($ttlAfterCompletionDays); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - $request = (new GetJobRequest()) - ->setName($formattedName); - $response = $gapicClient->getJob($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/GetJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - $request = (new GetJobRequest()) - ->setName($formattedName); - try { - $gapicClient->getJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new JobTemplate(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); - $request = (new GetJobTemplateRequest()) - ->setName($formattedName); - $response = $gapicClient->getJobTemplate($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/GetJobTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); - $request = (new GetJobTemplateRequest()) - ->setName($formattedName); - try { - $gapicClient->getJobTemplate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobTemplatesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $jobTemplatesElement = new JobTemplate(); - $jobTemplates = [ - $jobTemplatesElement, - ]; - $expectedResponse = new ListJobTemplatesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setJobTemplates($jobTemplates); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListJobTemplatesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listJobTemplates($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getJobTemplates()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/ListJobTemplates', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobTemplatesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListJobTemplatesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listJobTemplates($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $jobsElement = new Job(); - $jobs = [ - $jobsElement, - ]; - $expectedResponse = new ListJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setJobs($jobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListJobsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listJobs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/ListJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListJobsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listJobs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createJobAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $inputUri = 'inputUri1707300727'; - $outputUri = 'outputUri-1273518802'; - $templateId = 'templateId1769642752'; - $ttlAfterCompletionDays = 107576420; - $expectedResponse = new Job(); - $expectedResponse->setName($name); - $expectedResponse->setInputUri($inputUri); - $expectedResponse->setOutputUri($outputUri); - $expectedResponse->setTemplateId($templateId); - $expectedResponse->setTtlAfterCompletionDays($ttlAfterCompletionDays); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $job = new Job(); - $request = (new CreateJobRequest()) - ->setParent($formattedParent) - ->setJob($job); - $response = $gapicClient->createJobAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/CreateJob', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getJob(); - $this->assertProtobufEquals($job, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/TranscoderServiceClientTest.php b/owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/TranscoderServiceClientTest.php deleted file mode 100644 index 8d3032b1bbd5..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/TranscoderServiceClientTest.php +++ /dev/null @@ -1,583 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return TranscoderServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new TranscoderServiceClient($options); - } - - /** @test */ - public function createJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $inputUri = 'inputUri1707300727'; - $outputUri = 'outputUri-1273518802'; - $templateId = 'templateId1769642752'; - $ttlAfterCompletionDays = 107576420; - $expectedResponse = new Job(); - $expectedResponse->setName($name); - $expectedResponse->setInputUri($inputUri); - $expectedResponse->setOutputUri($outputUri); - $expectedResponse->setTemplateId($templateId); - $expectedResponse->setTtlAfterCompletionDays($ttlAfterCompletionDays); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $job = new Job(); - $response = $gapicClient->createJob($formattedParent, $job); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/CreateJob', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getJob(); - $this->assertProtobufEquals($job, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $job = new Job(); - try { - $gapicClient->createJob($formattedParent, $job); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createJobTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new JobTemplate(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $jobTemplate = new JobTemplate(); - $jobTemplateId = 'jobTemplateId-1231822466'; - $response = $gapicClient->createJobTemplate($formattedParent, $jobTemplate, $jobTemplateId); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/CreateJobTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getJobTemplate(); - $this->assertProtobufEquals($jobTemplate, $actualValue); - $actualValue = $actualRequestObject->getJobTemplateId(); - $this->assertProtobufEquals($jobTemplateId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createJobTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $jobTemplate = new JobTemplate(); - $jobTemplateId = 'jobTemplateId-1231822466'; - try { - $gapicClient->createJobTemplate($formattedParent, $jobTemplate, $jobTemplateId); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - $gapicClient->deleteJob($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/DeleteJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - try { - $gapicClient->deleteJob($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteJobTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); - $gapicClient->deleteJobTemplate($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/DeleteJobTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteJobTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); - try { - $gapicClient->deleteJobTemplate($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $inputUri = 'inputUri1707300727'; - $outputUri = 'outputUri-1273518802'; - $templateId = 'templateId1769642752'; - $ttlAfterCompletionDays = 107576420; - $expectedResponse = new Job(); - $expectedResponse->setName($name2); - $expectedResponse->setInputUri($inputUri); - $expectedResponse->setOutputUri($outputUri); - $expectedResponse->setTemplateId($templateId); - $expectedResponse->setTtlAfterCompletionDays($ttlAfterCompletionDays); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - $response = $gapicClient->getJob($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/GetJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - try { - $gapicClient->getJob($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new JobTemplate(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); - $response = $gapicClient->getJobTemplate($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/GetJobTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); - try { - $gapicClient->getJobTemplate($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobTemplatesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $jobTemplatesElement = new JobTemplate(); - $jobTemplates = [ - $jobTemplatesElement, - ]; - $expectedResponse = new ListJobTemplatesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setJobTemplates($jobTemplates); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listJobTemplates($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getJobTemplates()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/ListJobTemplates', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobTemplatesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listJobTemplates($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $jobsElement = new Job(); - $jobs = [ - $jobsElement, - ]; - $expectedResponse = new ListJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setJobs($jobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listJobs($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/ListJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listJobs($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/Geometry.php b/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/Geometry.php deleted file mode 100644 index e1e496589232..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/Geometry.php +++ /dev/null @@ -1,40 +0,0 @@ -internalAddGeneratedFile( - ' -� -%google/cloud/vision/v1/geometry.protogoogle.cloud.vision.v1" -Vertex -x ( -y ("( -NormalizedVertex -x ( -y ("� - BoundingPoly0 -vertices ( 2.google.cloud.vision.v1.VertexE -normalized_vertices ( 2(.google.cloud.vision.v1.NormalizedVertex"+ -Position -x ( -y ( -z (Bn -com.google.cloud.vision.v1B GeometryProtoPZ5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb��GCVNbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ImageAnnotator.php b/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ImageAnnotator.php deleted file mode 100644 index d3551fd8c5ab9f8186e235b08be311118969c8da..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11157 zcmcf{&u`n-c~<=MlkF(9<0wwjs7%(RX=*i2+HP*sRzGN4i!5of+$@;~f|e+oD^02- zmBcFo483fJp@;1>4A@~i?z+SNhVC$6I}F%qzcN%VmTu{e=INc>!AZ_L(sMn>_UyK8<_`MZuI}X8_HoZJb!RP?E7x;@8lmDu3=mGN4N6Ev397dnq}FZ=Go2~BMe|^ z$GY3o+InuQQQXlzt)qF`{uZOLUm_a&A2J&IAKrQgplxcdo2wA5f=>!QfgJwp^$$#= zopX^q{&&@IRl_noLotikTyXy4BXNznbGT3HEBw#_iwD z`9d{FBdCr2isk8!rJ4I>-EBKY4|ml-(2b2l-3#AxF&0Xg*ZfuMQc{k@d zeLc)QmveNl?^y3JxrxBj;II7{l@)r%zR(Qr$lcf&>}fzE39)1vy5+qX&ZeQ8ouYoE zJu+-(eAFS+?r-V#vFw28UrdJq5<4%gtb9k}@-Nk>}Y&}%G3t??AK_UP8?IYCA1 z8JNB(6nK_ey&U?`C4W~Bgu@GfZzk|R6kaXBUP}POTu82~y3BV4aMGSUbWlH!qH_r7 z8wsQz>j!Gb_d@}DMZlT^XUp4xvk4%7&nO#9cX`kEC;{MW%jvcAl+gO_&<78FBafxS zPxh->!Iyn7nFDYX`6s7fW>ZHRjxMdkBmrb6aue4V*RQT|q+w&N3Gg-YCTR)M$J!Is z(cQl3x!Dw=PDu+eb!>NZGkXeu&dI+`!6XA-hD_^0Ls9o?yA7pO*{mq#%r_(n7B>qe zMJ+2WrPQj_YncgY1*B@BR^BNz?}gS=1Y50d)kABiP=wRfLQ$!P7AFa?rF^dyTAPwC zz`1h0w6~+wTI$fpv~(WM?iMx`byq1gOWPs5X$i%y>=d>Xwb86MlxC}<>}F=9MSv3i zR<|p))^27_Is*&$m0}1HNC-qJ@0D7DY-V0M2TS$hcW|R>wO%SzD-R27%S-axkY?3& zmsNA=EG!(hv68al-FFOT72+~CSR!rD$vZH`5T(;F)3z~mEsp`uOSfT~_Xf-^>Gdl~ zCJix`zg$3jU|TRq#nL;laA5bX4(3L+XPYOCd^*`fiUPQSu+n>w>0;PM@JaA-@ry8L zYF6i1b3Ss>p-v%UK4~9Ox!0-!4-Em1ZJHRo*dS#mk$Z|X+0!hsG{u$>%ri`iaRQrW zYZqZTh+-Ah+ci2mHY(W}_Vp!L@r5Jhguc(R?;EiAL;FNEjgNHGII`_db`IAU*X5)g zR0BxqE}U^~$FU!W(P3=#cOirO(48=LdTi|XVae?~J;!kMFoF5836vp=9)s-lCq3KM zJ7FpdV^et#qyw|>I8pq?vGH*mN4nN|jOjfr!0B-btp0NbW&<}WiUdh%ZE^ihk_{8Q zkSEM_m_>bHdu&_G5!36rBsvWNC;wx5kU;lp_iFX~HPug#m_X-IL}jz3Di0J)oeMD6 ztZZ%bpD8H|%j{!)Q}uz0&HDY!Dav>paQM?Cee#h4S`2GST7{JWEBbAk&~_^2MjbPv zT2xy16{SW(QMN=GYxP}4ZB-hXS(0(DfvHrj;?FtyS*_m}KY=pqPJOSn%>>S*F|Vch zZ^jREXa?r_LJ3p3(#$Miwmieg7wfH7eMjYhiZ>>5Q@TbS94 z^}SlT(0q_N6Zynb~qRGGn-ts_^BkaybzeV`1NSEL| zUm?6z(_Rc->`Vwv+&4lV|`aS*GdP)?%IR9nr$7FFvDqlGY zw#0e|v(n88*_ z#b#O5yCpwRsY}A*;#I9f`7X?2>yJI0cY;nnNvCR2s<8`tq?vu472i1&eZG&4^;>sT zzDh}CQvO{EGK%FH-btw5rs34F(Gg@8VcJBoupqH=PaRiB9D6B;uojCtF1Kwver;R9 z^ZKAvvEo)tWhbZ(dUnr1YRFI&xRK&cm2KSO{5BS6p))r-%ZhVi-xyKu9RTcaNo|Ji zVo{{Bo}37Ug5_UMzN7& zU#4JrSL^Eh7#tGo7EEa!?2ef|$1DAa;^Oe5%Y+^em4#JbBXbg?!YV#4@}n3 zP**e_)*CSCXzi2nTNzn{G=&SEdYWi5={g=73`>1}bTLRgUigr_Z;Xw@J(y#sVHUbC z!xTIIh`^O1fy=-K5koXnm=qR!#uMFCySO!0oXJB{*j#7JHVUg*9>a4ZhMi_yTx3K3 z`?Akw=yW?SS8bbhG(FIsCj(fJ_Y1sb`>**dW`JBTl!Z2^6KbE4N{ZCQZSJNZ_o&E4rl} zn7Yc2`EfnJ%2O5Zj{zNP0a{su;`4zn_3*5w$wA zNmKv0k0UziCQKQ0ycXehDM>ztB;A79E+3T8n1kZ|auR|+P{De_7|^+pw!<>>GwKOr zBs@mmfED(8kZ^oo!uDV=5WsezM>WpsA0OxrD;QJq7c+2nXvCunEilkvBqx>*RV8m60Z=2pQ8pv?Db5@qT<7B{*Yh2bi@rekDO8TZ{lQ z&iF*`!$sC$(QSolv!)_KZ-vpjm9(+segt>OoH#7p)C&q%hUIP_Cl^D6vOEqFZANi0 za2%-$D=xMsV$2!Z9qR$p>o=1&7u(QO;R1K-K?fHmNt2KCdU6J0ULC4`80(=lHc%F( z(r3nckjX+D#fXb!pzH#pk=T=lQx9orC>8o+O&T~nLrald*yN*7340J7r#B93lhW%! z4}w$MH9qW@-WLNq%nWB4hqWX-#AgEeV^}R}Ui(OBfTuUt&u=A|b$F`tV?5E$5ds3g zcG4;|+ks8D~S%nL+EQ9 z!;0X2_;bBHYy|n!6l4qTiPeq~NctKU`akyz)bHDUFBBl$go&xI&VYG@$lrtWF**<` z9-+*SC*x86!vtJrq$5tl@>$?D|C2=Z!SMe1VR0-ehaJyPb-858{};MBftN-ZMB-^{ zB%Trvg)#PHZEpPD4&$s6jjZx$WF#V0q9ywTuX6BN<24jwOw%= z7P{J^q%cpnH^+D_sHhjn(xuvBF`Qhv#>8rsw<;yC&p^FG_r9nwA|< zbyZz#4Mk_2g}H%L;YM7(1dBuXk2-`I&9iuZh^rup8vH;7tM{^n3WyM_Y6cUy(l@a=6H zW=c&3*UNbKfIpghwOXaNl}SmnFj=nG6ufD``F^QTD=F0~LQUS#0YcYYh$HSa@G1jG zz8@;h2Y5qVt=vL>ORNz)jLE0YeoFQ|tc*SPb_~wj=!_ z1xqn`NLu$bHaxkB0T%tp>g^Z85z+ATiBJFX#V=Ano{*P9<>-;!_B zmrr=pbr(%YQ%*O3BTt7EHe<-&c*-AjMKN#6``6-887S+fzX}l%h zil;GfmN?#jE37!;OmQ>PZhT&N6P{l#V^ZK>Q*drnciaQt8eiGMr&!5*p02;(y8hLK ze35h@JST3u4-4|U@oI{y`dK92l;4Oa5x8L-=a55wUbyr8YCWpi)kmKf&Wbly{3#DU zuX5M$9qFG7-#_xap1YCHKYsjJ=-B_5*ZSTOe?|Fo= diff --git a/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearch.php b/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearch.php deleted file mode 100644 index 802d4d50d763..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearch.php +++ /dev/null @@ -1,55 +0,0 @@ -internalAddGeneratedFile( - ' -� -+google/cloud/vision/v1/product_search.protogoogle.cloud.vision.v1%google/cloud/vision/v1/geometry.proto3google/cloud/vision/v1/product_search_service.protogoogle/protobuf/timestamp.proto"� -ProductSearchParams; - bounding_poly ( 2$.google.cloud.vision.v1.BoundingPoly: - product_set ( B%�A" - vision.googleapis.com/ProductSet -product_categories (  -filter ( "� -ProductSearchResults. - -index_time ( 2.google.protobuf.TimestampD -results ( 23.google.cloud.vision.v1.ProductSearchResults.Result[ -product_grouped_results ( 2:.google.cloud.vision.v1.ProductSearchResults.GroupedResultX -Result0 -product ( 2.google.cloud.vision.v1.Product -score ( -image ( S -ObjectAnnotation -mid (  - language_code (  -name (  -score (� - GroupedResult; - bounding_poly ( 2$.google.cloud.vision.v1.BoundingPolyD -results ( 23.google.cloud.vision.v1.ProductSearchResults.ResultY -object_annotations ( 2=.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotationBs -com.google.cloud.vision.v1BProductSearchProtoPZ5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb��GCVNbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearchService.php b/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearchService.php deleted file mode 100644 index 0aa07b5b06e84c662e56a3c395720385efec543b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9855 zcmc&)&2Jn@72mewtW$Opr{dU-LzGS@n{|vcL&lpA#_Mcm#vd{3*pBT4Eg3Ot&y>f# zndxr2dz?6t5dsb?A%w(-IKTxC2*C{@Bn12exgc1HgD-I4l=B_{iH}!bJ>5OiaZen; z7x#3(s(Qcoe(zPi*ZuB$_LhwP2Fg0ZW2c=TXoy0 z5htapGt27I^13=Zv#@?1hPqb6DU+;PwXAB5q{}s{QAuwbu3?$!?W<{+sM08VC70+< zc?Uz2d|1KJC$uJGi&}+t1z&5RJ>NS_ZM6I%$4YTZl&MFzLVy;htdZrL$x&vI5kG@Gpw&o?T)Gj>@l zOQ$n7)iJJPHrt})wCXtx5?ozX9pW_{bBgIrC)o9`ifs&+vyEcTG%acc%XG8ZCZ^^T zaRUoAgP2}tW9AG}tK`X+zHL}eXG2$sAW&i@BeW>a6RS=E ziQk!-eD8zpXY01t!P5RvX0p4w`zX2E{@8T`qQ=wfcJi^ScDc9)d}ze5ff4-5Ekn>b zSE=~yorAa^^Z7>E_cr=>0ZqO_z~do4D8;fwif4(`_SMm0F_~@~kU=N`d4?E07kIEq zSytK*G!p`+0|JiVl6dr%coa=ZRY4dbc0q{Mnyg4$J}ZRK86jkgz)utEckxi>KK~)t zv<}`C5)y_l;Yk+?0ciloE~jZ`Xt?}=_VX_ECODqvP~49W(S$josLI$8Jc#-$hHKaK zof5m-#qOR&eHD?4fYc-1?B-cC04uXRT!t)PwVa)iL-a|$`!Bg3d>b8;k8An{sktLP zYWG-QW-P@~N8ObY3Z>pBI}h|)gN$B6z499Oq3%ayM<{s|^=wm#5vE=Ci!X8y(OKbl zJ~_DDO~Lk(mMF8J%ZH@wx#?%(YByc8KyMnP>1XnCS8gp_j)L3O{;41&=2;`j3^s|7 zVOGeK5_Ji)S6^mS0tW?Ho=^E9M=jQkCr}?BL>$L*m@WGFm~v96{5q*lq4q-Mi?xvj(HhALSC>a#( zuJ%I(4Hg^%EEhajC0}Ylw#1)Bhix6~;&Eo?F9Z00=SZPkPcr%Z-UO0 zVa#xSnR9Wr5o>bGVuZx7l2PH2s69p}7Y)}Fa_(zT?gTnw1M-p!M;xYJ52g##Tb}iZ zh!mi0puzCMt_|Tt@Kw|+lyt!`)baa)!^7yfNuGG6z#1&NwL9p!7%D=^| zer}%}pnVw)-nZc_7-`Ypu<`8KEb4Gl{xtl=ySETPfG#sLD zK$BNR_bUaR;Uo^{b7{3}k@T7@(D4j99!cSX$d}@X9A2IqXcXbdEI~q#Qc{J7`J{eD zwG$@YZ-CL-E-qMo8x2JCmds8FAGcAYO?qahKEe^k$!@a{!+3XUHbr? z;cR>TQ-4cAXQ37m+vU0?E)LFTd_BCUA4$41eOE!+DyduBa%-A%tor|7t*SFca8OC0r|GEvJ+{_1z$$oHbdd=~8|3L0q$P!FAe7r@6du~6F&XC)cIa29kM8+F6u1s^@RzO>+jTCbOwm4xLXB*PwB z`Vo8zomgAXt+oD|VG(4z@lkZ7kXtIuF4CWev@|-^4CE$A|{Lc5p7 zmZyWtUgndt=%}v|Z7}0MC}<#h*v9ENG*L+rmZJ%dX4=+QKmO}?x^8J{+U9=7Ys+as z&3hN)fu6;<->aZGDjPhu@8!<(krTpRw2lv6!$AiBQbET9sg+KGQ*n?Yf)Y`z30mZN zylb}^ysNlVczZcfXX76!=xFGKjVI!i4v9&XlQ`j4NK4uWi*bSM7E$A+$9MN~td)j8 z2D(HK?eTPpN_L{@hfLGYWu`b?n&Fp9u62Yu!$Hmj3S9gHKoua|~kLi>Q3`i3^qL1emF+2h&EoeqbjAC3@; zKUGkFAYxqnX=$Wrn=B|LHILaZ-}j&w+KelFIZn~0j8t=915brC zOTd6&$o&S~9}1*+_lLw1Yxj_8_g?0mV5B99GOA^O1}8;$O$0;h+n{|YVB)n8iAn9_ zf=ZZloIATilm6XrdWK6dJQ?S79#~;%sba#~6V8jw(D$@k`^T9~ztqIhE^ap30@%x4 z77^&kelKtDPDFmw&G8q2om)DLCLVh`X^B0~J$D(@+v6N+GWSGr2DY8wE4&XJR@ud| zwFXTP5n-uvtdHA{5xHfVBd19W@uJ50i!=;JA8Y;{sCq)Vl_86Y$CSTSf zh^yPdpGQM=X#AcT5=#j833Ja4Ez<#7H_M7%hE&um&vQ^#7O>l4Yu`C|E}XcXRU^Jx>4;M1& diff --git a/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/TextAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/TextAnnotation.php deleted file mode 100644 index 3499c9a949474093fc8221903d355496744c24bb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2489 zcmd5;-EQMV6vknMbVIXhcI|vuWUZG}H)bbxEh&Cwl9oe;-pLHVbW9BV)$K9m#WH*%R@xj3kB`kD_--)G$9xTHy70N)W*afW(+0b}wK^|A-_-8A1_MV{qbg8v3R;Xwk?H-GH;uz|dN4O!-nru~L4p z*jB)~BT|lQtkvEq@`&(oMz8NqNJ#lC^bcj-0^oA_H28PP2FH|5DG%qh+7-DgEXnQB zQ+L6n?l{ZBzrrq;ms^RA_u;n!JiJYN)equmO`1WA&7fTzlzvP@VYP|sr;rKEF^zT< zvQf@gKh)lysu>uhZb4f3X(vULa&GqsiY>~ijkax@{&*%L-iK{(@jSGdLlG83RTVA7 z{E_QWY_m*H?f$92c9P!+srgcEBm6vwa|+d`>q=Q=psiqN5~+_U>bsCbGX^0Yxv%Ax znEdiw-rC$_C%MR}G5ck-la{XgXx$zS5p}~o8H7lc{z^e6e)~U_T!Sr(&3wo8$3u(7j>%W|)>gKN zHJCS7p8y1AXpTcOm_*1?d`b7$Wg1DOipP_bVJKanMqY*LV1HenWUI;l(%-A!RIEx5 z4K5^;0V@XIgmhp3rjPzctM}`Twq8uB7-5_=`{?%KhFI^Nwe=oa8rK{3UbEZMi<#0N z3goV8z5{CGk@bp&P9pT$BkKhQ-SCdkI92)`-7a6=0WuZ17tN;@^Ab8Auj~J*40|h~ zpB2b1Uf%&q$&?V^`pu(XHlV>_7cVqxh&J9^J>ccwHinternalAddGeneratedFile( - ' -� -*google/cloud/vision/v1/web_detection.protogoogle.cloud.vision.v1"� - WebDetectionD - web_entities ( 2..google.cloud.vision.v1.WebDetection.WebEntityK -full_matching_images ( 2-.google.cloud.vision.v1.WebDetection.WebImageN -partial_matching_images ( 2-.google.cloud.vision.v1.WebDetection.WebImageP -pages_with_matching_images ( 2,.google.cloud.vision.v1.WebDetection.WebPageN -visually_similar_images ( 2-.google.cloud.vision.v1.WebDetection.WebImageH -best_guess_labels ( 2-.google.cloud.vision.v1.WebDetection.WebLabelB - WebEntity - entity_id (  -score ( - description ( & -WebImage -url (  -score (� -WebPage -url (  -score ( - -page_title ( K -full_matching_images ( 2-.google.cloud.vision.v1.WebDetection.WebImageN -partial_matching_images ( 2-.google.cloud.vision.v1.WebDetection.WebImage0 -WebLabel -label (  - language_code ( Br -com.google.cloud.vision.v1BWebDetectionProtoPZ5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb��GCVNbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AddProductToProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AddProductToProductSetRequest.php deleted file mode 100644 index 576f4d539fe8..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AddProductToProductSetRequest.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.vision.v1.AddProductToProductSetRequest - */ -class AddProductToProductSetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name for the ProductSet to modify. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The resource name for the Product to be added to this ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * - * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $product = ''; - - /** - * @param string $name Required. The resource name for the ProductSet to modify. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. - * @param string $product Required. The resource name for the Product to be added to this ProductSet. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * Please see {@see ProductSearchClient::productName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\AddProductToProductSetRequest - * - * @experimental - */ - public static function build(string $name, string $product): self - { - return (new self()) - ->setName($name) - ->setProduct($product); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name for the ProductSet to modify. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @type string $product - * Required. The resource name for the Product to be added to this ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name for the ProductSet to modify. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name for the ProductSet to modify. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The resource name for the Product to be added to this ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * - * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getProduct() - { - return $this->product; - } - - /** - * Required. The resource name for the Product to be added to this ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * - * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProduct($var) - { - GPBUtil::checkString($var, True); - $this->product = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileRequest.php deleted file mode 100644 index 99467c0d102c..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileRequest.php +++ /dev/null @@ -1,225 +0,0 @@ -google.cloud.vision.v1.AnnotateFileRequest - */ -class AnnotateFileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Information about the input file. - * - * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; - */ - protected $input_config = null; - /** - * Required. Requested features. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; - */ - private $features; - /** - * Additional context that may accompany the image(s) in the file. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; - */ - protected $image_context = null; - /** - * Pages of the file to perform image annotation. - * Pages starts from 1, we assume the first page of the file is page 1. - * At most 5 pages are supported per request. Pages can be negative. - * Page 1 means the first page. - * Page 2 means the second page. - * Page -1 means the last page. - * Page -2 means the second to the last page. - * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. - * If this field is empty, by default the service performs image annotation - * for the first 5 pages of the file. - * - * Generated from protobuf field repeated int32 pages = 4; - */ - private $pages; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\InputConfig $input_config - * Required. Information about the input file. - * @type array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $features - * Required. Requested features. - * @type \Google\Cloud\Vision\V1\ImageContext $image_context - * Additional context that may accompany the image(s) in the file. - * @type array|\Google\Protobuf\Internal\RepeatedField $pages - * Pages of the file to perform image annotation. - * Pages starts from 1, we assume the first page of the file is page 1. - * At most 5 pages are supported per request. Pages can be negative. - * Page 1 means the first page. - * Page 2 means the second page. - * Page -1 means the last page. - * Page -2 means the second to the last page. - * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. - * If this field is empty, by default the service performs image annotation - * for the first 5 pages of the file. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Required. Information about the input file. - * - * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; - * @return \Google\Cloud\Vision\V1\InputConfig|null - */ - public function getInputConfig() - { - return $this->input_config; - } - - public function hasInputConfig() - { - return isset($this->input_config); - } - - public function clearInputConfig() - { - unset($this->input_config); - } - - /** - * Required. Information about the input file. - * - * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; - * @param \Google\Cloud\Vision\V1\InputConfig $var - * @return $this - */ - public function setInputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\InputConfig::class); - $this->input_config = $var; - - return $this; - } - - /** - * Required. Requested features. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFeatures() - { - return $this->features; - } - - /** - * Required. Requested features. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; - * @param array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFeatures($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Feature::class); - $this->features = $arr; - - return $this; - } - - /** - * Additional context that may accompany the image(s) in the file. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; - * @return \Google\Cloud\Vision\V1\ImageContext|null - */ - public function getImageContext() - { - return $this->image_context; - } - - public function hasImageContext() - { - return isset($this->image_context); - } - - public function clearImageContext() - { - unset($this->image_context); - } - - /** - * Additional context that may accompany the image(s) in the file. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; - * @param \Google\Cloud\Vision\V1\ImageContext $var - * @return $this - */ - public function setImageContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageContext::class); - $this->image_context = $var; - - return $this; - } - - /** - * Pages of the file to perform image annotation. - * Pages starts from 1, we assume the first page of the file is page 1. - * At most 5 pages are supported per request. Pages can be negative. - * Page 1 means the first page. - * Page 2 means the second page. - * Page -1 means the last page. - * Page -2 means the second to the last page. - * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. - * If this field is empty, by default the service performs image annotation - * for the first 5 pages of the file. - * - * Generated from protobuf field repeated int32 pages = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPages() - { - return $this->pages; - } - - /** - * Pages of the file to perform image annotation. - * Pages starts from 1, we assume the first page of the file is page 1. - * At most 5 pages are supported per request. Pages can be negative. - * Page 1 means the first page. - * Page 2 means the second page. - * Page -1 means the last page. - * Page -2 means the second to the last page. - * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. - * If this field is empty, by default the service performs image annotation - * for the first 5 pages of the file. - * - * Generated from protobuf field repeated int32 pages = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->pages = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileResponse.php deleted file mode 100644 index 92682231fc13..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileResponse.php +++ /dev/null @@ -1,198 +0,0 @@ -google.cloud.vision.v1.AnnotateFileResponse - */ -class AnnotateFileResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Information about the file for which this response is generated. - * - * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; - */ - protected $input_config = null; - /** - * Individual responses to images found within the file. This field will be - * empty if the `error` field is set. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - private $responses; - /** - * This field gives the total number of pages in the file. - * - * Generated from protobuf field int32 total_pages = 3; - */ - protected $total_pages = 0; - /** - * If set, represents the error message for the failed request. The - * `responses` field will not be set in this case. - * - * Generated from protobuf field .google.rpc.Status error = 4; - */ - protected $error = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\InputConfig $input_config - * Information about the file for which this response is generated. - * @type array<\Google\Cloud\Vision\V1\AnnotateImageResponse>|\Google\Protobuf\Internal\RepeatedField $responses - * Individual responses to images found within the file. This field will be - * empty if the `error` field is set. - * @type int $total_pages - * This field gives the total number of pages in the file. - * @type \Google\Rpc\Status $error - * If set, represents the error message for the failed request. The - * `responses` field will not be set in this case. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Information about the file for which this response is generated. - * - * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; - * @return \Google\Cloud\Vision\V1\InputConfig|null - */ - public function getInputConfig() - { - return $this->input_config; - } - - public function hasInputConfig() - { - return isset($this->input_config); - } - - public function clearInputConfig() - { - unset($this->input_config); - } - - /** - * Information about the file for which this response is generated. - * - * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; - * @param \Google\Cloud\Vision\V1\InputConfig $var - * @return $this - */ - public function setInputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\InputConfig::class); - $this->input_config = $var; - - return $this; - } - - /** - * Individual responses to images found within the file. This field will be - * empty if the `error` field is set. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResponses() - { - return $this->responses; - } - - /** - * Individual responses to images found within the file. This field will be - * empty if the `error` field is set. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - * @param array<\Google\Cloud\Vision\V1\AnnotateImageResponse>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResponses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateImageResponse::class); - $this->responses = $arr; - - return $this; - } - - /** - * This field gives the total number of pages in the file. - * - * Generated from protobuf field int32 total_pages = 3; - * @return int - */ - public function getTotalPages() - { - return $this->total_pages; - } - - /** - * This field gives the total number of pages in the file. - * - * Generated from protobuf field int32 total_pages = 3; - * @param int $var - * @return $this - */ - public function setTotalPages($var) - { - GPBUtil::checkInt32($var); - $this->total_pages = $var; - - return $this; - } - - /** - * If set, represents the error message for the failed request. The - * `responses` field will not be set in this case. - * - * Generated from protobuf field .google.rpc.Status error = 4; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * If set, represents the error message for the failed request. The - * `responses` field will not be set in this case. - * - * Generated from protobuf field .google.rpc.Status error = 4; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageRequest.php deleted file mode 100644 index 87da32a59c91..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.vision.v1.AnnotateImageRequest - */ -class AnnotateImageRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The image to be processed. - * - * Generated from protobuf field .google.cloud.vision.v1.Image image = 1; - */ - protected $image = null; - /** - * Requested features. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; - */ - private $features; - /** - * Additional context that may accompany the image. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; - */ - protected $image_context = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\Image $image - * The image to be processed. - * @type array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $features - * Requested features. - * @type \Google\Cloud\Vision\V1\ImageContext $image_context - * Additional context that may accompany the image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * The image to be processed. - * - * Generated from protobuf field .google.cloud.vision.v1.Image image = 1; - * @return \Google\Cloud\Vision\V1\Image|null - */ - public function getImage() - { - return $this->image; - } - - public function hasImage() - { - return isset($this->image); - } - - public function clearImage() - { - unset($this->image); - } - - /** - * The image to be processed. - * - * Generated from protobuf field .google.cloud.vision.v1.Image image = 1; - * @param \Google\Cloud\Vision\V1\Image $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Image::class); - $this->image = $var; - - return $this; - } - - /** - * Requested features. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFeatures() - { - return $this->features; - } - - /** - * Requested features. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; - * @param array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFeatures($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Feature::class); - $this->features = $arr; - - return $this; - } - - /** - * Additional context that may accompany the image. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; - * @return \Google\Cloud\Vision\V1\ImageContext|null - */ - public function getImageContext() - { - return $this->image_context; - } - - public function hasImageContext() - { - return isset($this->image_context); - } - - public function clearImageContext() - { - unset($this->image_context); - } - - /** - * Additional context that may accompany the image. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; - * @param \Google\Cloud\Vision\V1\ImageContext $var - * @return $this - */ - public function setImageContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageContext::class); - $this->image_context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageResponse.php deleted file mode 100644 index 5da367298068..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageResponse.php +++ /dev/null @@ -1,617 +0,0 @@ -google.cloud.vision.v1.AnnotateImageResponse - */ -class AnnotateImageResponse extends \Google\Protobuf\Internal\Message -{ - /** - * If present, face detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - private $face_annotations; - /** - * If present, landmark detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - private $landmark_annotations; - /** - * If present, logo detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - private $logo_annotations; - /** - * If present, label detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - private $label_annotations; - /** - * If present, localized object detection has completed successfully. - * This will be sorted descending by confidence score. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - private $localized_object_annotations; - /** - * If present, text (OCR) detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - private $text_annotations; - /** - * If present, text (OCR) detection or document (OCR) text detection has - * completed successfully. - * This annotation provides the structural hierarchy for the OCR detected - * text. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; - */ - protected $full_text_annotation = null; - /** - * If present, safe-search annotation has completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; - */ - protected $safe_search_annotation = null; - /** - * If present, image properties were extracted successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; - */ - protected $image_properties_annotation = null; - /** - * If present, crop hints have completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; - */ - protected $crop_hints_annotation = null; - /** - * If present, web detection has completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.WebDetection web_detection = 13; - */ - protected $web_detection = null; - /** - * If present, product search has completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; - */ - protected $product_search_results = null; - /** - * If set, represents the error message for the operation. - * Note that filled-in image annotations are guaranteed to be - * correct, even when `error` is set. - * - * Generated from protobuf field .google.rpc.Status error = 9; - */ - protected $error = null; - /** - * If present, contextual information is needed to understand where this image - * comes from. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageAnnotationContext context = 21; - */ - protected $context = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\FaceAnnotation>|\Google\Protobuf\Internal\RepeatedField $face_annotations - * If present, face detection has completed successfully. - * @type array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $landmark_annotations - * If present, landmark detection has completed successfully. - * @type array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $logo_annotations - * If present, logo detection has completed successfully. - * @type array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $label_annotations - * If present, label detection has completed successfully. - * @type array<\Google\Cloud\Vision\V1\LocalizedObjectAnnotation>|\Google\Protobuf\Internal\RepeatedField $localized_object_annotations - * If present, localized object detection has completed successfully. - * This will be sorted descending by confidence score. - * @type array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $text_annotations - * If present, text (OCR) detection has completed successfully. - * @type \Google\Cloud\Vision\V1\TextAnnotation $full_text_annotation - * If present, text (OCR) detection or document (OCR) text detection has - * completed successfully. - * This annotation provides the structural hierarchy for the OCR detected - * text. - * @type \Google\Cloud\Vision\V1\SafeSearchAnnotation $safe_search_annotation - * If present, safe-search annotation has completed successfully. - * @type \Google\Cloud\Vision\V1\ImageProperties $image_properties_annotation - * If present, image properties were extracted successfully. - * @type \Google\Cloud\Vision\V1\CropHintsAnnotation $crop_hints_annotation - * If present, crop hints have completed successfully. - * @type \Google\Cloud\Vision\V1\WebDetection $web_detection - * If present, web detection has completed successfully. - * @type \Google\Cloud\Vision\V1\ProductSearchResults $product_search_results - * If present, product search has completed successfully. - * @type \Google\Rpc\Status $error - * If set, represents the error message for the operation. - * Note that filled-in image annotations are guaranteed to be - * correct, even when `error` is set. - * @type \Google\Cloud\Vision\V1\ImageAnnotationContext $context - * If present, contextual information is needed to understand where this image - * comes from. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * If present, face detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFaceAnnotations() - { - return $this->face_annotations; - } - - /** - * If present, face detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - * @param array<\Google\Cloud\Vision\V1\FaceAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFaceAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\FaceAnnotation::class); - $this->face_annotations = $arr; - - return $this; - } - - /** - * If present, landmark detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLandmarkAnnotations() - { - return $this->landmark_annotations; - } - - /** - * If present, landmark detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - * @param array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLandmarkAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\EntityAnnotation::class); - $this->landmark_annotations = $arr; - - return $this; - } - - /** - * If present, logo detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLogoAnnotations() - { - return $this->logo_annotations; - } - - /** - * If present, logo detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - * @param array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLogoAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\EntityAnnotation::class); - $this->logo_annotations = $arr; - - return $this; - } - - /** - * If present, label detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLabelAnnotations() - { - return $this->label_annotations; - } - - /** - * If present, label detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - * @param array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLabelAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\EntityAnnotation::class); - $this->label_annotations = $arr; - - return $this; - } - - /** - * If present, localized object detection has completed successfully. - * This will be sorted descending by confidence score. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLocalizedObjectAnnotations() - { - return $this->localized_object_annotations; - } - - /** - * If present, localized object detection has completed successfully. - * This will be sorted descending by confidence score. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - * @param array<\Google\Cloud\Vision\V1\LocalizedObjectAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLocalizedObjectAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\LocalizedObjectAnnotation::class); - $this->localized_object_annotations = $arr; - - return $this; - } - - /** - * If present, text (OCR) detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTextAnnotations() - { - return $this->text_annotations; - } - - /** - * If present, text (OCR) detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - * @param array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTextAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\EntityAnnotation::class); - $this->text_annotations = $arr; - - return $this; - } - - /** - * If present, text (OCR) detection or document (OCR) text detection has - * completed successfully. - * This annotation provides the structural hierarchy for the OCR detected - * text. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; - * @return \Google\Cloud\Vision\V1\TextAnnotation|null - */ - public function getFullTextAnnotation() - { - return $this->full_text_annotation; - } - - public function hasFullTextAnnotation() - { - return isset($this->full_text_annotation); - } - - public function clearFullTextAnnotation() - { - unset($this->full_text_annotation); - } - - /** - * If present, text (OCR) detection or document (OCR) text detection has - * completed successfully. - * This annotation provides the structural hierarchy for the OCR detected - * text. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; - * @param \Google\Cloud\Vision\V1\TextAnnotation $var - * @return $this - */ - public function setFullTextAnnotation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation::class); - $this->full_text_annotation = $var; - - return $this; - } - - /** - * If present, safe-search annotation has completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; - * @return \Google\Cloud\Vision\V1\SafeSearchAnnotation|null - */ - public function getSafeSearchAnnotation() - { - return $this->safe_search_annotation; - } - - public function hasSafeSearchAnnotation() - { - return isset($this->safe_search_annotation); - } - - public function clearSafeSearchAnnotation() - { - unset($this->safe_search_annotation); - } - - /** - * If present, safe-search annotation has completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; - * @param \Google\Cloud\Vision\V1\SafeSearchAnnotation $var - * @return $this - */ - public function setSafeSearchAnnotation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\SafeSearchAnnotation::class); - $this->safe_search_annotation = $var; - - return $this; - } - - /** - * If present, image properties were extracted successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; - * @return \Google\Cloud\Vision\V1\ImageProperties|null - */ - public function getImagePropertiesAnnotation() - { - return $this->image_properties_annotation; - } - - public function hasImagePropertiesAnnotation() - { - return isset($this->image_properties_annotation); - } - - public function clearImagePropertiesAnnotation() - { - unset($this->image_properties_annotation); - } - - /** - * If present, image properties were extracted successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; - * @param \Google\Cloud\Vision\V1\ImageProperties $var - * @return $this - */ - public function setImagePropertiesAnnotation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageProperties::class); - $this->image_properties_annotation = $var; - - return $this; - } - - /** - * If present, crop hints have completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; - * @return \Google\Cloud\Vision\V1\CropHintsAnnotation|null - */ - public function getCropHintsAnnotation() - { - return $this->crop_hints_annotation; - } - - public function hasCropHintsAnnotation() - { - return isset($this->crop_hints_annotation); - } - - public function clearCropHintsAnnotation() - { - unset($this->crop_hints_annotation); - } - - /** - * If present, crop hints have completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; - * @param \Google\Cloud\Vision\V1\CropHintsAnnotation $var - * @return $this - */ - public function setCropHintsAnnotation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\CropHintsAnnotation::class); - $this->crop_hints_annotation = $var; - - return $this; - } - - /** - * If present, web detection has completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.WebDetection web_detection = 13; - * @return \Google\Cloud\Vision\V1\WebDetection|null - */ - public function getWebDetection() - { - return $this->web_detection; - } - - public function hasWebDetection() - { - return isset($this->web_detection); - } - - public function clearWebDetection() - { - unset($this->web_detection); - } - - /** - * If present, web detection has completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.WebDetection web_detection = 13; - * @param \Google\Cloud\Vision\V1\WebDetection $var - * @return $this - */ - public function setWebDetection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\WebDetection::class); - $this->web_detection = $var; - - return $this; - } - - /** - * If present, product search has completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; - * @return \Google\Cloud\Vision\V1\ProductSearchResults|null - */ - public function getProductSearchResults() - { - return $this->product_search_results; - } - - public function hasProductSearchResults() - { - return isset($this->product_search_results); - } - - public function clearProductSearchResults() - { - unset($this->product_search_results); - } - - /** - * If present, product search has completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; - * @param \Google\Cloud\Vision\V1\ProductSearchResults $var - * @return $this - */ - public function setProductSearchResults($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSearchResults::class); - $this->product_search_results = $var; - - return $this; - } - - /** - * If set, represents the error message for the operation. - * Note that filled-in image annotations are guaranteed to be - * correct, even when `error` is set. - * - * Generated from protobuf field .google.rpc.Status error = 9; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * If set, represents the error message for the operation. - * Note that filled-in image annotations are guaranteed to be - * correct, even when `error` is set. - * - * Generated from protobuf field .google.rpc.Status error = 9; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * If present, contextual information is needed to understand where this image - * comes from. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageAnnotationContext context = 21; - * @return \Google\Cloud\Vision\V1\ImageAnnotationContext|null - */ - public function getContext() - { - return $this->context; - } - - public function hasContext() - { - return isset($this->context); - } - - public function clearContext() - { - unset($this->context); - } - - /** - * If present, contextual information is needed to understand where this image - * comes from. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageAnnotationContext context = 21; - * @param \Google\Cloud\Vision\V1\ImageAnnotationContext $var - * @return $this - */ - public function setContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageAnnotationContext::class); - $this->context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileRequest.php deleted file mode 100644 index c1ebfd6cc6dc..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.vision.v1.AsyncAnnotateFileRequest - */ -class AsyncAnnotateFileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Information about the input file. - * - * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; - */ - protected $input_config = null; - /** - * Required. Requested features. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; - */ - private $features; - /** - * Additional context that may accompany the image(s) in the file. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; - */ - protected $image_context = null; - /** - * Required. The desired output location and metadata (e.g. format). - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 4; - */ - protected $output_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\InputConfig $input_config - * Required. Information about the input file. - * @type array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $features - * Required. Requested features. - * @type \Google\Cloud\Vision\V1\ImageContext $image_context - * Additional context that may accompany the image(s) in the file. - * @type \Google\Cloud\Vision\V1\OutputConfig $output_config - * Required. The desired output location and metadata (e.g. format). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Required. Information about the input file. - * - * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; - * @return \Google\Cloud\Vision\V1\InputConfig|null - */ - public function getInputConfig() - { - return $this->input_config; - } - - public function hasInputConfig() - { - return isset($this->input_config); - } - - public function clearInputConfig() - { - unset($this->input_config); - } - - /** - * Required. Information about the input file. - * - * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; - * @param \Google\Cloud\Vision\V1\InputConfig $var - * @return $this - */ - public function setInputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\InputConfig::class); - $this->input_config = $var; - - return $this; - } - - /** - * Required. Requested features. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFeatures() - { - return $this->features; - } - - /** - * Required. Requested features. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; - * @param array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFeatures($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Feature::class); - $this->features = $arr; - - return $this; - } - - /** - * Additional context that may accompany the image(s) in the file. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; - * @return \Google\Cloud\Vision\V1\ImageContext|null - */ - public function getImageContext() - { - return $this->image_context; - } - - public function hasImageContext() - { - return isset($this->image_context); - } - - public function clearImageContext() - { - unset($this->image_context); - } - - /** - * Additional context that may accompany the image(s) in the file. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; - * @param \Google\Cloud\Vision\V1\ImageContext $var - * @return $this - */ - public function setImageContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageContext::class); - $this->image_context = $var; - - return $this; - } - - /** - * Required. The desired output location and metadata (e.g. format). - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 4; - * @return \Google\Cloud\Vision\V1\OutputConfig|null - */ - public function getOutputConfig() - { - return $this->output_config; - } - - public function hasOutputConfig() - { - return isset($this->output_config); - } - - public function clearOutputConfig() - { - unset($this->output_config); - } - - /** - * Required. The desired output location and metadata (e.g. format). - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 4; - * @param \Google\Cloud\Vision\V1\OutputConfig $var - * @return $this - */ - public function setOutputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\OutputConfig::class); - $this->output_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileResponse.php deleted file mode 100644 index 1dbad5e843de..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.vision.v1.AsyncAnnotateFileResponse - */ -class AsyncAnnotateFileResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The output location and metadata from AsyncAnnotateFileRequest. - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; - */ - protected $output_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\OutputConfig $output_config - * The output location and metadata from AsyncAnnotateFileRequest. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * The output location and metadata from AsyncAnnotateFileRequest. - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; - * @return \Google\Cloud\Vision\V1\OutputConfig|null - */ - public function getOutputConfig() - { - return $this->output_config; - } - - public function hasOutputConfig() - { - return isset($this->output_config); - } - - public function clearOutputConfig() - { - unset($this->output_config); - } - - /** - * The output location and metadata from AsyncAnnotateFileRequest. - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; - * @param \Google\Cloud\Vision\V1\OutputConfig $var - * @return $this - */ - public function setOutputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\OutputConfig::class); - $this->output_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesRequest.php deleted file mode 100644 index 89b4ff854f7b..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesRequest.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest - */ -class AsyncBatchAnnotateFilesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Individual async file annotation requests for this batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $requests; - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 4; - */ - protected $parent = ''; - - /** - * @param \Google\Cloud\Vision\V1\AsyncAnnotateFileRequest[] $requests Required. Individual async file annotation requests for this batch. - * - * @return \Google\Cloud\Vision\V1\AsyncBatchAnnotateFilesRequest - * - * @experimental - */ - public static function build(array $requests): self - { - return (new self()) - ->setRequests($requests); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\AsyncAnnotateFileRequest>|\Google\Protobuf\Internal\RepeatedField $requests - * Required. Individual async file annotation requests for this batch. - * @type string $parent - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Required. Individual async file annotation requests for this batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRequests() - { - return $this->requests; - } - - /** - * Required. Individual async file annotation requests for this batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Vision\V1\AsyncAnnotateFileRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AsyncAnnotateFileRequest::class); - $this->requests = $arr; - - return $this; - } - - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 4; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 4; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesResponse.php deleted file mode 100644 index 475b70528eef..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesResponse.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse - */ -class AsyncBatchAnnotateFilesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of file annotation responses, one for each request in - * AsyncBatchAnnotateFilesRequest. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - private $responses; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\AsyncAnnotateFileResponse>|\Google\Protobuf\Internal\RepeatedField $responses - * The list of file annotation responses, one for each request in - * AsyncBatchAnnotateFilesRequest. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * The list of file annotation responses, one for each request in - * AsyncBatchAnnotateFilesRequest. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResponses() - { - return $this->responses; - } - - /** - * The list of file annotation responses, one for each request in - * AsyncBatchAnnotateFilesRequest. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - * @param array<\Google\Cloud\Vision\V1\AsyncAnnotateFileResponse>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResponses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AsyncAnnotateFileResponse::class); - $this->responses = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesRequest.php deleted file mode 100644 index 57662728fa40..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesRequest.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest - */ -class AsyncBatchAnnotateImagesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Individual image annotation requests for this batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $requests; - /** - * Required. The desired output location and metadata (e.g. format). - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $output_config = null; - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 4; - */ - protected $parent = ''; - - /** - * @param \Google\Cloud\Vision\V1\AnnotateImageRequest[] $requests Required. Individual image annotation requests for this batch. - * @param \Google\Cloud\Vision\V1\OutputConfig $outputConfig Required. The desired output location and metadata (e.g. format). - * - * @return \Google\Cloud\Vision\V1\AsyncBatchAnnotateImagesRequest - * - * @experimental - */ - public static function build(array $requests, \Google\Cloud\Vision\V1\OutputConfig $outputConfig): self - { - return (new self()) - ->setRequests($requests) - ->setOutputConfig($outputConfig); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\AnnotateImageRequest>|\Google\Protobuf\Internal\RepeatedField $requests - * Required. Individual image annotation requests for this batch. - * @type \Google\Cloud\Vision\V1\OutputConfig $output_config - * Required. The desired output location and metadata (e.g. format). - * @type string $parent - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Required. Individual image annotation requests for this batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRequests() - { - return $this->requests; - } - - /** - * Required. Individual image annotation requests for this batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Vision\V1\AnnotateImageRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateImageRequest::class); - $this->requests = $arr; - - return $this; - } - - /** - * Required. The desired output location and metadata (e.g. format). - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Vision\V1\OutputConfig|null - */ - public function getOutputConfig() - { - return $this->output_config; - } - - public function hasOutputConfig() - { - return isset($this->output_config); - } - - public function clearOutputConfig() - { - unset($this->output_config); - } - - /** - * Required. The desired output location and metadata (e.g. format). - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Vision\V1\OutputConfig $var - * @return $this - */ - public function setOutputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\OutputConfig::class); - $this->output_config = $var; - - return $this; - } - - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 4; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 4; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesResponse.php deleted file mode 100644 index 6a424d1a37ce..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse - */ -class AsyncBatchAnnotateImagesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The output location and metadata from AsyncBatchAnnotateImagesRequest. - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; - */ - protected $output_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\OutputConfig $output_config - * The output location and metadata from AsyncBatchAnnotateImagesRequest. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * The output location and metadata from AsyncBatchAnnotateImagesRequest. - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; - * @return \Google\Cloud\Vision\V1\OutputConfig|null - */ - public function getOutputConfig() - { - return $this->output_config; - } - - public function hasOutputConfig() - { - return isset($this->output_config); - } - - public function clearOutputConfig() - { - unset($this->output_config); - } - - /** - * The output location and metadata from AsyncBatchAnnotateImagesRequest. - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; - * @param \Google\Cloud\Vision\V1\OutputConfig $var - * @return $this - */ - public function setOutputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\OutputConfig::class); - $this->output_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesRequest.php deleted file mode 100644 index 3146d9c883e1..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesRequest.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.vision.v1.BatchAnnotateFilesRequest - */ -class BatchAnnotateFilesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The list of file annotation requests. Right now we support only one - * AnnotateFileRequest in BatchAnnotateFilesRequest. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $requests; - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 3; - */ - protected $parent = ''; - - /** - * @param \Google\Cloud\Vision\V1\AnnotateFileRequest[] $requests Required. The list of file annotation requests. Right now we support only one - * AnnotateFileRequest in BatchAnnotateFilesRequest. - * - * @return \Google\Cloud\Vision\V1\BatchAnnotateFilesRequest - * - * @experimental - */ - public static function build(array $requests): self - { - return (new self()) - ->setRequests($requests); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\AnnotateFileRequest>|\Google\Protobuf\Internal\RepeatedField $requests - * Required. The list of file annotation requests. Right now we support only one - * AnnotateFileRequest in BatchAnnotateFilesRequest. - * @type string $parent - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Required. The list of file annotation requests. Right now we support only one - * AnnotateFileRequest in BatchAnnotateFilesRequest. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRequests() - { - return $this->requests; - } - - /** - * Required. The list of file annotation requests. Right now we support only one - * AnnotateFileRequest in BatchAnnotateFilesRequest. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Vision\V1\AnnotateFileRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateFileRequest::class); - $this->requests = $arr; - - return $this; - } - - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 3; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 3; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesResponse.php deleted file mode 100644 index 2a6384a5d6a3..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesResponse.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.vision.v1.BatchAnnotateFilesResponse - */ -class BatchAnnotateFilesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of file annotation responses, each response corresponding to each - * AnnotateFileRequest in BatchAnnotateFilesRequest. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - private $responses; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\AnnotateFileResponse>|\Google\Protobuf\Internal\RepeatedField $responses - * The list of file annotation responses, each response corresponding to each - * AnnotateFileRequest in BatchAnnotateFilesRequest. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * The list of file annotation responses, each response corresponding to each - * AnnotateFileRequest in BatchAnnotateFilesRequest. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResponses() - { - return $this->responses; - } - - /** - * The list of file annotation responses, each response corresponding to each - * AnnotateFileRequest in BatchAnnotateFilesRequest. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - * @param array<\Google\Cloud\Vision\V1\AnnotateFileResponse>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResponses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateFileResponse::class); - $this->responses = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesRequest.php deleted file mode 100644 index be33dee8c896..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesRequest.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.vision.v1.BatchAnnotateImagesRequest - */ -class BatchAnnotateImagesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Individual image annotation requests for this batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $requests; - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 4; - */ - protected $parent = ''; - - /** - * @param \Google\Cloud\Vision\V1\AnnotateImageRequest[] $requests Required. Individual image annotation requests for this batch. - * - * @return \Google\Cloud\Vision\V1\BatchAnnotateImagesRequest - * - * @experimental - */ - public static function build(array $requests): self - { - return (new self()) - ->setRequests($requests); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\AnnotateImageRequest>|\Google\Protobuf\Internal\RepeatedField $requests - * Required. Individual image annotation requests for this batch. - * @type string $parent - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Required. Individual image annotation requests for this batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRequests() - { - return $this->requests; - } - - /** - * Required. Individual image annotation requests for this batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Vision\V1\AnnotateImageRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateImageRequest::class); - $this->requests = $arr; - - return $this; - } - - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 4; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 4; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesResponse.php deleted file mode 100644 index 94a35240ca6f..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.vision.v1.BatchAnnotateImagesResponse - */ -class BatchAnnotateImagesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Individual responses to image annotation requests within the batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - private $responses; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\AnnotateImageResponse>|\Google\Protobuf\Internal\RepeatedField $responses - * Individual responses to image annotation requests within the batch. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Individual responses to image annotation requests within the batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResponses() - { - return $this->responses; - } - - /** - * Individual responses to image annotation requests within the batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - * @param array<\Google\Cloud\Vision\V1\AnnotateImageResponse>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResponses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateImageResponse::class); - $this->responses = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata.php deleted file mode 100644 index 12e0a5a4af97..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.vision.v1.BatchOperationMetadata - */ -class BatchOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The current state of the batch operation. - * - * Generated from protobuf field .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; - */ - protected $state = 0; - /** - * The time when the batch request was submitted to the server. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 2; - */ - protected $submit_time = null; - /** - * The time when the batch request is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The current state of the batch operation. - * @type \Google\Protobuf\Timestamp $submit_time - * The time when the batch request was submitted to the server. - * @type \Google\Protobuf\Timestamp $end_time - * The time when the batch request is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * The current state of the batch operation. - * - * Generated from protobuf field .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the batch operation. - * - * Generated from protobuf field .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\BatchOperationMetadata\State::class); - $this->state = $var; - - return $this; - } - - /** - * The time when the batch request was submitted to the server. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSubmitTime() - { - return $this->submit_time; - } - - public function hasSubmitTime() - { - return isset($this->submit_time); - } - - public function clearSubmitTime() - { - unset($this->submit_time); - } - - /** - * The time when the batch request was submitted to the server. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSubmitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->submit_time = $var; - - return $this; - } - - /** - * The time when the batch request is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time when the batch request is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata/State.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata/State.php deleted file mode 100644 index cba5eccd4849..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata/State.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vision.v1.BatchOperationMetadata.State - */ -class State -{ - /** - * Invalid. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Request is actively being processed. - * - * Generated from protobuf enum PROCESSING = 1; - */ - const PROCESSING = 1; - /** - * The request is done and at least one item has been successfully - * processed. - * - * Generated from protobuf enum SUCCESSFUL = 2; - */ - const SUCCESSFUL = 2; - /** - * The request is done and no item has been successfully processed. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * The request is done after the longrunning.Operations.CancelOperation has - * been called by the user. Any records that were processed before the - * cancel command are output as specified in the request. - * - * Generated from protobuf enum CANCELLED = 4; - */ - const CANCELLED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PROCESSING => 'PROCESSING', - self::SUCCESSFUL => 'SUCCESSFUL', - self::FAILED => 'FAILED', - self::CANCELLED => 'CANCELLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Vision\V1\BatchOperationMetadata_State::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block.php deleted file mode 100644 index d53227721f64..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block.php +++ /dev/null @@ -1,279 +0,0 @@ -google.cloud.vision.v1.Block - */ -class Block extends \Google\Protobuf\Internal\Message -{ - /** - * Additional information detected for the block. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - protected $property = null; - /** - * The bounding box for the block. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - protected $bounding_box = null; - /** - * List of paragraphs in this block (if this blocks is of type text). - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - private $paragraphs; - /** - * Detected block type (text, image etc) for this block. - * - * Generated from protobuf field .google.cloud.vision.v1.Block.BlockType block_type = 4; - */ - protected $block_type = 0; - /** - * Confidence of the OCR results on the block. Range [0, 1]. - * - * Generated from protobuf field float confidence = 5; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $property - * Additional information detected for the block. - * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_box - * The bounding box for the block. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * @type array<\Google\Cloud\Vision\V1\Paragraph>|\Google\Protobuf\Internal\RepeatedField $paragraphs - * List of paragraphs in this block (if this blocks is of type text). - * @type int $block_type - * Detected block type (text, image etc) for this block. - * @type float $confidence - * Confidence of the OCR results on the block. Range [0, 1]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); - parent::__construct($data); - } - - /** - * Additional information detected for the block. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return \Google\Cloud\Vision\V1\TextAnnotation\TextProperty|null - */ - public function getProperty() - { - return $this->property; - } - - public function hasProperty() - { - return isset($this->property); - } - - public function clearProperty() - { - unset($this->property); - } - - /** - * Additional information detected for the block. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @param \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $var - * @return $this - */ - public function setProperty($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\TextProperty::class); - $this->property = $var; - - return $this; - } - - /** - * The bounding box for the block. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return \Google\Cloud\Vision\V1\BoundingPoly|null - */ - public function getBoundingBox() - { - return $this->bounding_box; - } - - public function hasBoundingBox() - { - return isset($this->bounding_box); - } - - public function clearBoundingBox() - { - unset($this->bounding_box); - } - - /** - * The bounding box for the block. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @param \Google\Cloud\Vision\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingBox($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->bounding_box = $var; - - return $this; - } - - /** - * List of paragraphs in this block (if this blocks is of type text). - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getParagraphs() - { - return $this->paragraphs; - } - - /** - * List of paragraphs in this block (if this blocks is of type text). - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - * @param array<\Google\Cloud\Vision\V1\Paragraph>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setParagraphs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Paragraph::class); - $this->paragraphs = $arr; - - return $this; - } - - /** - * Detected block type (text, image etc) for this block. - * - * Generated from protobuf field .google.cloud.vision.v1.Block.BlockType block_type = 4; - * @return int - */ - public function getBlockType() - { - return $this->block_type; - } - - /** - * Detected block type (text, image etc) for this block. - * - * Generated from protobuf field .google.cloud.vision.v1.Block.BlockType block_type = 4; - * @param int $var - * @return $this - */ - public function setBlockType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Block\BlockType::class); - $this->block_type = $var; - - return $this; - } - - /** - * Confidence of the OCR results on the block. Range [0, 1]. - * - * Generated from protobuf field float confidence = 5; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Confidence of the OCR results on the block. Range [0, 1]. - * - * Generated from protobuf field float confidence = 5; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block/BlockType.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block/BlockType.php deleted file mode 100644 index eefde91942e3..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block/BlockType.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.vision.v1.Block.BlockType - */ -class BlockType -{ - /** - * Unknown block type. - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * Regular text block. - * - * Generated from protobuf enum TEXT = 1; - */ - const TEXT = 1; - /** - * Table block. - * - * Generated from protobuf enum TABLE = 2; - */ - const TABLE = 2; - /** - * Image block. - * - * Generated from protobuf enum PICTURE = 3; - */ - const PICTURE = 3; - /** - * Horizontal/vertical line box. - * - * Generated from protobuf enum RULER = 4; - */ - const RULER = 4; - /** - * Barcode block. - * - * Generated from protobuf enum BARCODE = 5; - */ - const BARCODE = 5; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::TEXT => 'TEXT', - self::TABLE => 'TABLE', - self::PICTURE => 'PICTURE', - self::RULER => 'RULER', - self::BARCODE => 'BARCODE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BlockType::class, \Google\Cloud\Vision\V1\Block_BlockType::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BoundingPoly.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BoundingPoly.php deleted file mode 100644 index 7bc296abfa82..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BoundingPoly.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.vision.v1.BoundingPoly - */ -class BoundingPoly extends \Google\Protobuf\Internal\Message -{ - /** - * The bounding polygon vertices. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - private $vertices; - /** - * The bounding polygon normalized vertices. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - private $normalized_vertices; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\Vertex>|\Google\Protobuf\Internal\RepeatedField $vertices - * The bounding polygon vertices. - * @type array<\Google\Cloud\Vision\V1\NormalizedVertex>|\Google\Protobuf\Internal\RepeatedField $normalized_vertices - * The bounding polygon normalized vertices. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\Geometry::initOnce(); - parent::__construct($data); - } - - /** - * The bounding polygon vertices. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Vertex vertices = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVertices() - { - return $this->vertices; - } - - /** - * The bounding polygon vertices. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Vertex vertices = 1; - * @param array<\Google\Cloud\Vision\V1\Vertex>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVertices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Vertex::class); - $this->vertices = $arr; - - return $this; - } - - /** - * The bounding polygon normalized vertices. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNormalizedVertices() - { - return $this->normalized_vertices; - } - - /** - * The bounding polygon normalized vertices. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - * @param array<\Google\Cloud\Vision\V1\NormalizedVertex>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNormalizedVertices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\NormalizedVertex::class); - $this->normalized_vertices = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ColorInfo.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ColorInfo.php deleted file mode 100644 index 545a5de76ace..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ColorInfo.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.vision.v1.ColorInfo - */ -class ColorInfo extends \Google\Protobuf\Internal\Message -{ - /** - * RGB components of the color. - * - * Generated from protobuf field .google.type.Color color = 1; - */ - protected $color = null; - /** - * Image-specific score for this color. Value in range [0, 1]. - * - * Generated from protobuf field float score = 2; - */ - protected $score = 0.0; - /** - * The fraction of pixels the color occupies in the image. - * Value in range [0, 1]. - * - * Generated from protobuf field float pixel_fraction = 3; - */ - protected $pixel_fraction = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\Color $color - * RGB components of the color. - * @type float $score - * Image-specific score for this color. Value in range [0, 1]. - * @type float $pixel_fraction - * The fraction of pixels the color occupies in the image. - * Value in range [0, 1]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * RGB components of the color. - * - * Generated from protobuf field .google.type.Color color = 1; - * @return \Google\Type\Color|null - */ - public function getColor() - { - return $this->color; - } - - public function hasColor() - { - return isset($this->color); - } - - public function clearColor() - { - unset($this->color); - } - - /** - * RGB components of the color. - * - * Generated from protobuf field .google.type.Color color = 1; - * @param \Google\Type\Color $var - * @return $this - */ - public function setColor($var) - { - GPBUtil::checkMessage($var, \Google\Type\Color::class); - $this->color = $var; - - return $this; - } - - /** - * Image-specific score for this color. Value in range [0, 1]. - * - * Generated from protobuf field float score = 2; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * Image-specific score for this color. Value in range [0, 1]. - * - * Generated from protobuf field float score = 2; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - - /** - * The fraction of pixels the color occupies in the image. - * Value in range [0, 1]. - * - * Generated from protobuf field float pixel_fraction = 3; - * @return float - */ - public function getPixelFraction() - { - return $this->pixel_fraction; - } - - /** - * The fraction of pixels the color occupies in the image. - * Value in range [0, 1]. - * - * Generated from protobuf field float pixel_fraction = 3; - * @param float $var - * @return $this - */ - public function setPixelFraction($var) - { - GPBUtil::checkFloat($var); - $this->pixel_fraction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductRequest.php deleted file mode 100644 index fbb905a23ca3..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.vision.v1.CreateProductRequest - */ -class CreateProductRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project in which the Product should be created. - * Format is - * `projects/PROJECT_ID/locations/LOC_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The product to create. - * - * Generated from protobuf field .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $product = null; - /** - * A user-supplied resource id for this Product. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * - * Generated from protobuf field string product_id = 3; - */ - protected $product_id = ''; - - /** - * @param string $parent Required. The project in which the Product should be created. - * - * Format is - * `projects/PROJECT_ID/locations/LOC_ID`. Please see - * {@see ProductSearchClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Vision\V1\Product $product Required. The product to create. - * @param string $productId A user-supplied resource id for this Product. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * - * @return \Google\Cloud\Vision\V1\CreateProductRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Vision\V1\Product $product, string $productId): self - { - return (new self()) - ->setParent($parent) - ->setProduct($product) - ->setProductId($productId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project in which the Product should be created. - * Format is - * `projects/PROJECT_ID/locations/LOC_ID`. - * @type \Google\Cloud\Vision\V1\Product $product - * Required. The product to create. - * @type string $product_id - * A user-supplied resource id for this Product. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project in which the Product should be created. - * Format is - * `projects/PROJECT_ID/locations/LOC_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project in which the Product should be created. - * Format is - * `projects/PROJECT_ID/locations/LOC_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The product to create. - * - * Generated from protobuf field .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Vision\V1\Product|null - */ - public function getProduct() - { - return $this->product; - } - - public function hasProduct() - { - return isset($this->product); - } - - public function clearProduct() - { - unset($this->product); - } - - /** - * Required. The product to create. - * - * Generated from protobuf field .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Vision\V1\Product $var - * @return $this - */ - public function setProduct($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Product::class); - $this->product = $var; - - return $this; - } - - /** - * A user-supplied resource id for this Product. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * - * Generated from protobuf field string product_id = 3; - * @return string - */ - public function getProductId() - { - return $this->product_id; - } - - /** - * A user-supplied resource id for this Product. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * - * Generated from protobuf field string product_id = 3; - * @param string $var - * @return $this - */ - public function setProductId($var) - { - GPBUtil::checkString($var, True); - $this->product_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductSetRequest.php deleted file mode 100644 index 06f5ef2cf0cb..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductSetRequest.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.vision.v1.CreateProductSetRequest - */ -class CreateProductSetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project in which the ProductSet should be created. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ProductSet to create. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $product_set = null; - /** - * A user-supplied resource id for this ProductSet. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * - * Generated from protobuf field string product_set_id = 3; - */ - protected $product_set_id = ''; - - /** - * @param string $parent Required. The project in which the ProductSet should be created. - * - * Format is `projects/PROJECT_ID/locations/LOC_ID`. Please see - * {@see ProductSearchClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Vision\V1\ProductSet $productSet Required. The ProductSet to create. - * @param string $productSetId A user-supplied resource id for this ProductSet. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * - * @return \Google\Cloud\Vision\V1\CreateProductSetRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Vision\V1\ProductSet $productSet, string $productSetId): self - { - return (new self()) - ->setParent($parent) - ->setProductSet($productSet) - ->setProductSetId($productSetId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project in which the ProductSet should be created. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @type \Google\Cloud\Vision\V1\ProductSet $product_set - * Required. The ProductSet to create. - * @type string $product_set_id - * A user-supplied resource id for this ProductSet. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project in which the ProductSet should be created. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project in which the ProductSet should be created. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ProductSet to create. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Vision\V1\ProductSet|null - */ - public function getProductSet() - { - return $this->product_set; - } - - public function hasProductSet() - { - return isset($this->product_set); - } - - public function clearProductSet() - { - unset($this->product_set); - } - - /** - * Required. The ProductSet to create. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Vision\V1\ProductSet $var - * @return $this - */ - public function setProductSet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSet::class); - $this->product_set = $var; - - return $this; - } - - /** - * A user-supplied resource id for this ProductSet. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * - * Generated from protobuf field string product_set_id = 3; - * @return string - */ - public function getProductSetId() - { - return $this->product_set_id; - } - - /** - * A user-supplied resource id for this ProductSet. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * - * Generated from protobuf field string product_set_id = 3; - * @param string $var - * @return $this - */ - public function setProductSetId($var) - { - GPBUtil::checkString($var, True); - $this->product_set_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateReferenceImageRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateReferenceImageRequest.php deleted file mode 100644 index 318b63962ef2..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateReferenceImageRequest.php +++ /dev/null @@ -1,194 +0,0 @@ -google.cloud.vision.v1.CreateReferenceImageRequest - */ -class CreateReferenceImageRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the product in which to create the reference image. - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The reference image to create. - * If an image ID is specified, it is ignored. - * - * Generated from protobuf field .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $reference_image = null; - /** - * A user-supplied resource id for the ReferenceImage to be added. If set, - * the server will attempt to use this value as the resource id. If it is - * already in use, an error is returned with code ALREADY_EXISTS. Must be at - * most 128 characters long. It cannot contain the character `/`. - * - * Generated from protobuf field string reference_image_id = 3; - */ - protected $reference_image_id = ''; - - /** - * @param string $parent Required. Resource name of the product in which to create the reference image. - * - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. Please see - * {@see ProductSearchClient::productName()} for help formatting this field. - * @param \Google\Cloud\Vision\V1\ReferenceImage $referenceImage Required. The reference image to create. - * If an image ID is specified, it is ignored. - * @param string $referenceImageId A user-supplied resource id for the ReferenceImage to be added. If set, - * the server will attempt to use this value as the resource id. If it is - * already in use, an error is returned with code ALREADY_EXISTS. Must be at - * most 128 characters long. It cannot contain the character `/`. - * - * @return \Google\Cloud\Vision\V1\CreateReferenceImageRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Vision\V1\ReferenceImage $referenceImage, string $referenceImageId): self - { - return (new self()) - ->setParent($parent) - ->setReferenceImage($referenceImage) - ->setReferenceImageId($referenceImageId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the product in which to create the reference image. - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * @type \Google\Cloud\Vision\V1\ReferenceImage $reference_image - * Required. The reference image to create. - * If an image ID is specified, it is ignored. - * @type string $reference_image_id - * A user-supplied resource id for the ReferenceImage to be added. If set, - * the server will attempt to use this value as the resource id. If it is - * already in use, an error is returned with code ALREADY_EXISTS. Must be at - * most 128 characters long. It cannot contain the character `/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the product in which to create the reference image. - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Resource name of the product in which to create the reference image. - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The reference image to create. - * If an image ID is specified, it is ignored. - * - * Generated from protobuf field .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Vision\V1\ReferenceImage|null - */ - public function getReferenceImage() - { - return $this->reference_image; - } - - public function hasReferenceImage() - { - return isset($this->reference_image); - } - - public function clearReferenceImage() - { - unset($this->reference_image); - } - - /** - * Required. The reference image to create. - * If an image ID is specified, it is ignored. - * - * Generated from protobuf field .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Vision\V1\ReferenceImage $var - * @return $this - */ - public function setReferenceImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ReferenceImage::class); - $this->reference_image = $var; - - return $this; - } - - /** - * A user-supplied resource id for the ReferenceImage to be added. If set, - * the server will attempt to use this value as the resource id. If it is - * already in use, an error is returned with code ALREADY_EXISTS. Must be at - * most 128 characters long. It cannot contain the character `/`. - * - * Generated from protobuf field string reference_image_id = 3; - * @return string - */ - public function getReferenceImageId() - { - return $this->reference_image_id; - } - - /** - * A user-supplied resource id for the ReferenceImage to be added. If set, - * the server will attempt to use this value as the resource id. If it is - * already in use, an error is returned with code ALREADY_EXISTS. Must be at - * most 128 characters long. It cannot contain the character `/`. - * - * Generated from protobuf field string reference_image_id = 3; - * @param string $var - * @return $this - */ - public function setReferenceImageId($var) - { - GPBUtil::checkString($var, True); - $this->reference_image_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHint.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHint.php deleted file mode 100644 index 34593cd6e194..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHint.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.vision.v1.CropHint - */ -class CropHint extends \Google\Protobuf\Internal\Message -{ - /** - * The bounding polygon for the crop region. The coordinates of the bounding - * box are in the original image's scale. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - protected $bounding_poly = null; - /** - * Confidence of this being a salient region. Range [0, 1]. - * - * Generated from protobuf field float confidence = 2; - */ - protected $confidence = 0.0; - /** - * Fraction of importance of this salient region with respect to the original - * image. - * - * Generated from protobuf field float importance_fraction = 3; - */ - protected $importance_fraction = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly - * The bounding polygon for the crop region. The coordinates of the bounding - * box are in the original image's scale. - * @type float $confidence - * Confidence of this being a salient region. Range [0, 1]. - * @type float $importance_fraction - * Fraction of importance of this salient region with respect to the original - * image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * The bounding polygon for the crop region. The coordinates of the bounding - * box are in the original image's scale. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return \Google\Cloud\Vision\V1\BoundingPoly|null - */ - public function getBoundingPoly() - { - return $this->bounding_poly; - } - - public function hasBoundingPoly() - { - return isset($this->bounding_poly); - } - - public function clearBoundingPoly() - { - unset($this->bounding_poly); - } - - /** - * The bounding polygon for the crop region. The coordinates of the bounding - * box are in the original image's scale. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @param \Google\Cloud\Vision\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingPoly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->bounding_poly = $var; - - return $this; - } - - /** - * Confidence of this being a salient region. Range [0, 1]. - * - * Generated from protobuf field float confidence = 2; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Confidence of this being a salient region. Range [0, 1]. - * - * Generated from protobuf field float confidence = 2; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - - /** - * Fraction of importance of this salient region with respect to the original - * image. - * - * Generated from protobuf field float importance_fraction = 3; - * @return float - */ - public function getImportanceFraction() - { - return $this->importance_fraction; - } - - /** - * Fraction of importance of this salient region with respect to the original - * image. - * - * Generated from protobuf field float importance_fraction = 3; - * @param float $var - * @return $this - */ - public function setImportanceFraction($var) - { - GPBUtil::checkFloat($var); - $this->importance_fraction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsAnnotation.php deleted file mode 100644 index 7edebe86ec09..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsAnnotation.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.vision.v1.CropHintsAnnotation - */ -class CropHintsAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * Crop hint results. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - private $crop_hints; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\CropHint>|\Google\Protobuf\Internal\RepeatedField $crop_hints - * Crop hint results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Crop hint results. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCropHints() - { - return $this->crop_hints; - } - - /** - * Crop hint results. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - * @param array<\Google\Cloud\Vision\V1\CropHint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCropHints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\CropHint::class); - $this->crop_hints = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsParams.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsParams.php deleted file mode 100644 index a1cc403bdb2e..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsParams.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.vision.v1.CropHintsParams - */ -class CropHintsParams extends \Google\Protobuf\Internal\Message -{ - /** - * Aspect ratios in floats, representing the ratio of the width to the height - * of the image. For example, if the desired aspect ratio is 4/3, the - * corresponding float value should be 1.33333. If not specified, the - * best possible crop is returned. The number of provided aspect ratios is - * limited to a maximum of 16; any aspect ratios provided after the 16th are - * ignored. - * - * Generated from protobuf field repeated float aspect_ratios = 1; - */ - private $aspect_ratios; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $aspect_ratios - * Aspect ratios in floats, representing the ratio of the width to the height - * of the image. For example, if the desired aspect ratio is 4/3, the - * corresponding float value should be 1.33333. If not specified, the - * best possible crop is returned. The number of provided aspect ratios is - * limited to a maximum of 16; any aspect ratios provided after the 16th are - * ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Aspect ratios in floats, representing the ratio of the width to the height - * of the image. For example, if the desired aspect ratio is 4/3, the - * corresponding float value should be 1.33333. If not specified, the - * best possible crop is returned. The number of provided aspect ratios is - * limited to a maximum of 16; any aspect ratios provided after the 16th are - * ignored. - * - * Generated from protobuf field repeated float aspect_ratios = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAspectRatios() - { - return $this->aspect_ratios; - } - - /** - * Aspect ratios in floats, representing the ratio of the width to the height - * of the image. For example, if the desired aspect ratio is 4/3, the - * corresponding float value should be 1.33333. If not specified, the - * best possible crop is returned. The number of provided aspect ratios is - * limited to a maximum of 16; any aspect ratios provided after the 16th are - * ignored. - * - * Generated from protobuf field repeated float aspect_ratios = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAspectRatios($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::FLOAT); - $this->aspect_ratios = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductRequest.php deleted file mode 100644 index 744dae5b2622..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.vision.v1.DeleteProductRequest - */ -class DeleteProductRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of product to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of product to delete. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * Please see {@see ProductSearchClient::productName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\DeleteProductRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of product to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of product to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of product to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductSetRequest.php deleted file mode 100644 index aa0ce3fb5abb..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductSetRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.vision.v1.DeleteProductSetRequest - */ -class DeleteProductSetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the ProductSet to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the ProductSet to delete. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\DeleteProductSetRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the ProductSet to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the ProductSet to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the ProductSet to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteReferenceImageRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteReferenceImageRequest.php deleted file mode 100644 index f40ed15cd650..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteReferenceImageRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.vision.v1.DeleteReferenceImageRequest - */ -class DeleteReferenceImageRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the reference image to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the reference image to delete. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - * Please see {@see ProductSearchClient::referenceImageName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\DeleteReferenceImageRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the reference image to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the reference image to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the reference image to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DominantColorsAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DominantColorsAnnotation.php deleted file mode 100644 index ed9d31ab00c2..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DominantColorsAnnotation.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.vision.v1.DominantColorsAnnotation - */ -class DominantColorsAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * RGB color values with their score and pixel fraction. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - private $colors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\ColorInfo>|\Google\Protobuf\Internal\RepeatedField $colors - * RGB color values with their score and pixel fraction. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * RGB color values with their score and pixel fraction. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ColorInfo colors = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getColors() - { - return $this->colors; - } - - /** - * RGB color values with their score and pixel fraction. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ColorInfo colors = 1; - * @param array<\Google\Cloud\Vision\V1\ColorInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setColors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ColorInfo::class); - $this->colors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/EntityAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/EntityAnnotation.php deleted file mode 100644 index 4ea1b12e776c..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/EntityAnnotation.php +++ /dev/null @@ -1,422 +0,0 @@ -google.cloud.vision.v1.EntityAnnotation - */ -class EntityAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * Opaque entity ID. Some IDs may be available in - * [Google Knowledge Graph Search - * API](https://developers.google.com/knowledge-graph/). - * - * Generated from protobuf field string mid = 1; - */ - protected $mid = ''; - /** - * The language code for the locale in which the entity textual - * `description` is expressed. - * - * Generated from protobuf field string locale = 2; - */ - protected $locale = ''; - /** - * Entity textual description, expressed in its `locale` language. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Overall score of the result. Range [0, 1]. - * - * Generated from protobuf field float score = 4; - */ - protected $score = 0.0; - /** - * **Deprecated. Use `score` instead.** - * The accuracy of the entity detection in an image. - * For example, for an image in which the "Eiffel Tower" entity is detected, - * this field represents the confidence that there is a tower in the query - * image. Range [0, 1]. - * - * Generated from protobuf field float confidence = 5 [deprecated = true]; - * @deprecated - */ - protected $confidence = 0.0; - /** - * The relevancy of the ICA (Image Content Annotation) label to the - * image. For example, the relevancy of "tower" is likely higher to an image - * containing the detected "Eiffel Tower" than to an image containing a - * detected distant towering building, even though the confidence that - * there is a tower in each image may be the same. Range [0, 1]. - * - * Generated from protobuf field float topicality = 6; - */ - protected $topicality = 0.0; - /** - * Image region to which this entity belongs. Not produced - * for `LABEL_DETECTION` features. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; - */ - protected $bounding_poly = null; - /** - * The location information for the detected entity. Multiple - * `LocationInfo` elements can be present because one location may - * indicate the location of the scene in the image, and another location - * may indicate the location of the place where the image was taken. - * Location information is usually present for landmarks. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - private $locations; - /** - * Some entities may have optional user-supplied `Property` (name/value) - * fields, such a score or string that qualifies the entity. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Property properties = 9; - */ - private $properties; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $mid - * Opaque entity ID. Some IDs may be available in - * [Google Knowledge Graph Search - * API](https://developers.google.com/knowledge-graph/). - * @type string $locale - * The language code for the locale in which the entity textual - * `description` is expressed. - * @type string $description - * Entity textual description, expressed in its `locale` language. - * @type float $score - * Overall score of the result. Range [0, 1]. - * @type float $confidence - * **Deprecated. Use `score` instead.** - * The accuracy of the entity detection in an image. - * For example, for an image in which the "Eiffel Tower" entity is detected, - * this field represents the confidence that there is a tower in the query - * image. Range [0, 1]. - * @type float $topicality - * The relevancy of the ICA (Image Content Annotation) label to the - * image. For example, the relevancy of "tower" is likely higher to an image - * containing the detected "Eiffel Tower" than to an image containing a - * detected distant towering building, even though the confidence that - * there is a tower in each image may be the same. Range [0, 1]. - * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly - * Image region to which this entity belongs. Not produced - * for `LABEL_DETECTION` features. - * @type array<\Google\Cloud\Vision\V1\LocationInfo>|\Google\Protobuf\Internal\RepeatedField $locations - * The location information for the detected entity. Multiple - * `LocationInfo` elements can be present because one location may - * indicate the location of the scene in the image, and another location - * may indicate the location of the place where the image was taken. - * Location information is usually present for landmarks. - * @type array<\Google\Cloud\Vision\V1\Property>|\Google\Protobuf\Internal\RepeatedField $properties - * Some entities may have optional user-supplied `Property` (name/value) - * fields, such a score or string that qualifies the entity. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Opaque entity ID. Some IDs may be available in - * [Google Knowledge Graph Search - * API](https://developers.google.com/knowledge-graph/). - * - * Generated from protobuf field string mid = 1; - * @return string - */ - public function getMid() - { - return $this->mid; - } - - /** - * Opaque entity ID. Some IDs may be available in - * [Google Knowledge Graph Search - * API](https://developers.google.com/knowledge-graph/). - * - * Generated from protobuf field string mid = 1; - * @param string $var - * @return $this - */ - public function setMid($var) - { - GPBUtil::checkString($var, True); - $this->mid = $var; - - return $this; - } - - /** - * The language code for the locale in which the entity textual - * `description` is expressed. - * - * Generated from protobuf field string locale = 2; - * @return string - */ - public function getLocale() - { - return $this->locale; - } - - /** - * The language code for the locale in which the entity textual - * `description` is expressed. - * - * Generated from protobuf field string locale = 2; - * @param string $var - * @return $this - */ - public function setLocale($var) - { - GPBUtil::checkString($var, True); - $this->locale = $var; - - return $this; - } - - /** - * Entity textual description, expressed in its `locale` language. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Entity textual description, expressed in its `locale` language. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Overall score of the result. Range [0, 1]. - * - * Generated from protobuf field float score = 4; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * Overall score of the result. Range [0, 1]. - * - * Generated from protobuf field float score = 4; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - - /** - * **Deprecated. Use `score` instead.** - * The accuracy of the entity detection in an image. - * For example, for an image in which the "Eiffel Tower" entity is detected, - * this field represents the confidence that there is a tower in the query - * image. Range [0, 1]. - * - * Generated from protobuf field float confidence = 5 [deprecated = true]; - * @return float - * @deprecated - */ - public function getConfidence() - { - @trigger_error('confidence is deprecated.', E_USER_DEPRECATED); - return $this->confidence; - } - - /** - * **Deprecated. Use `score` instead.** - * The accuracy of the entity detection in an image. - * For example, for an image in which the "Eiffel Tower" entity is detected, - * this field represents the confidence that there is a tower in the query - * image. Range [0, 1]. - * - * Generated from protobuf field float confidence = 5 [deprecated = true]; - * @param float $var - * @return $this - * @deprecated - */ - public function setConfidence($var) - { - @trigger_error('confidence is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - - /** - * The relevancy of the ICA (Image Content Annotation) label to the - * image. For example, the relevancy of "tower" is likely higher to an image - * containing the detected "Eiffel Tower" than to an image containing a - * detected distant towering building, even though the confidence that - * there is a tower in each image may be the same. Range [0, 1]. - * - * Generated from protobuf field float topicality = 6; - * @return float - */ - public function getTopicality() - { - return $this->topicality; - } - - /** - * The relevancy of the ICA (Image Content Annotation) label to the - * image. For example, the relevancy of "tower" is likely higher to an image - * containing the detected "Eiffel Tower" than to an image containing a - * detected distant towering building, even though the confidence that - * there is a tower in each image may be the same. Range [0, 1]. - * - * Generated from protobuf field float topicality = 6; - * @param float $var - * @return $this - */ - public function setTopicality($var) - { - GPBUtil::checkFloat($var); - $this->topicality = $var; - - return $this; - } - - /** - * Image region to which this entity belongs. Not produced - * for `LABEL_DETECTION` features. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; - * @return \Google\Cloud\Vision\V1\BoundingPoly|null - */ - public function getBoundingPoly() - { - return $this->bounding_poly; - } - - public function hasBoundingPoly() - { - return isset($this->bounding_poly); - } - - public function clearBoundingPoly() - { - unset($this->bounding_poly); - } - - /** - * Image region to which this entity belongs. Not produced - * for `LABEL_DETECTION` features. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; - * @param \Google\Cloud\Vision\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingPoly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->bounding_poly = $var; - - return $this; - } - - /** - * The location information for the detected entity. Multiple - * `LocationInfo` elements can be present because one location may - * indicate the location of the scene in the image, and another location - * may indicate the location of the place where the image was taken. - * Location information is usually present for landmarks. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.LocationInfo locations = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLocations() - { - return $this->locations; - } - - /** - * The location information for the detected entity. Multiple - * `LocationInfo` elements can be present because one location may - * indicate the location of the scene in the image, and another location - * may indicate the location of the place where the image was taken. - * Location information is usually present for landmarks. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.LocationInfo locations = 8; - * @param array<\Google\Cloud\Vision\V1\LocationInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\LocationInfo::class); - $this->locations = $arr; - - return $this; - } - - /** - * Some entities may have optional user-supplied `Property` (name/value) - * fields, such a score or string that qualifies the entity. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Property properties = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Some entities may have optional user-supplied `Property` (name/value) - * fields, such a score or string that qualifies the entity. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Property properties = 9; - * @param array<\Google\Cloud\Vision\V1\Property>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Property::class); - $this->properties = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation.php deleted file mode 100644 index b9af007fead8..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation.php +++ /dev/null @@ -1,627 +0,0 @@ -google.cloud.vision.v1.FaceAnnotation - */ -class FaceAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * The bounding polygon around the face. The coordinates of the bounding box - * are in the original image's scale. - * The bounding box is computed to "frame" the face in accordance with human - * expectations. It is based on the landmarker results. - * Note that one or more x and/or y coordinates may not be generated in the - * `BoundingPoly` (the polygon will be unbounded) if only a partial face - * appears in the image to be annotated. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - protected $bounding_poly = null; - /** - * The `fd_bounding_poly` bounding polygon is tighter than the - * `boundingPoly`, and encloses only the skin part of the face. Typically, it - * is used to eliminate the face from any image analysis that detects the - * "amount of skin" visible in an image. It is not based on the - * landmarker results, only on the initial face detection, hence - * the fd (face detection) prefix. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; - */ - protected $fd_bounding_poly = null; - /** - * Detected face landmarks. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - private $landmarks; - /** - * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation - * of the face relative to the image vertical about the axis perpendicular to - * the face. Range [-180,180]. - * - * Generated from protobuf field float roll_angle = 4; - */ - protected $roll_angle = 0.0; - /** - * Yaw angle, which indicates the leftward/rightward angle that the face is - * pointing relative to the vertical plane perpendicular to the image. Range - * [-180,180]. - * - * Generated from protobuf field float pan_angle = 5; - */ - protected $pan_angle = 0.0; - /** - * Pitch angle, which indicates the upwards/downwards angle that the face is - * pointing relative to the image's horizontal plane. Range [-180,180]. - * - * Generated from protobuf field float tilt_angle = 6; - */ - protected $tilt_angle = 0.0; - /** - * Detection confidence. Range [0, 1]. - * - * Generated from protobuf field float detection_confidence = 7; - */ - protected $detection_confidence = 0.0; - /** - * Face landmarking confidence. Range [0, 1]. - * - * Generated from protobuf field float landmarking_confidence = 8; - */ - protected $landmarking_confidence = 0.0; - /** - * Joy likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood joy_likelihood = 9; - */ - protected $joy_likelihood = 0; - /** - * Sorrow likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; - */ - protected $sorrow_likelihood = 0; - /** - * Anger likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood anger_likelihood = 11; - */ - protected $anger_likelihood = 0; - /** - * Surprise likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; - */ - protected $surprise_likelihood = 0; - /** - * Under-exposed likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; - */ - protected $under_exposed_likelihood = 0; - /** - * Blurred likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; - */ - protected $blurred_likelihood = 0; - /** - * Headwear likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; - */ - protected $headwear_likelihood = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly - * The bounding polygon around the face. The coordinates of the bounding box - * are in the original image's scale. - * The bounding box is computed to "frame" the face in accordance with human - * expectations. It is based on the landmarker results. - * Note that one or more x and/or y coordinates may not be generated in the - * `BoundingPoly` (the polygon will be unbounded) if only a partial face - * appears in the image to be annotated. - * @type \Google\Cloud\Vision\V1\BoundingPoly $fd_bounding_poly - * The `fd_bounding_poly` bounding polygon is tighter than the - * `boundingPoly`, and encloses only the skin part of the face. Typically, it - * is used to eliminate the face from any image analysis that detects the - * "amount of skin" visible in an image. It is not based on the - * landmarker results, only on the initial face detection, hence - * the fd (face detection) prefix. - * @type array<\Google\Cloud\Vision\V1\FaceAnnotation\Landmark>|\Google\Protobuf\Internal\RepeatedField $landmarks - * Detected face landmarks. - * @type float $roll_angle - * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation - * of the face relative to the image vertical about the axis perpendicular to - * the face. Range [-180,180]. - * @type float $pan_angle - * Yaw angle, which indicates the leftward/rightward angle that the face is - * pointing relative to the vertical plane perpendicular to the image. Range - * [-180,180]. - * @type float $tilt_angle - * Pitch angle, which indicates the upwards/downwards angle that the face is - * pointing relative to the image's horizontal plane. Range [-180,180]. - * @type float $detection_confidence - * Detection confidence. Range [0, 1]. - * @type float $landmarking_confidence - * Face landmarking confidence. Range [0, 1]. - * @type int $joy_likelihood - * Joy likelihood. - * @type int $sorrow_likelihood - * Sorrow likelihood. - * @type int $anger_likelihood - * Anger likelihood. - * @type int $surprise_likelihood - * Surprise likelihood. - * @type int $under_exposed_likelihood - * Under-exposed likelihood. - * @type int $blurred_likelihood - * Blurred likelihood. - * @type int $headwear_likelihood - * Headwear likelihood. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * The bounding polygon around the face. The coordinates of the bounding box - * are in the original image's scale. - * The bounding box is computed to "frame" the face in accordance with human - * expectations. It is based on the landmarker results. - * Note that one or more x and/or y coordinates may not be generated in the - * `BoundingPoly` (the polygon will be unbounded) if only a partial face - * appears in the image to be annotated. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return \Google\Cloud\Vision\V1\BoundingPoly|null - */ - public function getBoundingPoly() - { - return $this->bounding_poly; - } - - public function hasBoundingPoly() - { - return isset($this->bounding_poly); - } - - public function clearBoundingPoly() - { - unset($this->bounding_poly); - } - - /** - * The bounding polygon around the face. The coordinates of the bounding box - * are in the original image's scale. - * The bounding box is computed to "frame" the face in accordance with human - * expectations. It is based on the landmarker results. - * Note that one or more x and/or y coordinates may not be generated in the - * `BoundingPoly` (the polygon will be unbounded) if only a partial face - * appears in the image to be annotated. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @param \Google\Cloud\Vision\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingPoly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->bounding_poly = $var; - - return $this; - } - - /** - * The `fd_bounding_poly` bounding polygon is tighter than the - * `boundingPoly`, and encloses only the skin part of the face. Typically, it - * is used to eliminate the face from any image analysis that detects the - * "amount of skin" visible in an image. It is not based on the - * landmarker results, only on the initial face detection, hence - * the fd (face detection) prefix. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; - * @return \Google\Cloud\Vision\V1\BoundingPoly|null - */ - public function getFdBoundingPoly() - { - return $this->fd_bounding_poly; - } - - public function hasFdBoundingPoly() - { - return isset($this->fd_bounding_poly); - } - - public function clearFdBoundingPoly() - { - unset($this->fd_bounding_poly); - } - - /** - * The `fd_bounding_poly` bounding polygon is tighter than the - * `boundingPoly`, and encloses only the skin part of the face. Typically, it - * is used to eliminate the face from any image analysis that detects the - * "amount of skin" visible in an image. It is not based on the - * landmarker results, only on the initial face detection, hence - * the fd (face detection) prefix. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; - * @param \Google\Cloud\Vision\V1\BoundingPoly $var - * @return $this - */ - public function setFdBoundingPoly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->fd_bounding_poly = $var; - - return $this; - } - - /** - * Detected face landmarks. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLandmarks() - { - return $this->landmarks; - } - - /** - * Detected face landmarks. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - * @param array<\Google\Cloud\Vision\V1\FaceAnnotation\Landmark>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLandmarks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\FaceAnnotation\Landmark::class); - $this->landmarks = $arr; - - return $this; - } - - /** - * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation - * of the face relative to the image vertical about the axis perpendicular to - * the face. Range [-180,180]. - * - * Generated from protobuf field float roll_angle = 4; - * @return float - */ - public function getRollAngle() - { - return $this->roll_angle; - } - - /** - * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation - * of the face relative to the image vertical about the axis perpendicular to - * the face. Range [-180,180]. - * - * Generated from protobuf field float roll_angle = 4; - * @param float $var - * @return $this - */ - public function setRollAngle($var) - { - GPBUtil::checkFloat($var); - $this->roll_angle = $var; - - return $this; - } - - /** - * Yaw angle, which indicates the leftward/rightward angle that the face is - * pointing relative to the vertical plane perpendicular to the image. Range - * [-180,180]. - * - * Generated from protobuf field float pan_angle = 5; - * @return float - */ - public function getPanAngle() - { - return $this->pan_angle; - } - - /** - * Yaw angle, which indicates the leftward/rightward angle that the face is - * pointing relative to the vertical plane perpendicular to the image. Range - * [-180,180]. - * - * Generated from protobuf field float pan_angle = 5; - * @param float $var - * @return $this - */ - public function setPanAngle($var) - { - GPBUtil::checkFloat($var); - $this->pan_angle = $var; - - return $this; - } - - /** - * Pitch angle, which indicates the upwards/downwards angle that the face is - * pointing relative to the image's horizontal plane. Range [-180,180]. - * - * Generated from protobuf field float tilt_angle = 6; - * @return float - */ - public function getTiltAngle() - { - return $this->tilt_angle; - } - - /** - * Pitch angle, which indicates the upwards/downwards angle that the face is - * pointing relative to the image's horizontal plane. Range [-180,180]. - * - * Generated from protobuf field float tilt_angle = 6; - * @param float $var - * @return $this - */ - public function setTiltAngle($var) - { - GPBUtil::checkFloat($var); - $this->tilt_angle = $var; - - return $this; - } - - /** - * Detection confidence. Range [0, 1]. - * - * Generated from protobuf field float detection_confidence = 7; - * @return float - */ - public function getDetectionConfidence() - { - return $this->detection_confidence; - } - - /** - * Detection confidence. Range [0, 1]. - * - * Generated from protobuf field float detection_confidence = 7; - * @param float $var - * @return $this - */ - public function setDetectionConfidence($var) - { - GPBUtil::checkFloat($var); - $this->detection_confidence = $var; - - return $this; - } - - /** - * Face landmarking confidence. Range [0, 1]. - * - * Generated from protobuf field float landmarking_confidence = 8; - * @return float - */ - public function getLandmarkingConfidence() - { - return $this->landmarking_confidence; - } - - /** - * Face landmarking confidence. Range [0, 1]. - * - * Generated from protobuf field float landmarking_confidence = 8; - * @param float $var - * @return $this - */ - public function setLandmarkingConfidence($var) - { - GPBUtil::checkFloat($var); - $this->landmarking_confidence = $var; - - return $this; - } - - /** - * Joy likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood joy_likelihood = 9; - * @return int - */ - public function getJoyLikelihood() - { - return $this->joy_likelihood; - } - - /** - * Joy likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood joy_likelihood = 9; - * @param int $var - * @return $this - */ - public function setJoyLikelihood($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->joy_likelihood = $var; - - return $this; - } - - /** - * Sorrow likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; - * @return int - */ - public function getSorrowLikelihood() - { - return $this->sorrow_likelihood; - } - - /** - * Sorrow likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; - * @param int $var - * @return $this - */ - public function setSorrowLikelihood($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->sorrow_likelihood = $var; - - return $this; - } - - /** - * Anger likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood anger_likelihood = 11; - * @return int - */ - public function getAngerLikelihood() - { - return $this->anger_likelihood; - } - - /** - * Anger likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood anger_likelihood = 11; - * @param int $var - * @return $this - */ - public function setAngerLikelihood($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->anger_likelihood = $var; - - return $this; - } - - /** - * Surprise likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; - * @return int - */ - public function getSurpriseLikelihood() - { - return $this->surprise_likelihood; - } - - /** - * Surprise likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; - * @param int $var - * @return $this - */ - public function setSurpriseLikelihood($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->surprise_likelihood = $var; - - return $this; - } - - /** - * Under-exposed likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; - * @return int - */ - public function getUnderExposedLikelihood() - { - return $this->under_exposed_likelihood; - } - - /** - * Under-exposed likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; - * @param int $var - * @return $this - */ - public function setUnderExposedLikelihood($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->under_exposed_likelihood = $var; - - return $this; - } - - /** - * Blurred likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; - * @return int - */ - public function getBlurredLikelihood() - { - return $this->blurred_likelihood; - } - - /** - * Blurred likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; - * @param int $var - * @return $this - */ - public function setBlurredLikelihood($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->blurred_likelihood = $var; - - return $this; - } - - /** - * Headwear likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; - * @return int - */ - public function getHeadwearLikelihood() - { - return $this->headwear_likelihood; - } - - /** - * Headwear likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; - * @param int $var - * @return $this - */ - public function setHeadwearLikelihood($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->headwear_likelihood = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark.php deleted file mode 100644 index 060f8f4295d4..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.vision.v1.FaceAnnotation.Landmark - */ -class Landmark extends \Google\Protobuf\Internal\Message -{ - /** - * Face landmark type. - * - * Generated from protobuf field .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; - */ - protected $type = 0; - /** - * Face landmark position. - * - * Generated from protobuf field .google.cloud.vision.v1.Position position = 4; - */ - protected $position = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Face landmark type. - * @type \Google\Cloud\Vision\V1\Position $position - * Face landmark position. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Face landmark type. - * - * Generated from protobuf field .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Face landmark type. - * - * Generated from protobuf field .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\FaceAnnotation\Landmark\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Face landmark position. - * - * Generated from protobuf field .google.cloud.vision.v1.Position position = 4; - * @return \Google\Cloud\Vision\V1\Position|null - */ - public function getPosition() - { - return $this->position; - } - - public function hasPosition() - { - return isset($this->position); - } - - public function clearPosition() - { - unset($this->position); - } - - /** - * Face landmark position. - * - * Generated from protobuf field .google.cloud.vision.v1.Position position = 4; - * @param \Google\Cloud\Vision\V1\Position $var - * @return $this - */ - public function setPosition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Position::class); - $this->position = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Landmark::class, \Google\Cloud\Vision\V1\FaceAnnotation_Landmark::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark/Type.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark/Type.php deleted file mode 100644 index 7aabc19d2a6d..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark/Type.php +++ /dev/null @@ -1,305 +0,0 @@ -google.cloud.vision.v1.FaceAnnotation.Landmark.Type - */ -class Type -{ - /** - * Unknown face landmark detected. Should not be filled. - * - * Generated from protobuf enum UNKNOWN_LANDMARK = 0; - */ - const UNKNOWN_LANDMARK = 0; - /** - * Left eye. - * - * Generated from protobuf enum LEFT_EYE = 1; - */ - const LEFT_EYE = 1; - /** - * Right eye. - * - * Generated from protobuf enum RIGHT_EYE = 2; - */ - const RIGHT_EYE = 2; - /** - * Left of left eyebrow. - * - * Generated from protobuf enum LEFT_OF_LEFT_EYEBROW = 3; - */ - const LEFT_OF_LEFT_EYEBROW = 3; - /** - * Right of left eyebrow. - * - * Generated from protobuf enum RIGHT_OF_LEFT_EYEBROW = 4; - */ - const RIGHT_OF_LEFT_EYEBROW = 4; - /** - * Left of right eyebrow. - * - * Generated from protobuf enum LEFT_OF_RIGHT_EYEBROW = 5; - */ - const LEFT_OF_RIGHT_EYEBROW = 5; - /** - * Right of right eyebrow. - * - * Generated from protobuf enum RIGHT_OF_RIGHT_EYEBROW = 6; - */ - const RIGHT_OF_RIGHT_EYEBROW = 6; - /** - * Midpoint between eyes. - * - * Generated from protobuf enum MIDPOINT_BETWEEN_EYES = 7; - */ - const MIDPOINT_BETWEEN_EYES = 7; - /** - * Nose tip. - * - * Generated from protobuf enum NOSE_TIP = 8; - */ - const NOSE_TIP = 8; - /** - * Upper lip. - * - * Generated from protobuf enum UPPER_LIP = 9; - */ - const UPPER_LIP = 9; - /** - * Lower lip. - * - * Generated from protobuf enum LOWER_LIP = 10; - */ - const LOWER_LIP = 10; - /** - * Mouth left. - * - * Generated from protobuf enum MOUTH_LEFT = 11; - */ - const MOUTH_LEFT = 11; - /** - * Mouth right. - * - * Generated from protobuf enum MOUTH_RIGHT = 12; - */ - const MOUTH_RIGHT = 12; - /** - * Mouth center. - * - * Generated from protobuf enum MOUTH_CENTER = 13; - */ - const MOUTH_CENTER = 13; - /** - * Nose, bottom right. - * - * Generated from protobuf enum NOSE_BOTTOM_RIGHT = 14; - */ - const NOSE_BOTTOM_RIGHT = 14; - /** - * Nose, bottom left. - * - * Generated from protobuf enum NOSE_BOTTOM_LEFT = 15; - */ - const NOSE_BOTTOM_LEFT = 15; - /** - * Nose, bottom center. - * - * Generated from protobuf enum NOSE_BOTTOM_CENTER = 16; - */ - const NOSE_BOTTOM_CENTER = 16; - /** - * Left eye, top boundary. - * - * Generated from protobuf enum LEFT_EYE_TOP_BOUNDARY = 17; - */ - const LEFT_EYE_TOP_BOUNDARY = 17; - /** - * Left eye, right corner. - * - * Generated from protobuf enum LEFT_EYE_RIGHT_CORNER = 18; - */ - const LEFT_EYE_RIGHT_CORNER = 18; - /** - * Left eye, bottom boundary. - * - * Generated from protobuf enum LEFT_EYE_BOTTOM_BOUNDARY = 19; - */ - const LEFT_EYE_BOTTOM_BOUNDARY = 19; - /** - * Left eye, left corner. - * - * Generated from protobuf enum LEFT_EYE_LEFT_CORNER = 20; - */ - const LEFT_EYE_LEFT_CORNER = 20; - /** - * Right eye, top boundary. - * - * Generated from protobuf enum RIGHT_EYE_TOP_BOUNDARY = 21; - */ - const RIGHT_EYE_TOP_BOUNDARY = 21; - /** - * Right eye, right corner. - * - * Generated from protobuf enum RIGHT_EYE_RIGHT_CORNER = 22; - */ - const RIGHT_EYE_RIGHT_CORNER = 22; - /** - * Right eye, bottom boundary. - * - * Generated from protobuf enum RIGHT_EYE_BOTTOM_BOUNDARY = 23; - */ - const RIGHT_EYE_BOTTOM_BOUNDARY = 23; - /** - * Right eye, left corner. - * - * Generated from protobuf enum RIGHT_EYE_LEFT_CORNER = 24; - */ - const RIGHT_EYE_LEFT_CORNER = 24; - /** - * Left eyebrow, upper midpoint. - * - * Generated from protobuf enum LEFT_EYEBROW_UPPER_MIDPOINT = 25; - */ - const LEFT_EYEBROW_UPPER_MIDPOINT = 25; - /** - * Right eyebrow, upper midpoint. - * - * Generated from protobuf enum RIGHT_EYEBROW_UPPER_MIDPOINT = 26; - */ - const RIGHT_EYEBROW_UPPER_MIDPOINT = 26; - /** - * Left ear tragion. - * - * Generated from protobuf enum LEFT_EAR_TRAGION = 27; - */ - const LEFT_EAR_TRAGION = 27; - /** - * Right ear tragion. - * - * Generated from protobuf enum RIGHT_EAR_TRAGION = 28; - */ - const RIGHT_EAR_TRAGION = 28; - /** - * Left eye pupil. - * - * Generated from protobuf enum LEFT_EYE_PUPIL = 29; - */ - const LEFT_EYE_PUPIL = 29; - /** - * Right eye pupil. - * - * Generated from protobuf enum RIGHT_EYE_PUPIL = 30; - */ - const RIGHT_EYE_PUPIL = 30; - /** - * Forehead glabella. - * - * Generated from protobuf enum FOREHEAD_GLABELLA = 31; - */ - const FOREHEAD_GLABELLA = 31; - /** - * Chin gnathion. - * - * Generated from protobuf enum CHIN_GNATHION = 32; - */ - const CHIN_GNATHION = 32; - /** - * Chin left gonion. - * - * Generated from protobuf enum CHIN_LEFT_GONION = 33; - */ - const CHIN_LEFT_GONION = 33; - /** - * Chin right gonion. - * - * Generated from protobuf enum CHIN_RIGHT_GONION = 34; - */ - const CHIN_RIGHT_GONION = 34; - /** - * Left cheek center. - * - * Generated from protobuf enum LEFT_CHEEK_CENTER = 35; - */ - const LEFT_CHEEK_CENTER = 35; - /** - * Right cheek center. - * - * Generated from protobuf enum RIGHT_CHEEK_CENTER = 36; - */ - const RIGHT_CHEEK_CENTER = 36; - - private static $valueToName = [ - self::UNKNOWN_LANDMARK => 'UNKNOWN_LANDMARK', - self::LEFT_EYE => 'LEFT_EYE', - self::RIGHT_EYE => 'RIGHT_EYE', - self::LEFT_OF_LEFT_EYEBROW => 'LEFT_OF_LEFT_EYEBROW', - self::RIGHT_OF_LEFT_EYEBROW => 'RIGHT_OF_LEFT_EYEBROW', - self::LEFT_OF_RIGHT_EYEBROW => 'LEFT_OF_RIGHT_EYEBROW', - self::RIGHT_OF_RIGHT_EYEBROW => 'RIGHT_OF_RIGHT_EYEBROW', - self::MIDPOINT_BETWEEN_EYES => 'MIDPOINT_BETWEEN_EYES', - self::NOSE_TIP => 'NOSE_TIP', - self::UPPER_LIP => 'UPPER_LIP', - self::LOWER_LIP => 'LOWER_LIP', - self::MOUTH_LEFT => 'MOUTH_LEFT', - self::MOUTH_RIGHT => 'MOUTH_RIGHT', - self::MOUTH_CENTER => 'MOUTH_CENTER', - self::NOSE_BOTTOM_RIGHT => 'NOSE_BOTTOM_RIGHT', - self::NOSE_BOTTOM_LEFT => 'NOSE_BOTTOM_LEFT', - self::NOSE_BOTTOM_CENTER => 'NOSE_BOTTOM_CENTER', - self::LEFT_EYE_TOP_BOUNDARY => 'LEFT_EYE_TOP_BOUNDARY', - self::LEFT_EYE_RIGHT_CORNER => 'LEFT_EYE_RIGHT_CORNER', - self::LEFT_EYE_BOTTOM_BOUNDARY => 'LEFT_EYE_BOTTOM_BOUNDARY', - self::LEFT_EYE_LEFT_CORNER => 'LEFT_EYE_LEFT_CORNER', - self::RIGHT_EYE_TOP_BOUNDARY => 'RIGHT_EYE_TOP_BOUNDARY', - self::RIGHT_EYE_RIGHT_CORNER => 'RIGHT_EYE_RIGHT_CORNER', - self::RIGHT_EYE_BOTTOM_BOUNDARY => 'RIGHT_EYE_BOTTOM_BOUNDARY', - self::RIGHT_EYE_LEFT_CORNER => 'RIGHT_EYE_LEFT_CORNER', - self::LEFT_EYEBROW_UPPER_MIDPOINT => 'LEFT_EYEBROW_UPPER_MIDPOINT', - self::RIGHT_EYEBROW_UPPER_MIDPOINT => 'RIGHT_EYEBROW_UPPER_MIDPOINT', - self::LEFT_EAR_TRAGION => 'LEFT_EAR_TRAGION', - self::RIGHT_EAR_TRAGION => 'RIGHT_EAR_TRAGION', - self::LEFT_EYE_PUPIL => 'LEFT_EYE_PUPIL', - self::RIGHT_EYE_PUPIL => 'RIGHT_EYE_PUPIL', - self::FOREHEAD_GLABELLA => 'FOREHEAD_GLABELLA', - self::CHIN_GNATHION => 'CHIN_GNATHION', - self::CHIN_LEFT_GONION => 'CHIN_LEFT_GONION', - self::CHIN_RIGHT_GONION => 'CHIN_RIGHT_GONION', - self::LEFT_CHEEK_CENTER => 'LEFT_CHEEK_CENTER', - self::RIGHT_CHEEK_CENTER => 'RIGHT_CHEEK_CENTER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Vision\V1\FaceAnnotation_Landmark_Type::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature.php deleted file mode 100644 index ac1b22a40aa9..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.vision.v1.Feature - */ -class Feature extends \Google\Protobuf\Internal\Message -{ - /** - * The feature type. - * - * Generated from protobuf field .google.cloud.vision.v1.Feature.Type type = 1; - */ - protected $type = 0; - /** - * Maximum number of results of this type. Does not apply to - * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. - * - * Generated from protobuf field int32 max_results = 2; - */ - protected $max_results = 0; - /** - * Model to use for the feature. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also - * support "builtin/weekly" for the bleeding edge release updated weekly. - * - * Generated from protobuf field string model = 3; - */ - protected $model = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * The feature type. - * @type int $max_results - * Maximum number of results of this type. Does not apply to - * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. - * @type string $model - * Model to use for the feature. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also - * support "builtin/weekly" for the bleeding edge release updated weekly. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * The feature type. - * - * Generated from protobuf field .google.cloud.vision.v1.Feature.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The feature type. - * - * Generated from protobuf field .google.cloud.vision.v1.Feature.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Feature\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Maximum number of results of this type. Does not apply to - * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. - * - * Generated from protobuf field int32 max_results = 2; - * @return int - */ - public function getMaxResults() - { - return $this->max_results; - } - - /** - * Maximum number of results of this type. Does not apply to - * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. - * - * Generated from protobuf field int32 max_results = 2; - * @param int $var - * @return $this - */ - public function setMaxResults($var) - { - GPBUtil::checkInt32($var); - $this->max_results = $var; - - return $this; - } - - /** - * Model to use for the feature. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also - * support "builtin/weekly" for the bleeding edge release updated weekly. - * - * Generated from protobuf field string model = 3; - * @return string - */ - public function getModel() - { - return $this->model; - } - - /** - * Model to use for the feature. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also - * support "builtin/weekly" for the bleeding edge release updated weekly. - * - * Generated from protobuf field string model = 3; - * @param string $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkString($var, True); - $this->model = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature/Type.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature/Type.php deleted file mode 100644 index d905c7320a41..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature/Type.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.vision.v1.Feature.Type - */ -class Type -{ - /** - * Unspecified feature type. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Run face detection. - * - * Generated from protobuf enum FACE_DETECTION = 1; - */ - const FACE_DETECTION = 1; - /** - * Run landmark detection. - * - * Generated from protobuf enum LANDMARK_DETECTION = 2; - */ - const LANDMARK_DETECTION = 2; - /** - * Run logo detection. - * - * Generated from protobuf enum LOGO_DETECTION = 3; - */ - const LOGO_DETECTION = 3; - /** - * Run label detection. - * - * Generated from protobuf enum LABEL_DETECTION = 4; - */ - const LABEL_DETECTION = 4; - /** - * Run text detection / optical character recognition (OCR). Text detection - * is optimized for areas of text within a larger image; if the image is - * a document, use `DOCUMENT_TEXT_DETECTION` instead. - * - * Generated from protobuf enum TEXT_DETECTION = 5; - */ - const TEXT_DETECTION = 5; - /** - * Run dense text document OCR. Takes precedence when both - * `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present. - * - * Generated from protobuf enum DOCUMENT_TEXT_DETECTION = 11; - */ - const DOCUMENT_TEXT_DETECTION = 11; - /** - * Run Safe Search to detect potentially unsafe - * or undesirable content. - * - * Generated from protobuf enum SAFE_SEARCH_DETECTION = 6; - */ - const SAFE_SEARCH_DETECTION = 6; - /** - * Compute a set of image properties, such as the - * image's dominant colors. - * - * Generated from protobuf enum IMAGE_PROPERTIES = 7; - */ - const IMAGE_PROPERTIES = 7; - /** - * Run crop hints. - * - * Generated from protobuf enum CROP_HINTS = 9; - */ - const CROP_HINTS = 9; - /** - * Run web detection. - * - * Generated from protobuf enum WEB_DETECTION = 10; - */ - const WEB_DETECTION = 10; - /** - * Run Product Search. - * - * Generated from protobuf enum PRODUCT_SEARCH = 12; - */ - const PRODUCT_SEARCH = 12; - /** - * Run localizer for object detection. - * - * Generated from protobuf enum OBJECT_LOCALIZATION = 19; - */ - const OBJECT_LOCALIZATION = 19; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::FACE_DETECTION => 'FACE_DETECTION', - self::LANDMARK_DETECTION => 'LANDMARK_DETECTION', - self::LOGO_DETECTION => 'LOGO_DETECTION', - self::LABEL_DETECTION => 'LABEL_DETECTION', - self::TEXT_DETECTION => 'TEXT_DETECTION', - self::DOCUMENT_TEXT_DETECTION => 'DOCUMENT_TEXT_DETECTION', - self::SAFE_SEARCH_DETECTION => 'SAFE_SEARCH_DETECTION', - self::IMAGE_PROPERTIES => 'IMAGE_PROPERTIES', - self::CROP_HINTS => 'CROP_HINTS', - self::WEB_DETECTION => 'WEB_DETECTION', - self::PRODUCT_SEARCH => 'PRODUCT_SEARCH', - self::OBJECT_LOCALIZATION => 'OBJECT_LOCALIZATION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Vision\V1\Feature_Type::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsDestination.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsDestination.php deleted file mode 100644 index 5e5f3f520ee1..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsDestination.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.vision.v1.GcsDestination - */ -class GcsDestination extends \Google\Protobuf\Internal\Message -{ - /** - * Google Cloud Storage URI prefix where the results will be stored. Results - * will be in JSON format and preceded by its corresponding input URI prefix. - * This field can either represent a gcs file prefix or gcs directory. In - * either case, the uri should be unique because in order to get all of the - * output files, you will need to do a wildcard gcs search on the uri prefix - * you provide. - * Examples: - * * File Prefix: gs://bucket-name/here/filenameprefix The output files - * will be created in gs://bucket-name/here/ and the names of the - * output files will begin with "filenameprefix". - * * Directory Prefix: gs://bucket-name/some/location/ The output files - * will be created in gs://bucket-name/some/location/ and the names of the - * output files could be anything because there was no filename prefix - * specified. - * If multiple outputs, each response is still AnnotateFileResponse, each of - * which contains some subset of the full list of AnnotateImageResponse. - * Multiple outputs can happen if, for example, the output JSON is too large - * and overflows into multiple sharded files. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Google Cloud Storage URI prefix where the results will be stored. Results - * will be in JSON format and preceded by its corresponding input URI prefix. - * This field can either represent a gcs file prefix or gcs directory. In - * either case, the uri should be unique because in order to get all of the - * output files, you will need to do a wildcard gcs search on the uri prefix - * you provide. - * Examples: - * * File Prefix: gs://bucket-name/here/filenameprefix The output files - * will be created in gs://bucket-name/here/ and the names of the - * output files will begin with "filenameprefix". - * * Directory Prefix: gs://bucket-name/some/location/ The output files - * will be created in gs://bucket-name/some/location/ and the names of the - * output files could be anything because there was no filename prefix - * specified. - * If multiple outputs, each response is still AnnotateFileResponse, each of - * which contains some subset of the full list of AnnotateImageResponse. - * Multiple outputs can happen if, for example, the output JSON is too large - * and overflows into multiple sharded files. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Google Cloud Storage URI prefix where the results will be stored. Results - * will be in JSON format and preceded by its corresponding input URI prefix. - * This field can either represent a gcs file prefix or gcs directory. In - * either case, the uri should be unique because in order to get all of the - * output files, you will need to do a wildcard gcs search on the uri prefix - * you provide. - * Examples: - * * File Prefix: gs://bucket-name/here/filenameprefix The output files - * will be created in gs://bucket-name/here/ and the names of the - * output files will begin with "filenameprefix". - * * Directory Prefix: gs://bucket-name/some/location/ The output files - * will be created in gs://bucket-name/some/location/ and the names of the - * output files could be anything because there was no filename prefix - * specified. - * If multiple outputs, each response is still AnnotateFileResponse, each of - * which contains some subset of the full list of AnnotateImageResponse. - * Multiple outputs can happen if, for example, the output JSON is too large - * and overflows into multiple sharded files. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Google Cloud Storage URI prefix where the results will be stored. Results - * will be in JSON format and preceded by its corresponding input URI prefix. - * This field can either represent a gcs file prefix or gcs directory. In - * either case, the uri should be unique because in order to get all of the - * output files, you will need to do a wildcard gcs search on the uri prefix - * you provide. - * Examples: - * * File Prefix: gs://bucket-name/here/filenameprefix The output files - * will be created in gs://bucket-name/here/ and the names of the - * output files will begin with "filenameprefix". - * * Directory Prefix: gs://bucket-name/some/location/ The output files - * will be created in gs://bucket-name/some/location/ and the names of the - * output files could be anything because there was no filename prefix - * specified. - * If multiple outputs, each response is still AnnotateFileResponse, each of - * which contains some subset of the full list of AnnotateImageResponse. - * Multiple outputs can happen if, for example, the output JSON is too large - * and overflows into multiple sharded files. - * - * Generated from protobuf field string uri = 1; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsSource.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsSource.php deleted file mode 100644 index e7c46ae00ad3..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsSource.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.vision.v1.GcsSource - */ -class GcsSource extends \Google\Protobuf\Internal\Message -{ - /** - * Google Cloud Storage URI for the input file. This must only be a - * Google Cloud Storage object. Wildcards are not currently supported. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Google Cloud Storage URI for the input file. This must only be a - * Google Cloud Storage object. Wildcards are not currently supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Google Cloud Storage URI for the input file. This must only be a - * Google Cloud Storage object. Wildcards are not currently supported. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Google Cloud Storage URI for the input file. This must only be a - * Google Cloud Storage object. Wildcards are not currently supported. - * - * Generated from protobuf field string uri = 1; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductRequest.php deleted file mode 100644 index 8716aa759f18..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.vision.v1.GetProductRequest - */ -class GetProductRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the Product to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the Product to get. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * Please see {@see ProductSearchClient::productName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\GetProductRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the Product to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the Product to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the Product to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductSetRequest.php deleted file mode 100644 index f133d964a1f9..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductSetRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.vision.v1.GetProductSetRequest - */ -class GetProductSetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the ProductSet to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the ProductSet to get. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\GetProductSetRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the ProductSet to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the ProductSet to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the ProductSet to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetReferenceImageRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetReferenceImageRequest.php deleted file mode 100644 index 87a13da256c2..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetReferenceImageRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.vision.v1.GetReferenceImageRequest - */ -class GetReferenceImageRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the ReferenceImage to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the ReferenceImage to get. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. Please see - * {@see ProductSearchClient::referenceImageName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\GetReferenceImageRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the ReferenceImage to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the ReferenceImage to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the ReferenceImage to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Image.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Image.php deleted file mode 100644 index a829768dbbe8..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Image.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.vision.v1.Image - */ -class Image extends \Google\Protobuf\Internal\Message -{ - /** - * Image content, represented as a stream of bytes. - * Note: As with all `bytes` fields, protobuffers use a pure binary - * representation, whereas JSON representations use base64. - * Currently, this field only works for BatchAnnotateImages requests. It does - * not work for AsyncBatchAnnotateImages requests. - * - * Generated from protobuf field bytes content = 1; - */ - protected $content = ''; - /** - * Google Cloud Storage image location, or publicly-accessible image - * URL. If both `content` and `source` are provided for an image, `content` - * takes precedence and is used to perform the image annotation request. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageSource source = 2; - */ - protected $source = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $content - * Image content, represented as a stream of bytes. - * Note: As with all `bytes` fields, protobuffers use a pure binary - * representation, whereas JSON representations use base64. - * Currently, this field only works for BatchAnnotateImages requests. It does - * not work for AsyncBatchAnnotateImages requests. - * @type \Google\Cloud\Vision\V1\ImageSource $source - * Google Cloud Storage image location, or publicly-accessible image - * URL. If both `content` and `source` are provided for an image, `content` - * takes precedence and is used to perform the image annotation request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Image content, represented as a stream of bytes. - * Note: As with all `bytes` fields, protobuffers use a pure binary - * representation, whereas JSON representations use base64. - * Currently, this field only works for BatchAnnotateImages requests. It does - * not work for AsyncBatchAnnotateImages requests. - * - * Generated from protobuf field bytes content = 1; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * Image content, represented as a stream of bytes. - * Note: As with all `bytes` fields, protobuffers use a pure binary - * representation, whereas JSON representations use base64. - * Currently, this field only works for BatchAnnotateImages requests. It does - * not work for AsyncBatchAnnotateImages requests. - * - * Generated from protobuf field bytes content = 1; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, False); - $this->content = $var; - - return $this; - } - - /** - * Google Cloud Storage image location, or publicly-accessible image - * URL. If both `content` and `source` are provided for an image, `content` - * takes precedence and is used to perform the image annotation request. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageSource source = 2; - * @return \Google\Cloud\Vision\V1\ImageSource|null - */ - public function getSource() - { - return $this->source; - } - - public function hasSource() - { - return isset($this->source); - } - - public function clearSource() - { - unset($this->source); - } - - /** - * Google Cloud Storage image location, or publicly-accessible image - * URL. If both `content` and `source` are provided for an image, `content` - * takes precedence and is used to perform the image annotation request. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageSource source = 2; - * @param \Google\Cloud\Vision\V1\ImageSource $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageSource::class); - $this->source = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotationContext.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotationContext.php deleted file mode 100644 index 04aba2e4a1dc..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotationContext.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.vision.v1.ImageAnnotationContext - */ -class ImageAnnotationContext extends \Google\Protobuf\Internal\Message -{ - /** - * The URI of the file used to produce the image. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - /** - * If the file was a PDF or TIFF, this field gives the page number within - * the file used to produce the image. - * - * Generated from protobuf field int32 page_number = 2; - */ - protected $page_number = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * The URI of the file used to produce the image. - * @type int $page_number - * If the file was a PDF or TIFF, this field gives the page number within - * the file used to produce the image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * The URI of the file used to produce the image. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * The URI of the file used to produce the image. - * - * Generated from protobuf field string uri = 1; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * If the file was a PDF or TIFF, this field gives the page number within - * the file used to produce the image. - * - * Generated from protobuf field int32 page_number = 2; - * @return int - */ - public function getPageNumber() - { - return $this->page_number; - } - - /** - * If the file was a PDF or TIFF, this field gives the page number within - * the file used to produce the image. - * - * Generated from protobuf field int32 page_number = 2; - * @param int $var - * @return $this - */ - public function setPageNumber($var) - { - GPBUtil::checkInt32($var); - $this->page_number = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotatorGrpcClient.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotatorGrpcClient.php deleted file mode 100644 index 9ed2b8e8a5f7..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotatorGrpcClient.php +++ /dev/null @@ -1,116 +0,0 @@ -_simpleRequest('/google.cloud.vision.v1.ImageAnnotator/BatchAnnotateImages', - $argument, - ['\Google\Cloud\Vision\V1\BatchAnnotateImagesResponse', 'decode'], - $metadata, $options); - } - - /** - * Service that performs image detection and annotation for a batch of files. - * Now only "application/pdf", "image/tiff" and "image/gif" are supported. - * - * This service will extract at most 5 (customers can specify which 5 in - * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each - * file provided and perform detection and annotation for each image - * extracted. - * @param \Google\Cloud\Vision\V1\BatchAnnotateFilesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function BatchAnnotateFiles(\Google\Cloud\Vision\V1\BatchAnnotateFilesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vision.v1.ImageAnnotator/BatchAnnotateFiles', - $argument, - ['\Google\Cloud\Vision\V1\BatchAnnotateFilesResponse', 'decode'], - $metadata, $options); - } - - /** - * Run asynchronous image detection and annotation for a list of images. - * - * Progress and results can be retrieved through the - * `google.longrunning.Operations` interface. - * `Operation.metadata` contains `OperationMetadata` (metadata). - * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). - * - * This service will write image annotation outputs to json files in customer - * GCS bucket, each json file containing BatchAnnotateImagesResponse proto. - * @param \Google\Cloud\Vision\V1\AsyncBatchAnnotateImagesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function AsyncBatchAnnotateImages(\Google\Cloud\Vision\V1\AsyncBatchAnnotateImagesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateImages', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Run asynchronous image detection and annotation for a list of generic - * files, such as PDF files, which may contain multiple pages and multiple - * images per page. Progress and results can be retrieved through the - * `google.longrunning.Operations` interface. - * `Operation.metadata` contains `OperationMetadata` (metadata). - * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). - * @param \Google\Cloud\Vision\V1\AsyncBatchAnnotateFilesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function AsyncBatchAnnotateFiles(\Google\Cloud\Vision\V1\AsyncBatchAnnotateFilesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateFiles', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageContext.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageContext.php deleted file mode 100644 index 25a6e9b648ce..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageContext.php +++ /dev/null @@ -1,315 +0,0 @@ -google.cloud.vision.v1.ImageContext - */ -class ImageContext extends \Google\Protobuf\Internal\Message -{ - /** - * Not used. - * - * Generated from protobuf field .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; - */ - protected $lat_long_rect = null; - /** - * List of languages to use for TEXT_DETECTION. In most cases, an empty value - * yields the best results since it enables automatic language detection. For - * languages based on the Latin alphabet, setting `language_hints` is not - * needed. In rare cases, when the language of the text in the image is known, - * setting a hint will help get better results (although it will be a - * significant hindrance if the hint is wrong). Text detection returns an - * error if one or more of the specified languages is not one of the - * [supported languages](https://cloud.google.com/vision/docs/languages). - * - * Generated from protobuf field repeated string language_hints = 2; - */ - private $language_hints; - /** - * Parameters for crop hints annotation request. - * - * Generated from protobuf field .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; - */ - protected $crop_hints_params = null; - /** - * Parameters for product search. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; - */ - protected $product_search_params = null; - /** - * Parameters for web detection. - * - * Generated from protobuf field .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; - */ - protected $web_detection_params = null; - /** - * Parameters for text detection and document text detection. - * - * Generated from protobuf field .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; - */ - protected $text_detection_params = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\LatLongRect $lat_long_rect - * Not used. - * @type array|\Google\Protobuf\Internal\RepeatedField $language_hints - * List of languages to use for TEXT_DETECTION. In most cases, an empty value - * yields the best results since it enables automatic language detection. For - * languages based on the Latin alphabet, setting `language_hints` is not - * needed. In rare cases, when the language of the text in the image is known, - * setting a hint will help get better results (although it will be a - * significant hindrance if the hint is wrong). Text detection returns an - * error if one or more of the specified languages is not one of the - * [supported languages](https://cloud.google.com/vision/docs/languages). - * @type \Google\Cloud\Vision\V1\CropHintsParams $crop_hints_params - * Parameters for crop hints annotation request. - * @type \Google\Cloud\Vision\V1\ProductSearchParams $product_search_params - * Parameters for product search. - * @type \Google\Cloud\Vision\V1\WebDetectionParams $web_detection_params - * Parameters for web detection. - * @type \Google\Cloud\Vision\V1\TextDetectionParams $text_detection_params - * Parameters for text detection and document text detection. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Not used. - * - * Generated from protobuf field .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; - * @return \Google\Cloud\Vision\V1\LatLongRect|null - */ - public function getLatLongRect() - { - return $this->lat_long_rect; - } - - public function hasLatLongRect() - { - return isset($this->lat_long_rect); - } - - public function clearLatLongRect() - { - unset($this->lat_long_rect); - } - - /** - * Not used. - * - * Generated from protobuf field .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; - * @param \Google\Cloud\Vision\V1\LatLongRect $var - * @return $this - */ - public function setLatLongRect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\LatLongRect::class); - $this->lat_long_rect = $var; - - return $this; - } - - /** - * List of languages to use for TEXT_DETECTION. In most cases, an empty value - * yields the best results since it enables automatic language detection. For - * languages based on the Latin alphabet, setting `language_hints` is not - * needed. In rare cases, when the language of the text in the image is known, - * setting a hint will help get better results (although it will be a - * significant hindrance if the hint is wrong). Text detection returns an - * error if one or more of the specified languages is not one of the - * [supported languages](https://cloud.google.com/vision/docs/languages). - * - * Generated from protobuf field repeated string language_hints = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLanguageHints() - { - return $this->language_hints; - } - - /** - * List of languages to use for TEXT_DETECTION. In most cases, an empty value - * yields the best results since it enables automatic language detection. For - * languages based on the Latin alphabet, setting `language_hints` is not - * needed. In rare cases, when the language of the text in the image is known, - * setting a hint will help get better results (although it will be a - * significant hindrance if the hint is wrong). Text detection returns an - * error if one or more of the specified languages is not one of the - * [supported languages](https://cloud.google.com/vision/docs/languages). - * - * Generated from protobuf field repeated string language_hints = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLanguageHints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->language_hints = $arr; - - return $this; - } - - /** - * Parameters for crop hints annotation request. - * - * Generated from protobuf field .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; - * @return \Google\Cloud\Vision\V1\CropHintsParams|null - */ - public function getCropHintsParams() - { - return $this->crop_hints_params; - } - - public function hasCropHintsParams() - { - return isset($this->crop_hints_params); - } - - public function clearCropHintsParams() - { - unset($this->crop_hints_params); - } - - /** - * Parameters for crop hints annotation request. - * - * Generated from protobuf field .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; - * @param \Google\Cloud\Vision\V1\CropHintsParams $var - * @return $this - */ - public function setCropHintsParams($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\CropHintsParams::class); - $this->crop_hints_params = $var; - - return $this; - } - - /** - * Parameters for product search. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; - * @return \Google\Cloud\Vision\V1\ProductSearchParams|null - */ - public function getProductSearchParams() - { - return $this->product_search_params; - } - - public function hasProductSearchParams() - { - return isset($this->product_search_params); - } - - public function clearProductSearchParams() - { - unset($this->product_search_params); - } - - /** - * Parameters for product search. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; - * @param \Google\Cloud\Vision\V1\ProductSearchParams $var - * @return $this - */ - public function setProductSearchParams($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSearchParams::class); - $this->product_search_params = $var; - - return $this; - } - - /** - * Parameters for web detection. - * - * Generated from protobuf field .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; - * @return \Google\Cloud\Vision\V1\WebDetectionParams|null - */ - public function getWebDetectionParams() - { - return $this->web_detection_params; - } - - public function hasWebDetectionParams() - { - return isset($this->web_detection_params); - } - - public function clearWebDetectionParams() - { - unset($this->web_detection_params); - } - - /** - * Parameters for web detection. - * - * Generated from protobuf field .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; - * @param \Google\Cloud\Vision\V1\WebDetectionParams $var - * @return $this - */ - public function setWebDetectionParams($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\WebDetectionParams::class); - $this->web_detection_params = $var; - - return $this; - } - - /** - * Parameters for text detection and document text detection. - * - * Generated from protobuf field .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; - * @return \Google\Cloud\Vision\V1\TextDetectionParams|null - */ - public function getTextDetectionParams() - { - return $this->text_detection_params; - } - - public function hasTextDetectionParams() - { - return isset($this->text_detection_params); - } - - public function clearTextDetectionParams() - { - unset($this->text_detection_params); - } - - /** - * Parameters for text detection and document text detection. - * - * Generated from protobuf field .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; - * @param \Google\Cloud\Vision\V1\TextDetectionParams $var - * @return $this - */ - public function setTextDetectionParams($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextDetectionParams::class); - $this->text_detection_params = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageProperties.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageProperties.php deleted file mode 100644 index 05d082b53f75..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageProperties.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.vision.v1.ImageProperties - */ -class ImageProperties extends \Google\Protobuf\Internal\Message -{ - /** - * If present, dominant colors completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; - */ - protected $dominant_colors = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\DominantColorsAnnotation $dominant_colors - * If present, dominant colors completed successfully. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * If present, dominant colors completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; - * @return \Google\Cloud\Vision\V1\DominantColorsAnnotation|null - */ - public function getDominantColors() - { - return $this->dominant_colors; - } - - public function hasDominantColors() - { - return isset($this->dominant_colors); - } - - public function clearDominantColors() - { - unset($this->dominant_colors); - } - - /** - * If present, dominant colors completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; - * @param \Google\Cloud\Vision\V1\DominantColorsAnnotation $var - * @return $this - */ - public function setDominantColors($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\DominantColorsAnnotation::class); - $this->dominant_colors = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageSource.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageSource.php deleted file mode 100644 index 977a6a7406c4..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageSource.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.vision.v1.ImageSource - */ -class ImageSource extends \Google\Protobuf\Internal\Message -{ - /** - * **Use `image_uri` instead.** - * The Google Cloud Storage URI of the form - * `gs://bucket_name/object_name`. Object versioning is not supported. See - * [Google Cloud Storage Request - * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. - * - * Generated from protobuf field string gcs_image_uri = 1; - */ - protected $gcs_image_uri = ''; - /** - * The URI of the source image. Can be either: - * 1. A Google Cloud Storage URI of the form - * `gs://bucket_name/object_name`. Object versioning is not supported. See - * [Google Cloud Storage Request - * URIs](https://cloud.google.com/storage/docs/reference-uris) for more - * info. - * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from - * HTTP/HTTPS URLs, Google cannot guarantee that the request will be - * completed. Your request may fail if the specified host denies the - * request (e.g. due to request throttling or DOS prevention), or if Google - * throttles requests to the site for abuse prevention. You should not - * depend on externally-hosted images for production applications. - * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes - * precedence. - * - * Generated from protobuf field string image_uri = 2; - */ - protected $image_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_image_uri - * **Use `image_uri` instead.** - * The Google Cloud Storage URI of the form - * `gs://bucket_name/object_name`. Object versioning is not supported. See - * [Google Cloud Storage Request - * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. - * @type string $image_uri - * The URI of the source image. Can be either: - * 1. A Google Cloud Storage URI of the form - * `gs://bucket_name/object_name`. Object versioning is not supported. See - * [Google Cloud Storage Request - * URIs](https://cloud.google.com/storage/docs/reference-uris) for more - * info. - * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from - * HTTP/HTTPS URLs, Google cannot guarantee that the request will be - * completed. Your request may fail if the specified host denies the - * request (e.g. due to request throttling or DOS prevention), or if Google - * throttles requests to the site for abuse prevention. You should not - * depend on externally-hosted images for production applications. - * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes - * precedence. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * **Use `image_uri` instead.** - * The Google Cloud Storage URI of the form - * `gs://bucket_name/object_name`. Object versioning is not supported. See - * [Google Cloud Storage Request - * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. - * - * Generated from protobuf field string gcs_image_uri = 1; - * @return string - */ - public function getGcsImageUri() - { - return $this->gcs_image_uri; - } - - /** - * **Use `image_uri` instead.** - * The Google Cloud Storage URI of the form - * `gs://bucket_name/object_name`. Object versioning is not supported. See - * [Google Cloud Storage Request - * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. - * - * Generated from protobuf field string gcs_image_uri = 1; - * @param string $var - * @return $this - */ - public function setGcsImageUri($var) - { - GPBUtil::checkString($var, True); - $this->gcs_image_uri = $var; - - return $this; - } - - /** - * The URI of the source image. Can be either: - * 1. A Google Cloud Storage URI of the form - * `gs://bucket_name/object_name`. Object versioning is not supported. See - * [Google Cloud Storage Request - * URIs](https://cloud.google.com/storage/docs/reference-uris) for more - * info. - * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from - * HTTP/HTTPS URLs, Google cannot guarantee that the request will be - * completed. Your request may fail if the specified host denies the - * request (e.g. due to request throttling or DOS prevention), or if Google - * throttles requests to the site for abuse prevention. You should not - * depend on externally-hosted images for production applications. - * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes - * precedence. - * - * Generated from protobuf field string image_uri = 2; - * @return string - */ - public function getImageUri() - { - return $this->image_uri; - } - - /** - * The URI of the source image. Can be either: - * 1. A Google Cloud Storage URI of the form - * `gs://bucket_name/object_name`. Object versioning is not supported. See - * [Google Cloud Storage Request - * URIs](https://cloud.google.com/storage/docs/reference-uris) for more - * info. - * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from - * HTTP/HTTPS URLs, Google cannot guarantee that the request will be - * completed. Your request may fail if the specified host denies the - * request (e.g. due to request throttling or DOS prevention), or if Google - * throttles requests to the site for abuse prevention. You should not - * depend on externally-hosted images for production applications. - * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes - * precedence. - * - * Generated from protobuf field string image_uri = 2; - * @param string $var - * @return $this - */ - public function setImageUri($var) - { - GPBUtil::checkString($var, True); - $this->image_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsGcsSource.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsGcsSource.php deleted file mode 100644 index bc4cbe117db2..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsGcsSource.php +++ /dev/null @@ -1,252 +0,0 @@ -google.cloud.vision.v1.ImportProductSetsGcsSource - */ -class ImportProductSetsGcsSource extends \Google\Protobuf\Internal\Message -{ - /** - * The Google Cloud Storage URI of the input csv file. - * The URI must start with `gs://`. - * The format of the input csv file should be one image per line. - * In each line, there are 8 columns. - * 1. image-uri - * 2. image-id - * 3. product-set-id - * 4. product-id - * 5. product-category - * 6. product-display-name - * 7. labels - * 8. bounding-poly - * The `image-uri`, `product-set-id`, `product-id`, and `product-category` - * columns are required. All other columns are optional. - * If the `ProductSet` or `Product` specified by the `product-set-id` and - * `product-id` values does not exist, then the system will create a new - * `ProductSet` or `Product` for the image. In this case, the - * `product-display-name` column refers to - * [display_name][google.cloud.vision.v1.Product.display_name], the - * `product-category` column refers to - * [product_category][google.cloud.vision.v1.Product.product_category], and the - * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels]. - * The `image-id` column is optional but must be unique if provided. If it is - * empty, the system will automatically assign a unique id to the image. - * The `product-display-name` column is optional. If it is empty, the system - * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a - * space (" "). You can update the `display_name` later by using the API. - * If a `Product` with the specified `product-id` already exists, then the - * system ignores the `product-display-name`, `product-category`, and `labels` - * columns. - * The `labels` column (optional) is a line containing a list of - * comma-separated key-value pairs, in the following format: - * "key_1=value_1,key_2=value_2,...,key_n=value_n" - * The `bounding-poly` column (optional) identifies one region of - * interest from the image in the same manner as `CreateReferenceImage`. If - * you do not specify the `bounding-poly` column, then the system will try to - * detect regions of interest automatically. - * At most one `bounding-poly` column is allowed per line. If the image - * contains multiple regions of interest, add a line to the CSV file that - * includes the same product information, and the `bounding-poly` values for - * each region of interest. - * The `bounding-poly` column must contain an even number of comma-separated - * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use - * non-negative integers for absolute bounding polygons, and float values - * in [0, 1] for normalized bounding polygons. - * The system will resize the image if the image resolution is too - * large to process (larger than 20MP). - * - * Generated from protobuf field string csv_file_uri = 1; - */ - protected $csv_file_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $csv_file_uri - * The Google Cloud Storage URI of the input csv file. - * The URI must start with `gs://`. - * The format of the input csv file should be one image per line. - * In each line, there are 8 columns. - * 1. image-uri - * 2. image-id - * 3. product-set-id - * 4. product-id - * 5. product-category - * 6. product-display-name - * 7. labels - * 8. bounding-poly - * The `image-uri`, `product-set-id`, `product-id`, and `product-category` - * columns are required. All other columns are optional. - * If the `ProductSet` or `Product` specified by the `product-set-id` and - * `product-id` values does not exist, then the system will create a new - * `ProductSet` or `Product` for the image. In this case, the - * `product-display-name` column refers to - * [display_name][google.cloud.vision.v1.Product.display_name], the - * `product-category` column refers to - * [product_category][google.cloud.vision.v1.Product.product_category], and the - * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels]. - * The `image-id` column is optional but must be unique if provided. If it is - * empty, the system will automatically assign a unique id to the image. - * The `product-display-name` column is optional. If it is empty, the system - * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a - * space (" "). You can update the `display_name` later by using the API. - * If a `Product` with the specified `product-id` already exists, then the - * system ignores the `product-display-name`, `product-category`, and `labels` - * columns. - * The `labels` column (optional) is a line containing a list of - * comma-separated key-value pairs, in the following format: - * "key_1=value_1,key_2=value_2,...,key_n=value_n" - * The `bounding-poly` column (optional) identifies one region of - * interest from the image in the same manner as `CreateReferenceImage`. If - * you do not specify the `bounding-poly` column, then the system will try to - * detect regions of interest automatically. - * At most one `bounding-poly` column is allowed per line. If the image - * contains multiple regions of interest, add a line to the CSV file that - * includes the same product information, and the `bounding-poly` values for - * each region of interest. - * The `bounding-poly` column must contain an even number of comma-separated - * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use - * non-negative integers for absolute bounding polygons, and float values - * in [0, 1] for normalized bounding polygons. - * The system will resize the image if the image resolution is too - * large to process (larger than 20MP). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * The Google Cloud Storage URI of the input csv file. - * The URI must start with `gs://`. - * The format of the input csv file should be one image per line. - * In each line, there are 8 columns. - * 1. image-uri - * 2. image-id - * 3. product-set-id - * 4. product-id - * 5. product-category - * 6. product-display-name - * 7. labels - * 8. bounding-poly - * The `image-uri`, `product-set-id`, `product-id`, and `product-category` - * columns are required. All other columns are optional. - * If the `ProductSet` or `Product` specified by the `product-set-id` and - * `product-id` values does not exist, then the system will create a new - * `ProductSet` or `Product` for the image. In this case, the - * `product-display-name` column refers to - * [display_name][google.cloud.vision.v1.Product.display_name], the - * `product-category` column refers to - * [product_category][google.cloud.vision.v1.Product.product_category], and the - * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels]. - * The `image-id` column is optional but must be unique if provided. If it is - * empty, the system will automatically assign a unique id to the image. - * The `product-display-name` column is optional. If it is empty, the system - * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a - * space (" "). You can update the `display_name` later by using the API. - * If a `Product` with the specified `product-id` already exists, then the - * system ignores the `product-display-name`, `product-category`, and `labels` - * columns. - * The `labels` column (optional) is a line containing a list of - * comma-separated key-value pairs, in the following format: - * "key_1=value_1,key_2=value_2,...,key_n=value_n" - * The `bounding-poly` column (optional) identifies one region of - * interest from the image in the same manner as `CreateReferenceImage`. If - * you do not specify the `bounding-poly` column, then the system will try to - * detect regions of interest automatically. - * At most one `bounding-poly` column is allowed per line. If the image - * contains multiple regions of interest, add a line to the CSV file that - * includes the same product information, and the `bounding-poly` values for - * each region of interest. - * The `bounding-poly` column must contain an even number of comma-separated - * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use - * non-negative integers for absolute bounding polygons, and float values - * in [0, 1] for normalized bounding polygons. - * The system will resize the image if the image resolution is too - * large to process (larger than 20MP). - * - * Generated from protobuf field string csv_file_uri = 1; - * @return string - */ - public function getCsvFileUri() - { - return $this->csv_file_uri; - } - - /** - * The Google Cloud Storage URI of the input csv file. - * The URI must start with `gs://`. - * The format of the input csv file should be one image per line. - * In each line, there are 8 columns. - * 1. image-uri - * 2. image-id - * 3. product-set-id - * 4. product-id - * 5. product-category - * 6. product-display-name - * 7. labels - * 8. bounding-poly - * The `image-uri`, `product-set-id`, `product-id`, and `product-category` - * columns are required. All other columns are optional. - * If the `ProductSet` or `Product` specified by the `product-set-id` and - * `product-id` values does not exist, then the system will create a new - * `ProductSet` or `Product` for the image. In this case, the - * `product-display-name` column refers to - * [display_name][google.cloud.vision.v1.Product.display_name], the - * `product-category` column refers to - * [product_category][google.cloud.vision.v1.Product.product_category], and the - * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels]. - * The `image-id` column is optional but must be unique if provided. If it is - * empty, the system will automatically assign a unique id to the image. - * The `product-display-name` column is optional. If it is empty, the system - * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a - * space (" "). You can update the `display_name` later by using the API. - * If a `Product` with the specified `product-id` already exists, then the - * system ignores the `product-display-name`, `product-category`, and `labels` - * columns. - * The `labels` column (optional) is a line containing a list of - * comma-separated key-value pairs, in the following format: - * "key_1=value_1,key_2=value_2,...,key_n=value_n" - * The `bounding-poly` column (optional) identifies one region of - * interest from the image in the same manner as `CreateReferenceImage`. If - * you do not specify the `bounding-poly` column, then the system will try to - * detect regions of interest automatically. - * At most one `bounding-poly` column is allowed per line. If the image - * contains multiple regions of interest, add a line to the CSV file that - * includes the same product information, and the `bounding-poly` values for - * each region of interest. - * The `bounding-poly` column must contain an even number of comma-separated - * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use - * non-negative integers for absolute bounding polygons, and float values - * in [0, 1] for normalized bounding polygons. - * The system will resize the image if the image resolution is too - * large to process (larger than 20MP). - * - * Generated from protobuf field string csv_file_uri = 1; - * @param string $var - * @return $this - */ - public function setCsvFileUri($var) - { - GPBUtil::checkString($var, True); - $this->csv_file_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsInputConfig.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsInputConfig.php deleted file mode 100644 index 181836273298..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsInputConfig.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.vision.v1.ImportProductSetsInputConfig - */ -class ImportProductSetsInputConfig extends \Google\Protobuf\Internal\Message -{ - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\ImportProductSetsGcsSource $gcs_source - * The Google Cloud Storage location for a csv file which preserves a list - * of ImportProductSetRequests in each line. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * The Google Cloud Storage location for a csv file which preserves a list - * of ImportProductSetRequests in each line. - * - * Generated from protobuf field .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; - * @return \Google\Cloud\Vision\V1\ImportProductSetsGcsSource|null - */ - public function getGcsSource() - { - return $this->readOneof(1); - } - - public function hasGcsSource() - { - return $this->hasOneof(1); - } - - /** - * The Google Cloud Storage location for a csv file which preserves a list - * of ImportProductSetRequests in each line. - * - * Generated from protobuf field .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; - * @param \Google\Cloud\Vision\V1\ImportProductSetsGcsSource $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImportProductSetsGcsSource::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsRequest.php deleted file mode 100644 index 24ecfc858acb..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.vision.v1.ImportProductSetsRequest - */ -class ImportProductSetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project in which the ProductSets should be imported. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The input content for the list of requests. - * - * Generated from protobuf field .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_config = null; - - /** - * @param string $parent Required. The project in which the ProductSets should be imported. - * - * Format is `projects/PROJECT_ID/locations/LOC_ID`. Please see - * {@see ProductSearchClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Vision\V1\ImportProductSetsInputConfig $inputConfig Required. The input content for the list of requests. - * - * @return \Google\Cloud\Vision\V1\ImportProductSetsRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Vision\V1\ImportProductSetsInputConfig $inputConfig): self - { - return (new self()) - ->setParent($parent) - ->setInputConfig($inputConfig); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project in which the ProductSets should be imported. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @type \Google\Cloud\Vision\V1\ImportProductSetsInputConfig $input_config - * Required. The input content for the list of requests. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project in which the ProductSets should be imported. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project in which the ProductSets should be imported. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The input content for the list of requests. - * - * Generated from protobuf field .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Vision\V1\ImportProductSetsInputConfig|null - */ - public function getInputConfig() - { - return $this->input_config; - } - - public function hasInputConfig() - { - return isset($this->input_config); - } - - public function clearInputConfig() - { - unset($this->input_config); - } - - /** - * Required. The input content for the list of requests. - * - * Generated from protobuf field .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Vision\V1\ImportProductSetsInputConfig $var - * @return $this - */ - public function setInputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImportProductSetsInputConfig::class); - $this->input_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsResponse.php deleted file mode 100644 index 89318b1ca8e7..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsResponse.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.vision.v1.ImportProductSetsResponse - */ -class ImportProductSetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of reference_images that are imported successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - private $reference_images; - /** - * The rpc status for each ImportProductSet request, including both successes - * and errors. - * The number of statuses here matches the number of lines in the csv file, - * and statuses[i] stores the success or failure status of processing the i-th - * line of the csv, starting from line 0. - * - * Generated from protobuf field repeated .google.rpc.Status statuses = 2; - */ - private $statuses; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\ReferenceImage>|\Google\Protobuf\Internal\RepeatedField $reference_images - * The list of reference_images that are imported successfully. - * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $statuses - * The rpc status for each ImportProductSet request, including both successes - * and errors. - * The number of statuses here matches the number of lines in the csv file, - * and statuses[i] stores the success or failure status of processing the i-th - * line of the csv, starting from line 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * The list of reference_images that are imported successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReferenceImages() - { - return $this->reference_images; - } - - /** - * The list of reference_images that are imported successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - * @param array<\Google\Cloud\Vision\V1\ReferenceImage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReferenceImages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ReferenceImage::class); - $this->reference_images = $arr; - - return $this; - } - - /** - * The rpc status for each ImportProductSet request, including both successes - * and errors. - * The number of statuses here matches the number of lines in the csv file, - * and statuses[i] stores the success or failure status of processing the i-th - * line of the csv, starting from line 0. - * - * Generated from protobuf field repeated .google.rpc.Status statuses = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStatuses() - { - return $this->statuses; - } - - /** - * The rpc status for each ImportProductSet request, including both successes - * and errors. - * The number of statuses here matches the number of lines in the csv file, - * and statuses[i] stores the success or failure status of processing the i-th - * line of the csv, starting from line 0. - * - * Generated from protobuf field repeated .google.rpc.Status statuses = 2; - * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStatuses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->statuses = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/InputConfig.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/InputConfig.php deleted file mode 100644 index 7fc7ef2d630c..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/InputConfig.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.vision.v1.InputConfig - */ -class InputConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The Google Cloud Storage location to read the input from. - * - * Generated from protobuf field .google.cloud.vision.v1.GcsSource gcs_source = 1; - */ - protected $gcs_source = null; - /** - * File content, represented as a stream of bytes. - * Note: As with all `bytes` fields, protobuffers use a pure binary - * representation, whereas JSON representations use base64. - * Currently, this field only works for BatchAnnotateFiles requests. It does - * not work for AsyncBatchAnnotateFiles requests. - * - * Generated from protobuf field bytes content = 3; - */ - protected $content = ''; - /** - * The type of the file. Currently only "application/pdf", "image/tiff" and - * "image/gif" are supported. Wildcards are not supported. - * - * Generated from protobuf field string mime_type = 2; - */ - protected $mime_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\GcsSource $gcs_source - * The Google Cloud Storage location to read the input from. - * @type string $content - * File content, represented as a stream of bytes. - * Note: As with all `bytes` fields, protobuffers use a pure binary - * representation, whereas JSON representations use base64. - * Currently, this field only works for BatchAnnotateFiles requests. It does - * not work for AsyncBatchAnnotateFiles requests. - * @type string $mime_type - * The type of the file. Currently only "application/pdf", "image/tiff" and - * "image/gif" are supported. Wildcards are not supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * The Google Cloud Storage location to read the input from. - * - * Generated from protobuf field .google.cloud.vision.v1.GcsSource gcs_source = 1; - * @return \Google\Cloud\Vision\V1\GcsSource|null - */ - public function getGcsSource() - { - return $this->gcs_source; - } - - public function hasGcsSource() - { - return isset($this->gcs_source); - } - - public function clearGcsSource() - { - unset($this->gcs_source); - } - - /** - * The Google Cloud Storage location to read the input from. - * - * Generated from protobuf field .google.cloud.vision.v1.GcsSource gcs_source = 1; - * @param \Google\Cloud\Vision\V1\GcsSource $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\GcsSource::class); - $this->gcs_source = $var; - - return $this; - } - - /** - * File content, represented as a stream of bytes. - * Note: As with all `bytes` fields, protobuffers use a pure binary - * representation, whereas JSON representations use base64. - * Currently, this field only works for BatchAnnotateFiles requests. It does - * not work for AsyncBatchAnnotateFiles requests. - * - * Generated from protobuf field bytes content = 3; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * File content, represented as a stream of bytes. - * Note: As with all `bytes` fields, protobuffers use a pure binary - * representation, whereas JSON representations use base64. - * Currently, this field only works for BatchAnnotateFiles requests. It does - * not work for AsyncBatchAnnotateFiles requests. - * - * Generated from protobuf field bytes content = 3; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, False); - $this->content = $var; - - return $this; - } - - /** - * The type of the file. Currently only "application/pdf", "image/tiff" and - * "image/gif" are supported. Wildcards are not supported. - * - * Generated from protobuf field string mime_type = 2; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * The type of the file. Currently only "application/pdf", "image/tiff" and - * "image/gif" are supported. Wildcards are not supported. - * - * Generated from protobuf field string mime_type = 2; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LatLongRect.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LatLongRect.php deleted file mode 100644 index c582fe6217f4..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LatLongRect.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.vision.v1.LatLongRect - */ -class LatLongRect extends \Google\Protobuf\Internal\Message -{ - /** - * Min lat/long pair. - * - * Generated from protobuf field .google.type.LatLng min_lat_lng = 1; - */ - protected $min_lat_lng = null; - /** - * Max lat/long pair. - * - * Generated from protobuf field .google.type.LatLng max_lat_lng = 2; - */ - protected $max_lat_lng = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\LatLng $min_lat_lng - * Min lat/long pair. - * @type \Google\Type\LatLng $max_lat_lng - * Max lat/long pair. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Min lat/long pair. - * - * Generated from protobuf field .google.type.LatLng min_lat_lng = 1; - * @return \Google\Type\LatLng|null - */ - public function getMinLatLng() - { - return $this->min_lat_lng; - } - - public function hasMinLatLng() - { - return isset($this->min_lat_lng); - } - - public function clearMinLatLng() - { - unset($this->min_lat_lng); - } - - /** - * Min lat/long pair. - * - * Generated from protobuf field .google.type.LatLng min_lat_lng = 1; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setMinLatLng($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->min_lat_lng = $var; - - return $this; - } - - /** - * Max lat/long pair. - * - * Generated from protobuf field .google.type.LatLng max_lat_lng = 2; - * @return \Google\Type\LatLng|null - */ - public function getMaxLatLng() - { - return $this->max_lat_lng; - } - - public function hasMaxLatLng() - { - return isset($this->max_lat_lng); - } - - public function clearMaxLatLng() - { - unset($this->max_lat_lng); - } - - /** - * Max lat/long pair. - * - * Generated from protobuf field .google.type.LatLng max_lat_lng = 2; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setMaxLatLng($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->max_lat_lng = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Likelihood.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Likelihood.php deleted file mode 100644 index a38e9ab08c22..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Likelihood.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.vision.v1.Likelihood - */ -class Likelihood -{ - /** - * Unknown likelihood. - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * It is very unlikely. - * - * Generated from protobuf enum VERY_UNLIKELY = 1; - */ - const VERY_UNLIKELY = 1; - /** - * It is unlikely. - * - * Generated from protobuf enum UNLIKELY = 2; - */ - const UNLIKELY = 2; - /** - * It is possible. - * - * Generated from protobuf enum POSSIBLE = 3; - */ - const POSSIBLE = 3; - /** - * It is likely. - * - * Generated from protobuf enum LIKELY = 4; - */ - const LIKELY = 4; - /** - * It is very likely. - * - * Generated from protobuf enum VERY_LIKELY = 5; - */ - const VERY_LIKELY = 5; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::VERY_UNLIKELY => 'VERY_UNLIKELY', - self::UNLIKELY => 'UNLIKELY', - self::POSSIBLE => 'POSSIBLE', - self::LIKELY => 'LIKELY', - self::VERY_LIKELY => 'VERY_LIKELY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsRequest.php deleted file mode 100644 index c2ca9f793d5a..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.vision.v1.ListProductSetsRequest - */ -class ListProductSetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project from which ProductSets should be listed. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The project from which ProductSets should be listed. - * - * Format is `projects/PROJECT_ID/locations/LOC_ID`. Please see - * {@see ProductSearchClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\ListProductSetsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project from which ProductSets should be listed. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @type int $page_size - * The maximum number of items to return. Default 10, maximum 100. - * @type string $page_token - * The next_page_token returned from a previous List request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project from which ProductSets should be listed. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project from which ProductSets should be listed. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsResponse.php deleted file mode 100644 index 6fb58f3ea6d7..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.vision.v1.ListProductSetsResponse - */ -class ListProductSetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of ProductSets. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - private $product_sets; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\ProductSet>|\Google\Protobuf\Internal\RepeatedField $product_sets - * List of ProductSets. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * List of ProductSets. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProductSets() - { - return $this->product_sets; - } - - /** - * List of ProductSets. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - * @param array<\Google\Cloud\Vision\V1\ProductSet>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProductSets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ProductSet::class); - $this->product_sets = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetRequest.php deleted file mode 100644 index 70a71c26a951..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.vision.v1.ListProductsInProductSetRequest - */ -class ListProductsInProductSetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ProductSet resource for which to retrieve Products. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $name Required. The ProductSet resource for which to retrieve Products. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\ListProductsInProductSetRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The ProductSet resource for which to retrieve Products. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @type int $page_size - * The maximum number of items to return. Default 10, maximum 100. - * @type string $page_token - * The next_page_token returned from a previous List request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ProductSet resource for which to retrieve Products. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The ProductSet resource for which to retrieve Products. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetResponse.php deleted file mode 100644 index 550e51fc19f7..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.vision.v1.ListProductsInProductSetResponse - */ -class ListProductsInProductSetResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Products. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; - */ - private $products; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\Product>|\Google\Protobuf\Internal\RepeatedField $products - * The list of Products. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * The list of Products. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProducts() - { - return $this->products; - } - - /** - * The list of Products. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; - * @param array<\Google\Cloud\Vision\V1\Product>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProducts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Product::class); - $this->products = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsRequest.php deleted file mode 100644 index e6efb131265a..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.vision.v1.ListProductsRequest - */ -class ListProductsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project OR ProductSet from which Products should be listed. - * Format: - * `projects/PROJECT_ID/locations/LOC_ID` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The project OR ProductSet from which Products should be listed. - * - * Format: - * `projects/PROJECT_ID/locations/LOC_ID` - * Please see {@see ProductSearchClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\ListProductsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project OR ProductSet from which Products should be listed. - * Format: - * `projects/PROJECT_ID/locations/LOC_ID` - * @type int $page_size - * The maximum number of items to return. Default 10, maximum 100. - * @type string $page_token - * The next_page_token returned from a previous List request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project OR ProductSet from which Products should be listed. - * Format: - * `projects/PROJECT_ID/locations/LOC_ID` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project OR ProductSet from which Products should be listed. - * Format: - * `projects/PROJECT_ID/locations/LOC_ID` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsResponse.php deleted file mode 100644 index 192d6f3a9a11..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.vision.v1.ListProductsResponse - */ -class ListProductsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of products. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; - */ - private $products; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\Product>|\Google\Protobuf\Internal\RepeatedField $products - * List of products. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * List of products. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProducts() - { - return $this->products; - } - - /** - * List of products. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; - * @param array<\Google\Cloud\Vision\V1\Product>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProducts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Product::class); - $this->products = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesRequest.php deleted file mode 100644 index fb833ada7722..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.vision.v1.ListReferenceImagesRequest - */ -class ListReferenceImagesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the product containing the reference images. - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results to be returned. This is the value - * of `nextPageToken` returned in a previous reference image list request. - * Defaults to the first page if not specified. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Resource name of the product containing the reference images. - * - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. Please see - * {@see ProductSearchClient::productName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\ListReferenceImagesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the product containing the reference images. - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * @type int $page_size - * The maximum number of items to return. Default 10, maximum 100. - * @type string $page_token - * A token identifying a page of results to be returned. This is the value - * of `nextPageToken` returned in a previous reference image list request. - * Defaults to the first page if not specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the product containing the reference images. - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Resource name of the product containing the reference images. - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results to be returned. This is the value - * of `nextPageToken` returned in a previous reference image list request. - * Defaults to the first page if not specified. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results to be returned. This is the value - * of `nextPageToken` returned in a previous reference image list request. - * Defaults to the first page if not specified. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesResponse.php deleted file mode 100644 index bf552bad802f..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.vision.v1.ListReferenceImagesResponse - */ -class ListReferenceImagesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of reference images. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - private $reference_images; - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token returned from a previous List request, if any. - * - * Generated from protobuf field string next_page_token = 3; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\ReferenceImage>|\Google\Protobuf\Internal\RepeatedField $reference_images - * The list of reference images. - * @type int $page_size - * The maximum number of items to return. Default 10, maximum 100. - * @type string $next_page_token - * The next_page_token returned from a previous List request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * The list of reference images. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReferenceImages() - { - return $this->reference_images; - } - - /** - * The list of reference images. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - * @param array<\Google\Cloud\Vision\V1\ReferenceImage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReferenceImages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ReferenceImage::class); - $this->reference_images = $arr; - - return $this; - } - - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token returned from a previous List request, if any. - * - * Generated from protobuf field string next_page_token = 3; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The next_page_token returned from a previous List request, if any. - * - * Generated from protobuf field string next_page_token = 3; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocalizedObjectAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocalizedObjectAnnotation.php deleted file mode 100644 index 6e85feb7fede..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocalizedObjectAnnotation.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.vision.v1.LocalizedObjectAnnotation - */ -class LocalizedObjectAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * Object ID that should align with EntityAnnotation mid. - * - * Generated from protobuf field string mid = 1; - */ - protected $mid = ''; - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 2; - */ - protected $language_code = ''; - /** - * Object name, expressed in its `language_code` language. - * - * Generated from protobuf field string name = 3; - */ - protected $name = ''; - /** - * Score of the result. Range [0, 1]. - * - * Generated from protobuf field float score = 4; - */ - protected $score = 0.0; - /** - * Image region to which this object belongs. This must be populated. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; - */ - protected $bounding_poly = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $mid - * Object ID that should align with EntityAnnotation mid. - * @type string $language_code - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * @type string $name - * Object name, expressed in its `language_code` language. - * @type float $score - * Score of the result. Range [0, 1]. - * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly - * Image region to which this object belongs. This must be populated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Object ID that should align with EntityAnnotation mid. - * - * Generated from protobuf field string mid = 1; - * @return string - */ - public function getMid() - { - return $this->mid; - } - - /** - * Object ID that should align with EntityAnnotation mid. - * - * Generated from protobuf field string mid = 1; - * @param string $var - * @return $this - */ - public function setMid($var) - { - GPBUtil::checkString($var, True); - $this->mid = $var; - - return $this; - } - - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 2; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Object name, expressed in its `language_code` language. - * - * Generated from protobuf field string name = 3; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Object name, expressed in its `language_code` language. - * - * Generated from protobuf field string name = 3; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Score of the result. Range [0, 1]. - * - * Generated from protobuf field float score = 4; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * Score of the result. Range [0, 1]. - * - * Generated from protobuf field float score = 4; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - - /** - * Image region to which this object belongs. This must be populated. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; - * @return \Google\Cloud\Vision\V1\BoundingPoly|null - */ - public function getBoundingPoly() - { - return $this->bounding_poly; - } - - public function hasBoundingPoly() - { - return isset($this->bounding_poly); - } - - public function clearBoundingPoly() - { - unset($this->bounding_poly); - } - - /** - * Image region to which this object belongs. This must be populated. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; - * @param \Google\Cloud\Vision\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingPoly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->bounding_poly = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocationInfo.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocationInfo.php deleted file mode 100644 index 02c79371bf4d..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocationInfo.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.vision.v1.LocationInfo - */ -class LocationInfo extends \Google\Protobuf\Internal\Message -{ - /** - * lat/long location coordinates. - * - * Generated from protobuf field .google.type.LatLng lat_lng = 1; - */ - protected $lat_lng = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\LatLng $lat_lng - * lat/long location coordinates. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * lat/long location coordinates. - * - * Generated from protobuf field .google.type.LatLng lat_lng = 1; - * @return \Google\Type\LatLng|null - */ - public function getLatLng() - { - return $this->lat_lng; - } - - public function hasLatLng() - { - return isset($this->lat_lng); - } - - public function clearLatLng() - { - unset($this->lat_lng); - } - - /** - * lat/long location coordinates. - * - * Generated from protobuf field .google.type.LatLng lat_lng = 1; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setLatLng($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->lat_lng = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/NormalizedVertex.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/NormalizedVertex.php deleted file mode 100644 index 20d663aa3bd5..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/NormalizedVertex.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.vision.v1.NormalizedVertex - */ -class NormalizedVertex extends \Google\Protobuf\Internal\Message -{ - /** - * X coordinate. - * - * Generated from protobuf field float x = 1; - */ - protected $x = 0.0; - /** - * Y coordinate. - * - * Generated from protobuf field float y = 2; - */ - protected $y = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $x - * X coordinate. - * @type float $y - * Y coordinate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\Geometry::initOnce(); - parent::__construct($data); - } - - /** - * X coordinate. - * - * Generated from protobuf field float x = 1; - * @return float - */ - public function getX() - { - return $this->x; - } - - /** - * X coordinate. - * - * Generated from protobuf field float x = 1; - * @param float $var - * @return $this - */ - public function setX($var) - { - GPBUtil::checkFloat($var); - $this->x = $var; - - return $this; - } - - /** - * Y coordinate. - * - * Generated from protobuf field float y = 2; - * @return float - */ - public function getY() - { - return $this->y; - } - - /** - * Y coordinate. - * - * Generated from protobuf field float y = 2; - * @param float $var - * @return $this - */ - public function setY($var) - { - GPBUtil::checkFloat($var); - $this->y = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata.php deleted file mode 100644 index ae546b7644c5..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.vision.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Current state of the batch operation. - * - * Generated from protobuf field .google.cloud.vision.v1.OperationMetadata.State state = 1; - */ - protected $state = 0; - /** - * The time when the batch request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - */ - protected $create_time = null; - /** - * The time when the operation result was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Current state of the batch operation. - * @type \Google\Protobuf\Timestamp $create_time - * The time when the batch request was received. - * @type \Google\Protobuf\Timestamp $update_time - * The time when the operation result was last updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Current state of the batch operation. - * - * Generated from protobuf field .google.cloud.vision.v1.OperationMetadata.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Current state of the batch operation. - * - * Generated from protobuf field .google.cloud.vision.v1.OperationMetadata.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\OperationMetadata\State::class); - $this->state = $var; - - return $this; - } - - /** - * The time when the batch request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * The time when the batch request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The time when the operation result was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * The time when the operation result was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata/State.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata/State.php deleted file mode 100644 index 345f7bb0a591..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.vision.v1.OperationMetadata.State - */ -class State -{ - /** - * Invalid. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Request is received. - * - * Generated from protobuf enum CREATED = 1; - */ - const CREATED = 1; - /** - * Request is actively being processed. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The batch processing is done. - * - * Generated from protobuf enum DONE = 3; - */ - const DONE = 3; - /** - * The batch processing was cancelled. - * - * Generated from protobuf enum CANCELLED = 4; - */ - const CANCELLED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATED => 'CREATED', - self::RUNNING => 'RUNNING', - self::DONE => 'DONE', - self::CANCELLED => 'CANCELLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Vision\V1\OperationMetadata_State::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OutputConfig.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OutputConfig.php deleted file mode 100644 index 4273ce192966..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OutputConfig.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.vision.v1.OutputConfig - */ -class OutputConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The Google Cloud Storage location to write the output(s) to. - * - * Generated from protobuf field .google.cloud.vision.v1.GcsDestination gcs_destination = 1; - */ - protected $gcs_destination = null; - /** - * The max number of response protos to put into each output JSON file on - * Google Cloud Storage. - * The valid range is [1, 100]. If not specified, the default value is 20. - * For example, for one pdf file with 100 pages, 100 response protos will - * be generated. If `batch_size` = 20, then 5 json files each - * containing 20 response protos will be written under the prefix - * `gcs_destination`.`uri`. - * Currently, batch_size only applies to GcsDestination, with potential future - * support for other output configurations. - * - * Generated from protobuf field int32 batch_size = 2; - */ - protected $batch_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\GcsDestination $gcs_destination - * The Google Cloud Storage location to write the output(s) to. - * @type int $batch_size - * The max number of response protos to put into each output JSON file on - * Google Cloud Storage. - * The valid range is [1, 100]. If not specified, the default value is 20. - * For example, for one pdf file with 100 pages, 100 response protos will - * be generated. If `batch_size` = 20, then 5 json files each - * containing 20 response protos will be written under the prefix - * `gcs_destination`.`uri`. - * Currently, batch_size only applies to GcsDestination, with potential future - * support for other output configurations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * The Google Cloud Storage location to write the output(s) to. - * - * Generated from protobuf field .google.cloud.vision.v1.GcsDestination gcs_destination = 1; - * @return \Google\Cloud\Vision\V1\GcsDestination|null - */ - public function getGcsDestination() - { - return $this->gcs_destination; - } - - public function hasGcsDestination() - { - return isset($this->gcs_destination); - } - - public function clearGcsDestination() - { - unset($this->gcs_destination); - } - - /** - * The Google Cloud Storage location to write the output(s) to. - * - * Generated from protobuf field .google.cloud.vision.v1.GcsDestination gcs_destination = 1; - * @param \Google\Cloud\Vision\V1\GcsDestination $var - * @return $this - */ - public function setGcsDestination($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\GcsDestination::class); - $this->gcs_destination = $var; - - return $this; - } - - /** - * The max number of response protos to put into each output JSON file on - * Google Cloud Storage. - * The valid range is [1, 100]. If not specified, the default value is 20. - * For example, for one pdf file with 100 pages, 100 response protos will - * be generated. If `batch_size` = 20, then 5 json files each - * containing 20 response protos will be written under the prefix - * `gcs_destination`.`uri`. - * Currently, batch_size only applies to GcsDestination, with potential future - * support for other output configurations. - * - * Generated from protobuf field int32 batch_size = 2; - * @return int - */ - public function getBatchSize() - { - return $this->batch_size; - } - - /** - * The max number of response protos to put into each output JSON file on - * Google Cloud Storage. - * The valid range is [1, 100]. If not specified, the default value is 20. - * For example, for one pdf file with 100 pages, 100 response protos will - * be generated. If `batch_size` = 20, then 5 json files each - * containing 20 response protos will be written under the prefix - * `gcs_destination`.`uri`. - * Currently, batch_size only applies to GcsDestination, with potential future - * support for other output configurations. - * - * Generated from protobuf field int32 batch_size = 2; - * @param int $var - * @return $this - */ - public function setBatchSize($var) - { - GPBUtil::checkInt32($var); - $this->batch_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Page.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Page.php deleted file mode 100644 index 26020d0280b5..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Page.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.vision.v1.Page - */ -class Page extends \Google\Protobuf\Internal\Message -{ - /** - * Additional information detected on the page. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - protected $property = null; - /** - * Page width. For PDFs the unit is points. For images (including - * TIFFs) the unit is pixels. - * - * Generated from protobuf field int32 width = 2; - */ - protected $width = 0; - /** - * Page height. For PDFs the unit is points. For images (including - * TIFFs) the unit is pixels. - * - * Generated from protobuf field int32 height = 3; - */ - protected $height = 0; - /** - * List of blocks of text, images etc on this page. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Block blocks = 4; - */ - private $blocks; - /** - * Confidence of the OCR results on the page. Range [0, 1]. - * - * Generated from protobuf field float confidence = 5; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $property - * Additional information detected on the page. - * @type int $width - * Page width. For PDFs the unit is points. For images (including - * TIFFs) the unit is pixels. - * @type int $height - * Page height. For PDFs the unit is points. For images (including - * TIFFs) the unit is pixels. - * @type array<\Google\Cloud\Vision\V1\Block>|\Google\Protobuf\Internal\RepeatedField $blocks - * List of blocks of text, images etc on this page. - * @type float $confidence - * Confidence of the OCR results on the page. Range [0, 1]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); - parent::__construct($data); - } - - /** - * Additional information detected on the page. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return \Google\Cloud\Vision\V1\TextAnnotation\TextProperty|null - */ - public function getProperty() - { - return $this->property; - } - - public function hasProperty() - { - return isset($this->property); - } - - public function clearProperty() - { - unset($this->property); - } - - /** - * Additional information detected on the page. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @param \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $var - * @return $this - */ - public function setProperty($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\TextProperty::class); - $this->property = $var; - - return $this; - } - - /** - * Page width. For PDFs the unit is points. For images (including - * TIFFs) the unit is pixels. - * - * Generated from protobuf field int32 width = 2; - * @return int - */ - public function getWidth() - { - return $this->width; - } - - /** - * Page width. For PDFs the unit is points. For images (including - * TIFFs) the unit is pixels. - * - * Generated from protobuf field int32 width = 2; - * @param int $var - * @return $this - */ - public function setWidth($var) - { - GPBUtil::checkInt32($var); - $this->width = $var; - - return $this; - } - - /** - * Page height. For PDFs the unit is points. For images (including - * TIFFs) the unit is pixels. - * - * Generated from protobuf field int32 height = 3; - * @return int - */ - public function getHeight() - { - return $this->height; - } - - /** - * Page height. For PDFs the unit is points. For images (including - * TIFFs) the unit is pixels. - * - * Generated from protobuf field int32 height = 3; - * @param int $var - * @return $this - */ - public function setHeight($var) - { - GPBUtil::checkInt32($var); - $this->height = $var; - - return $this; - } - - /** - * List of blocks of text, images etc on this page. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Block blocks = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBlocks() - { - return $this->blocks; - } - - /** - * List of blocks of text, images etc on this page. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Block blocks = 4; - * @param array<\Google\Cloud\Vision\V1\Block>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBlocks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Block::class); - $this->blocks = $arr; - - return $this; - } - - /** - * Confidence of the OCR results on the page. Range [0, 1]. - * - * Generated from protobuf field float confidence = 5; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Confidence of the OCR results on the page. Range [0, 1]. - * - * Generated from protobuf field float confidence = 5; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Paragraph.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Paragraph.php deleted file mode 100644 index 0dbbb5b4367f..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Paragraph.php +++ /dev/null @@ -1,245 +0,0 @@ -google.cloud.vision.v1.Paragraph - */ -class Paragraph extends \Google\Protobuf\Internal\Message -{ - /** - * Additional information detected for the paragraph. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - protected $property = null; - /** - * The bounding box for the paragraph. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - protected $bounding_box = null; - /** - * List of all words in this paragraph. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Word words = 3; - */ - private $words; - /** - * Confidence of the OCR results for the paragraph. Range [0, 1]. - * - * Generated from protobuf field float confidence = 4; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $property - * Additional information detected for the paragraph. - * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_box - * The bounding box for the paragraph. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * @type array<\Google\Cloud\Vision\V1\Word>|\Google\Protobuf\Internal\RepeatedField $words - * List of all words in this paragraph. - * @type float $confidence - * Confidence of the OCR results for the paragraph. Range [0, 1]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); - parent::__construct($data); - } - - /** - * Additional information detected for the paragraph. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return \Google\Cloud\Vision\V1\TextAnnotation\TextProperty|null - */ - public function getProperty() - { - return $this->property; - } - - public function hasProperty() - { - return isset($this->property); - } - - public function clearProperty() - { - unset($this->property); - } - - /** - * Additional information detected for the paragraph. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @param \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $var - * @return $this - */ - public function setProperty($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\TextProperty::class); - $this->property = $var; - - return $this; - } - - /** - * The bounding box for the paragraph. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return \Google\Cloud\Vision\V1\BoundingPoly|null - */ - public function getBoundingBox() - { - return $this->bounding_box; - } - - public function hasBoundingBox() - { - return isset($this->bounding_box); - } - - public function clearBoundingBox() - { - unset($this->bounding_box); - } - - /** - * The bounding box for the paragraph. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @param \Google\Cloud\Vision\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingBox($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->bounding_box = $var; - - return $this; - } - - /** - * List of all words in this paragraph. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Word words = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWords() - { - return $this->words; - } - - /** - * List of all words in this paragraph. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Word words = 3; - * @param array<\Google\Cloud\Vision\V1\Word>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWords($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Word::class); - $this->words = $arr; - - return $this; - } - - /** - * Confidence of the OCR results for the paragraph. Range [0, 1]. - * - * Generated from protobuf field float confidence = 4; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Confidence of the OCR results for the paragraph. Range [0, 1]. - * - * Generated from protobuf field float confidence = 4; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Position.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Position.php deleted file mode 100644 index 198ed9067d2e..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Position.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.vision.v1.Position - */ -class Position extends \Google\Protobuf\Internal\Message -{ - /** - * X coordinate. - * - * Generated from protobuf field float x = 1; - */ - protected $x = 0.0; - /** - * Y coordinate. - * - * Generated from protobuf field float y = 2; - */ - protected $y = 0.0; - /** - * Z coordinate (or depth). - * - * Generated from protobuf field float z = 3; - */ - protected $z = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $x - * X coordinate. - * @type float $y - * Y coordinate. - * @type float $z - * Z coordinate (or depth). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\Geometry::initOnce(); - parent::__construct($data); - } - - /** - * X coordinate. - * - * Generated from protobuf field float x = 1; - * @return float - */ - public function getX() - { - return $this->x; - } - - /** - * X coordinate. - * - * Generated from protobuf field float x = 1; - * @param float $var - * @return $this - */ - public function setX($var) - { - GPBUtil::checkFloat($var); - $this->x = $var; - - return $this; - } - - /** - * Y coordinate. - * - * Generated from protobuf field float y = 2; - * @return float - */ - public function getY() - { - return $this->y; - } - - /** - * Y coordinate. - * - * Generated from protobuf field float y = 2; - * @param float $var - * @return $this - */ - public function setY($var) - { - GPBUtil::checkFloat($var); - $this->y = $var; - - return $this; - } - - /** - * Z coordinate (or depth). - * - * Generated from protobuf field float z = 3; - * @return float - */ - public function getZ() - { - return $this->z; - } - - /** - * Z coordinate (or depth). - * - * Generated from protobuf field float z = 3; - * @param float $var - * @return $this - */ - public function setZ($var) - { - GPBUtil::checkFloat($var); - $this->z = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product.php deleted file mode 100644 index bca748b2244d..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product.php +++ /dev/null @@ -1,271 +0,0 @@ -google.cloud.vision.v1.Product - */ -class Product extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the product. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * This field is ignored when creating a product. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The user-provided name for this Product. Must not be empty. Must be at most - * 4096 characters long. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * User-provided metadata to be stored with this product. Must be at most 4096 - * characters long. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Immutable. The category for the product identified by the reference image. This should - * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or - * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are - * still supported, but these should not be used for new products. - * - * Generated from protobuf field string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $product_category = ''; - /** - * Key-value pairs that can be attached to a product. At query time, - * constraints can be specified based on the product_labels. - * Note that integer values can be provided as strings, e.g. "1199". Only - * strings with integer values can match a range-based restriction which is - * to be supported soon. - * Multiple values can be assigned to the same key. One product may have up to - * 500 product_labels. - * Notice that the total number of distinct product_labels over all products - * in one ProductSet cannot exceed 1M, otherwise the product search pipeline - * will refuse to work for that ProductSet. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - private $product_labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the product. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * This field is ignored when creating a product. - * @type string $display_name - * The user-provided name for this Product. Must not be empty. Must be at most - * 4096 characters long. - * @type string $description - * User-provided metadata to be stored with this product. Must be at most 4096 - * characters long. - * @type string $product_category - * Immutable. The category for the product identified by the reference image. This should - * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or - * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are - * still supported, but these should not be used for new products. - * @type array<\Google\Cloud\Vision\V1\Product\KeyValue>|\Google\Protobuf\Internal\RepeatedField $product_labels - * Key-value pairs that can be attached to a product. At query time, - * constraints can be specified based on the product_labels. - * Note that integer values can be provided as strings, e.g. "1199". Only - * strings with integer values can match a range-based restriction which is - * to be supported soon. - * Multiple values can be assigned to the same key. One product may have up to - * 500 product_labels. - * Notice that the total number of distinct product_labels over all products - * in one ProductSet cannot exceed 1M, otherwise the product search pipeline - * will refuse to work for that ProductSet. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the product. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * This field is ignored when creating a product. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the product. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * This field is ignored when creating a product. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The user-provided name for this Product. Must not be empty. Must be at most - * 4096 characters long. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The user-provided name for this Product. Must not be empty. Must be at most - * 4096 characters long. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * User-provided metadata to be stored with this product. Must be at most 4096 - * characters long. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User-provided metadata to be stored with this product. Must be at most 4096 - * characters long. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Immutable. The category for the product identified by the reference image. This should - * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or - * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are - * still supported, but these should not be used for new products. - * - * Generated from protobuf field string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getProductCategory() - { - return $this->product_category; - } - - /** - * Immutable. The category for the product identified by the reference image. This should - * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or - * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are - * still supported, but these should not be used for new products. - * - * Generated from protobuf field string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setProductCategory($var) - { - GPBUtil::checkString($var, True); - $this->product_category = $var; - - return $this; - } - - /** - * Key-value pairs that can be attached to a product. At query time, - * constraints can be specified based on the product_labels. - * Note that integer values can be provided as strings, e.g. "1199". Only - * strings with integer values can match a range-based restriction which is - * to be supported soon. - * Multiple values can be assigned to the same key. One product may have up to - * 500 product_labels. - * Notice that the total number of distinct product_labels over all products - * in one ProductSet cannot exceed 1M, otherwise the product search pipeline - * will refuse to work for that ProductSet. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProductLabels() - { - return $this->product_labels; - } - - /** - * Key-value pairs that can be attached to a product. At query time, - * constraints can be specified based on the product_labels. - * Note that integer values can be provided as strings, e.g. "1199". Only - * strings with integer values can match a range-based restriction which is - * to be supported soon. - * Multiple values can be assigned to the same key. One product may have up to - * 500 product_labels. - * Notice that the total number of distinct product_labels over all products - * in one ProductSet cannot exceed 1M, otherwise the product search pipeline - * will refuse to work for that ProductSet. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - * @param array<\Google\Cloud\Vision\V1\Product\KeyValue>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProductLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Product\KeyValue::class); - $this->product_labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product/KeyValue.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product/KeyValue.php deleted file mode 100644 index 6f977cac6d14..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product/KeyValue.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.vision.v1.Product.KeyValue - */ -class KeyValue extends \Google\Protobuf\Internal\Message -{ - /** - * The key of the label attached to the product. Cannot be empty and cannot - * exceed 128 bytes. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * The value of the label attached to the product. Cannot be empty and - * cannot exceed 128 bytes. - * - * Generated from protobuf field string value = 2; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * The key of the label attached to the product. Cannot be empty and cannot - * exceed 128 bytes. - * @type string $value - * The value of the label attached to the product. Cannot be empty and - * cannot exceed 128 bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * The key of the label attached to the product. Cannot be empty and cannot - * exceed 128 bytes. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * The key of the label attached to the product. Cannot be empty and cannot - * exceed 128 bytes. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * The value of the label attached to the product. Cannot be empty and - * cannot exceed 128 bytes. - * - * Generated from protobuf field string value = 2; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * The value of the label attached to the product. Cannot be empty and - * cannot exceed 128 bytes. - * - * Generated from protobuf field string value = 2; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(KeyValue::class, \Google\Cloud\Vision\V1\Product_KeyValue::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchGrpcClient.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchGrpcClient.php deleted file mode 100644 index 0d3768b48c6b..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchGrpcClient.php +++ /dev/null @@ -1,470 +0,0 @@ -_simpleRequest('/google.cloud.vision.v1.ProductSearch/CreateProductSet', - $argument, - ['\Google\Cloud\Vision\V1\ProductSet', 'decode'], - $metadata, $options); - } - - /** - * Lists ProductSets in an unspecified order. - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less - * than 1. - * @param \Google\Cloud\Vision\V1\ListProductSetsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListProductSets(\Google\Cloud\Vision\V1\ListProductSetsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/ListProductSets', - $argument, - ['\Google\Cloud\Vision\V1\ListProductSetsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets information associated with a ProductSet. - * - * Possible errors: - * - * * Returns NOT_FOUND if the ProductSet does not exist. - * @param \Google\Cloud\Vision\V1\GetProductSetRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetProductSet(\Google\Cloud\Vision\V1\GetProductSetRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/GetProductSet', - $argument, - ['\Google\Cloud\Vision\V1\ProductSet', 'decode'], - $metadata, $options); - } - - /** - * Makes changes to a ProductSet resource. - * Only display_name can be updated currently. - * - * Possible errors: - * - * * Returns NOT_FOUND if the ProductSet does not exist. - * * Returns INVALID_ARGUMENT if display_name is present in update_mask but - * missing from the request or longer than 4096 characters. - * @param \Google\Cloud\Vision\V1\UpdateProductSetRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateProductSet(\Google\Cloud\Vision\V1\UpdateProductSetRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/UpdateProductSet', - $argument, - ['\Google\Cloud\Vision\V1\ProductSet', 'decode'], - $metadata, $options); - } - - /** - * Permanently deletes a ProductSet. Products and ReferenceImages in the - * ProductSet are not deleted. - * - * The actual image files are not deleted from Google Cloud Storage. - * @param \Google\Cloud\Vision\V1\DeleteProductSetRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteProductSet(\Google\Cloud\Vision\V1\DeleteProductSetRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/DeleteProductSet', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Creates and returns a new product resource. - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 - * characters. - * * Returns INVALID_ARGUMENT if description is longer than 4096 characters. - * * Returns INVALID_ARGUMENT if product_category is missing or invalid. - * @param \Google\Cloud\Vision\V1\CreateProductRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateProduct(\Google\Cloud\Vision\V1\CreateProductRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/CreateProduct', - $argument, - ['\Google\Cloud\Vision\V1\Product', 'decode'], - $metadata, $options); - } - - /** - * Lists products in an unspecified order. - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - * @param \Google\Cloud\Vision\V1\ListProductsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListProducts(\Google\Cloud\Vision\V1\ListProductsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/ListProducts', - $argument, - ['\Google\Cloud\Vision\V1\ListProductsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets information associated with a Product. - * - * Possible errors: - * - * * Returns NOT_FOUND if the Product does not exist. - * @param \Google\Cloud\Vision\V1\GetProductRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetProduct(\Google\Cloud\Vision\V1\GetProductRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/GetProduct', - $argument, - ['\Google\Cloud\Vision\V1\Product', 'decode'], - $metadata, $options); - } - - /** - * Makes changes to a Product resource. - * Only the `display_name`, `description`, and `labels` fields can be updated - * right now. - * - * If labels are updated, the change will not be reflected in queries until - * the next index time. - * - * Possible errors: - * - * * Returns NOT_FOUND if the Product does not exist. - * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is - * missing from the request or longer than 4096 characters. - * * Returns INVALID_ARGUMENT if description is present in update_mask but is - * longer than 4096 characters. - * * Returns INVALID_ARGUMENT if product_category is present in update_mask. - * @param \Google\Cloud\Vision\V1\UpdateProductRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateProduct(\Google\Cloud\Vision\V1\UpdateProductRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/UpdateProduct', - $argument, - ['\Google\Cloud\Vision\V1\Product', 'decode'], - $metadata, $options); - } - - /** - * Permanently deletes a product and its reference images. - * - * Metadata of the product and all its images will be deleted right away, but - * search queries against ProductSets containing the product may still work - * until all related caches are refreshed. - * @param \Google\Cloud\Vision\V1\DeleteProductRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteProduct(\Google\Cloud\Vision\V1\DeleteProductRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/DeleteProduct', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Creates and returns a new ReferenceImage resource. - * - * The `bounding_poly` field is optional. If `bounding_poly` is not specified, - * the system will try to detect regions of interest in the image that are - * compatible with the product_category on the parent product. If it is - * specified, detection is ALWAYS skipped. The system converts polygons into - * non-rotated rectangles. - * - * Note that the pipeline will resize the image if the image resolution is too - * large to process (above 50MP). - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 - * characters. - * * Returns INVALID_ARGUMENT if the product does not exist. - * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing - * compatible with the parent product's product_category is detected. - * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - * @param \Google\Cloud\Vision\V1\CreateReferenceImageRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateReferenceImage(\Google\Cloud\Vision\V1\CreateReferenceImageRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/CreateReferenceImage', - $argument, - ['\Google\Cloud\Vision\V1\ReferenceImage', 'decode'], - $metadata, $options); - } - - /** - * Permanently deletes a reference image. - * - * The image metadata will be deleted right away, but search queries - * against ProductSets containing the image may still work until all related - * caches are refreshed. - * - * The actual image files are not deleted from Google Cloud Storage. - * @param \Google\Cloud\Vision\V1\DeleteReferenceImageRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteReferenceImage(\Google\Cloud\Vision\V1\DeleteReferenceImageRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/DeleteReferenceImage', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Lists reference images. - * - * Possible errors: - * - * * Returns NOT_FOUND if the parent product does not exist. - * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less - * than 1. - * @param \Google\Cloud\Vision\V1\ListReferenceImagesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListReferenceImages(\Google\Cloud\Vision\V1\ListReferenceImagesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/ListReferenceImages', - $argument, - ['\Google\Cloud\Vision\V1\ListReferenceImagesResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets information associated with a ReferenceImage. - * - * Possible errors: - * - * * Returns NOT_FOUND if the specified image does not exist. - * @param \Google\Cloud\Vision\V1\GetReferenceImageRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetReferenceImage(\Google\Cloud\Vision\V1\GetReferenceImageRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/GetReferenceImage', - $argument, - ['\Google\Cloud\Vision\V1\ReferenceImage', 'decode'], - $metadata, $options); - } - - /** - * Adds a Product to the specified ProductSet. If the Product is already - * present, no change is made. - * - * One Product can be added to at most 100 ProductSets. - * - * Possible errors: - * - * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - * @param \Google\Cloud\Vision\V1\AddProductToProductSetRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function AddProductToProductSet(\Google\Cloud\Vision\V1\AddProductToProductSetRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/AddProductToProductSet', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Removes a Product from the specified ProductSet. - * @param \Google\Cloud\Vision\V1\RemoveProductFromProductSetRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function RemoveProductFromProductSet(\Google\Cloud\Vision\V1\RemoveProductFromProductSetRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/RemoveProductFromProductSet', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Lists the Products in a ProductSet, in an unspecified order. If the - * ProductSet does not exist, the products field of the response will be - * empty. - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - * @param \Google\Cloud\Vision\V1\ListProductsInProductSetRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListProductsInProductSet(\Google\Cloud\Vision\V1\ListProductsInProductSetRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/ListProductsInProductSet', - $argument, - ['\Google\Cloud\Vision\V1\ListProductsInProductSetResponse', 'decode'], - $metadata, $options); - } - - /** - * Asynchronous API that imports a list of reference images to specified - * product sets based on a list of image information. - * - * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the - * progress and results of the request. - * `Operation.metadata` contains `BatchOperationMetadata`. (progress) - * `Operation.response` contains `ImportProductSetsResponse`. (results) - * - * The input source of this method is a csv file on Google Cloud Storage. - * For the format of the csv file please see - * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. - * @param \Google\Cloud\Vision\V1\ImportProductSetsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ImportProductSets(\Google\Cloud\Vision\V1\ImportProductSetsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/ImportProductSets', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Asynchronous API to delete all Products in a ProductSet or all Products - * that are in no ProductSet. - * - * If a Product is a member of the specified ProductSet in addition to other - * ProductSets, the Product will still be deleted. - * - * It is recommended to not delete the specified ProductSet until after this - * operation has completed. It is also recommended to not add any of the - * Products involved in the batch delete to a new ProductSet while this - * operation is running because those Products may still end up deleted. - * - * It's not possible to undo the PurgeProducts operation. Therefore, it is - * recommended to keep the csv files used in ImportProductSets (if that was - * how you originally built the Product Set) before starting PurgeProducts, in - * case you need to re-import the data after deletion. - * - * If the plan is to purge all of the Products from a ProductSet and then - * re-use the empty ProductSet to re-import new Products into the empty - * ProductSet, you must wait until the PurgeProducts operation has finished - * for that ProductSet. - * - * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the - * progress and results of the request. - * `Operation.metadata` contains `BatchOperationMetadata`. (progress) - * @param \Google\Cloud\Vision\V1\PurgeProductsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function PurgeProducts(\Google\Cloud\Vision\V1\PurgeProductsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vision.v1.ProductSearch/PurgeProducts', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchParams.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchParams.php deleted file mode 100644 index 8bf96a779274..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchParams.php +++ /dev/null @@ -1,239 +0,0 @@ -google.cloud.vision.v1.ProductSearchParams - */ -class ProductSearchParams extends \Google\Protobuf\Internal\Message -{ - /** - * The bounding polygon around the area of interest in the image. - * If it is not specified, system discretion will be applied. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; - */ - protected $bounding_poly = null; - /** - * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - * - * Generated from protobuf field string product_set = 6 [(.google.api.resource_reference) = { - */ - protected $product_set = ''; - /** - * The list of product categories to search in. Currently, we only consider - * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", - * "packagedgoods-v1", or "general-v1" should be specified. The legacy - * categories "homegoods", "apparel", and "toys" are still supported but will - * be deprecated. For new products, please use "homegoods-v2", "apparel-v2", - * or "toys-v2" for better product search accuracy. It is recommended to - * migrate existing products to these categories as well. - * - * Generated from protobuf field repeated string product_categories = 7; - */ - private $product_categories; - /** - * The filtering expression. This can be used to restrict search results based - * on Product labels. We currently support an AND of OR of key-value - * expressions, where each expression within an OR must have the same key. An - * '=' should be used to connect the key and value. - * For example, "(color = red OR color = blue) AND brand = Google" is - * acceptable, but "(color = red OR brand = Google)" is not acceptable. - * "color: red" is not acceptable because it uses a ':' instead of an '='. - * - * Generated from protobuf field string filter = 8; - */ - protected $filter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly - * The bounding polygon around the area of interest in the image. - * If it is not specified, system discretion will be applied. - * @type string $product_set - * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - * @type array|\Google\Protobuf\Internal\RepeatedField $product_categories - * The list of product categories to search in. Currently, we only consider - * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", - * "packagedgoods-v1", or "general-v1" should be specified. The legacy - * categories "homegoods", "apparel", and "toys" are still supported but will - * be deprecated. For new products, please use "homegoods-v2", "apparel-v2", - * or "toys-v2" for better product search accuracy. It is recommended to - * migrate existing products to these categories as well. - * @type string $filter - * The filtering expression. This can be used to restrict search results based - * on Product labels. We currently support an AND of OR of key-value - * expressions, where each expression within an OR must have the same key. An - * '=' should be used to connect the key and value. - * For example, "(color = red OR color = blue) AND brand = Google" is - * acceptable, but "(color = red OR brand = Google)" is not acceptable. - * "color: red" is not acceptable because it uses a ':' instead of an '='. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearch::initOnce(); - parent::__construct($data); - } - - /** - * The bounding polygon around the area of interest in the image. - * If it is not specified, system discretion will be applied. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; - * @return \Google\Cloud\Vision\V1\BoundingPoly|null - */ - public function getBoundingPoly() - { - return $this->bounding_poly; - } - - public function hasBoundingPoly() - { - return isset($this->bounding_poly); - } - - public function clearBoundingPoly() - { - unset($this->bounding_poly); - } - - /** - * The bounding polygon around the area of interest in the image. - * If it is not specified, system discretion will be applied. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; - * @param \Google\Cloud\Vision\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingPoly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->bounding_poly = $var; - - return $this; - } - - /** - * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - * - * Generated from protobuf field string product_set = 6 [(.google.api.resource_reference) = { - * @return string - */ - public function getProductSet() - { - return $this->product_set; - } - - /** - * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - * - * Generated from protobuf field string product_set = 6 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProductSet($var) - { - GPBUtil::checkString($var, True); - $this->product_set = $var; - - return $this; - } - - /** - * The list of product categories to search in. Currently, we only consider - * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", - * "packagedgoods-v1", or "general-v1" should be specified. The legacy - * categories "homegoods", "apparel", and "toys" are still supported but will - * be deprecated. For new products, please use "homegoods-v2", "apparel-v2", - * or "toys-v2" for better product search accuracy. It is recommended to - * migrate existing products to these categories as well. - * - * Generated from protobuf field repeated string product_categories = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProductCategories() - { - return $this->product_categories; - } - - /** - * The list of product categories to search in. Currently, we only consider - * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", - * "packagedgoods-v1", or "general-v1" should be specified. The legacy - * categories "homegoods", "apparel", and "toys" are still supported but will - * be deprecated. For new products, please use "homegoods-v2", "apparel-v2", - * or "toys-v2" for better product search accuracy. It is recommended to - * migrate existing products to these categories as well. - * - * Generated from protobuf field repeated string product_categories = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProductCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->product_categories = $arr; - - return $this; - } - - /** - * The filtering expression. This can be used to restrict search results based - * on Product labels. We currently support an AND of OR of key-value - * expressions, where each expression within an OR must have the same key. An - * '=' should be used to connect the key and value. - * For example, "(color = red OR color = blue) AND brand = Google" is - * acceptable, but "(color = red OR brand = Google)" is not acceptable. - * "color: red" is not acceptable because it uses a ':' instead of an '='. - * - * Generated from protobuf field string filter = 8; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filtering expression. This can be used to restrict search results based - * on Product labels. We currently support an AND of OR of key-value - * expressions, where each expression within an OR must have the same key. An - * '=' should be used to connect the key and value. - * For example, "(color = red OR color = blue) AND brand = Google" is - * acceptable, but "(color = red OR brand = Google)" is not acceptable. - * "color: red" is not acceptable because it uses a ':' instead of an '='. - * - * Generated from protobuf field string filter = 8; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults.php deleted file mode 100644 index 44d025f0d729..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.vision.v1.ProductSearchResults - */ -class ProductSearchResults extends \Google\Protobuf\Internal\Message -{ - /** - * Timestamp of the index which provided these results. Products added to the - * product set and products removed from the product set after this time are - * not reflected in the current results. - * - * Generated from protobuf field .google.protobuf.Timestamp index_time = 2; - */ - protected $index_time = null; - /** - * List of results, one for each product match. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - private $results; - /** - * List of results grouped by products detected in the query image. Each entry - * corresponds to one bounding polygon in the query image, and contains the - * matching products specific to that region. There may be duplicate product - * matches in the union of all the per-product results. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - private $product_grouped_results; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $index_time - * Timestamp of the index which provided these results. Products added to the - * product set and products removed from the product set after this time are - * not reflected in the current results. - * @type array<\Google\Cloud\Vision\V1\ProductSearchResults\Result>|\Google\Protobuf\Internal\RepeatedField $results - * List of results, one for each product match. - * @type array<\Google\Cloud\Vision\V1\ProductSearchResults\GroupedResult>|\Google\Protobuf\Internal\RepeatedField $product_grouped_results - * List of results grouped by products detected in the query image. Each entry - * corresponds to one bounding polygon in the query image, and contains the - * matching products specific to that region. There may be duplicate product - * matches in the union of all the per-product results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearch::initOnce(); - parent::__construct($data); - } - - /** - * Timestamp of the index which provided these results. Products added to the - * product set and products removed from the product set after this time are - * not reflected in the current results. - * - * Generated from protobuf field .google.protobuf.Timestamp index_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getIndexTime() - { - return $this->index_time; - } - - public function hasIndexTime() - { - return isset($this->index_time); - } - - public function clearIndexTime() - { - unset($this->index_time); - } - - /** - * Timestamp of the index which provided these results. Products added to the - * product set and products removed from the product set after this time are - * not reflected in the current results. - * - * Generated from protobuf field .google.protobuf.Timestamp index_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setIndexTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->index_time = $var; - - return $this; - } - - /** - * List of results, one for each product match. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResults() - { - return $this->results; - } - - /** - * List of results, one for each product match. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - * @param array<\Google\Cloud\Vision\V1\ProductSearchResults\Result>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ProductSearchResults\Result::class); - $this->results = $arr; - - return $this; - } - - /** - * List of results grouped by products detected in the query image. Each entry - * corresponds to one bounding polygon in the query image, and contains the - * matching products specific to that region. There may be duplicate product - * matches in the union of all the per-product results. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProductGroupedResults() - { - return $this->product_grouped_results; - } - - /** - * List of results grouped by products detected in the query image. Each entry - * corresponds to one bounding polygon in the query image, and contains the - * matching products specific to that region. There may be duplicate product - * matches in the union of all the per-product results. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - * @param array<\Google\Cloud\Vision\V1\ProductSearchResults\GroupedResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProductGroupedResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ProductSearchResults\GroupedResult::class); - $this->product_grouped_results = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/GroupedResult.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/GroupedResult.php deleted file mode 100644 index 9066aef0cfdf..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/GroupedResult.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.vision.v1.ProductSearchResults.GroupedResult - */ -class GroupedResult extends \Google\Protobuf\Internal\Message -{ - /** - * The bounding polygon around the product detected in the query image. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - protected $bounding_poly = null; - /** - * List of results, one for each product match. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - private $results; - /** - * List of generic predictions for the object in the bounding box. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - private $object_annotations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly - * The bounding polygon around the product detected in the query image. - * @type array<\Google\Cloud\Vision\V1\ProductSearchResults\Result>|\Google\Protobuf\Internal\RepeatedField $results - * List of results, one for each product match. - * @type array<\Google\Cloud\Vision\V1\ProductSearchResults\ObjectAnnotation>|\Google\Protobuf\Internal\RepeatedField $object_annotations - * List of generic predictions for the object in the bounding box. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearch::initOnce(); - parent::__construct($data); - } - - /** - * The bounding polygon around the product detected in the query image. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return \Google\Cloud\Vision\V1\BoundingPoly|null - */ - public function getBoundingPoly() - { - return $this->bounding_poly; - } - - public function hasBoundingPoly() - { - return isset($this->bounding_poly); - } - - public function clearBoundingPoly() - { - unset($this->bounding_poly); - } - - /** - * The bounding polygon around the product detected in the query image. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @param \Google\Cloud\Vision\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingPoly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->bounding_poly = $var; - - return $this; - } - - /** - * List of results, one for each product match. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResults() - { - return $this->results; - } - - /** - * List of results, one for each product match. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - * @param array<\Google\Cloud\Vision\V1\ProductSearchResults\Result>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ProductSearchResults\Result::class); - $this->results = $arr; - - return $this; - } - - /** - * List of generic predictions for the object in the bounding box. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getObjectAnnotations() - { - return $this->object_annotations; - } - - /** - * List of generic predictions for the object in the bounding box. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - * @param array<\Google\Cloud\Vision\V1\ProductSearchResults\ObjectAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setObjectAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ProductSearchResults\ObjectAnnotation::class); - $this->object_annotations = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GroupedResult::class, \Google\Cloud\Vision\V1\ProductSearchResults_GroupedResult::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/ObjectAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/ObjectAnnotation.php deleted file mode 100644 index a8005c3f6b30..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/ObjectAnnotation.php +++ /dev/null @@ -1,180 +0,0 @@ -google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation - */ -class ObjectAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * Object ID that should align with EntityAnnotation mid. - * - * Generated from protobuf field string mid = 1; - */ - protected $mid = ''; - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 2; - */ - protected $language_code = ''; - /** - * Object name, expressed in its `language_code` language. - * - * Generated from protobuf field string name = 3; - */ - protected $name = ''; - /** - * Score of the result. Range [0, 1]. - * - * Generated from protobuf field float score = 4; - */ - protected $score = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $mid - * Object ID that should align with EntityAnnotation mid. - * @type string $language_code - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * @type string $name - * Object name, expressed in its `language_code` language. - * @type float $score - * Score of the result. Range [0, 1]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearch::initOnce(); - parent::__construct($data); - } - - /** - * Object ID that should align with EntityAnnotation mid. - * - * Generated from protobuf field string mid = 1; - * @return string - */ - public function getMid() - { - return $this->mid; - } - - /** - * Object ID that should align with EntityAnnotation mid. - * - * Generated from protobuf field string mid = 1; - * @param string $var - * @return $this - */ - public function setMid($var) - { - GPBUtil::checkString($var, True); - $this->mid = $var; - - return $this; - } - - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 2; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Object name, expressed in its `language_code` language. - * - * Generated from protobuf field string name = 3; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Object name, expressed in its `language_code` language. - * - * Generated from protobuf field string name = 3; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Score of the result. Range [0, 1]. - * - * Generated from protobuf field float score = 4; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * Score of the result. Range [0, 1]. - * - * Generated from protobuf field float score = 4; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ObjectAnnotation::class, \Google\Cloud\Vision\V1\ProductSearchResults_ObjectAnnotation::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/Result.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/Result.php deleted file mode 100644 index 4fa9d2e05b69..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/Result.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.vision.v1.ProductSearchResults.Result - */ -class Result extends \Google\Protobuf\Internal\Message -{ - /** - * The Product. - * - * Generated from protobuf field .google.cloud.vision.v1.Product product = 1; - */ - protected $product = null; - /** - * A confidence level on the match, ranging from 0 (no confidence) to - * 1 (full confidence). - * - * Generated from protobuf field float score = 2; - */ - protected $score = 0.0; - /** - * The resource name of the image from the product that is the closest match - * to the query. - * - * Generated from protobuf field string image = 3; - */ - protected $image = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\Product $product - * The Product. - * @type float $score - * A confidence level on the match, ranging from 0 (no confidence) to - * 1 (full confidence). - * @type string $image - * The resource name of the image from the product that is the closest match - * to the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearch::initOnce(); - parent::__construct($data); - } - - /** - * The Product. - * - * Generated from protobuf field .google.cloud.vision.v1.Product product = 1; - * @return \Google\Cloud\Vision\V1\Product|null - */ - public function getProduct() - { - return $this->product; - } - - public function hasProduct() - { - return isset($this->product); - } - - public function clearProduct() - { - unset($this->product); - } - - /** - * The Product. - * - * Generated from protobuf field .google.cloud.vision.v1.Product product = 1; - * @param \Google\Cloud\Vision\V1\Product $var - * @return $this - */ - public function setProduct($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Product::class); - $this->product = $var; - - return $this; - } - - /** - * A confidence level on the match, ranging from 0 (no confidence) to - * 1 (full confidence). - * - * Generated from protobuf field float score = 2; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * A confidence level on the match, ranging from 0 (no confidence) to - * 1 (full confidence). - * - * Generated from protobuf field float score = 2; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - - /** - * The resource name of the image from the product that is the closest match - * to the query. - * - * Generated from protobuf field string image = 3; - * @return string - */ - public function getImage() - { - return $this->image; - } - - /** - * The resource name of the image from the product that is the closest match - * to the query. - * - * Generated from protobuf field string image = 3; - * @param string $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkString($var, True); - $this->image = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Result::class, \Google\Cloud\Vision\V1\ProductSearchResults_Result::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSet.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSet.php deleted file mode 100644 index fae1466b47f3..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSet.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.vision.v1.ProductSet - */ -class ProductSet extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - * This field is ignored when creating a ProductSet. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The user-provided name for this ProductSet. Must not be empty. Must be at - * most 4096 characters long. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Output only. The time at which this ProductSet was last indexed. Query - * results will reflect all updates before this time. If this ProductSet has - * never been indexed, this timestamp is the default value - * "1970-01-01T00:00:00Z". - * This field is ignored when creating a ProductSet. - * - * Generated from protobuf field .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $index_time = null; - /** - * Output only. If there was an error with indexing the product set, the field - * is populated. - * This field is ignored when creating a ProductSet. - * - * Generated from protobuf field .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $index_error = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - * This field is ignored when creating a ProductSet. - * @type string $display_name - * The user-provided name for this ProductSet. Must not be empty. Must be at - * most 4096 characters long. - * @type \Google\Protobuf\Timestamp $index_time - * Output only. The time at which this ProductSet was last indexed. Query - * results will reflect all updates before this time. If this ProductSet has - * never been indexed, this timestamp is the default value - * "1970-01-01T00:00:00Z". - * This field is ignored when creating a ProductSet. - * @type \Google\Rpc\Status $index_error - * Output only. If there was an error with indexing the product set, the field - * is populated. - * This field is ignored when creating a ProductSet. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - * This field is ignored when creating a ProductSet. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - * This field is ignored when creating a ProductSet. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The user-provided name for this ProductSet. Must not be empty. Must be at - * most 4096 characters long. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The user-provided name for this ProductSet. Must not be empty. Must be at - * most 4096 characters long. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. The time at which this ProductSet was last indexed. Query - * results will reflect all updates before this time. If this ProductSet has - * never been indexed, this timestamp is the default value - * "1970-01-01T00:00:00Z". - * This field is ignored when creating a ProductSet. - * - * Generated from protobuf field .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getIndexTime() - { - return $this->index_time; - } - - public function hasIndexTime() - { - return isset($this->index_time); - } - - public function clearIndexTime() - { - unset($this->index_time); - } - - /** - * Output only. The time at which this ProductSet was last indexed. Query - * results will reflect all updates before this time. If this ProductSet has - * never been indexed, this timestamp is the default value - * "1970-01-01T00:00:00Z". - * This field is ignored when creating a ProductSet. - * - * Generated from protobuf field .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setIndexTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->index_time = $var; - - return $this; - } - - /** - * Output only. If there was an error with indexing the product set, the field - * is populated. - * This field is ignored when creating a ProductSet. - * - * Generated from protobuf field .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getIndexError() - { - return $this->index_error; - } - - public function hasIndexError() - { - return isset($this->index_error); - } - - public function clearIndexError() - { - unset($this->index_error); - } - - /** - * Output only. If there was an error with indexing the product set, the field - * is populated. - * This field is ignored when creating a ProductSet. - * - * Generated from protobuf field .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setIndexError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->index_error = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSetPurgeConfig.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSetPurgeConfig.php deleted file mode 100644 index b433c625acb4..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSetPurgeConfig.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.vision.v1.ProductSetPurgeConfig - */ -class ProductSetPurgeConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The ProductSet that contains the Products to delete. If a Product is a - * member of product_set_id in addition to other ProductSets, the Product will - * still be deleted. - * - * Generated from protobuf field string product_set_id = 1; - */ - protected $product_set_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $product_set_id - * The ProductSet that contains the Products to delete. If a Product is a - * member of product_set_id in addition to other ProductSets, the Product will - * still be deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * The ProductSet that contains the Products to delete. If a Product is a - * member of product_set_id in addition to other ProductSets, the Product will - * still be deleted. - * - * Generated from protobuf field string product_set_id = 1; - * @return string - */ - public function getProductSetId() - { - return $this->product_set_id; - } - - /** - * The ProductSet that contains the Products to delete. If a Product is a - * member of product_set_id in addition to other ProductSets, the Product will - * still be deleted. - * - * Generated from protobuf field string product_set_id = 1; - * @param string $var - * @return $this - */ - public function setProductSetId($var) - { - GPBUtil::checkString($var, True); - $this->product_set_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Property.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Property.php deleted file mode 100644 index 3fb9058b77b0..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Property.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.vision.v1.Property - */ -class Property extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the property. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Value of the property. - * - * Generated from protobuf field string value = 2; - */ - protected $value = ''; - /** - * Value of numeric properties. - * - * Generated from protobuf field uint64 uint64_value = 3; - */ - protected $uint64_value = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the property. - * @type string $value - * Value of the property. - * @type int|string $uint64_value - * Value of numeric properties. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Name of the property. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the property. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Value of the property. - * - * Generated from protobuf field string value = 2; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Value of the property. - * - * Generated from protobuf field string value = 2; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - - /** - * Value of numeric properties. - * - * Generated from protobuf field uint64 uint64_value = 3; - * @return int|string - */ - public function getUint64Value() - { - return $this->uint64_value; - } - - /** - * Value of numeric properties. - * - * Generated from protobuf field uint64 uint64_value = 3; - * @param int|string $var - * @return $this - */ - public function setUint64Value($var) - { - GPBUtil::checkUint64($var); - $this->uint64_value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/PurgeProductsRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/PurgeProductsRequest.php deleted file mode 100644 index 9633606d6678..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/PurgeProductsRequest.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.vision.v1.PurgeProductsRequest - */ -class PurgeProductsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location in which the Products should be deleted. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The default value is false. Override this value to true to actually perform - * the purge. - * - * Generated from protobuf field bool force = 4; - */ - protected $force = false; - protected $target; - - /** - * @param string $parent Required. The project and location in which the Products should be deleted. - * - * Format is `projects/PROJECT_ID/locations/LOC_ID`. Please see - * {@see ProductSearchClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\PurgeProductsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\ProductSetPurgeConfig $product_set_purge_config - * Specify which ProductSet contains the Products to be deleted. - * @type bool $delete_orphan_products - * If delete_orphan_products is true, all Products that are not in any - * ProductSet will be deleted. - * @type string $parent - * Required. The project and location in which the Products should be deleted. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @type bool $force - * The default value is false. Override this value to true to actually perform - * the purge. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Specify which ProductSet contains the Products to be deleted. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; - * @return \Google\Cloud\Vision\V1\ProductSetPurgeConfig|null - */ - public function getProductSetPurgeConfig() - { - return $this->readOneof(2); - } - - public function hasProductSetPurgeConfig() - { - return $this->hasOneof(2); - } - - /** - * Specify which ProductSet contains the Products to be deleted. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; - * @param \Google\Cloud\Vision\V1\ProductSetPurgeConfig $var - * @return $this - */ - public function setProductSetPurgeConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSetPurgeConfig::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * If delete_orphan_products is true, all Products that are not in any - * ProductSet will be deleted. - * - * Generated from protobuf field bool delete_orphan_products = 3; - * @return bool - */ - public function getDeleteOrphanProducts() - { - return $this->readOneof(3); - } - - public function hasDeleteOrphanProducts() - { - return $this->hasOneof(3); - } - - /** - * If delete_orphan_products is true, all Products that are not in any - * ProductSet will be deleted. - * - * Generated from protobuf field bool delete_orphan_products = 3; - * @param bool $var - * @return $this - */ - public function setDeleteOrphanProducts($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Required. The project and location in which the Products should be deleted. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project and location in which the Products should be deleted. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The default value is false. Override this value to true to actually perform - * the purge. - * - * Generated from protobuf field bool force = 4; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * The default value is false. Override this value to true to actually perform - * the purge. - * - * Generated from protobuf field bool force = 4; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - - /** - * @return string - */ - public function getTarget() - { - return $this->whichOneof("target"); - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ReferenceImage.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ReferenceImage.php deleted file mode 100644 index c5ec6e1a686d..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ReferenceImage.php +++ /dev/null @@ -1,176 +0,0 @@ -google.cloud.vision.v1.ReferenceImage - */ -class ReferenceImage extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the reference image. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - * This field is ignored when creating a reference image. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The Google Cloud Storage URI of the reference image. - * The URI must start with `gs://`. - * - * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - /** - * Optional. Bounding polygons around the areas of interest in the reference image. - * If this field is empty, the system will try to detect regions of - * interest. At most 10 bounding polygons will be used. - * The provided shape is converted into a non-rotated rectangle. Once - * converted, the small edge of the rectangle must be greater than or equal - * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 - * is not). - * - * Generated from protobuf field repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $bounding_polys; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the reference image. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - * This field is ignored when creating a reference image. - * @type string $uri - * Required. The Google Cloud Storage URI of the reference image. - * The URI must start with `gs://`. - * @type array<\Google\Cloud\Vision\V1\BoundingPoly>|\Google\Protobuf\Internal\RepeatedField $bounding_polys - * Optional. Bounding polygons around the areas of interest in the reference image. - * If this field is empty, the system will try to detect regions of - * interest. At most 10 bounding polygons will be used. - * The provided shape is converted into a non-rotated rectangle. Once - * converted, the small edge of the rectangle must be greater than or equal - * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 - * is not). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the reference image. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - * This field is ignored when creating a reference image. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the reference image. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - * This field is ignored when creating a reference image. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The Google Cloud Storage URI of the reference image. - * The URI must start with `gs://`. - * - * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. The Google Cloud Storage URI of the reference image. - * The URI must start with `gs://`. - * - * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Optional. Bounding polygons around the areas of interest in the reference image. - * If this field is empty, the system will try to detect regions of - * interest. At most 10 bounding polygons will be used. - * The provided shape is converted into a non-rotated rectangle. Once - * converted, the small edge of the rectangle must be greater than or equal - * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 - * is not). - * - * Generated from protobuf field repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBoundingPolys() - { - return $this->bounding_polys; - } - - /** - * Optional. Bounding polygons around the areas of interest in the reference image. - * If this field is empty, the system will try to detect regions of - * interest. At most 10 bounding polygons will be used. - * The provided shape is converted into a non-rotated rectangle. Once - * converted, the small edge of the rectangle must be greater than or equal - * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 - * is not). - * - * Generated from protobuf field repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Vision\V1\BoundingPoly>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBoundingPolys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->bounding_polys = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/RemoveProductFromProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/RemoveProductFromProductSetRequest.php deleted file mode 100644 index d539e005612b..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/RemoveProductFromProductSetRequest.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.vision.v1.RemoveProductFromProductSetRequest - */ -class RemoveProductFromProductSetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name for the ProductSet to modify. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The resource name for the Product to be removed from this ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * - * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $product = ''; - - /** - * @param string $name Required. The resource name for the ProductSet to modify. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. - * @param string $product Required. The resource name for the Product to be removed from this ProductSet. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * Please see {@see ProductSearchClient::productName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\RemoveProductFromProductSetRequest - * - * @experimental - */ - public static function build(string $name, string $product): self - { - return (new self()) - ->setName($name) - ->setProduct($product); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name for the ProductSet to modify. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @type string $product - * Required. The resource name for the Product to be removed from this ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name for the ProductSet to modify. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name for the ProductSet to modify. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The resource name for the Product to be removed from this ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * - * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getProduct() - { - return $this->product; - } - - /** - * Required. The resource name for the Product to be removed from this ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * - * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProduct($var) - { - GPBUtil::checkString($var, True); - $this->product = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/SafeSearchAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/SafeSearchAnnotation.php deleted file mode 100644 index d04921c5a8b8..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/SafeSearchAnnotation.php +++ /dev/null @@ -1,233 +0,0 @@ -google.cloud.vision.v1.SafeSearchAnnotation - */ -class SafeSearchAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * Represents the adult content likelihood for the image. Adult content may - * contain elements such as nudity, pornographic images or cartoons, or - * sexual activities. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood adult = 1; - */ - protected $adult = 0; - /** - * Spoof likelihood. The likelihood that an modification - * was made to the image's canonical version to make it appear - * funny or offensive. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood spoof = 2; - */ - protected $spoof = 0; - /** - * Likelihood that this is a medical image. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood medical = 3; - */ - protected $medical = 0; - /** - * Likelihood that this image contains violent content. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood violence = 4; - */ - protected $violence = 0; - /** - * Likelihood that the request image contains racy content. Racy content may - * include (but is not limited to) skimpy or sheer clothing, strategically - * covered nudity, lewd or provocative poses, or close-ups of sensitive - * body areas. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood racy = 9; - */ - protected $racy = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $adult - * Represents the adult content likelihood for the image. Adult content may - * contain elements such as nudity, pornographic images or cartoons, or - * sexual activities. - * @type int $spoof - * Spoof likelihood. The likelihood that an modification - * was made to the image's canonical version to make it appear - * funny or offensive. - * @type int $medical - * Likelihood that this is a medical image. - * @type int $violence - * Likelihood that this image contains violent content. - * @type int $racy - * Likelihood that the request image contains racy content. Racy content may - * include (but is not limited to) skimpy or sheer clothing, strategically - * covered nudity, lewd or provocative poses, or close-ups of sensitive - * body areas. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Represents the adult content likelihood for the image. Adult content may - * contain elements such as nudity, pornographic images or cartoons, or - * sexual activities. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood adult = 1; - * @return int - */ - public function getAdult() - { - return $this->adult; - } - - /** - * Represents the adult content likelihood for the image. Adult content may - * contain elements such as nudity, pornographic images or cartoons, or - * sexual activities. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood adult = 1; - * @param int $var - * @return $this - */ - public function setAdult($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->adult = $var; - - return $this; - } - - /** - * Spoof likelihood. The likelihood that an modification - * was made to the image's canonical version to make it appear - * funny or offensive. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood spoof = 2; - * @return int - */ - public function getSpoof() - { - return $this->spoof; - } - - /** - * Spoof likelihood. The likelihood that an modification - * was made to the image's canonical version to make it appear - * funny or offensive. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood spoof = 2; - * @param int $var - * @return $this - */ - public function setSpoof($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->spoof = $var; - - return $this; - } - - /** - * Likelihood that this is a medical image. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood medical = 3; - * @return int - */ - public function getMedical() - { - return $this->medical; - } - - /** - * Likelihood that this is a medical image. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood medical = 3; - * @param int $var - * @return $this - */ - public function setMedical($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->medical = $var; - - return $this; - } - - /** - * Likelihood that this image contains violent content. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood violence = 4; - * @return int - */ - public function getViolence() - { - return $this->violence; - } - - /** - * Likelihood that this image contains violent content. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood violence = 4; - * @param int $var - * @return $this - */ - public function setViolence($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->violence = $var; - - return $this; - } - - /** - * Likelihood that the request image contains racy content. Racy content may - * include (but is not limited to) skimpy or sheer clothing, strategically - * covered nudity, lewd or provocative poses, or close-ups of sensitive - * body areas. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood racy = 9; - * @return int - */ - public function getRacy() - { - return $this->racy; - } - - /** - * Likelihood that the request image contains racy content. Racy content may - * include (but is not limited to) skimpy or sheer clothing, strategically - * covered nudity, lewd or provocative poses, or close-ups of sensitive - * body areas. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood racy = 9; - * @param int $var - * @return $this - */ - public function setRacy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->racy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Symbol.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Symbol.php deleted file mode 100644 index 4fe27114775f..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Symbol.php +++ /dev/null @@ -1,245 +0,0 @@ -google.cloud.vision.v1.Symbol - */ -class Symbol extends \Google\Protobuf\Internal\Message -{ - /** - * Additional information detected for the symbol. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - protected $property = null; - /** - * The bounding box for the symbol. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - protected $bounding_box = null; - /** - * The actual UTF-8 representation of the symbol. - * - * Generated from protobuf field string text = 3; - */ - protected $text = ''; - /** - * Confidence of the OCR results for the symbol. Range [0, 1]. - * - * Generated from protobuf field float confidence = 4; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $property - * Additional information detected for the symbol. - * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_box - * The bounding box for the symbol. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * @type string $text - * The actual UTF-8 representation of the symbol. - * @type float $confidence - * Confidence of the OCR results for the symbol. Range [0, 1]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); - parent::__construct($data); - } - - /** - * Additional information detected for the symbol. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return \Google\Cloud\Vision\V1\TextAnnotation\TextProperty|null - */ - public function getProperty() - { - return $this->property; - } - - public function hasProperty() - { - return isset($this->property); - } - - public function clearProperty() - { - unset($this->property); - } - - /** - * Additional information detected for the symbol. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @param \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $var - * @return $this - */ - public function setProperty($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\TextProperty::class); - $this->property = $var; - - return $this; - } - - /** - * The bounding box for the symbol. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return \Google\Cloud\Vision\V1\BoundingPoly|null - */ - public function getBoundingBox() - { - return $this->bounding_box; - } - - public function hasBoundingBox() - { - return isset($this->bounding_box); - } - - public function clearBoundingBox() - { - unset($this->bounding_box); - } - - /** - * The bounding box for the symbol. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @param \Google\Cloud\Vision\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingBox($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->bounding_box = $var; - - return $this; - } - - /** - * The actual UTF-8 representation of the symbol. - * - * Generated from protobuf field string text = 3; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * The actual UTF-8 representation of the symbol. - * - * Generated from protobuf field string text = 3; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - - /** - * Confidence of the OCR results for the symbol. Range [0, 1]. - * - * Generated from protobuf field float confidence = 4; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Confidence of the OCR results for the symbol. Range [0, 1]. - * - * Generated from protobuf field float confidence = 4; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation.php deleted file mode 100644 index b9449e3014dc..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation.php +++ /dev/null @@ -1,107 +0,0 @@ - Page -> Block -> Paragraph -> Word -> Symbol - * Each structural component, starting from Page, may further have their own - * properties. Properties describe detected languages, breaks etc.. Please refer - * to the [TextAnnotation.TextProperty][google.cloud.vision.v1.TextAnnotation.TextProperty] message definition below for more - * detail. - * - * Generated from protobuf message google.cloud.vision.v1.TextAnnotation - */ -class TextAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * List of pages detected by OCR. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Page pages = 1; - */ - private $pages; - /** - * UTF-8 text detected on the pages. - * - * Generated from protobuf field string text = 2; - */ - protected $text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\Page>|\Google\Protobuf\Internal\RepeatedField $pages - * List of pages detected by OCR. - * @type string $text - * UTF-8 text detected on the pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); - parent::__construct($data); - } - - /** - * List of pages detected by OCR. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Page pages = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPages() - { - return $this->pages; - } - - /** - * List of pages detected by OCR. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Page pages = 1; - * @param array<\Google\Cloud\Vision\V1\Page>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Page::class); - $this->pages = $arr; - - return $this; - } - - /** - * UTF-8 text detected on the pages. - * - * Generated from protobuf field string text = 2; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * UTF-8 text detected on the pages. - * - * Generated from protobuf field string text = 2; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak.php deleted file mode 100644 index 7844b2387083..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.vision.v1.TextAnnotation.DetectedBreak - */ -class DetectedBreak extends \Google\Protobuf\Internal\Message -{ - /** - * Detected break type. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; - */ - protected $type = 0; - /** - * True if break prepends the element. - * - * Generated from protobuf field bool is_prefix = 2; - */ - protected $is_prefix = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Detected break type. - * @type bool $is_prefix - * True if break prepends the element. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); - parent::__construct($data); - } - - /** - * Detected break type. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Detected break type. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\TextAnnotation\DetectedBreak\BreakType::class); - $this->type = $var; - - return $this; - } - - /** - * True if break prepends the element. - * - * Generated from protobuf field bool is_prefix = 2; - * @return bool - */ - public function getIsPrefix() - { - return $this->is_prefix; - } - - /** - * True if break prepends the element. - * - * Generated from protobuf field bool is_prefix = 2; - * @param bool $var - * @return $this - */ - public function setIsPrefix($var) - { - GPBUtil::checkBool($var); - $this->is_prefix = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DetectedBreak::class, \Google\Cloud\Vision\V1\TextAnnotation_DetectedBreak::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak/BreakType.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak/BreakType.php deleted file mode 100644 index 455626c48545..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak/BreakType.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType - */ -class BreakType -{ - /** - * Unknown break label type. - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * Regular space. - * - * Generated from protobuf enum SPACE = 1; - */ - const SPACE = 1; - /** - * Sure space (very wide). - * - * Generated from protobuf enum SURE_SPACE = 2; - */ - const SURE_SPACE = 2; - /** - * Line-wrapping break. - * - * Generated from protobuf enum EOL_SURE_SPACE = 3; - */ - const EOL_SURE_SPACE = 3; - /** - * End-line hyphen that is not present in text; does not co-occur with - * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`. - * - * Generated from protobuf enum HYPHEN = 4; - */ - const HYPHEN = 4; - /** - * Line break that ends a paragraph. - * - * Generated from protobuf enum LINE_BREAK = 5; - */ - const LINE_BREAK = 5; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::SPACE => 'SPACE', - self::SURE_SPACE => 'SURE_SPACE', - self::EOL_SURE_SPACE => 'EOL_SURE_SPACE', - self::HYPHEN => 'HYPHEN', - self::LINE_BREAK => 'LINE_BREAK', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BreakType::class, \Google\Cloud\Vision\V1\TextAnnotation_DetectedBreak_BreakType::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedLanguage.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedLanguage.php deleted file mode 100644 index d2c4a7623404..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedLanguage.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.vision.v1.TextAnnotation.DetectedLanguage - */ -class DetectedLanguage extends \Google\Protobuf\Internal\Message -{ - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 1; - */ - protected $language_code = ''; - /** - * Confidence of detected language. Range [0, 1]. - * - * Generated from protobuf field float confidence = 2; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $language_code - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * @type float $confidence - * Confidence of detected language. Range [0, 1]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); - parent::__construct($data); - } - - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 1; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 1; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Confidence of detected language. Range [0, 1]. - * - * Generated from protobuf field float confidence = 2; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Confidence of detected language. Range [0, 1]. - * - * Generated from protobuf field float confidence = 2; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DetectedLanguage::class, \Google\Cloud\Vision\V1\TextAnnotation_DetectedLanguage::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/TextProperty.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/TextProperty.php deleted file mode 100644 index 3dbed38cafb6..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/TextProperty.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.vision.v1.TextAnnotation.TextProperty - */ -class TextProperty extends \Google\Protobuf\Internal\Message -{ - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - private $detected_languages; - /** - * Detected start or end of a text segment. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; - */ - protected $detected_break = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\TextAnnotation\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $detected_languages - * A list of detected languages together with confidence. - * @type \Google\Cloud\Vision\V1\TextAnnotation\DetectedBreak $detected_break - * Detected start or end of a text segment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); - parent::__construct($data); - } - - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDetectedLanguages() - { - return $this->detected_languages; - } - - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - * @param array<\Google\Cloud\Vision\V1\TextAnnotation\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDetectedLanguages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\TextAnnotation\DetectedLanguage::class); - $this->detected_languages = $arr; - - return $this; - } - - /** - * Detected start or end of a text segment. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; - * @return \Google\Cloud\Vision\V1\TextAnnotation\DetectedBreak|null - */ - public function getDetectedBreak() - { - return $this->detected_break; - } - - public function hasDetectedBreak() - { - return isset($this->detected_break); - } - - public function clearDetectedBreak() - { - unset($this->detected_break); - } - - /** - * Detected start or end of a text segment. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; - * @param \Google\Cloud\Vision\V1\TextAnnotation\DetectedBreak $var - * @return $this - */ - public function setDetectedBreak($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\DetectedBreak::class); - $this->detected_break = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TextProperty::class, \Google\Cloud\Vision\V1\TextAnnotation_TextProperty::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextDetectionParams.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextDetectionParams.php deleted file mode 100644 index 49aa253b71bb..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextDetectionParams.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.vision.v1.TextDetectionParams - */ -class TextDetectionParams extends \Google\Protobuf\Internal\Message -{ - /** - * By default, Cloud Vision API only includes confidence score for - * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence - * score for TEXT_DETECTION as well. - * - * Generated from protobuf field bool enable_text_detection_confidence_score = 9; - */ - protected $enable_text_detection_confidence_score = false; - /** - * A list of advanced OCR options to fine-tune OCR behavior. - * - * Generated from protobuf field repeated string advanced_ocr_options = 11; - */ - private $advanced_ocr_options; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_text_detection_confidence_score - * By default, Cloud Vision API only includes confidence score for - * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence - * score for TEXT_DETECTION as well. - * @type array|\Google\Protobuf\Internal\RepeatedField $advanced_ocr_options - * A list of advanced OCR options to fine-tune OCR behavior. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * By default, Cloud Vision API only includes confidence score for - * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence - * score for TEXT_DETECTION as well. - * - * Generated from protobuf field bool enable_text_detection_confidence_score = 9; - * @return bool - */ - public function getEnableTextDetectionConfidenceScore() - { - return $this->enable_text_detection_confidence_score; - } - - /** - * By default, Cloud Vision API only includes confidence score for - * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence - * score for TEXT_DETECTION as well. - * - * Generated from protobuf field bool enable_text_detection_confidence_score = 9; - * @param bool $var - * @return $this - */ - public function setEnableTextDetectionConfidenceScore($var) - { - GPBUtil::checkBool($var); - $this->enable_text_detection_confidence_score = $var; - - return $this; - } - - /** - * A list of advanced OCR options to fine-tune OCR behavior. - * - * Generated from protobuf field repeated string advanced_ocr_options = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdvancedOcrOptions() - { - return $this->advanced_ocr_options; - } - - /** - * A list of advanced OCR options to fine-tune OCR behavior. - * - * Generated from protobuf field repeated string advanced_ocr_options = 11; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdvancedOcrOptions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->advanced_ocr_options = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductRequest.php deleted file mode 100644 index 91ab72f3f77e..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.vision.v1.UpdateProductRequest - */ -class UpdateProductRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Product resource which replaces the one on the server. - * product.name is immutable. - * - * Generated from protobuf field .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $product = null; - /** - * The [FieldMask][google.protobuf.FieldMask] that specifies which fields - * to update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask paths include `product_labels`, `display_name`, and - * `description`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Vision\V1\Product $product Required. The Product resource which replaces the one on the server. - * product.name is immutable. - * @param \Google\Protobuf\FieldMask $updateMask The [FieldMask][google.protobuf.FieldMask] that specifies which fields - * to update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask paths include `product_labels`, `display_name`, and - * `description`. - * - * @return \Google\Cloud\Vision\V1\UpdateProductRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Vision\V1\Product $product, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setProduct($product) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\Product $product - * Required. The Product resource which replaces the one on the server. - * product.name is immutable. - * @type \Google\Protobuf\FieldMask $update_mask - * The [FieldMask][google.protobuf.FieldMask] that specifies which fields - * to update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask paths include `product_labels`, `display_name`, and - * `description`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Product resource which replaces the one on the server. - * product.name is immutable. - * - * Generated from protobuf field .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Vision\V1\Product|null - */ - public function getProduct() - { - return $this->product; - } - - public function hasProduct() - { - return isset($this->product); - } - - public function clearProduct() - { - unset($this->product); - } - - /** - * Required. The Product resource which replaces the one on the server. - * product.name is immutable. - * - * Generated from protobuf field .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Vision\V1\Product $var - * @return $this - */ - public function setProduct($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Product::class); - $this->product = $var; - - return $this; - } - - /** - * The [FieldMask][google.protobuf.FieldMask] that specifies which fields - * to update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask paths include `product_labels`, `display_name`, and - * `description`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The [FieldMask][google.protobuf.FieldMask] that specifies which fields - * to update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask paths include `product_labels`, `display_name`, and - * `description`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductSetRequest.php deleted file mode 100644 index f3efd0e6405a..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductSetRequest.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.vision.v1.UpdateProductSetRequest - */ -class UpdateProductSetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ProductSet resource which replaces the one on the server. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $product_set = null; - /** - * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to - * update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask path is `display_name`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Vision\V1\ProductSet $productSet Required. The ProductSet resource which replaces the one on the server. - * @param \Google\Protobuf\FieldMask $updateMask The [FieldMask][google.protobuf.FieldMask] that specifies which fields to - * update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask path is `display_name`. - * - * @return \Google\Cloud\Vision\V1\UpdateProductSetRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Vision\V1\ProductSet $productSet, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setProductSet($productSet) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\ProductSet $product_set - * Required. The ProductSet resource which replaces the one on the server. - * @type \Google\Protobuf\FieldMask $update_mask - * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to - * update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask path is `display_name`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ProductSet resource which replaces the one on the server. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Vision\V1\ProductSet|null - */ - public function getProductSet() - { - return $this->product_set; - } - - public function hasProductSet() - { - return isset($this->product_set); - } - - public function clearProductSet() - { - unset($this->product_set); - } - - /** - * Required. The ProductSet resource which replaces the one on the server. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Vision\V1\ProductSet $var - * @return $this - */ - public function setProductSet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSet::class); - $this->product_set = $var; - - return $this; - } - - /** - * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to - * update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask path is `display_name`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to - * update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask path is `display_name`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Vertex.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Vertex.php deleted file mode 100644 index 2944b434c7a6..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Vertex.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.vision.v1.Vertex - */ -class Vertex extends \Google\Protobuf\Internal\Message -{ - /** - * X coordinate. - * - * Generated from protobuf field int32 x = 1; - */ - protected $x = 0; - /** - * Y coordinate. - * - * Generated from protobuf field int32 y = 2; - */ - protected $y = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $x - * X coordinate. - * @type int $y - * Y coordinate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\Geometry::initOnce(); - parent::__construct($data); - } - - /** - * X coordinate. - * - * Generated from protobuf field int32 x = 1; - * @return int - */ - public function getX() - { - return $this->x; - } - - /** - * X coordinate. - * - * Generated from protobuf field int32 x = 1; - * @param int $var - * @return $this - */ - public function setX($var) - { - GPBUtil::checkInt32($var); - $this->x = $var; - - return $this; - } - - /** - * Y coordinate. - * - * Generated from protobuf field int32 y = 2; - * @return int - */ - public function getY() - { - return $this->y; - } - - /** - * Y coordinate. - * - * Generated from protobuf field int32 y = 2; - * @param int $var - * @return $this - */ - public function setY($var) - { - GPBUtil::checkInt32($var); - $this->y = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection.php deleted file mode 100644 index 7210409bd479..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection.php +++ /dev/null @@ -1,253 +0,0 @@ -google.cloud.vision.v1.WebDetection - */ -class WebDetection extends \Google\Protobuf\Internal\Message -{ - /** - * Deduced entities from similar images on the Internet. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - private $web_entities; - /** - * Fully matching images from the Internet. - * Can include resized copies of the query image. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - private $full_matching_images; - /** - * Partial matching images from the Internet. - * Those images are similar enough to share some key-point features. For - * example an original image will likely have partial matching for its crops. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - private $partial_matching_images; - /** - * Web pages containing the matching images from the Internet. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - private $pages_with_matching_images; - /** - * The visually similar image results. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - private $visually_similar_images; - /** - * The service's best guess as to the topic of the request image. - * Inferred from similar images on the open web. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - private $best_guess_labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\WebDetection\WebEntity>|\Google\Protobuf\Internal\RepeatedField $web_entities - * Deduced entities from similar images on the Internet. - * @type array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $full_matching_images - * Fully matching images from the Internet. - * Can include resized copies of the query image. - * @type array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $partial_matching_images - * Partial matching images from the Internet. - * Those images are similar enough to share some key-point features. For - * example an original image will likely have partial matching for its crops. - * @type array<\Google\Cloud\Vision\V1\WebDetection\WebPage>|\Google\Protobuf\Internal\RepeatedField $pages_with_matching_images - * Web pages containing the matching images from the Internet. - * @type array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $visually_similar_images - * The visually similar image results. - * @type array<\Google\Cloud\Vision\V1\WebDetection\WebLabel>|\Google\Protobuf\Internal\RepeatedField $best_guess_labels - * The service's best guess as to the topic of the request image. - * Inferred from similar images on the open web. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\WebDetection::initOnce(); - parent::__construct($data); - } - - /** - * Deduced entities from similar images on the Internet. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWebEntities() - { - return $this->web_entities; - } - - /** - * Deduced entities from similar images on the Internet. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - * @param array<\Google\Cloud\Vision\V1\WebDetection\WebEntity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWebEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebEntity::class); - $this->web_entities = $arr; - - return $this; - } - - /** - * Fully matching images from the Internet. - * Can include resized copies of the query image. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFullMatchingImages() - { - return $this->full_matching_images; - } - - /** - * Fully matching images from the Internet. - * Can include resized copies of the query image. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - * @param array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFullMatchingImages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); - $this->full_matching_images = $arr; - - return $this; - } - - /** - * Partial matching images from the Internet. - * Those images are similar enough to share some key-point features. For - * example an original image will likely have partial matching for its crops. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPartialMatchingImages() - { - return $this->partial_matching_images; - } - - /** - * Partial matching images from the Internet. - * Those images are similar enough to share some key-point features. For - * example an original image will likely have partial matching for its crops. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - * @param array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPartialMatchingImages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); - $this->partial_matching_images = $arr; - - return $this; - } - - /** - * Web pages containing the matching images from the Internet. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPagesWithMatchingImages() - { - return $this->pages_with_matching_images; - } - - /** - * Web pages containing the matching images from the Internet. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - * @param array<\Google\Cloud\Vision\V1\WebDetection\WebPage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPagesWithMatchingImages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebPage::class); - $this->pages_with_matching_images = $arr; - - return $this; - } - - /** - * The visually similar image results. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVisuallySimilarImages() - { - return $this->visually_similar_images; - } - - /** - * The visually similar image results. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - * @param array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVisuallySimilarImages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); - $this->visually_similar_images = $arr; - - return $this; - } - - /** - * The service's best guess as to the topic of the request image. - * Inferred from similar images on the open web. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBestGuessLabels() - { - return $this->best_guess_labels; - } - - /** - * The service's best guess as to the topic of the request image. - * Inferred from similar images on the open web. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - * @param array<\Google\Cloud\Vision\V1\WebDetection\WebLabel>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBestGuessLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebLabel::class); - $this->best_guess_labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebEntity.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebEntity.php deleted file mode 100644 index 7ed5190c9507..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebEntity.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.vision.v1.WebDetection.WebEntity - */ -class WebEntity extends \Google\Protobuf\Internal\Message -{ - /** - * Opaque entity ID. - * - * Generated from protobuf field string entity_id = 1; - */ - protected $entity_id = ''; - /** - * Overall relevancy score for the entity. - * Not normalized and not comparable across different image queries. - * - * Generated from protobuf field float score = 2; - */ - protected $score = 0.0; - /** - * Canonical description of the entity, in English. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $entity_id - * Opaque entity ID. - * @type float $score - * Overall relevancy score for the entity. - * Not normalized and not comparable across different image queries. - * @type string $description - * Canonical description of the entity, in English. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\WebDetection::initOnce(); - parent::__construct($data); - } - - /** - * Opaque entity ID. - * - * Generated from protobuf field string entity_id = 1; - * @return string - */ - public function getEntityId() - { - return $this->entity_id; - } - - /** - * Opaque entity ID. - * - * Generated from protobuf field string entity_id = 1; - * @param string $var - * @return $this - */ - public function setEntityId($var) - { - GPBUtil::checkString($var, True); - $this->entity_id = $var; - - return $this; - } - - /** - * Overall relevancy score for the entity. - * Not normalized and not comparable across different image queries. - * - * Generated from protobuf field float score = 2; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * Overall relevancy score for the entity. - * Not normalized and not comparable across different image queries. - * - * Generated from protobuf field float score = 2; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - - /** - * Canonical description of the entity, in English. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Canonical description of the entity, in English. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WebEntity::class, \Google\Cloud\Vision\V1\WebDetection_WebEntity::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebImage.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebImage.php deleted file mode 100644 index 0a74c6f6392c..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebImage.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.vision.v1.WebDetection.WebImage - */ -class WebImage extends \Google\Protobuf\Internal\Message -{ - /** - * The result image URL. - * - * Generated from protobuf field string url = 1; - */ - protected $url = ''; - /** - * (Deprecated) Overall relevancy score for the image. - * - * Generated from protobuf field float score = 2; - */ - protected $score = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $url - * The result image URL. - * @type float $score - * (Deprecated) Overall relevancy score for the image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\WebDetection::initOnce(); - parent::__construct($data); - } - - /** - * The result image URL. - * - * Generated from protobuf field string url = 1; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * The result image URL. - * - * Generated from protobuf field string url = 1; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - - /** - * (Deprecated) Overall relevancy score for the image. - * - * Generated from protobuf field float score = 2; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * (Deprecated) Overall relevancy score for the image. - * - * Generated from protobuf field float score = 2; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WebImage::class, \Google\Cloud\Vision\V1\WebDetection_WebImage::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebLabel.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebLabel.php deleted file mode 100644 index 455b38bf8f91..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebLabel.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.vision.v1.WebDetection.WebLabel - */ -class WebLabel extends \Google\Protobuf\Internal\Message -{ - /** - * Label for extra metadata. - * - * Generated from protobuf field string label = 1; - */ - protected $label = ''; - /** - * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". - * For more information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 2; - */ - protected $language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $label - * Label for extra metadata. - * @type string $language_code - * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". - * For more information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\WebDetection::initOnce(); - parent::__construct($data); - } - - /** - * Label for extra metadata. - * - * Generated from protobuf field string label = 1; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * Label for extra metadata. - * - * Generated from protobuf field string label = 1; - * @param string $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkString($var, True); - $this->label = $var; - - return $this; - } - - /** - * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". - * For more information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". - * For more information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 2; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WebLabel::class, \Google\Cloud\Vision\V1\WebDetection_WebLabel::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebPage.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebPage.php deleted file mode 100644 index a7ebc3422453..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebPage.php +++ /dev/null @@ -1,222 +0,0 @@ -google.cloud.vision.v1.WebDetection.WebPage - */ -class WebPage extends \Google\Protobuf\Internal\Message -{ - /** - * The result web page URL. - * - * Generated from protobuf field string url = 1; - */ - protected $url = ''; - /** - * (Deprecated) Overall relevancy score for the web page. - * - * Generated from protobuf field float score = 2; - */ - protected $score = 0.0; - /** - * Title for the web page, may contain HTML markups. - * - * Generated from protobuf field string page_title = 3; - */ - protected $page_title = ''; - /** - * Fully matching images on the page. - * Can include resized copies of the query image. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - private $full_matching_images; - /** - * Partial matching images on the page. - * Those images are similar enough to share some key-point features. For - * example an original image will likely have partial matching for its - * crops. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - private $partial_matching_images; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $url - * The result web page URL. - * @type float $score - * (Deprecated) Overall relevancy score for the web page. - * @type string $page_title - * Title for the web page, may contain HTML markups. - * @type array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $full_matching_images - * Fully matching images on the page. - * Can include resized copies of the query image. - * @type array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $partial_matching_images - * Partial matching images on the page. - * Those images are similar enough to share some key-point features. For - * example an original image will likely have partial matching for its - * crops. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\WebDetection::initOnce(); - parent::__construct($data); - } - - /** - * The result web page URL. - * - * Generated from protobuf field string url = 1; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * The result web page URL. - * - * Generated from protobuf field string url = 1; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - - /** - * (Deprecated) Overall relevancy score for the web page. - * - * Generated from protobuf field float score = 2; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * (Deprecated) Overall relevancy score for the web page. - * - * Generated from protobuf field float score = 2; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - - /** - * Title for the web page, may contain HTML markups. - * - * Generated from protobuf field string page_title = 3; - * @return string - */ - public function getPageTitle() - { - return $this->page_title; - } - - /** - * Title for the web page, may contain HTML markups. - * - * Generated from protobuf field string page_title = 3; - * @param string $var - * @return $this - */ - public function setPageTitle($var) - { - GPBUtil::checkString($var, True); - $this->page_title = $var; - - return $this; - } - - /** - * Fully matching images on the page. - * Can include resized copies of the query image. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFullMatchingImages() - { - return $this->full_matching_images; - } - - /** - * Fully matching images on the page. - * Can include resized copies of the query image. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - * @param array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFullMatchingImages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); - $this->full_matching_images = $arr; - - return $this; - } - - /** - * Partial matching images on the page. - * Those images are similar enough to share some key-point features. For - * example an original image will likely have partial matching for its - * crops. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPartialMatchingImages() - { - return $this->partial_matching_images; - } - - /** - * Partial matching images on the page. - * Those images are similar enough to share some key-point features. For - * example an original image will likely have partial matching for its - * crops. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - * @param array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPartialMatchingImages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); - $this->partial_matching_images = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WebPage::class, \Google\Cloud\Vision\V1\WebDetection_WebPage::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetectionParams.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetectionParams.php deleted file mode 100644 index 586162fd8928..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetectionParams.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.vision.v1.WebDetectionParams - */ -class WebDetectionParams extends \Google\Protobuf\Internal\Message -{ - /** - * Whether to include results derived from the geo information in the image. - * - * Generated from protobuf field bool include_geo_results = 2; - */ - protected $include_geo_results = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $include_geo_results - * Whether to include results derived from the geo information in the image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Whether to include results derived from the geo information in the image. - * - * Generated from protobuf field bool include_geo_results = 2; - * @return bool - */ - public function getIncludeGeoResults() - { - return $this->include_geo_results; - } - - /** - * Whether to include results derived from the geo information in the image. - * - * Generated from protobuf field bool include_geo_results = 2; - * @param bool $var - * @return $this - */ - public function setIncludeGeoResults($var) - { - GPBUtil::checkBool($var); - $this->include_geo_results = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Word.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Word.php deleted file mode 100644 index e753e3772569..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Word.php +++ /dev/null @@ -1,249 +0,0 @@ -google.cloud.vision.v1.Word - */ -class Word extends \Google\Protobuf\Internal\Message -{ - /** - * Additional information detected for the word. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - protected $property = null; - /** - * The bounding box for the word. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - protected $bounding_box = null; - /** - * List of symbols in the word. - * The order of the symbols follows the natural reading order. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - private $symbols; - /** - * Confidence of the OCR results for the word. Range [0, 1]. - * - * Generated from protobuf field float confidence = 4; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $property - * Additional information detected for the word. - * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_box - * The bounding box for the word. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * @type array<\Google\Cloud\Vision\V1\Symbol>|\Google\Protobuf\Internal\RepeatedField $symbols - * List of symbols in the word. - * The order of the symbols follows the natural reading order. - * @type float $confidence - * Confidence of the OCR results for the word. Range [0, 1]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); - parent::__construct($data); - } - - /** - * Additional information detected for the word. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return \Google\Cloud\Vision\V1\TextAnnotation\TextProperty|null - */ - public function getProperty() - { - return $this->property; - } - - public function hasProperty() - { - return isset($this->property); - } - - public function clearProperty() - { - unset($this->property); - } - - /** - * Additional information detected for the word. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @param \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $var - * @return $this - */ - public function setProperty($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\TextProperty::class); - $this->property = $var; - - return $this; - } - - /** - * The bounding box for the word. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return \Google\Cloud\Vision\V1\BoundingPoly|null - */ - public function getBoundingBox() - { - return $this->bounding_box; - } - - public function hasBoundingBox() - { - return isset($this->bounding_box); - } - - public function clearBoundingBox() - { - unset($this->bounding_box); - } - - /** - * The bounding box for the word. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @param \Google\Cloud\Vision\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingBox($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->bounding_box = $var; - - return $this; - } - - /** - * List of symbols in the word. - * The order of the symbols follows the natural reading order. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Symbol symbols = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSymbols() - { - return $this->symbols; - } - - /** - * List of symbols in the word. - * The order of the symbols follows the natural reading order. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Symbol symbols = 3; - * @param array<\Google\Cloud\Vision\V1\Symbol>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSymbols($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Symbol::class); - $this->symbols = $arr; - - return $this; - } - - /** - * Confidence of the OCR results for the word. Range [0, 1]. - * - * Generated from protobuf field float confidence = 4; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Confidence of the OCR results for the word. Range [0, 1]. - * - * Generated from protobuf field float confidence = 4; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_files.php b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_files.php deleted file mode 100644 index 081ca3b1a85b..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_files.php +++ /dev/null @@ -1,74 +0,0 @@ -asyncBatchAnnotateFiles($requests); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AsyncBatchAnnotateFilesResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_images.php b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_images.php deleted file mode 100644 index 377f30c09d05..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_images.php +++ /dev/null @@ -1,79 +0,0 @@ -asyncBatchAnnotateImages($requests, $outputConfig); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AsyncBatchAnnotateImagesResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateImages_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_files.php b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_files.php deleted file mode 100644 index 9d87ae097455..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_files.php +++ /dev/null @@ -1,63 +0,0 @@ -batchAnnotateFiles($requests); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vision_v1_generated_ImageAnnotator_BatchAnnotateFiles_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_images.php b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_images.php deleted file mode 100644 index 6731ba9d6c66..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_images.php +++ /dev/null @@ -1,57 +0,0 @@ -batchAnnotateImages($requests); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vision_v1_generated_ImageAnnotator_BatchAnnotateImages_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/add_product_to_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/add_product_to_product_set.php deleted file mode 100644 index fb4b0504cea6..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/add_product_to_product_set.php +++ /dev/null @@ -1,80 +0,0 @@ -addProductToProductSet($formattedName, $formattedProduct); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ProductSearchClient::productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $formattedProduct = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - - add_product_to_product_set_sample($formattedName, $formattedProduct); -} -// [END vision_v1_generated_ProductSearch_AddProductToProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product.php deleted file mode 100644 index 97ff3f2028f7..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product.php +++ /dev/null @@ -1,79 +0,0 @@ -createProduct($formattedParent, $product); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); - - create_product_sample($formattedParent); -} -// [END vision_v1_generated_ProductSearch_CreateProduct_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product_set.php deleted file mode 100644 index 633e41e3610d..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product_set.php +++ /dev/null @@ -1,76 +0,0 @@ -createProductSet($formattedParent, $productSet); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); - - create_product_set_sample($formattedParent); -} -// [END vision_v1_generated_ProductSearch_CreateProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_reference_image.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_reference_image.php deleted file mode 100644 index e17703ebad54..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_reference_image.php +++ /dev/null @@ -1,95 +0,0 @@ -setUri($referenceImageUri); - - // Call the API and handle any network failures. - try { - /** @var ReferenceImage $response */ - $response = $productSearchClient->createReferenceImage($formattedParent, $referenceImage); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $referenceImageUri = '[URI]'; - - create_reference_image_sample($formattedParent, $referenceImageUri); -} -// [END vision_v1_generated_ProductSearch_CreateReferenceImage_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product.php deleted file mode 100644 index 05ddeb9e065f..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product.php +++ /dev/null @@ -1,71 +0,0 @@ -deleteProduct($formattedName); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - - delete_product_sample($formattedName); -} -// [END vision_v1_generated_ProductSearch_DeleteProduct_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product_set.php deleted file mode 100644 index d4cb125c0850..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product_set.php +++ /dev/null @@ -1,70 +0,0 @@ -deleteProductSet($formattedName); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ProductSearchClient::productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - - delete_product_set_sample($formattedName); -} -// [END vision_v1_generated_ProductSearch_DeleteProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_reference_image.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_reference_image.php deleted file mode 100644 index a5a5ae5bf852..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_reference_image.php +++ /dev/null @@ -1,78 +0,0 @@ -deleteReferenceImage($formattedName); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ProductSearchClient::referenceImageName( - '[PROJECT]', - '[LOCATION]', - '[PRODUCT]', - '[REFERENCE_IMAGE]' - ); - - delete_reference_image_sample($formattedName); -} -// [END vision_v1_generated_ProductSearch_DeleteReferenceImage_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product.php deleted file mode 100644 index 9deedec661d3..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product.php +++ /dev/null @@ -1,73 +0,0 @@ -getProduct($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - - get_product_sample($formattedName); -} -// [END vision_v1_generated_ProductSearch_GetProduct_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product_set.php deleted file mode 100644 index c006d001ffb7..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product_set.php +++ /dev/null @@ -1,73 +0,0 @@ -getProductSet($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ProductSearchClient::productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - - get_product_set_sample($formattedName); -} -// [END vision_v1_generated_ProductSearch_GetProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_reference_image.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_reference_image.php deleted file mode 100644 index 925d70e882f0..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_reference_image.php +++ /dev/null @@ -1,78 +0,0 @@ -getReferenceImage($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ProductSearchClient::referenceImageName( - '[PROJECT]', - '[LOCATION]', - '[PRODUCT]', - '[REFERENCE_IMAGE]' - ); - - get_reference_image_sample($formattedName); -} -// [END vision_v1_generated_ProductSearch_GetReferenceImage_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/import_product_sets.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/import_product_sets.php deleted file mode 100644 index f99a4a0c533b..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/import_product_sets.php +++ /dev/null @@ -1,94 +0,0 @@ -importProductSets($formattedParent, $inputConfig); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ImportProductSetsResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); - - import_product_sets_sample($formattedParent); -} -// [END vision_v1_generated_ProductSearch_ImportProductSets_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_product_sets.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_product_sets.php deleted file mode 100644 index 02281b647f31..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_product_sets.php +++ /dev/null @@ -1,78 +0,0 @@ -listProductSets($formattedParent); - - /** @var ProductSet $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); - - list_product_sets_sample($formattedParent); -} -// [END vision_v1_generated_ProductSearch_ListProductSets_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products.php deleted file mode 100644 index 21701335c941..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products.php +++ /dev/null @@ -1,78 +0,0 @@ -listProducts($formattedParent); - - /** @var Product $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); - - list_products_sample($formattedParent); -} -// [END vision_v1_generated_ProductSearch_ListProducts_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products_in_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products_in_product_set.php deleted file mode 100644 index e420a719929d..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products_in_product_set.php +++ /dev/null @@ -1,80 +0,0 @@ -listProductsInProductSet($formattedName); - - /** @var Product $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ProductSearchClient::productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - - list_products_in_product_set_sample($formattedName); -} -// [END vision_v1_generated_ProductSearch_ListProductsInProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_reference_images.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_reference_images.php deleted file mode 100644 index d954b90a9681..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_reference_images.php +++ /dev/null @@ -1,80 +0,0 @@ -listReferenceImages($formattedParent); - - /** @var ReferenceImage $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - - list_reference_images_sample($formattedParent); -} -// [END vision_v1_generated_ProductSearch_ListReferenceImages_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/purge_products.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/purge_products.php deleted file mode 100644 index e2333ea4171f..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/purge_products.php +++ /dev/null @@ -1,100 +0,0 @@ -purgeProducts($formattedParent); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); - - purge_products_sample($formattedParent); -} -// [END vision_v1_generated_ProductSearch_PurgeProducts_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/remove_product_from_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/remove_product_from_product_set.php deleted file mode 100644 index b4da45abe3a0..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/remove_product_from_product_set.php +++ /dev/null @@ -1,75 +0,0 @@ -removeProductFromProductSet($formattedName, $formattedProduct); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ProductSearchClient::productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $formattedProduct = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - - remove_product_from_product_set_sample($formattedName, $formattedProduct); -} -// [END vision_v1_generated_ProductSearch_RemoveProductFromProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product.php deleted file mode 100644 index 9a3b9810fabd..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product.php +++ /dev/null @@ -1,70 +0,0 @@ -updateProduct($product); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vision_v1_generated_ProductSearch_UpdateProduct_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product_set.php deleted file mode 100644 index 67a0759ff741..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product_set.php +++ /dev/null @@ -1,63 +0,0 @@ -updateProductSet($productSet); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vision_v1_generated_ProductSearch_UpdateProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/src/V1/Gapic/ImageAnnotatorGapicClient.php b/owl-bot-staging/Vision/V1/src/V1/Gapic/ImageAnnotatorGapicClient.php deleted file mode 100644 index 1b7942ecbf43..000000000000 --- a/owl-bot-staging/Vision/V1/src/V1/Gapic/ImageAnnotatorGapicClient.php +++ /dev/null @@ -1,614 +0,0 @@ -asyncBatchAnnotateFiles($requests); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $imageAnnotatorClient->asyncBatchAnnotateFiles($requests); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $imageAnnotatorClient->resumeOperation($operationName, 'asyncBatchAnnotateFiles'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $imageAnnotatorClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - */ -class ImageAnnotatorGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.vision.v1.ImageAnnotator'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'vision.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-vision', - ]; - - private static $productSetNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/image_annotator_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/image_annotator_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/image_annotator_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/image_annotator_rest_client_config.php', - ], - ], - ]; - } - - private static function getProductSetNameTemplate() - { - if (self::$productSetNameTemplate == null) { - self::$productSetNameTemplate = new PathTemplate('projects/{project}/locations/{location}/productSets/{product_set}'); - } - - return self::$productSetNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'productSet' => self::getProductSetNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a product_set - * resource. - * - * @param string $project - * @param string $location - * @param string $productSet - * - * @return string The formatted product_set resource. - */ - public static function productSetName($project, $location, $productSet) - { - return self::getProductSetNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'product_set' => $productSet, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - productSet: projects/{project}/locations/{location}/productSets/{product_set} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'vision.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Run asynchronous image detection and annotation for a list of generic - * files, such as PDF files, which may contain multiple pages and multiple - * images per page. Progress and results can be retrieved through the - * `google.longrunning.Operations` interface. - * `Operation.metadata` contains `OperationMetadata` (metadata). - * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). - * - * Sample code: - * ``` - * $imageAnnotatorClient = new ImageAnnotatorClient(); - * try { - * $requests = []; - * $operationResponse = $imageAnnotatorClient->asyncBatchAnnotateFiles($requests); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $imageAnnotatorClient->asyncBatchAnnotateFiles($requests); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $imageAnnotatorClient->resumeOperation($operationName, 'asyncBatchAnnotateFiles'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $imageAnnotatorClient->close(); - * } - * ``` - * - * @param AsyncAnnotateFileRequest[] $requests Required. Individual async file annotation requests for this batch. - * @param array $optionalArgs { - * Optional. - * - * @type string $parent - * Optional. Target project and location to make a call. - * - * Format: `projects/{project-id}/locations/{location-id}`. - * - * If no parent is specified, a region will be chosen automatically. - * - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * - * Example: `projects/project-A/locations/eu`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function asyncBatchAnnotateFiles($requests, array $optionalArgs = []) - { - $request = new AsyncBatchAnnotateFilesRequest(); - $requestParamHeaders = []; - $request->setRequests($requests); - if (isset($optionalArgs['parent'])) { - $request->setParent($optionalArgs['parent']); - $requestParamHeaders['parent'] = $optionalArgs['parent']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('AsyncBatchAnnotateFiles', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Run asynchronous image detection and annotation for a list of images. - * - * Progress and results can be retrieved through the - * `google.longrunning.Operations` interface. - * `Operation.metadata` contains `OperationMetadata` (metadata). - * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). - * - * This service will write image annotation outputs to json files in customer - * GCS bucket, each json file containing BatchAnnotateImagesResponse proto. - * - * Sample code: - * ``` - * $imageAnnotatorClient = new ImageAnnotatorClient(); - * try { - * $requests = []; - * $outputConfig = new OutputConfig(); - * $operationResponse = $imageAnnotatorClient->asyncBatchAnnotateImages($requests, $outputConfig); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $imageAnnotatorClient->asyncBatchAnnotateImages($requests, $outputConfig); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $imageAnnotatorClient->resumeOperation($operationName, 'asyncBatchAnnotateImages'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $imageAnnotatorClient->close(); - * } - * ``` - * - * @param AnnotateImageRequest[] $requests Required. Individual image annotation requests for this batch. - * @param OutputConfig $outputConfig Required. The desired output location and metadata (e.g. format). - * @param array $optionalArgs { - * Optional. - * - * @type string $parent - * Optional. Target project and location to make a call. - * - * Format: `projects/{project-id}/locations/{location-id}`. - * - * If no parent is specified, a region will be chosen automatically. - * - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * - * Example: `projects/project-A/locations/eu`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function asyncBatchAnnotateImages($requests, $outputConfig, array $optionalArgs = []) - { - $request = new AsyncBatchAnnotateImagesRequest(); - $requestParamHeaders = []; - $request->setRequests($requests); - $request->setOutputConfig($outputConfig); - if (isset($optionalArgs['parent'])) { - $request->setParent($optionalArgs['parent']); - $requestParamHeaders['parent'] = $optionalArgs['parent']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('AsyncBatchAnnotateImages', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Service that performs image detection and annotation for a batch of files. - * Now only "application/pdf", "image/tiff" and "image/gif" are supported. - * - * This service will extract at most 5 (customers can specify which 5 in - * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each - * file provided and perform detection and annotation for each image - * extracted. - * - * Sample code: - * ``` - * $imageAnnotatorClient = new ImageAnnotatorClient(); - * try { - * $requests = []; - * $response = $imageAnnotatorClient->batchAnnotateFiles($requests); - * } finally { - * $imageAnnotatorClient->close(); - * } - * ``` - * - * @param AnnotateFileRequest[] $requests Required. The list of file annotation requests. Right now we support only one - * AnnotateFileRequest in BatchAnnotateFilesRequest. - * @param array $optionalArgs { - * Optional. - * - * @type string $parent - * Optional. Target project and location to make a call. - * - * Format: `projects/{project-id}/locations/{location-id}`. - * - * If no parent is specified, a region will be chosen automatically. - * - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * - * Example: `projects/project-A/locations/eu`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Vision\V1\BatchAnnotateFilesResponse - * - * @throws ApiException if the remote call fails - */ - public function batchAnnotateFiles($requests, array $optionalArgs = []) - { - $request = new BatchAnnotateFilesRequest(); - $requestParamHeaders = []; - $request->setRequests($requests); - if (isset($optionalArgs['parent'])) { - $request->setParent($optionalArgs['parent']); - $requestParamHeaders['parent'] = $optionalArgs['parent']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('BatchAnnotateFiles', BatchAnnotateFilesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Run image detection and annotation for a batch of images. - * - * Sample code: - * ``` - * $imageAnnotatorClient = new ImageAnnotatorClient(); - * try { - * $requests = []; - * $response = $imageAnnotatorClient->batchAnnotateImages($requests); - * } finally { - * $imageAnnotatorClient->close(); - * } - * ``` - * - * @param AnnotateImageRequest[] $requests Required. Individual image annotation requests for this batch. - * @param array $optionalArgs { - * Optional. - * - * @type string $parent - * Optional. Target project and location to make a call. - * - * Format: `projects/{project-id}/locations/{location-id}`. - * - * If no parent is specified, a region will be chosen automatically. - * - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * - * Example: `projects/project-A/locations/eu`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Vision\V1\BatchAnnotateImagesResponse - * - * @throws ApiException if the remote call fails - */ - public function batchAnnotateImages($requests, array $optionalArgs = []) - { - $request = new BatchAnnotateImagesRequest(); - $requestParamHeaders = []; - $request->setRequests($requests); - if (isset($optionalArgs['parent'])) { - $request->setParent($optionalArgs['parent']); - $requestParamHeaders['parent'] = $optionalArgs['parent']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('BatchAnnotateImages', BatchAnnotateImagesResponse::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Vision/V1/src/V1/Gapic/ProductSearchGapicClient.php b/owl-bot-staging/Vision/V1/src/V1/Gapic/ProductSearchGapicClient.php deleted file mode 100644 index 6135ce2cbb53..000000000000 --- a/owl-bot-staging/Vision/V1/src/V1/Gapic/ProductSearchGapicClient.php +++ /dev/null @@ -1,1590 +0,0 @@ -productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - * $formattedProduct = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - * $productSearchClient->addProductToProductSet($formattedName, $formattedProduct); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - */ -class ProductSearchGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.vision.v1.ProductSearch'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'vision.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-vision', - ]; - - private static $locationNameTemplate; - - private static $productNameTemplate; - - private static $productSetNameTemplate; - - private static $referenceImageNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/product_search_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/product_search_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/product_search_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/product_search_rest_client_config.php', - ], - ], - ]; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getProductNameTemplate() - { - if (self::$productNameTemplate == null) { - self::$productNameTemplate = new PathTemplate('projects/{project}/locations/{location}/products/{product}'); - } - - return self::$productNameTemplate; - } - - private static function getProductSetNameTemplate() - { - if (self::$productSetNameTemplate == null) { - self::$productSetNameTemplate = new PathTemplate('projects/{project}/locations/{location}/productSets/{product_set}'); - } - - return self::$productSetNameTemplate; - } - - private static function getReferenceImageNameTemplate() - { - if (self::$referenceImageNameTemplate == null) { - self::$referenceImageNameTemplate = new PathTemplate('projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}'); - } - - return self::$referenceImageNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'location' => self::getLocationNameTemplate(), - 'product' => self::getProductNameTemplate(), - 'productSet' => self::getProductSetNameTemplate(), - 'referenceImage' => self::getReferenceImageNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a product - * resource. - * - * @param string $project - * @param string $location - * @param string $product - * - * @return string The formatted product resource. - */ - public static function productName($project, $location, $product) - { - return self::getProductNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'product' => $product, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a product_set - * resource. - * - * @param string $project - * @param string $location - * @param string $productSet - * - * @return string The formatted product_set resource. - */ - public static function productSetName($project, $location, $productSet) - { - return self::getProductSetNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'product_set' => $productSet, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * reference_image resource. - * - * @param string $project - * @param string $location - * @param string $product - * @param string $referenceImage - * - * @return string The formatted reference_image resource. - */ - public static function referenceImageName($project, $location, $product, $referenceImage) - { - return self::getReferenceImageNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'product' => $product, - 'reference_image' => $referenceImage, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - location: projects/{project}/locations/{location} - * - product: projects/{project}/locations/{location}/products/{product} - * - productSet: projects/{project}/locations/{location}/productSets/{product_set} - * - referenceImage: projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'vision.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Adds a Product to the specified ProductSet. If the Product is already - * present, no change is made. - * - * One Product can be added to at most 100 ProductSets. - * - * Possible errors: - * - * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedName = $productSearchClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - * $formattedProduct = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - * $productSearchClient->addProductToProductSet($formattedName, $formattedProduct); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name for the ProductSet to modify. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param string $product Required. The resource name for the Product to be added to this ProductSet. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function addProductToProductSet($name, $product, array $optionalArgs = []) - { - $request = new AddProductToProductSetRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setProduct($product); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('AddProductToProductSet', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates and returns a new product resource. - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 - * characters. - * * Returns INVALID_ARGUMENT if description is longer than 4096 characters. - * * Returns INVALID_ARGUMENT if product_category is missing or invalid. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); - * $product = new Product(); - * $response = $productSearchClient->createProduct($formattedParent, $product); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $parent Required. The project in which the Product should be created. - * - * Format is - * `projects/PROJECT_ID/locations/LOC_ID`. - * @param Product $product Required. The product to create. - * @param array $optionalArgs { - * Optional. - * - * @type string $productId - * A user-supplied resource id for this Product. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Vision\V1\Product - * - * @throws ApiException if the remote call fails - */ - public function createProduct($parent, $product, array $optionalArgs = []) - { - $request = new CreateProductRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setProduct($product); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['productId'])) { - $request->setProductId($optionalArgs['productId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateProduct', Product::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates and returns a new ProductSet resource. - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than - * 4096 characters. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); - * $productSet = new ProductSet(); - * $response = $productSearchClient->createProductSet($formattedParent, $productSet); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $parent Required. The project in which the ProductSet should be created. - * - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param ProductSet $productSet Required. The ProductSet to create. - * @param array $optionalArgs { - * Optional. - * - * @type string $productSetId - * A user-supplied resource id for this ProductSet. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Vision\V1\ProductSet - * - * @throws ApiException if the remote call fails - */ - public function createProductSet($parent, $productSet, array $optionalArgs = []) - { - $request = new CreateProductSetRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setProductSet($productSet); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['productSetId'])) { - $request->setProductSetId($optionalArgs['productSetId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateProductSet', ProductSet::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates and returns a new ReferenceImage resource. - * - * The `bounding_poly` field is optional. If `bounding_poly` is not specified, - * the system will try to detect regions of interest in the image that are - * compatible with the product_category on the parent product. If it is - * specified, detection is ALWAYS skipped. The system converts polygons into - * non-rotated rectangles. - * - * Note that the pipeline will resize the image if the image resolution is too - * large to process (above 50MP). - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 - * characters. - * * Returns INVALID_ARGUMENT if the product does not exist. - * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing - * compatible with the parent product's product_category is detected. - * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedParent = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - * $referenceImage = new ReferenceImage(); - * $response = $productSearchClient->createReferenceImage($formattedParent, $referenceImage); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the product in which to create the reference image. - * - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * @param ReferenceImage $referenceImage Required. The reference image to create. - * If an image ID is specified, it is ignored. - * @param array $optionalArgs { - * Optional. - * - * @type string $referenceImageId - * A user-supplied resource id for the ReferenceImage to be added. If set, - * the server will attempt to use this value as the resource id. If it is - * already in use, an error is returned with code ALREADY_EXISTS. Must be at - * most 128 characters long. It cannot contain the character `/`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Vision\V1\ReferenceImage - * - * @throws ApiException if the remote call fails - */ - public function createReferenceImage($parent, $referenceImage, array $optionalArgs = []) - { - $request = new CreateReferenceImageRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setReferenceImage($referenceImage); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['referenceImageId'])) { - $request->setReferenceImageId($optionalArgs['referenceImageId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateReferenceImage', ReferenceImage::class, $optionalArgs, $request)->wait(); - } - - /** - * Permanently deletes a product and its reference images. - * - * Metadata of the product and all its images will be deleted right away, but - * search queries against ProductSets containing the product may still work - * until all related caches are refreshed. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedName = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - * $productSearchClient->deleteProduct($formattedName); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $name Required. Resource name of product to delete. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteProduct($name, array $optionalArgs = []) - { - $request = new DeleteProductRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteProduct', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Permanently deletes a ProductSet. Products and ReferenceImages in the - * ProductSet are not deleted. - * - * The actual image files are not deleted from Google Cloud Storage. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedName = $productSearchClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - * $productSearchClient->deleteProductSet($formattedName); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $name Required. Resource name of the ProductSet to delete. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteProductSet($name, array $optionalArgs = []) - { - $request = new DeleteProductSetRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteProductSet', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Permanently deletes a reference image. - * - * The image metadata will be deleted right away, but search queries - * against ProductSets containing the image may still work until all related - * caches are refreshed. - * - * The actual image files are not deleted from Google Cloud Storage. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedName = $productSearchClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); - * $productSearchClient->deleteReferenceImage($formattedName); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the reference image to delete. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteReferenceImage($name, array $optionalArgs = []) - { - $request = new DeleteReferenceImageRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteReferenceImage', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information associated with a Product. - * - * Possible errors: - * - * * Returns NOT_FOUND if the Product does not exist. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedName = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - * $response = $productSearchClient->getProduct($formattedName); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $name Required. Resource name of the Product to get. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Vision\V1\Product - * - * @throws ApiException if the remote call fails - */ - public function getProduct($name, array $optionalArgs = []) - { - $request = new GetProductRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetProduct', Product::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information associated with a ProductSet. - * - * Possible errors: - * - * * Returns NOT_FOUND if the ProductSet does not exist. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedName = $productSearchClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - * $response = $productSearchClient->getProductSet($formattedName); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $name Required. Resource name of the ProductSet to get. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Vision\V1\ProductSet - * - * @throws ApiException if the remote call fails - */ - public function getProductSet($name, array $optionalArgs = []) - { - $request = new GetProductSetRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetProductSet', ProductSet::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information associated with a ReferenceImage. - * - * Possible errors: - * - * * Returns NOT_FOUND if the specified image does not exist. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedName = $productSearchClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); - * $response = $productSearchClient->getReferenceImage($formattedName); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the ReferenceImage to get. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Vision\V1\ReferenceImage - * - * @throws ApiException if the remote call fails - */ - public function getReferenceImage($name, array $optionalArgs = []) - { - $request = new GetReferenceImageRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetReferenceImage', ReferenceImage::class, $optionalArgs, $request)->wait(); - } - - /** - * Asynchronous API that imports a list of reference images to specified - * product sets based on a list of image information. - * - * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the - * progress and results of the request. - * `Operation.metadata` contains `BatchOperationMetadata`. (progress) - * `Operation.response` contains `ImportProductSetsResponse`. (results) - * - * The input source of this method is a csv file on Google Cloud Storage. - * For the format of the csv file please see - * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); - * $inputConfig = new ImportProductSetsInputConfig(); - * $operationResponse = $productSearchClient->importProductSets($formattedParent, $inputConfig); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $productSearchClient->importProductSets($formattedParent, $inputConfig); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $productSearchClient->resumeOperation($operationName, 'importProductSets'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $parent Required. The project in which the ProductSets should be imported. - * - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param ImportProductSetsInputConfig $inputConfig Required. The input content for the list of requests. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function importProductSets($parent, $inputConfig, array $optionalArgs = []) - { - $request = new ImportProductSetsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setInputConfig($inputConfig); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ImportProductSets', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Lists ProductSets in an unspecified order. - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less - * than 1. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $productSearchClient->listProductSets($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $productSearchClient->listProductSets($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $parent Required. The project from which ProductSets should be listed. - * - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listProductSets($parent, array $optionalArgs = []) - { - $request = new ListProductSetsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListProductSets', $optionalArgs, ListProductSetsResponse::class, $request); - } - - /** - * Lists products in an unspecified order. - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $productSearchClient->listProducts($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $productSearchClient->listProducts($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $parent Required. The project OR ProductSet from which Products should be listed. - * - * Format: - * `projects/PROJECT_ID/locations/LOC_ID` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listProducts($parent, array $optionalArgs = []) - { - $request = new ListProductsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListProducts', $optionalArgs, ListProductsResponse::class, $request); - } - - /** - * Lists the Products in a ProductSet, in an unspecified order. If the - * ProductSet does not exist, the products field of the response will be - * empty. - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedName = $productSearchClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - * // Iterate over pages of elements - * $pagedResponse = $productSearchClient->listProductsInProductSet($formattedName); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $productSearchClient->listProductsInProductSet($formattedName); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $name Required. The ProductSet resource for which to retrieve Products. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listProductsInProductSet($name, array $optionalArgs = []) - { - $request = new ListProductsInProductSetRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListProductsInProductSet', $optionalArgs, ListProductsInProductSetResponse::class, $request); - } - - /** - * Lists reference images. - * - * Possible errors: - * - * * Returns NOT_FOUND if the parent product does not exist. - * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less - * than 1. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedParent = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - * // Iterate over pages of elements - * $pagedResponse = $productSearchClient->listReferenceImages($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $productSearchClient->listReferenceImages($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the product containing the reference images. - * - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listReferenceImages($parent, array $optionalArgs = []) - { - $request = new ListReferenceImagesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListReferenceImages', $optionalArgs, ListReferenceImagesResponse::class, $request); - } - - /** - * Asynchronous API to delete all Products in a ProductSet or all Products - * that are in no ProductSet. - * - * If a Product is a member of the specified ProductSet in addition to other - * ProductSets, the Product will still be deleted. - * - * It is recommended to not delete the specified ProductSet until after this - * operation has completed. It is also recommended to not add any of the - * Products involved in the batch delete to a new ProductSet while this - * operation is running because those Products may still end up deleted. - * - * It's not possible to undo the PurgeProducts operation. Therefore, it is - * recommended to keep the csv files used in ImportProductSets (if that was - * how you originally built the Product Set) before starting PurgeProducts, in - * case you need to re-import the data after deletion. - * - * If the plan is to purge all of the Products from a ProductSet and then - * re-use the empty ProductSet to re-import new Products into the empty - * ProductSet, you must wait until the PurgeProducts operation has finished - * for that ProductSet. - * - * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the - * progress and results of the request. - * `Operation.metadata` contains `BatchOperationMetadata`. (progress) - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); - * $operationResponse = $productSearchClient->purgeProducts($formattedParent); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $productSearchClient->purgeProducts($formattedParent); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $productSearchClient->resumeOperation($operationName, 'purgeProducts'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $parent Required. The project and location in which the Products should be deleted. - * - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param array $optionalArgs { - * Optional. - * - * @type ProductSetPurgeConfig $productSetPurgeConfig - * Specify which ProductSet contains the Products to be deleted. - * @type bool $deleteOrphanProducts - * If delete_orphan_products is true, all Products that are not in any - * ProductSet will be deleted. - * @type bool $force - * The default value is false. Override this value to true to actually perform - * the purge. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function purgeProducts($parent, array $optionalArgs = []) - { - $request = new PurgeProductsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['productSetPurgeConfig'])) { - $request->setProductSetPurgeConfig($optionalArgs['productSetPurgeConfig']); - } - - if (isset($optionalArgs['deleteOrphanProducts'])) { - $request->setDeleteOrphanProducts($optionalArgs['deleteOrphanProducts']); - } - - if (isset($optionalArgs['force'])) { - $request->setForce($optionalArgs['force']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('PurgeProducts', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Removes a Product from the specified ProductSet. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedName = $productSearchClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - * $formattedProduct = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - * $productSearchClient->removeProductFromProductSet($formattedName, $formattedProduct); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name for the ProductSet to modify. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param string $product Required. The resource name for the Product to be removed from this ProductSet. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function removeProductFromProductSet($name, $product, array $optionalArgs = []) - { - $request = new RemoveProductFromProductSetRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setProduct($product); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RemoveProductFromProductSet', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Makes changes to a Product resource. - * Only the `display_name`, `description`, and `labels` fields can be updated - * right now. - * - * If labels are updated, the change will not be reflected in queries until - * the next index time. - * - * Possible errors: - * - * * Returns NOT_FOUND if the Product does not exist. - * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is - * missing from the request or longer than 4096 characters. - * * Returns INVALID_ARGUMENT if description is present in update_mask but is - * longer than 4096 characters. - * * Returns INVALID_ARGUMENT if product_category is present in update_mask. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $product = new Product(); - * $response = $productSearchClient->updateProduct($product); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param Product $product Required. The Product resource which replaces the one on the server. - * product.name is immutable. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The [FieldMask][google.protobuf.FieldMask] that specifies which fields - * to update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask paths include `product_labels`, `display_name`, and - * `description`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Vision\V1\Product - * - * @throws ApiException if the remote call fails - */ - public function updateProduct($product, array $optionalArgs = []) - { - $request = new UpdateProductRequest(); - $requestParamHeaders = []; - $request->setProduct($product); - $requestParamHeaders['product.name'] = $product->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateProduct', Product::class, $optionalArgs, $request)->wait(); - } - - /** - * Makes changes to a ProductSet resource. - * Only display_name can be updated currently. - * - * Possible errors: - * - * * Returns NOT_FOUND if the ProductSet does not exist. - * * Returns INVALID_ARGUMENT if display_name is present in update_mask but - * missing from the request or longer than 4096 characters. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $productSet = new ProductSet(); - * $response = $productSearchClient->updateProductSet($productSet); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param ProductSet $productSet Required. The ProductSet resource which replaces the one on the server. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to - * update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask path is `display_name`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Vision\V1\ProductSet - * - * @throws ApiException if the remote call fails - */ - public function updateProductSet($productSet, array $optionalArgs = []) - { - $request = new UpdateProductSetRequest(); - $requestParamHeaders = []; - $request->setProductSet($productSet); - $requestParamHeaders['product_set.name'] = $productSet->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateProductSet', ProductSet::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Vision/V1/src/V1/ImageAnnotatorClient.php b/owl-bot-staging/Vision/V1/src/V1/ImageAnnotatorClient.php deleted file mode 100644 index 420be2268364..000000000000 --- a/owl-bot-staging/Vision/V1/src/V1/ImageAnnotatorClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.vision.v1.ImageAnnotator' => [ - 'AsyncBatchAnnotateFiles' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Vision\V1\AsyncBatchAnnotateFilesResponse', - 'metadataReturnType' => '\Google\Cloud\Vision\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'AsyncBatchAnnotateImages' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Vision\V1\AsyncBatchAnnotateImagesResponse', - 'metadataReturnType' => '\Google\Cloud\Vision\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'BatchAnnotateFiles' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\BatchAnnotateFilesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'BatchAnnotateImages' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\BatchAnnotateImagesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'productSet' => 'projects/{project}/locations/{location}/productSets/{product_set}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_rest_client_config.php b/owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_rest_client_config.php deleted file mode 100644 index 5ca910208251..000000000000 --- a/owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_rest_client_config.php +++ /dev/null @@ -1,132 +0,0 @@ - [ - 'google.cloud.vision.v1.ImageAnnotator' => [ - 'AsyncBatchAnnotateFiles' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/files:asyncBatchAnnotate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/files:asyncBatchAnnotate', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/files:asyncBatchAnnotate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'AsyncBatchAnnotateImages' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/images:asyncBatchAnnotate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/images:asyncBatchAnnotate', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/images:asyncBatchAnnotate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'BatchAnnotateFiles' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/files:annotate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/files:annotate', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/files:annotate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'BatchAnnotateImages' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/images:annotate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/images:annotate', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/images:annotate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Vision/V1/src/V1/resources/product_search_client_config.json b/owl-bot-staging/Vision/V1/src/V1/resources/product_search_client_config.json deleted file mode 100644 index 393b5b951284..000000000000 --- a/owl-bot-staging/Vision/V1/src/V1/resources/product_search_client_config.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "interfaces": { - "google.cloud.vision.v1.ProductSearch": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_2_codes": [], - "retry_policy_3_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - }, - "retry_policy_3_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "AddProductToProductSet": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "CreateProduct": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "CreateProductSet": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "CreateReferenceImage": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "DeleteProduct": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "DeleteProductSet": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "DeleteReferenceImage": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "GetProduct": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "GetProductSet": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "GetReferenceImage": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ImportProductSets": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListProductSets": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ListProducts": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ListProductsInProductSet": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ListReferenceImages": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "PurgeProducts": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "RemoveProductFromProductSet": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "UpdateProduct": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "UpdateProductSet": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - } - } - } - } -} diff --git a/owl-bot-staging/Vision/V1/src/V1/resources/product_search_descriptor_config.php b/owl-bot-staging/Vision/V1/src/V1/resources/product_search_descriptor_config.php deleted file mode 100644 index 62781007ff5c..000000000000 --- a/owl-bot-staging/Vision/V1/src/V1/resources/product_search_descriptor_config.php +++ /dev/null @@ -1,290 +0,0 @@ - [ - 'google.cloud.vision.v1.ProductSearch' => [ - 'ImportProductSets' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Vision\V1\ImportProductSetsResponse', - 'metadataReturnType' => '\Google\Cloud\Vision\V1\BatchOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'PurgeProducts' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Vision\V1\BatchOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'AddProductToProductSet' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateProduct' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\Product', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateProductSet' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\ProductSet', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateReferenceImage' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\ReferenceImage', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteProduct' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteProductSet' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteReferenceImage' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetProduct' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\Product', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetProductSet' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\ProductSet', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetReferenceImage' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\ReferenceImage', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListProductSets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getProductSets', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\ListProductSetsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListProducts' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getProducts', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\ListProductsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListProductsInProductSet' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getProducts', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\ListProductsInProductSetResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListReferenceImages' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getReferenceImages', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\ListReferenceImagesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RemoveProductFromProductSet' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateProduct' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\Product', - 'headerParams' => [ - [ - 'keyName' => 'product.name', - 'fieldAccessors' => [ - 'getProduct', - 'getName', - ], - ], - ], - ], - 'UpdateProductSet' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\ProductSet', - 'headerParams' => [ - [ - 'keyName' => 'product_set.name', - 'fieldAccessors' => [ - 'getProductSet', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'location' => 'projects/{project}/locations/{location}', - 'product' => 'projects/{project}/locations/{location}/products/{product}', - 'productSet' => 'projects/{project}/locations/{location}/productSets/{product_set}', - 'referenceImage' => 'projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Vision/V1/src/V1/resources/product_search_rest_client_config.php b/owl-bot-staging/Vision/V1/src/V1/resources/product_search_rest_client_config.php deleted file mode 100644 index 9ce3ae045331..000000000000 --- a/owl-bot-staging/Vision/V1/src/V1/resources/product_search_rest_client_config.php +++ /dev/null @@ -1,256 +0,0 @@ - [ - 'google.cloud.vision.v1.ProductSearch' => [ - 'AddProductToProductSet' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/productSets/*}:addProduct', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateProduct' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/products', - 'body' => 'product', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateProductSet' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/productSets', - 'body' => 'product_set', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateReferenceImage' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/products/*}/referenceImages', - 'body' => 'reference_image', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteProduct' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/products/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteProductSet' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/productSets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteReferenceImage' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/products/*/referenceImages/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetProduct' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/products/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetProductSet' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/productSets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetReferenceImage' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/products/*/referenceImages/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportProductSets' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/productSets:import', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListProductSets' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/productSets', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListProducts' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/products', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListProductsInProductSet' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/productSets/*}/products', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListReferenceImages' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/products/*}/referenceImages', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'PurgeProducts' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/products:purge', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RemoveProductFromProductSet' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/productSets/*}:removeProduct', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateProduct' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{product.name=projects/*/locations/*/products/*}', - 'body' => 'product', - 'placeholders' => [ - 'product.name' => [ - 'getters' => [ - 'getProduct', - 'getName', - ], - ], - ], - ], - 'UpdateProductSet' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{product_set.name=projects/*/locations/*/productSets/*}', - 'body' => 'product_set', - 'placeholders' => [ - 'product_set.name' => [ - 'getters' => [ - 'getProductSet', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Vision/V1/tests/Unit/V1/ImageAnnotatorClientTest.php b/owl-bot-staging/Vision/V1/tests/Unit/V1/ImageAnnotatorClientTest.php deleted file mode 100644 index b5efaf7a89b5..000000000000 --- a/owl-bot-staging/Vision/V1/tests/Unit/V1/ImageAnnotatorClientTest.php +++ /dev/null @@ -1,423 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ImageAnnotatorClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ImageAnnotatorClient($options); - } - - /** @test */ - public function asyncBatchAnnotateFilesTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/asyncBatchAnnotateFilesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new AsyncBatchAnnotateFilesResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/asyncBatchAnnotateFilesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $requests = []; - $response = $gapicClient->asyncBatchAnnotateFiles($requests); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateFiles', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateFilesTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function asyncBatchAnnotateFilesExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/asyncBatchAnnotateFilesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $requests = []; - $response = $gapicClient->asyncBatchAnnotateFiles($requests); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateFilesTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function asyncBatchAnnotateImagesTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/asyncBatchAnnotateImagesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new AsyncBatchAnnotateImagesResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/asyncBatchAnnotateImagesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $requests = []; - $outputConfig = new OutputConfig(); - $response = $gapicClient->asyncBatchAnnotateImages($requests, $outputConfig); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateImages', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $actualValue = $actualApiRequestObject->getOutputConfig(); - $this->assertProtobufEquals($outputConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateImagesTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function asyncBatchAnnotateImagesExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/asyncBatchAnnotateImagesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $requests = []; - $outputConfig = new OutputConfig(); - $response = $gapicClient->asyncBatchAnnotateImages($requests, $outputConfig); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateImagesTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function batchAnnotateFilesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchAnnotateFilesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $requests = []; - $response = $gapicClient->batchAnnotateFiles($requests); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ImageAnnotator/BatchAnnotateFiles', $actualFuncCall); - $actualValue = $actualRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchAnnotateFilesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $requests = []; - try { - $gapicClient->batchAnnotateFiles($requests); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchAnnotateImagesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchAnnotateImagesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $requests = []; - $response = $gapicClient->batchAnnotateImages($requests); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ImageAnnotator/BatchAnnotateImages', $actualFuncCall); - $actualValue = $actualRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchAnnotateImagesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $requests = []; - try { - $gapicClient->batchAnnotateImages($requests); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Vision/V1/tests/Unit/V1/ProductSearchClientTest.php b/owl-bot-staging/Vision/V1/tests/Unit/V1/ProductSearchClientTest.php deleted file mode 100644 index 7d83b8a979ce..000000000000 --- a/owl-bot-staging/Vision/V1/tests/Unit/V1/ProductSearchClientTest.php +++ /dev/null @@ -1,1403 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ProductSearchClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ProductSearchClient($options); - } - - /** @test */ - public function addProductToProductSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $gapicClient->addProductToProductSet($formattedName, $formattedProduct); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/AddProductToProductSet', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getProduct(); - $this->assertProtobufEquals($formattedProduct, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function addProductToProductSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - try { - $gapicClient->addProductToProductSet($formattedName, $formattedProduct); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createProductTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $productCategory = 'productCategory-1607451058'; - $expectedResponse = new Product(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setProductCategory($productCategory); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $product = new Product(); - $response = $gapicClient->createProduct($formattedParent, $product); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/CreateProduct', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getProduct(); - $this->assertProtobufEquals($product, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createProductExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $product = new Product(); - try { - $gapicClient->createProduct($formattedParent, $product); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createProductSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ProductSet(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $productSet = new ProductSet(); - $response = $gapicClient->createProductSet($formattedParent, $productSet); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/CreateProductSet', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getProductSet(); - $this->assertProtobufEquals($productSet, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createProductSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $productSet = new ProductSet(); - try { - $gapicClient->createProductSet($formattedParent, $productSet); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createReferenceImageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $uri = 'uri116076'; - $expectedResponse = new ReferenceImage(); - $expectedResponse->setName($name); - $expectedResponse->setUri($uri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $referenceImage = new ReferenceImage(); - $referenceImageUri = 'referenceImageUri-707360132'; - $referenceImage->setUri($referenceImageUri); - $response = $gapicClient->createReferenceImage($formattedParent, $referenceImage); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/CreateReferenceImage', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getReferenceImage(); - $this->assertProtobufEquals($referenceImage, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createReferenceImageExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $referenceImage = new ReferenceImage(); - $referenceImageUri = 'referenceImageUri-707360132'; - $referenceImage->setUri($referenceImageUri); - try { - $gapicClient->createReferenceImage($formattedParent, $referenceImage); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteProductTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $gapicClient->deleteProduct($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/DeleteProduct', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteProductExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - try { - $gapicClient->deleteProduct($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteProductSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $gapicClient->deleteProductSet($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/DeleteProductSet', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteProductSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - try { - $gapicClient->deleteProductSet($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteReferenceImageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); - $gapicClient->deleteReferenceImage($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/DeleteReferenceImage', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteReferenceImageExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); - try { - $gapicClient->deleteReferenceImage($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProductTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $productCategory = 'productCategory-1607451058'; - $expectedResponse = new Product(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setProductCategory($productCategory); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $response = $gapicClient->getProduct($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/GetProduct', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProductExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - try { - $gapicClient->getProduct($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProductSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ProductSet(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $response = $gapicClient->getProductSet($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/GetProductSet', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProductSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - try { - $gapicClient->getProductSet($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReferenceImageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uri = 'uri116076'; - $expectedResponse = new ReferenceImage(); - $expectedResponse->setName($name2); - $expectedResponse->setUri($uri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); - $response = $gapicClient->getReferenceImage($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/GetReferenceImage', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReferenceImageExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); - try { - $gapicClient->getReferenceImage($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importProductSetsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importProductSetsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ImportProductSetsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importProductSetsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $inputConfig = new ImportProductSetsInputConfig(); - $response = $gapicClient->importProductSets($formattedParent, $inputConfig); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/ImportProductSets', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getInputConfig(); - $this->assertProtobufEquals($inputConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importProductSetsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function importProductSetsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importProductSetsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $inputConfig = new ImportProductSetsInputConfig(); - $response = $gapicClient->importProductSets($formattedParent, $inputConfig); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importProductSetsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function listProductSetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $productSetsElement = new ProductSet(); - $productSets = [ - $productSetsElement, - ]; - $expectedResponse = new ListProductSetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setProductSets($productSets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listProductSets($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getProductSets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListProductSets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProductSetsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listProductSets($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProductsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $productsElement = new Product(); - $products = [ - $productsElement, - ]; - $expectedResponse = new ListProductsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setProducts($products); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listProducts($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getProducts()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListProducts', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProductsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listProducts($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProductsInProductSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $productsElement = new Product(); - $products = [ - $productsElement, - ]; - $expectedResponse = new ListProductsInProductSetResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setProducts($products); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $response = $gapicClient->listProductsInProductSet($formattedName); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getProducts()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListProductsInProductSet', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProductsInProductSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - try { - $gapicClient->listProductsInProductSet($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReferenceImagesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $pageSize2 = 1024500956; - $nextPageToken = ''; - $referenceImagesElement = new ReferenceImage(); - $referenceImages = [ - $referenceImagesElement, - ]; - $expectedResponse = new ListReferenceImagesResponse(); - $expectedResponse->setPageSize($pageSize2); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setReferenceImages($referenceImages); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $response = $gapicClient->listReferenceImages($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getReferenceImages()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListReferenceImages', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReferenceImagesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - try { - $gapicClient->listReferenceImages($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function purgeProductsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/purgeProductsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/purgeProductsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->purgeProducts($formattedParent); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/PurgeProducts', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/purgeProductsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function purgeProductsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/purgeProductsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->purgeProducts($formattedParent); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/purgeProductsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function removeProductFromProductSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $gapicClient->removeProductFromProductSet($formattedName, $formattedProduct); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/RemoveProductFromProductSet', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getProduct(); - $this->assertProtobufEquals($formattedProduct, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function removeProductFromProductSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - try { - $gapicClient->removeProductFromProductSet($formattedName, $formattedProduct); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateProductTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $productCategory = 'productCategory-1607451058'; - $expectedResponse = new Product(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setProductCategory($productCategory); - $transport->addResponse($expectedResponse); - // Mock request - $product = new Product(); - $response = $gapicClient->updateProduct($product); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/UpdateProduct', $actualFuncCall); - $actualValue = $actualRequestObject->getProduct(); - $this->assertProtobufEquals($product, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateProductExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $product = new Product(); - try { - $gapicClient->updateProduct($product); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateProductSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ProductSet(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $productSet = new ProductSet(); - $response = $gapicClient->updateProductSet($productSet); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/UpdateProductSet', $actualFuncCall); - $actualValue = $actualRequestObject->getProductSet(); - $this->assertProtobufEquals($productSet, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateProductSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $productSet = new ProductSet(); - try { - $gapicClient->updateProductSet($productSet); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/VmMigration/v1/proto/src/GPBMetadata/Google/Cloud/Vmmigration/V1/Vmmigration.php b/owl-bot-staging/VmMigration/v1/proto/src/GPBMetadata/Google/Cloud/Vmmigration/V1/Vmmigration.php deleted file mode 100644 index 5b7c3d9240be601a7e0a0d24a17537f175058315..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 37746 zcmeHwYit}>mfkjBA}=M1D!p2iWw%QnTc#z_qCK+Rk~~u+n^M~(o5Pnahn}8hvq<)s z?Cx}RQ>&TfVt0bY?k1UiU|+MDWD_6@B-w0UK#)O#4R#YGL0}{Z@mZymecC>IIH6ivvLi}sCIQ@kdPeW_Xj1@5ObSW83{5M(1;uG_V8VQ*vBc8ax9 zwO*+$VQ4zNW7l0$(vusns?XALrR~%WhB2LP0rGyTUTfIiucuNqyWXgk?@G97fkXFS z8zDrqs-+F9T&@rmDrF~~ZsOEjqTR%qy^>w7cQQl-}2)MZ<-O~*ja zSIRrJM!8%n?`-6%#H`&R>F(WZgXeY*usc;EyijmHIl|o468ODd*spdzcez^J$kb|; z+APGQwAaOs(##d`L8Hwa$=J8vEh#p(wzgcZor9F$aQTe5?iKOh|4fg#)s=i3S9$n^ zR0k6tbue*od+f4Wt57XLUl8N5Rv3H1^J1I0E5E7OOAWZ<8BkL^q+VTDulAaZGFfpM zMGbmh4U$R-l03PkxIw+wTFiaVQ0!yR)d&ruJEE>PHt>mBwK!?h?&Y_5`_y}lJiRAv z&~W&L`R#r&x@=dW$s}*jJSpzk#%a+~Gq&q`=dDV?qcl zRIBF+lw<&#b?c5U+WKfj0?q;7q{6P6h!sz5xn;-7eOh$#1HE9Zv35m_hJN|MPH?)hQnF zKMp6A{VngT@8hZaSN>rCaIzNQG7RuM%1ahIG{4^?hMI)m*bqtAszM3pJu{NMl8|p} zLWb^PR-0r@_TWjo`tXO088PfGSl&tY$pvplF6b^&-cgIZC(c$YPCXA&6~T4*kYu>w zsmaKNmM~|@oubw{j!^YT=p#gMdO-9!K-|10u13(s1iPFKplO^J!z_=RPwKWK#l6=^ zicw8I8%k5YAt-u{+u~JtP0$UGEBXCWxq&(P!U62(j?LppHuH{MtdzIpKK2@Kikm!T zw^XY?iJwKA)oWf5Mk^uBj0b^AdF4sDXiSL_xx9lvI#gNauMdmi1@?Jt`+dW*Y*-(tU8AEb~ zDCQ+ZXjY>NpIyx&OB88!7}HrX zpzG(BX`~`7!~+^{%!+}%!lu3FBuAz7d^7UnUJA_1X_<1p_Qc4Db2XdHavlmBBJ}mj zrjtA;7yLrxf-^Myy~-wI@v=6j=OqzC%qfq{iu3w&jd}$th(CBiesJTJ=r8gN{mrpk zV%Uqxu;~57ej;_@5X^4>L1C|9vlyj&-cFd`OT^prrOe_i+w&pOznrmVAHkfD2r-vk zURlkrJX)NANr!p2W>&N7nbAIDRGgk!TV2JRd~Q9nJbH?}0z8p_4D!@PYo4bLdAtPS zzRP|@UmPY+VJ?fY*^l5UoHhVJW_dZcJbEVm<8T^&RJ0^GYE0Jl+MU)Fnd_H3>&Sd7vLGC9pP=Asb3>as{ur+Hfu}H0qo=X1`xc}!9;(7%8 zYoZ!oe-^w?=`5-0;3CU^lFm9L-uFs`WJmKqk-w~oh(Ki+DXnT9PH4X3C=WTBKP)vq zx1xN|oG_|z>k2hmgk-PeeBvnI_;#e!Ea_?M3$rvyE%>pxQYs^UDkC{2A={Te6Z`u*9n?md^k8 z>T0wzEfJ!wEUm664j+l}S(>D2udrg%2dr$bg`@%~qtVZ=U46#BXIp(XCeC0t;j{A~1{`vKB;{6~b&`;|U1>>;MHBF3PxkPmJ+-UI=s6qFL|&Qpeg|4>|Zb{lo6 zu(m3X%gvBX>B28YZuW|rJBz6*CesRQMu_ba^7zu5R|>Fe@WQn;OUB7-X->QS;A`nI zk!(kJ^Y16b#TglLYU{mh|Ir50<1&yfP<+L{{Pb(zw|YLezF>6Z0bD_LluPSw35~e;9c_ zf}LTMDHFCPNn|F<;I86sVRO&MZucs0-Grn*uw4>r3Lay>zSSoNSf#+<8#vg14BnMS zX?W`ONS(AUhw@aFAA+L0Cwh@_QfcXEJ>=$>nzOaN_av4Ap;3HZGAy;j$=%qXu(4j5^{q)y9vpyCtMi@}FTW=rLcuvFnbYx;rrvuGxaXw@_ zkscUCy#!TaRg)PaIjN$6{TRZ+xe4OeK2k0Rl!bu+m8w!X4bijuE^0hgxc+seaDH|` zj0U&e_^KE!6e-!AM*<{|Jl>Y0@@mtO3>aK!!jh}JZ$E)z-U2kJo;zSkXacY#Z269x zZ6v7sjR)G5ByAX1h-vwnEUvJ)y3QZ@q{CBfoxcTPl*$KytWtY|Z0}Bf59$!YM#>}F z%(i@ewXkEnES_&JhxB)&Rzj{@rsHI~)j@#^io>XjYaAp2e~^Lq-pSL}5)=+Ht^~nC zchu%c1WW2dxU+@@0hg1JsX0>2vZ;Ysg1ln(a>o|Lg|LkRYn}110c@010><;m(b!;$ zdcOJA!+K*cie92cMEY#Z5--F78!=sG-)6c=zBLPIGLxXPZN1Zm7$xpjoSCmbsoLh} z1LFKF+D2G%8jCP00QfpmLQV8aW*bj+1i>*E= z6>Zv-N<&pehmid^g`}uMawc^jDm??6jp8RZak=II<2@~RyxtP2LKW3)@{!Pwvt2_Ks@5o?qs7i^JY`jz)xgFpVyrpdschHDn7Sh= z_EwSJqA&^v=!YQduHQQ{g&voMxAe3%S-Eid%MZjzql#vwE%-sQ9*?9tVKyE~+BKd+ zimbs4nM>X9Ida9hxw-l5VkS^EZl==u(tipO;V&nIuYV#?G7i~dW9z8aZ4w2Ypfn*4 zY(CASOvplZX#R4KIOC&&mxEdVxam<6rjZz*$hQ`=X|q(%PDqGx2y{Pi;W&bcsZ{EQ zsG1MS^bDDE@%!g1`nSmen149|Lmgl>BPWt&`!Sq`>R#oEWL=lrrLvCYT`f!NtRsv$ zakf;>qdW-l;!2#4@{Ckto^na z;O8pP?vzsDVfHTqa8}oTz$e}MGc{)^5o(otw`I?0g2k5os9;G$Z|=bJ0LKT(dDQ(O zKiiXGAP7|yT@n}P?0RuGt9@V13fMVCW)Ao|X9n^Xw<~DKf>K z8MkRc7E||WgINz?rpFlIv4j+U<|WVL*8T)^u{9bPEmZ=wJNOzKr1mxD#c;Lq7+y6Q zVOzRDBU91I_5iRGOEjM>vW+f_p<=ZGb4C6Yxk~-?Xy4wa=wW|T_DS?pm_;=eHH`f1 zek2zzplZ2as-qhkuvBEH3}%oE*GrmihcZ=Av(X9<$m^|Chir2>jj)^2q}d+96+F)FmO;Uk~m7wnS20$=;|a#WH=h1JW>%a z_mfznPsXxm<>ct5N*~Fa5i3Oe8%XI%-+9RRBjWr4n#UT{f-k#S84Idck4(KAX*zxD zukWw>mRSWYj74#}P%G}1>WKCbO(dx?YGf)pB_3GS^2{H5O$;^hhzn-dPfR4KT|_sX z^c_<^KNJ^2N%gWY*BA2Z+2z$W>MpUQw68u|3ih)?w6SUMS=2yh1R{W02ej>krO0}RU_bj@rOwU)-&G*F_$sq1} z>EL>=cFeQpe@KW+L6fb#NYtASWabz3c5dB_bJsPb8ZxBhfNKFMIa-0EqUb=?hZv?G zDa|oGj9zBd&*+$cdO)08tCzHFqq(h8tG8)v^jUf~3lDV)gTRl|kS*V7pTLNX{n#wH z35=M8V<36X1-(`e)9tJ0)#s79MH_w|`3@w0IY|?(np!cWCFf|q@s=2o3!%$ZHSBko zr9rM44I}LSNWX@myDNH$Z#Zij-8Z?u?*S}}Mn@AVUv{qAG{v7r?-v^9sC@^r@9Tc| zbp;{N9%`aECN8aJ7c%*|WeflHx7kCJe2~e!kJX?(7IKTL51~l#@KMHE9_>y4BGMy2 zmk>82^8Fqh6q|nS$jOmLkmZpY@jRn~H{{^ZM0xXE3-#a~oO5Mg*A7(J(v`A;2vdin zbjsPMnnNhm1WjcDqEq5N@NoLBRw_Cq@|P7 zM_i*MfrmQGTyA;;4Z6Pc#+x#|F=2Gasu|IDP_iG(9UYmPiZnqju&iSy34H?os;A0J zEE8Jgl|DF4=%K{3s`ARvj92kid1ZcDJ~n?NA)aqX3uX0|#CZ>YDlyS@-)JS&f)#!A z=mp@vm=ITyQ)yXM$JEol^orWFF7?aFY?}FBL03-Lw1xI$m<&bn*4M% z>w*-sNNvR&hM>!n?vSi!9*XBVrP3DRlh~fNi57HNq==DcLsH2%ecw!m zYi5ov`iHE1Ja$HdHMlusSjh z9SQ|nxmtl>fiVA3LcGvkYPhNEq*%je$B00ocFdz?ns&@JZf(1j{_vEz8gU*>*0%Qf zAQq=WGh#&bfGdZRbD`6>KDWljjR=>N51K9U!A?5hEAuAo%E5=)N8^$_(1uh8&gIog zIOHe6r@X26CHGpF4;?U{dNcd%kX>_r+-(h_lf<$EhdI z#zl9E`qrN3*%HL8I4i4l$Ox-NRg+dsLqFBk>@Bqt>-zVEQB)@v9X^ML=6-dCEZW>E z=+x;w%%Y>9GW~~>oJbra^_RFYi0qgz4NbmnT#W6*yP1V#fIk$2`|5fQb=qw1$Qz{Z z`QRoOFneKZ3x&iAwcskk@(HvdDl+a?oO<)*W0$R9W0T^H|8sGfz27<|#(b2}+$E29 zv?>4;Nqv(4|3w+?-}+o4i}FnOoFa++>?C>iBqSM4IL}y!1Eqvx2(j@&i~MGex+{Kp z`T-N)f*5TvT@X=a1y%hLafj2`)Xz8_2`ws3Bq<@c0TU0=VJt8Cp@$ry{J8{<9{F@S zTABN#`6HhouEE7WbwXMe0EAkSHY)7(rA427cR`GXr0S9WTFjwqNS5c8tVa(xB{uyi zH;*#kZzK8Kv=EDxE!*105eM`(`n&uV(X%ZtN2%0Qdf{FqSA?%Q!8h@s<&G*-bm*3H z(rBAB-xh=JyQH{~Tgoh3tGVSseh)>1tvdvaYUKnm@7-d=}Z-ST;71@8mx#U8+(NP=BhZ?ipzEJ0!q3Mb2zoUU}YCq zGmCWOGC+A`XIC@J3pjMVO00xZ)I#bla+aS z%2L)CB_j`-|2!d*9ImRyRk|@kM@{br!qf>F6W=g8Jz3JtkV4C8jTw08 z`j!ehQb|tz@Kp3!G!KxxNLX&6){$uT z>!2C;OohPKb>mc!sR^uOGPMkL%@0MAb1NZG9*ctLX}pL^RZVXVwb^qjVm2V4oGj^b zgXox6aCwyu!H1XVnkDF@7Q#mmAW>J|E4Rk=)s}+NL+@_@)1l62YlJ)X{G7crDg0Q zm1X{>$Vg+PAoCroJ4oylQ=;^HkZhG*srVCB#@5@XTe#LvhwmNo{MQn=gE%;C#wa z+kt-<0J2--TU2k}@yUzBLVgqjId`0s@V{5?O_vl1&$FY9IL0O`6uYjCRx7YoLWseJk+K^@x7%*9*~b0o}#e#%ZBoGZ6c$v9kio)6GsJ8{E9EOqPz* zAAe?jB;qf$y3?t8lLz#m1m*u9QuX;9Nv$M{t7_2d?W?}yVlA8^@8n{wXR2a;LLG(B zz$(@9mKb2HRO^}<8Fk9Z$I~RpX2S%?g|zm#<5T^LUh(^8{tckSO3Am}(Ki5H29g*7 z-E&9Zl*Sy|A&J6O4K5TiSk?Go?pnpTFtMy15hm6swlG+u_&_@1uC&)6h**+z*)Lrp z*W#r)~cn-1@@F;Qi1U06}^Zz8KnYQ9NBSJxkxh|g5x|B_1E_~2G*e;T)y zG&e}QlU?o5(Nh=bpMVKyf^{-m_+vfDN6M@+N_x6jaKzKt-uwAFbY@WQX9rbsyE-il zR|%&)H#vjPb`x@gJS~pxy7x%AZEn;mc&Wz80u+0TlGFD%yGSXlL0$n@jNr~@efU^* z`SRz?-|iD5u4a{&w z6&%Z?-#u91JF;K8F*>i|;SyK3L521(^vt$+VJN zTSkI=9VZ-S`Gf<%?7>;CqUJZX|(y47<30Ck&i1-7e26B z&Uu8K6Z@Tnc#ae`+F?=Cl5!*OyLHv|Ou**7A#L6*qpMrdpQ+CN3kh!S4M9O^Zd^cs zR&R|T-)*M#cl5!l;F>HnN6iT2#Tb-$a80esai+_Y%~5pj>h}3@+<@KEi%FSzYL&ho z!r$xJ%m;xw6Z-b2t(EKymn-Mi=I2Ly#`ncprRb1U8gILEVV2Jsc9Xe z7l+npeW^Z&AmyU3vBPaWx*=Yg$t^6c;eP+j;se~pke|)2ydPHO`hs||?MRfy7H6&H zS>Tuw&$S=6LO&1?wa~ORPbvY&HOFyzR?-Layr&(B$RGF&lv`$TCBvZ4X6CH5`BnT* z!At1e^dsmSD9gu*xKXmS+%x_&-*-)>@mCYL6&lKi^`2uy-$3OVsYGThx^L7sK{=-PzV$DE{}+0ozUWtu zzR5|4`))2{-1A!v5*19LB#&;DT$tUHdAvh4jMucQfZN{mulJ~)0eFa}Bcc1E*$ws5>eTyF>oSx3 zrX$a#ssBS1^r>~#y_GG*9sM^z%X^_f3|iiy9ir8cXx*Edl1#ziO>{>4CU)wW^vwoe zvQL*B#31&Mffy$d6hlStmv?A~i0v>pjq`qWhLPf?Ptg>6G5C`-nf)sIQbP6!sEqiJ zP#V#vU;KkLI?)H2gL9NfFGwWcHST$KFJ5TU+rCR0AmhC6#_y}pwZ)J+Mp{b;E<L(>IClr2~q(PtmS zrs&;^?uKpol9}^i)e(1wpfuT3fPbw==Wbd)W<=AUbz#dajaiIZ{9Zz0vTh!Gf6^gG zd!Aa8N^v%thX&Q5tedTmq(Xf;^t^9tsQ*9UBCuX*!99jzZDw^yu^-{BA7_Fcf9t!` zR{vSGsDvC5ag6A;Iui1*X&UeQv0@%RTM7D#q|2-^-JPIsxksGbJM}!G{_mjCAh#hO zj?rl0lQgO^)~XdGlhv5UuCrYaL(L=df44_mVc`u!FM2oH&eIsii2dJVvH!?Cf!#`n z9*=rzy`eDP8%hxGeVX7+I=-$}4TcWU6L zdc`+V&aZLGv`h3A5tt* z{@)}E5eHO%MoGncsNlq~L~yvKLNxJOXDJKtz7&dk#xaP~bn^Z-+;S*!4>mDwxqq-m zrQ`NYGwXxCGm&<;3H$2N>^}*XH2HU#B|n&YAX(Cd2wc=z9O(b` zMhInqKa<`i{UKsJQ~pQvOt7x)oDwbLJEX(`Z{Rqy-*GmuJ6-&T;8cH$W(=qL2X}~_ zQa$VDS6cQtUjMpV$b6bcNy^i(3a$Ip^6mPk)@$wBPQz62|CB!+>FWqJqT}I~{!ZC4 zI~K$1e^T+fxqJdNsQFu1rRllZw(~R$?f-_2_qWK#Y`lMPha3OL8R?VR_^PjASmKPG z4#LIyJPc)&&(5{9$Ho}jmhl}T{%0BSN9O7Y?DlrBYdDPQCn9=(!>B=$&#r|2sf-u~ z@DJ{g4odP@%sEL1b{D#q`R1>SrJFxb^3=Mfybt#`GH$y6l77cE&u{F7I2{PWNBqAc z5=Q~<=b&HYzz-~TNP%xNCoG!_k^)Cj?M?Jyr_)?(mny8n91Cnp7#yL947?`3wtPiA#duW^xCp5jS-$FS94wObHrkvp!sj=zoCsoWf z9|FhTNL@boHo_q#TW+UNjPDy9t`UhbL4RJGpohm3Mi)#c?d_dJA6pxD{{P#itN8?E9@^3O9pR?XZoMALyX&%?r^1b;~3rq>m(zzh|5nhcw0XA3*Vt@VSV^C?4NfjaA2OUnZ*?jmgoZ z)dkfXAfc675cy<}rDH^A-Xb&fMsAJWWgT&9|4T6wz zNhA9DJUvVU+CiVL`Hl~^C?Ydpo;dTLLTj@gW8k9c;u)#oi&1uE3ECTG7i3HGuS`F+ zE-F1HfxapKD|OeHd#<20r4PG0%yDoh_;^Nkh)-4G^Ul=kk_{wGkukCyA$5|*>YRM! zkAkBx`iH=XD!p zox9uIp+d0LTzYrBZ=YK5>_fn5@8Kc0d?BpYI;O-JHl;(Xf0D7zs6w1XEFSAxNUORJ z@!Qco<6%+Fr|Rg4@4%5`MF08^DQW)%jd%35`eE~w9i5T9{ieaK4Uu8b;UqWXE~%r4 zO^f+GctX(1KG0%3q2O?hNEgSsOv?v*lwA4&_b7K<{HcCL!w-BkJz2^7W@z|hl)VZw zXU!wfI~_Q!_te^WMd^RWPoD|B>Hkw&1heH#ZL4KK-a-8`hYvL)niy;$d^0*EhRUk0 zOj%L~`Js-q89Y=oBKfl|v>Ed+=eH)EP~-RTJ0)x@e7MC>BVH%3t#gwwpS}JFzwDmN^>7_zswmsY(^)r8qAci}C(rvxy~`Sf8vl8+o}=xv8f9 zJ$4j&CkR2zj)u(8*hV+_1;1l{>_aeWhq=`VPEi28R_vO(Y;5sUYpne(h5y2u*sa&A zPI_|k@#Dv8hjHe?nLy|GWT8>trR+^(>lO}t*70L9`_um#H$mcE6f;cY;(k?gsFWd& z^~zG>BTKI1PQ&Uul}Qg^llUr{D?LxDn|FPG{YKB#2bIdso;`tF2^y)^7u=6btl$1r zzunl7uQxV4@A1d&&w8Hc>FKl_kWPCB;E&sz166|cjaNiU{qJT9KV@gXdRMql=s-!S dm`=Y`a`0n!xYLdgVWjTMk$2^|Lvbj?{{ayf?iv69 diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AdaptingOSStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AdaptingOSStep.php deleted file mode 100644 index 6fc60a510df5..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AdaptingOSStep.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.AdaptingOSStep - */ -class AdaptingOSStep extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationRequest.php deleted file mode 100644 index d4a9f9a19d65..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.vmmigration.v1.AddGroupMigrationRequest - */ -class AddGroupMigrationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full path name of the Group to add to. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $group = ''; - /** - * The full path name of the MigratingVm to add. - * - * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { - */ - protected $migrating_vm = ''; - - /** - * @param string $group Required. The full path name of the Group to add to. Please see - * {@see VmMigrationClient::groupName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\AddGroupMigrationRequest - * - * @experimental - */ - public static function build(string $group): self - { - return (new self()) - ->setGroup($group); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $group - * Required. The full path name of the Group to add to. - * @type string $migrating_vm - * The full path name of the MigratingVm to add. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full path name of the Group to add to. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getGroup() - { - return $this->group; - } - - /** - * Required. The full path name of the Group to add to. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkString($var, True); - $this->group = $var; - - return $this; - } - - /** - * The full path name of the MigratingVm to add. - * - * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getMigratingVm() - { - return $this->migrating_vm; - } - - /** - * The full path name of the MigratingVm to add. - * - * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setMigratingVm($var) - { - GPBUtil::checkString($var, True); - $this->migrating_vm = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationResponse.php deleted file mode 100644 index d1f198d54029..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.AddGroupMigrationResponse - */ -class AddGroupMigrationResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ApplianceVersion.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ApplianceVersion.php deleted file mode 100644 index da08b27da901..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ApplianceVersion.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.vmmigration.v1.ApplianceVersion - */ -class ApplianceVersion extends \Google\Protobuf\Internal\Message -{ - /** - * The appliance version. - * - * Generated from protobuf field string version = 1; - */ - protected $version = ''; - /** - * A link for downloading the version. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Determine whether it's critical to upgrade the appliance to this version. - * - * Generated from protobuf field bool critical = 3; - */ - protected $critical = false; - /** - * Link to a page that contains the version release notes. - * - * Generated from protobuf field string release_notes_uri = 4; - */ - protected $release_notes_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * The appliance version. - * @type string $uri - * A link for downloading the version. - * @type bool $critical - * Determine whether it's critical to upgrade the appliance to this version. - * @type string $release_notes_uri - * Link to a page that contains the version release notes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The appliance version. - * - * Generated from protobuf field string version = 1; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The appliance version. - * - * Generated from protobuf field string version = 1; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * A link for downloading the version. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * A link for downloading the version. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Determine whether it's critical to upgrade the appliance to this version. - * - * Generated from protobuf field bool critical = 3; - * @return bool - */ - public function getCritical() - { - return $this->critical; - } - - /** - * Determine whether it's critical to upgrade the appliance to this version. - * - * Generated from protobuf field bool critical = 3; - * @param bool $var - * @return $this - */ - public function setCritical($var) - { - GPBUtil::checkBool($var); - $this->critical = $var; - - return $this; - } - - /** - * Link to a page that contains the version release notes. - * - * Generated from protobuf field string release_notes_uri = 4; - * @return string - */ - public function getReleaseNotesUri() - { - return $this->release_notes_uri; - } - - /** - * Link to a page that contains the version release notes. - * - * Generated from protobuf field string release_notes_uri = 4; - * @param string $var - * @return $this - */ - public function setReleaseNotesUri($var) - { - GPBUtil::checkString($var, True); - $this->release_notes_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense.php deleted file mode 100644 index c015b9cf1649..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.vmmigration.v1.AppliedLicense - */ -class AppliedLicense extends \Google\Protobuf\Internal\Message -{ - /** - * The license type that was used in OS adaptation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense.Type type = 1; - */ - protected $type = 0; - /** - * The OS license returned from the adaptation module's report. - * - * Generated from protobuf field string os_license = 2; - */ - protected $os_license = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * The license type that was used in OS adaptation. - * @type string $os_license - * The OS license returned from the adaptation module's report. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The license type that was used in OS adaptation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The license type that was used in OS adaptation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AppliedLicense\Type::class); - $this->type = $var; - - return $this; - } - - /** - * The OS license returned from the adaptation module's report. - * - * Generated from protobuf field string os_license = 2; - * @return string - */ - public function getOsLicense() - { - return $this->os_license; - } - - /** - * The OS license returned from the adaptation module's report. - * - * Generated from protobuf field string os_license = 2; - * @param string $var - * @return $this - */ - public function setOsLicense($var) - { - GPBUtil::checkString($var, True); - $this->os_license = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense/Type.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense/Type.php deleted file mode 100644 index 27008d8cc57e..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense/Type.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.vmmigration.v1.AppliedLicense.Type - */ -class Type -{ - /** - * Unspecified license for the OS. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * No license available for the OS. - * - * Generated from protobuf enum NONE = 1; - */ - const NONE = 1; - /** - * The license type is Pay As You Go license type. - * - * Generated from protobuf enum PAYG = 2; - */ - const PAYG = 2; - /** - * The license type is Bring Your Own License type. - * - * Generated from protobuf enum BYOL = 3; - */ - const BYOL = 3; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::NONE => 'NONE', - self::PAYG => 'PAYG', - self::BYOL => 'BYOL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\VMMigration\V1\AppliedLicense_Type::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AvailableUpdates.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AvailableUpdates.php deleted file mode 100644 index a32202170f8c..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AvailableUpdates.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.vmmigration.v1.AvailableUpdates - */ -class AvailableUpdates extends \Google\Protobuf\Internal\Message -{ - /** - * The newest deployable version of the appliance. - * The current appliance can't be updated into this version, and the owner - * must manually deploy this OVA to a new appliance. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion new_deployable_appliance = 1; - */ - protected $new_deployable_appliance = null; - /** - * The latest version for in place update. - * The current appliance can be updated to this version using the API or m4c - * CLI. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion in_place_update = 2; - */ - protected $in_place_update = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VMMigration\V1\ApplianceVersion $new_deployable_appliance - * The newest deployable version of the appliance. - * The current appliance can't be updated into this version, and the owner - * must manually deploy this OVA to a new appliance. - * @type \Google\Cloud\VMMigration\V1\ApplianceVersion $in_place_update - * The latest version for in place update. - * The current appliance can be updated to this version using the API or m4c - * CLI. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The newest deployable version of the appliance. - * The current appliance can't be updated into this version, and the owner - * must manually deploy this OVA to a new appliance. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion new_deployable_appliance = 1; - * @return \Google\Cloud\VMMigration\V1\ApplianceVersion|null - */ - public function getNewDeployableAppliance() - { - return $this->new_deployable_appliance; - } - - public function hasNewDeployableAppliance() - { - return isset($this->new_deployable_appliance); - } - - public function clearNewDeployableAppliance() - { - unset($this->new_deployable_appliance); - } - - /** - * The newest deployable version of the appliance. - * The current appliance can't be updated into this version, and the owner - * must manually deploy this OVA to a new appliance. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion new_deployable_appliance = 1; - * @param \Google\Cloud\VMMigration\V1\ApplianceVersion $var - * @return $this - */ - public function setNewDeployableAppliance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ApplianceVersion::class); - $this->new_deployable_appliance = $var; - - return $this; - } - - /** - * The latest version for in place update. - * The current appliance can be updated to this version using the API or m4c - * CLI. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion in_place_update = 2; - * @return \Google\Cloud\VMMigration\V1\ApplianceVersion|null - */ - public function getInPlaceUpdate() - { - return $this->in_place_update; - } - - public function hasInPlaceUpdate() - { - return isset($this->in_place_update); - } - - public function clearInPlaceUpdate() - { - unset($this->in_place_update); - } - - /** - * The latest version for in place update. - * The current appliance can be updated to this version using the API or m4c - * CLI. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion in_place_update = 2; - * @param \Google\Cloud\VMMigration\V1\ApplianceVersion $var - * @return $this - */ - public function setInPlaceUpdate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ApplianceVersion::class); - $this->in_place_update = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSecurityGroup.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSecurityGroup.php deleted file mode 100644 index ee8d6768c507..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSecurityGroup.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.vmmigration.v1.AwsSecurityGroup - */ -class AwsSecurityGroup extends \Google\Protobuf\Internal\Message -{ - /** - * The AWS security group id. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * The AWS security group name. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * The AWS security group id. - * @type string $name - * The AWS security group name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The AWS security group id. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * The AWS security group id. - * - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The AWS security group name. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The AWS security group name. - * - * Generated from protobuf field string name = 2; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails.php deleted file mode 100644 index 31c465db770b..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails.php +++ /dev/null @@ -1,348 +0,0 @@ -google.cloud.vmmigration.v1.AwsSourceDetails - */ -class AwsSourceDetails extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The AWS region that the source VMs will be migrated from. - * - * Generated from protobuf field string aws_region = 3 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $aws_region = ''; - /** - * Output only. State of the source as determined by the health check. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Provides details on the state of the Source in case of an - * error. - * - * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - /** - * AWS resource tags to limit the scope of the source inventory. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSourceDetails.Tag inventory_tag_list = 10; - */ - private $inventory_tag_list; - /** - * AWS security group names to limit the scope of the source - * inventory. - * - * Generated from protobuf field repeated string inventory_security_group_names = 7; - */ - private $inventory_security_group_names; - /** - * User specified tags to add to every M2VM generated resource in AWS. - * These tags will be set in addition to the default tags that are set as part - * of the migration process. The tags must not begin with the reserved prefix - * `m2vm`. - * - * Generated from protobuf field map migration_resources_user_tags = 8; - */ - private $migration_resources_user_tags; - /** - * Output only. The source's public IP. All communication initiated by this - * source will originate from this IP. - * - * Generated from protobuf field string public_ip = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $public_ip = ''; - protected $credentials_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VMMigration\V1\AwsSourceDetails\AccessKeyCredentials $access_key_creds - * AWS Credentials using access key id and secret. - * @type string $aws_region - * Immutable. The AWS region that the source VMs will be migrated from. - * @type int $state - * Output only. State of the source as determined by the health check. - * @type \Google\Rpc\Status $error - * Output only. Provides details on the state of the Source in case of an - * error. - * @type array<\Google\Cloud\VMMigration\V1\AwsSourceDetails\Tag>|\Google\Protobuf\Internal\RepeatedField $inventory_tag_list - * AWS resource tags to limit the scope of the source inventory. - * @type array|\Google\Protobuf\Internal\RepeatedField $inventory_security_group_names - * AWS security group names to limit the scope of the source - * inventory. - * @type array|\Google\Protobuf\Internal\MapField $migration_resources_user_tags - * User specified tags to add to every M2VM generated resource in AWS. - * These tags will be set in addition to the default tags that are set as part - * of the migration process. The tags must not begin with the reserved prefix - * `m2vm`. - * @type string $public_ip - * Output only. The source's public IP. All communication initiated by this - * source will originate from this IP. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * AWS Credentials using access key id and secret. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails.AccessKeyCredentials access_key_creds = 11; - * @return \Google\Cloud\VMMigration\V1\AwsSourceDetails\AccessKeyCredentials|null - */ - public function getAccessKeyCreds() - { - return $this->readOneof(11); - } - - public function hasAccessKeyCreds() - { - return $this->hasOneof(11); - } - - /** - * AWS Credentials using access key id and secret. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails.AccessKeyCredentials access_key_creds = 11; - * @param \Google\Cloud\VMMigration\V1\AwsSourceDetails\AccessKeyCredentials $var - * @return $this - */ - public function setAccessKeyCreds($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AwsSourceDetails\AccessKeyCredentials::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Immutable. The AWS region that the source VMs will be migrated from. - * - * Generated from protobuf field string aws_region = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getAwsRegion() - { - return $this->aws_region; - } - - /** - * Immutable. The AWS region that the source VMs will be migrated from. - * - * Generated from protobuf field string aws_region = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setAwsRegion($var) - { - GPBUtil::checkString($var, True); - $this->aws_region = $var; - - return $this; - } - - /** - * Output only. State of the source as determined by the health check. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the source as determined by the health check. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsSourceDetails\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Provides details on the state of the Source in case of an - * error. - * - * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. Provides details on the state of the Source in case of an - * error. - * - * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * AWS resource tags to limit the scope of the source inventory. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSourceDetails.Tag inventory_tag_list = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInventoryTagList() - { - return $this->inventory_tag_list; - } - - /** - * AWS resource tags to limit the scope of the source inventory. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSourceDetails.Tag inventory_tag_list = 10; - * @param array<\Google\Cloud\VMMigration\V1\AwsSourceDetails\Tag>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInventoryTagList($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\AwsSourceDetails\Tag::class); - $this->inventory_tag_list = $arr; - - return $this; - } - - /** - * AWS security group names to limit the scope of the source - * inventory. - * - * Generated from protobuf field repeated string inventory_security_group_names = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInventorySecurityGroupNames() - { - return $this->inventory_security_group_names; - } - - /** - * AWS security group names to limit the scope of the source - * inventory. - * - * Generated from protobuf field repeated string inventory_security_group_names = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInventorySecurityGroupNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->inventory_security_group_names = $arr; - - return $this; - } - - /** - * User specified tags to add to every M2VM generated resource in AWS. - * These tags will be set in addition to the default tags that are set as part - * of the migration process. The tags must not begin with the reserved prefix - * `m2vm`. - * - * Generated from protobuf field map migration_resources_user_tags = 8; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMigrationResourcesUserTags() - { - return $this->migration_resources_user_tags; - } - - /** - * User specified tags to add to every M2VM generated resource in AWS. - * These tags will be set in addition to the default tags that are set as part - * of the migration process. The tags must not begin with the reserved prefix - * `m2vm`. - * - * Generated from protobuf field map migration_resources_user_tags = 8; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMigrationResourcesUserTags($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->migration_resources_user_tags = $arr; - - return $this; - } - - /** - * Output only. The source's public IP. All communication initiated by this - * source will originate from this IP. - * - * Generated from protobuf field string public_ip = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPublicIp() - { - return $this->public_ip; - } - - /** - * Output only. The source's public IP. All communication initiated by this - * source will originate from this IP. - * - * Generated from protobuf field string public_ip = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPublicIp($var) - { - GPBUtil::checkString($var, True); - $this->public_ip = $var; - - return $this; - } - - /** - * @return string - */ - public function getCredentialsType() - { - return $this->whichOneof("credentials_type"); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/AccessKeyCredentials.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/AccessKeyCredentials.php deleted file mode 100644 index 42e4c86fab4a..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/AccessKeyCredentials.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.vmmigration.v1.AwsSourceDetails.AccessKeyCredentials - */ -class AccessKeyCredentials extends \Google\Protobuf\Internal\Message -{ - /** - * AWS access key ID. - * - * Generated from protobuf field string access_key_id = 1; - */ - protected $access_key_id = ''; - /** - * Input only. AWS secret access key. - * - * Generated from protobuf field string secret_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $secret_access_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $access_key_id - * AWS access key ID. - * @type string $secret_access_key - * Input only. AWS secret access key. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * AWS access key ID. - * - * Generated from protobuf field string access_key_id = 1; - * @return string - */ - public function getAccessKeyId() - { - return $this->access_key_id; - } - - /** - * AWS access key ID. - * - * Generated from protobuf field string access_key_id = 1; - * @param string $var - * @return $this - */ - public function setAccessKeyId($var) - { - GPBUtil::checkString($var, True); - $this->access_key_id = $var; - - return $this; - } - - /** - * Input only. AWS secret access key. - * - * Generated from protobuf field string secret_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getSecretAccessKey() - { - return $this->secret_access_key; - } - - /** - * Input only. AWS secret access key. - * - * Generated from protobuf field string secret_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSecretAccessKey($var) - { - GPBUtil::checkString($var, True); - $this->secret_access_key = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AccessKeyCredentials::class, \Google\Cloud\VMMigration\V1\AwsSourceDetails_AccessKeyCredentials::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/State.php deleted file mode 100644 index 64b61a6c73a5..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/State.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.vmmigration.v1.AwsSourceDetails.State - */ -class State -{ - /** - * The state is unknown. This is used for API compatibility only and is not - * used by the system. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The state was not sampled by the health checks yet. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The source is available but might not be usable yet due to invalid - * credentials or another reason. - * The error message will contain further details. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - /** - * The source exists and its credentials were verified. - * - * Generated from protobuf enum ACTIVE = 3; - */ - const ACTIVE = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::FAILED => 'FAILED', - self::ACTIVE => 'ACTIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VMMigration\V1\AwsSourceDetails_State::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/Tag.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/Tag.php deleted file mode 100644 index 7604d5c11845..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/Tag.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.vmmigration.v1.AwsSourceDetails.Tag - */ -class Tag extends \Google\Protobuf\Internal\Message -{ - /** - * Key of tag. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * Value of tag. - * - * Generated from protobuf field string value = 2; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * Key of tag. - * @type string $value - * Value of tag. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Key of tag. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * Key of tag. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * Value of tag. - * - * Generated from protobuf field string value = 2; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Value of tag. - * - * Generated from protobuf field string value = 2; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Tag::class, \Google\Cloud\VMMigration\V1\AwsSourceDetails_Tag::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails.php deleted file mode 100644 index b8365eebfd4d..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.vmmigration.v1.AwsSourceVmDetails - */ -class AwsSourceVmDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The firmware type of the source VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1; - */ - protected $firmware = 0; - /** - * The total size of the disks being migrated in bytes. - * - * Generated from protobuf field int64 committed_storage_bytes = 2; - */ - protected $committed_storage_bytes = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $firmware - * The firmware type of the source VM. - * @type int|string $committed_storage_bytes - * The total size of the disks being migrated in bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The firmware type of the source VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1; - * @return int - */ - public function getFirmware() - { - return $this->firmware; - } - - /** - * The firmware type of the source VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1; - * @param int $var - * @return $this - */ - public function setFirmware($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsSourceVmDetails\Firmware::class); - $this->firmware = $var; - - return $this; - } - - /** - * The total size of the disks being migrated in bytes. - * - * Generated from protobuf field int64 committed_storage_bytes = 2; - * @return int|string - */ - public function getCommittedStorageBytes() - { - return $this->committed_storage_bytes; - } - - /** - * The total size of the disks being migrated in bytes. - * - * Generated from protobuf field int64 committed_storage_bytes = 2; - * @param int|string $var - * @return $this - */ - public function setCommittedStorageBytes($var) - { - GPBUtil::checkInt64($var); - $this->committed_storage_bytes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails/Firmware.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails/Firmware.php deleted file mode 100644 index 5a55b923fe10..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails/Firmware.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware - */ -class Firmware -{ - /** - * The firmware is unknown. - * - * Generated from protobuf enum FIRMWARE_UNSPECIFIED = 0; - */ - const FIRMWARE_UNSPECIFIED = 0; - /** - * The firmware is EFI. - * - * Generated from protobuf enum EFI = 1; - */ - const EFI = 1; - /** - * The firmware is BIOS. - * - * Generated from protobuf enum BIOS = 2; - */ - const BIOS = 2; - - private static $valueToName = [ - self::FIRMWARE_UNSPECIFIED => 'FIRMWARE_UNSPECIFIED', - self::EFI => 'EFI', - self::BIOS => 'BIOS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Firmware::class, \Google\Cloud\VMMigration\V1\AwsSourceVmDetails_Firmware::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails.php deleted file mode 100644 index 7535504cdd78..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails.php +++ /dev/null @@ -1,645 +0,0 @@ -google.cloud.vmmigration.v1.AwsVmDetails - */ -class AwsVmDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The VM ID in AWS. - * - * Generated from protobuf field string vm_id = 1; - */ - protected $vm_id = ''; - /** - * The display name of the VM. Note that this value is not necessarily unique. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * The id of the AWS's source this VM is connected to. - * - * Generated from protobuf field string source_id = 3; - */ - protected $source_id = ''; - /** - * The descriptive name of the AWS's source this VM is connected to. - * - * Generated from protobuf field string source_description = 4; - */ - protected $source_description = ''; - /** - * Output only. The power state of the VM at the moment list was taken. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.PowerState power_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $power_state = 0; - /** - * The number of cpus the VM has. - * - * Generated from protobuf field int32 cpu_count = 6; - */ - protected $cpu_count = 0; - /** - * The memory size of the VM in MB. - * - * Generated from protobuf field int32 memory_mb = 7; - */ - protected $memory_mb = 0; - /** - * The number of disks the VM has. - * - * Generated from protobuf field int32 disk_count = 8; - */ - protected $disk_count = 0; - /** - * The total size of the storage allocated to the VM in MB. - * - * Generated from protobuf field int64 committed_storage_mb = 9; - */ - protected $committed_storage_mb = 0; - /** - * The VM's OS. - * - * Generated from protobuf field string os_description = 10; - */ - protected $os_description = ''; - /** - * The VM Boot Option. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.BootOption boot_option = 11; - */ - protected $boot_option = 0; - /** - * The instance type of the VM. - * - * Generated from protobuf field string instance_type = 12; - */ - protected $instance_type = ''; - /** - * The VPC ID the VM belongs to. - * - * Generated from protobuf field string vpc_id = 13; - */ - protected $vpc_id = ''; - /** - * The security groups the VM belongs to. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSecurityGroup security_groups = 14; - */ - private $security_groups; - /** - * The tags of the VM. - * - * Generated from protobuf field map tags = 15; - */ - private $tags; - /** - * The AWS zone of the VM. - * - * Generated from protobuf field string zone = 16; - */ - protected $zone = ''; - /** - * The virtualization type. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmVirtualizationType virtualization_type = 17; - */ - protected $virtualization_type = 0; - /** - * The CPU architecture. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmArchitecture architecture = 18; - */ - protected $architecture = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $vm_id - * The VM ID in AWS. - * @type string $display_name - * The display name of the VM. Note that this value is not necessarily unique. - * @type string $source_id - * The id of the AWS's source this VM is connected to. - * @type string $source_description - * The descriptive name of the AWS's source this VM is connected to. - * @type int $power_state - * Output only. The power state of the VM at the moment list was taken. - * @type int $cpu_count - * The number of cpus the VM has. - * @type int $memory_mb - * The memory size of the VM in MB. - * @type int $disk_count - * The number of disks the VM has. - * @type int|string $committed_storage_mb - * The total size of the storage allocated to the VM in MB. - * @type string $os_description - * The VM's OS. - * @type int $boot_option - * The VM Boot Option. - * @type string $instance_type - * The instance type of the VM. - * @type string $vpc_id - * The VPC ID the VM belongs to. - * @type array<\Google\Cloud\VMMigration\V1\AwsSecurityGroup>|\Google\Protobuf\Internal\RepeatedField $security_groups - * The security groups the VM belongs to. - * @type array|\Google\Protobuf\Internal\MapField $tags - * The tags of the VM. - * @type string $zone - * The AWS zone of the VM. - * @type int $virtualization_type - * The virtualization type. - * @type int $architecture - * The CPU architecture. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The VM ID in AWS. - * - * Generated from protobuf field string vm_id = 1; - * @return string - */ - public function getVmId() - { - return $this->vm_id; - } - - /** - * The VM ID in AWS. - * - * Generated from protobuf field string vm_id = 1; - * @param string $var - * @return $this - */ - public function setVmId($var) - { - GPBUtil::checkString($var, True); - $this->vm_id = $var; - - return $this; - } - - /** - * The display name of the VM. Note that this value is not necessarily unique. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the VM. Note that this value is not necessarily unique. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The id of the AWS's source this VM is connected to. - * - * Generated from protobuf field string source_id = 3; - * @return string - */ - public function getSourceId() - { - return $this->source_id; - } - - /** - * The id of the AWS's source this VM is connected to. - * - * Generated from protobuf field string source_id = 3; - * @param string $var - * @return $this - */ - public function setSourceId($var) - { - GPBUtil::checkString($var, True); - $this->source_id = $var; - - return $this; - } - - /** - * The descriptive name of the AWS's source this VM is connected to. - * - * Generated from protobuf field string source_description = 4; - * @return string - */ - public function getSourceDescription() - { - return $this->source_description; - } - - /** - * The descriptive name of the AWS's source this VM is connected to. - * - * Generated from protobuf field string source_description = 4; - * @param string $var - * @return $this - */ - public function setSourceDescription($var) - { - GPBUtil::checkString($var, True); - $this->source_description = $var; - - return $this; - } - - /** - * Output only. The power state of the VM at the moment list was taken. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.PowerState power_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getPowerState() - { - return $this->power_state; - } - - /** - * Output only. The power state of the VM at the moment list was taken. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.PowerState power_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setPowerState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsVmDetails\PowerState::class); - $this->power_state = $var; - - return $this; - } - - /** - * The number of cpus the VM has. - * - * Generated from protobuf field int32 cpu_count = 6; - * @return int - */ - public function getCpuCount() - { - return $this->cpu_count; - } - - /** - * The number of cpus the VM has. - * - * Generated from protobuf field int32 cpu_count = 6; - * @param int $var - * @return $this - */ - public function setCpuCount($var) - { - GPBUtil::checkInt32($var); - $this->cpu_count = $var; - - return $this; - } - - /** - * The memory size of the VM in MB. - * - * Generated from protobuf field int32 memory_mb = 7; - * @return int - */ - public function getMemoryMb() - { - return $this->memory_mb; - } - - /** - * The memory size of the VM in MB. - * - * Generated from protobuf field int32 memory_mb = 7; - * @param int $var - * @return $this - */ - public function setMemoryMb($var) - { - GPBUtil::checkInt32($var); - $this->memory_mb = $var; - - return $this; - } - - /** - * The number of disks the VM has. - * - * Generated from protobuf field int32 disk_count = 8; - * @return int - */ - public function getDiskCount() - { - return $this->disk_count; - } - - /** - * The number of disks the VM has. - * - * Generated from protobuf field int32 disk_count = 8; - * @param int $var - * @return $this - */ - public function setDiskCount($var) - { - GPBUtil::checkInt32($var); - $this->disk_count = $var; - - return $this; - } - - /** - * The total size of the storage allocated to the VM in MB. - * - * Generated from protobuf field int64 committed_storage_mb = 9; - * @return int|string - */ - public function getCommittedStorageMb() - { - return $this->committed_storage_mb; - } - - /** - * The total size of the storage allocated to the VM in MB. - * - * Generated from protobuf field int64 committed_storage_mb = 9; - * @param int|string $var - * @return $this - */ - public function setCommittedStorageMb($var) - { - GPBUtil::checkInt64($var); - $this->committed_storage_mb = $var; - - return $this; - } - - /** - * The VM's OS. - * - * Generated from protobuf field string os_description = 10; - * @return string - */ - public function getOsDescription() - { - return $this->os_description; - } - - /** - * The VM's OS. - * - * Generated from protobuf field string os_description = 10; - * @param string $var - * @return $this - */ - public function setOsDescription($var) - { - GPBUtil::checkString($var, True); - $this->os_description = $var; - - return $this; - } - - /** - * The VM Boot Option. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.BootOption boot_option = 11; - * @return int - */ - public function getBootOption() - { - return $this->boot_option; - } - - /** - * The VM Boot Option. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.BootOption boot_option = 11; - * @param int $var - * @return $this - */ - public function setBootOption($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsVmDetails\BootOption::class); - $this->boot_option = $var; - - return $this; - } - - /** - * The instance type of the VM. - * - * Generated from protobuf field string instance_type = 12; - * @return string - */ - public function getInstanceType() - { - return $this->instance_type; - } - - /** - * The instance type of the VM. - * - * Generated from protobuf field string instance_type = 12; - * @param string $var - * @return $this - */ - public function setInstanceType($var) - { - GPBUtil::checkString($var, True); - $this->instance_type = $var; - - return $this; - } - - /** - * The VPC ID the VM belongs to. - * - * Generated from protobuf field string vpc_id = 13; - * @return string - */ - public function getVpcId() - { - return $this->vpc_id; - } - - /** - * The VPC ID the VM belongs to. - * - * Generated from protobuf field string vpc_id = 13; - * @param string $var - * @return $this - */ - public function setVpcId($var) - { - GPBUtil::checkString($var, True); - $this->vpc_id = $var; - - return $this; - } - - /** - * The security groups the VM belongs to. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSecurityGroup security_groups = 14; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSecurityGroups() - { - return $this->security_groups; - } - - /** - * The security groups the VM belongs to. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSecurityGroup security_groups = 14; - * @param array<\Google\Cloud\VMMigration\V1\AwsSecurityGroup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSecurityGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\AwsSecurityGroup::class); - $this->security_groups = $arr; - - return $this; - } - - /** - * The tags of the VM. - * - * Generated from protobuf field map tags = 15; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTags() - { - return $this->tags; - } - - /** - * The tags of the VM. - * - * Generated from protobuf field map tags = 15; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - - /** - * The AWS zone of the VM. - * - * Generated from protobuf field string zone = 16; - * @return string - */ - public function getZone() - { - return $this->zone; - } - - /** - * The AWS zone of the VM. - * - * Generated from protobuf field string zone = 16; - * @param string $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkString($var, True); - $this->zone = $var; - - return $this; - } - - /** - * The virtualization type. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmVirtualizationType virtualization_type = 17; - * @return int - */ - public function getVirtualizationType() - { - return $this->virtualization_type; - } - - /** - * The virtualization type. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmVirtualizationType virtualization_type = 17; - * @param int $var - * @return $this - */ - public function setVirtualizationType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsVmDetails\VmVirtualizationType::class); - $this->virtualization_type = $var; - - return $this; - } - - /** - * The CPU architecture. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmArchitecture architecture = 18; - * @return int - */ - public function getArchitecture() - { - return $this->architecture; - } - - /** - * The CPU architecture. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmArchitecture architecture = 18; - * @param int $var - * @return $this - */ - public function setArchitecture($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsVmDetails\VmArchitecture::class); - $this->architecture = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/BootOption.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/BootOption.php deleted file mode 100644 index 208852fafad7..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/BootOption.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.vmmigration.v1.AwsVmDetails.BootOption - */ -class BootOption -{ - /** - * The boot option is unknown. - * - * Generated from protobuf enum BOOT_OPTION_UNSPECIFIED = 0; - */ - const BOOT_OPTION_UNSPECIFIED = 0; - /** - * The boot option is UEFI. - * - * Generated from protobuf enum EFI = 1; - */ - const EFI = 1; - /** - * The boot option is LEGACY-BIOS. - * - * Generated from protobuf enum BIOS = 2; - */ - const BIOS = 2; - - private static $valueToName = [ - self::BOOT_OPTION_UNSPECIFIED => 'BOOT_OPTION_UNSPECIFIED', - self::EFI => 'EFI', - self::BIOS => 'BIOS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BootOption::class, \Google\Cloud\VMMigration\V1\AwsVmDetails_BootOption::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/PowerState.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/PowerState.php deleted file mode 100644 index 5d90c29f7821..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/PowerState.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.vmmigration.v1.AwsVmDetails.PowerState - */ -class PowerState -{ - /** - * Power state is not specified. - * - * Generated from protobuf enum POWER_STATE_UNSPECIFIED = 0; - */ - const POWER_STATE_UNSPECIFIED = 0; - /** - * The VM is turned on. - * - * Generated from protobuf enum ON = 1; - */ - const ON = 1; - /** - * The VM is turned off. - * - * Generated from protobuf enum OFF = 2; - */ - const OFF = 2; - /** - * The VM is suspended. This is similar to hibernation or sleep - * mode. - * - * Generated from protobuf enum SUSPENDED = 3; - */ - const SUSPENDED = 3; - /** - * The VM is starting. - * - * Generated from protobuf enum PENDING = 4; - */ - const PENDING = 4; - - private static $valueToName = [ - self::POWER_STATE_UNSPECIFIED => 'POWER_STATE_UNSPECIFIED', - self::ON => 'ON', - self::OFF => 'OFF', - self::SUSPENDED => 'SUSPENDED', - self::PENDING => 'PENDING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PowerState::class, \Google\Cloud\VMMigration\V1\AwsVmDetails_PowerState::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmArchitecture.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmArchitecture.php deleted file mode 100644 index 7f6c05454f56..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmArchitecture.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.vmmigration.v1.AwsVmDetails.VmArchitecture - */ -class VmArchitecture -{ - /** - * The architecture is unknown. - * - * Generated from protobuf enum VM_ARCHITECTURE_UNSPECIFIED = 0; - */ - const VM_ARCHITECTURE_UNSPECIFIED = 0; - /** - * The architecture is I386. - * - * Generated from protobuf enum I386 = 1; - */ - const I386 = 1; - /** - * The architecture is X86_64. - * - * Generated from protobuf enum X86_64 = 2; - */ - const X86_64 = 2; - /** - * The architecture is ARM64. - * - * Generated from protobuf enum ARM64 = 3; - */ - const ARM64 = 3; - /** - * The architecture is X86_64_MAC. - * - * Generated from protobuf enum X86_64_MAC = 4; - */ - const X86_64_MAC = 4; - - private static $valueToName = [ - self::VM_ARCHITECTURE_UNSPECIFIED => 'VM_ARCHITECTURE_UNSPECIFIED', - self::I386 => 'I386', - self::X86_64 => 'X86_64', - self::ARM64 => 'ARM64', - self::X86_64_MAC => 'X86_64_MAC', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VmArchitecture::class, \Google\Cloud\VMMigration\V1\AwsVmDetails_VmArchitecture::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmVirtualizationType.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmVirtualizationType.php deleted file mode 100644 index ce8c03686351..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmVirtualizationType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.vmmigration.v1.AwsVmDetails.VmVirtualizationType - */ -class VmVirtualizationType -{ - /** - * The virtualization type is unknown. - * - * Generated from protobuf enum VM_VIRTUALIZATION_TYPE_UNSPECIFIED = 0; - */ - const VM_VIRTUALIZATION_TYPE_UNSPECIFIED = 0; - /** - * The virtualziation type is HVM. - * - * Generated from protobuf enum HVM = 1; - */ - const HVM = 1; - /** - * The virtualziation type is PARAVIRTUAL. - * - * Generated from protobuf enum PARAVIRTUAL = 2; - */ - const PARAVIRTUAL = 2; - - private static $valueToName = [ - self::VM_VIRTUALIZATION_TYPE_UNSPECIFIED => 'VM_VIRTUALIZATION_TYPE_UNSPECIFIED', - self::HVM => 'HVM', - self::PARAVIRTUAL => 'PARAVIRTUAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VmVirtualizationType::class, \Google\Cloud\VMMigration\V1\AwsVmDetails_VmVirtualizationType::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmsDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmsDetails.php deleted file mode 100644 index c5027ecbc764..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmsDetails.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.vmmigration.v1.AwsVmsDetails - */ -class AwsVmsDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The details of the AWS VMs. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsVmDetails details = 1; - */ - private $details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VMMigration\V1\AwsVmDetails>|\Google\Protobuf\Internal\RepeatedField $details - * The details of the AWS VMs. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The details of the AWS VMs. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsVmDetails details = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDetails() - { - return $this->details; - } - - /** - * The details of the AWS VMs. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsVmDetails details = 1; - * @param array<\Google\Cloud\VMMigration\V1\AwsVmDetails>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\AwsVmDetails::class); - $this->details = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobRequest.php deleted file mode 100644 index 77cdadd56226..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.CancelCloneJobRequest - */ -class CancelCloneJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The clone job id - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The clone job id - * Please see {@see VmMigrationClient::cloneJobName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\CancelCloneJobRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The clone job id - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The clone job id - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The clone job id - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobResponse.php deleted file mode 100644 index cd231e22cc6d..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.CancelCloneJobResponse - */ -class CancelCloneJobResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobRequest.php deleted file mode 100644 index 71738014938e..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.CancelCutoverJobRequest - */ -class CancelCutoverJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The cutover job id - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The cutover job id - * Please see {@see VmMigrationClient::cutoverJobName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\CancelCutoverJobRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The cutover job id - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The cutover job id - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The cutover job id - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobResponse.php deleted file mode 100644 index 9c3a234caabd..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.CancelCutoverJobResponse - */ -class CancelCutoverJobResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob.php deleted file mode 100644 index dd34db7de2c9..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob.php +++ /dev/null @@ -1,370 +0,0 @@ -google.cloud.vmmigration.v1.CloneJob - */ -class CloneJob extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the clone job was created (as an API call, not when - * it was actually created in the target). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the clone job was ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. The name of the clone. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. State of the clone job. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time the state was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_time = null; - /** - * Output only. Provides details for the errors that led to the Clone Job's - * state. - * - * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - /** - * Output only. The clone steps list representing its progress. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneStep steps = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $steps; - protected $target_vm_details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails $compute_engine_target_details - * Output only. Details of the target VM in Compute Engine. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the clone job was created (as an API call, not when - * it was actually created in the target). - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the clone job was ended. - * @type string $name - * Output only. The name of the clone. - * @type int $state - * Output only. State of the clone job. - * @type \Google\Protobuf\Timestamp $state_time - * Output only. The time the state was last updated. - * @type \Google\Rpc\Status $error - * Output only. Provides details for the errors that led to the Clone Job's - * state. - * @type array<\Google\Cloud\VMMigration\V1\CloneStep>|\Google\Protobuf\Internal\RepeatedField $steps - * Output only. The clone steps list representing its progress. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Details of the target VM in Compute Engine. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDetails compute_engine_target_details = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails|null - */ - public function getComputeEngineTargetDetails() - { - return $this->readOneof(20); - } - - public function hasComputeEngineTargetDetails() - { - return $this->hasOneof(20); - } - - /** - * Output only. Details of the target VM in Compute Engine. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDetails compute_engine_target_details = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails $var - * @return $this - */ - public function setComputeEngineTargetDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails::class); - $this->writeOneof(20, $var); - - return $this; - } - - /** - * Output only. The time the clone job was created (as an API call, not when - * it was actually created in the target). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the clone job was created (as an API call, not when - * it was actually created in the target). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the clone job was ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the clone job was ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. The name of the clone. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the clone. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. State of the clone job. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the clone job. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\CloneJob\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time the state was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStateTime() - { - return $this->state_time; - } - - public function hasStateTime() - { - return isset($this->state_time); - } - - public function clearStateTime() - { - unset($this->state_time); - } - - /** - * Output only. The time the state was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->state_time = $var; - - return $this; - } - - /** - * Output only. Provides details for the errors that led to the Clone Job's - * state. - * - * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. Provides details for the errors that led to the Clone Job's - * state. - * - * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * Output only. The clone steps list representing its progress. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneStep steps = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSteps() - { - return $this->steps; - } - - /** - * Output only. The clone steps list representing its progress. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneStep steps = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\CloneStep>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSteps($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CloneStep::class); - $this->steps = $arr; - - return $this; - } - - /** - * @return string - */ - public function getTargetVmDetails() - { - return $this->whichOneof("target_vm_details"); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob/State.php deleted file mode 100644 index a60e309260f0..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob/State.php +++ /dev/null @@ -1,100 +0,0 @@ -google.cloud.vmmigration.v1.CloneJob.State - */ -class State -{ - /** - * The state is unknown. This is used for API compatibility only and is not - * used by the system. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The clone job has not yet started. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The clone job is active and running. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The clone job finished with errors. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * The clone job finished successfully. - * - * Generated from protobuf enum SUCCEEDED = 4; - */ - const SUCCEEDED = 4; - /** - * The clone job was cancelled. - * - * Generated from protobuf enum CANCELLED = 5; - */ - const CANCELLED = 5; - /** - * The clone job is being cancelled. - * - * Generated from protobuf enum CANCELLING = 6; - */ - const CANCELLING = 6; - /** - * OS adaptation is running as part of the clone job to generate license. - * - * Generated from protobuf enum ADAPTING_OS = 7; - */ - const ADAPTING_OS = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::ACTIVE => 'ACTIVE', - self::FAILED => 'FAILED', - self::SUCCEEDED => 'SUCCEEDED', - self::CANCELLED => 'CANCELLED', - self::CANCELLING => 'CANCELLING', - self::ADAPTING_OS => 'ADAPTING_OS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VMMigration\V1\CloneJob_State::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneStep.php deleted file mode 100644 index 38ffc545d9b1..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneStep.php +++ /dev/null @@ -1,229 +0,0 @@ -google.cloud.vmmigration.v1.CloneStep - */ -class CloneStep extends \Google\Protobuf\Internal\Message -{ - /** - * The time the step has started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time the step has ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - protected $step; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VMMigration\V1\AdaptingOSStep $adapting_os - * Adapting OS step. - * @type \Google\Cloud\VMMigration\V1\PreparingVMDisksStep $preparing_vm_disks - * Preparing VM disks step. - * @type \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep $instantiating_migrated_vm - * Instantiating migrated VM step. - * @type \Google\Protobuf\Timestamp $start_time - * The time the step has started. - * @type \Google\Protobuf\Timestamp $end_time - * The time the step has ended. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Adapting OS step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AdaptingOSStep adapting_os = 3; - * @return \Google\Cloud\VMMigration\V1\AdaptingOSStep|null - */ - public function getAdaptingOs() - { - return $this->readOneof(3); - } - - public function hasAdaptingOs() - { - return $this->hasOneof(3); - } - - /** - * Adapting OS step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AdaptingOSStep adapting_os = 3; - * @param \Google\Cloud\VMMigration\V1\AdaptingOSStep $var - * @return $this - */ - public function setAdaptingOs($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AdaptingOSStep::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Preparing VM disks step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.PreparingVMDisksStep preparing_vm_disks = 4; - * @return \Google\Cloud\VMMigration\V1\PreparingVMDisksStep|null - */ - public function getPreparingVmDisks() - { - return $this->readOneof(4); - } - - public function hasPreparingVmDisks() - { - return $this->hasOneof(4); - } - - /** - * Preparing VM disks step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.PreparingVMDisksStep preparing_vm_disks = 4; - * @param \Google\Cloud\VMMigration\V1\PreparingVMDisksStep $var - * @return $this - */ - public function setPreparingVmDisks($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\PreparingVMDisksStep::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Instantiating migrated VM step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.InstantiatingMigratedVMStep instantiating_migrated_vm = 5; - * @return \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep|null - */ - public function getInstantiatingMigratedVm() - { - return $this->readOneof(5); - } - - public function hasInstantiatingMigratedVm() - { - return $this->hasOneof(5); - } - - /** - * Instantiating migrated VM step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.InstantiatingMigratedVMStep instantiating_migrated_vm = 5; - * @param \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep $var - * @return $this - */ - public function setInstantiatingMigratedVm($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * The time the step has started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time the step has started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time the step has ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time the step has ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getStep() - { - return $this->whichOneof("step"); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineBootOption.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineBootOption.php deleted file mode 100644 index efcc0ffce13f..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineBootOption.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.vmmigration.v1.ComputeEngineBootOption - */ -class ComputeEngineBootOption -{ - /** - * The boot option is unknown. - * - * Generated from protobuf enum COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED = 0; - */ - const COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED = 0; - /** - * The boot option is EFI. - * - * Generated from protobuf enum COMPUTE_ENGINE_BOOT_OPTION_EFI = 1; - */ - const COMPUTE_ENGINE_BOOT_OPTION_EFI = 1; - /** - * The boot option is BIOS. - * - * Generated from protobuf enum COMPUTE_ENGINE_BOOT_OPTION_BIOS = 2; - */ - const COMPUTE_ENGINE_BOOT_OPTION_BIOS = 2; - - private static $valueToName = [ - self::COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED => 'COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED', - self::COMPUTE_ENGINE_BOOT_OPTION_EFI => 'COMPUTE_ENGINE_BOOT_OPTION_EFI', - self::COMPUTE_ENGINE_BOOT_OPTION_BIOS => 'COMPUTE_ENGINE_BOOT_OPTION_BIOS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDiskType.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDiskType.php deleted file mode 100644 index 6dd7104b8f4d..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDiskType.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.vmmigration.v1.ComputeEngineDiskType - */ -class ComputeEngineDiskType -{ - /** - * An unspecified disk type. Will be used as STANDARD. - * - * Generated from protobuf enum COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED = 0; - */ - const COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED = 0; - /** - * A Standard disk type. - * - * Generated from protobuf enum COMPUTE_ENGINE_DISK_TYPE_STANDARD = 1; - */ - const COMPUTE_ENGINE_DISK_TYPE_STANDARD = 1; - /** - * SSD hard disk type. - * - * Generated from protobuf enum COMPUTE_ENGINE_DISK_TYPE_SSD = 2; - */ - const COMPUTE_ENGINE_DISK_TYPE_SSD = 2; - /** - * An alternative to SSD persistent disks that balance performance and - * cost. - * - * Generated from protobuf enum COMPUTE_ENGINE_DISK_TYPE_BALANCED = 3; - */ - const COMPUTE_ENGINE_DISK_TYPE_BALANCED = 3; - - private static $valueToName = [ - self::COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED => 'COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED', - self::COMPUTE_ENGINE_DISK_TYPE_STANDARD => 'COMPUTE_ENGINE_DISK_TYPE_STANDARD', - self::COMPUTE_ENGINE_DISK_TYPE_SSD => 'COMPUTE_ENGINE_DISK_TYPE_SSD', - self::COMPUTE_ENGINE_DISK_TYPE_BALANCED => 'COMPUTE_ENGINE_DISK_TYPE_BALANCED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineLicenseType.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineLicenseType.php deleted file mode 100644 index 427ea82b29bf..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineLicenseType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.vmmigration.v1.ComputeEngineLicenseType - */ -class ComputeEngineLicenseType -{ - /** - * The license type is the default for the OS. - * - * Generated from protobuf enum COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT = 0; - */ - const COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT = 0; - /** - * The license type is Pay As You Go license type. - * - * Generated from protobuf enum COMPUTE_ENGINE_LICENSE_TYPE_PAYG = 1; - */ - const COMPUTE_ENGINE_LICENSE_TYPE_PAYG = 1; - /** - * The license type is Bring Your Own License type. - * - * Generated from protobuf enum COMPUTE_ENGINE_LICENSE_TYPE_BYOL = 2; - */ - const COMPUTE_ENGINE_LICENSE_TYPE_BYOL = 2; - - private static $valueToName = [ - self::COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT => 'COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT', - self::COMPUTE_ENGINE_LICENSE_TYPE_PAYG => 'COMPUTE_ENGINE_LICENSE_TYPE_PAYG', - self::COMPUTE_ENGINE_LICENSE_TYPE_BYOL => 'COMPUTE_ENGINE_LICENSE_TYPE_BYOL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDefaults.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDefaults.php deleted file mode 100644 index 2745c0b602a8..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDefaults.php +++ /dev/null @@ -1,674 +0,0 @@ -google.cloud.vmmigration.v1.ComputeEngineTargetDefaults - */ -class ComputeEngineTargetDefaults extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the VM to create. - * - * Generated from protobuf field string vm_name = 1; - */ - protected $vm_name = ''; - /** - * The full path of the resource of type TargetProject which represents the - * Compute Engine project in which to create this VM. - * - * Generated from protobuf field string target_project = 2 [(.google.api.resource_reference) = { - */ - protected $target_project = ''; - /** - * The zone in which to create the VM. - * - * Generated from protobuf field string zone = 3; - */ - protected $zone = ''; - /** - * The machine type series to create the VM with. - * - * Generated from protobuf field string machine_type_series = 4; - */ - protected $machine_type_series = ''; - /** - * The machine type to create the VM with. - * - * Generated from protobuf field string machine_type = 5; - */ - protected $machine_type = ''; - /** - * A map of network tags to associate with the VM. - * - * Generated from protobuf field repeated string network_tags = 6; - */ - private $network_tags; - /** - * List of NICs connected to this VM. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; - */ - private $network_interfaces; - /** - * The service account to associate the VM with. - * - * Generated from protobuf field string service_account = 8; - */ - protected $service_account = ''; - /** - * The disk type to use in the VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; - */ - protected $disk_type = 0; - /** - * A map of labels to associate with the VM. - * - * Generated from protobuf field map labels = 10; - */ - private $labels; - /** - * The license type to use in OS adaptation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; - */ - protected $license_type = 0; - /** - * Output only. The OS license returned from the adaptation module report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $applied_license = null; - /** - * Compute instance scheduling information (if empty default is used). - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; - */ - protected $compute_scheduling = null; - /** - * Defines whether the instance has Secure Boot enabled. - * This can be set to true only if the vm boot option is EFI. - * - * Generated from protobuf field bool secure_boot = 14; - */ - protected $secure_boot = false; - /** - * Output only. The VM Boot Option, as set in the source vm. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $boot_option = 0; - /** - * The metadata key/value pairs to assign to the VM. - * - * Generated from protobuf field map metadata = 16; - */ - private $metadata; - /** - * Additional licenses to assign to the VM. - * - * Generated from protobuf field repeated string additional_licenses = 17; - */ - private $additional_licenses; - /** - * The hostname to assign to the VM. - * - * Generated from protobuf field string hostname = 18; - */ - protected $hostname = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $vm_name - * The name of the VM to create. - * @type string $target_project - * The full path of the resource of type TargetProject which represents the - * Compute Engine project in which to create this VM. - * @type string $zone - * The zone in which to create the VM. - * @type string $machine_type_series - * The machine type series to create the VM with. - * @type string $machine_type - * The machine type to create the VM with. - * @type array|\Google\Protobuf\Internal\RepeatedField $network_tags - * A map of network tags to associate with the VM. - * @type array<\Google\Cloud\VMMigration\V1\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $network_interfaces - * List of NICs connected to this VM. - * @type string $service_account - * The service account to associate the VM with. - * @type int $disk_type - * The disk type to use in the VM. - * @type array|\Google\Protobuf\Internal\MapField $labels - * A map of labels to associate with the VM. - * @type int $license_type - * The license type to use in OS adaptation. - * @type \Google\Cloud\VMMigration\V1\AppliedLicense $applied_license - * Output only. The OS license returned from the adaptation module report. - * @type \Google\Cloud\VMMigration\V1\ComputeScheduling $compute_scheduling - * Compute instance scheduling information (if empty default is used). - * @type bool $secure_boot - * Defines whether the instance has Secure Boot enabled. - * This can be set to true only if the vm boot option is EFI. - * @type int $boot_option - * Output only. The VM Boot Option, as set in the source vm. - * @type array|\Google\Protobuf\Internal\MapField $metadata - * The metadata key/value pairs to assign to the VM. - * @type array|\Google\Protobuf\Internal\RepeatedField $additional_licenses - * Additional licenses to assign to the VM. - * @type string $hostname - * The hostname to assign to the VM. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The name of the VM to create. - * - * Generated from protobuf field string vm_name = 1; - * @return string - */ - public function getVmName() - { - return $this->vm_name; - } - - /** - * The name of the VM to create. - * - * Generated from protobuf field string vm_name = 1; - * @param string $var - * @return $this - */ - public function setVmName($var) - { - GPBUtil::checkString($var, True); - $this->vm_name = $var; - - return $this; - } - - /** - * The full path of the resource of type TargetProject which represents the - * Compute Engine project in which to create this VM. - * - * Generated from protobuf field string target_project = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getTargetProject() - { - return $this->target_project; - } - - /** - * The full path of the resource of type TargetProject which represents the - * Compute Engine project in which to create this VM. - * - * Generated from protobuf field string target_project = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTargetProject($var) - { - GPBUtil::checkString($var, True); - $this->target_project = $var; - - return $this; - } - - /** - * The zone in which to create the VM. - * - * Generated from protobuf field string zone = 3; - * @return string - */ - public function getZone() - { - return $this->zone; - } - - /** - * The zone in which to create the VM. - * - * Generated from protobuf field string zone = 3; - * @param string $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkString($var, True); - $this->zone = $var; - - return $this; - } - - /** - * The machine type series to create the VM with. - * - * Generated from protobuf field string machine_type_series = 4; - * @return string - */ - public function getMachineTypeSeries() - { - return $this->machine_type_series; - } - - /** - * The machine type series to create the VM with. - * - * Generated from protobuf field string machine_type_series = 4; - * @param string $var - * @return $this - */ - public function setMachineTypeSeries($var) - { - GPBUtil::checkString($var, True); - $this->machine_type_series = $var; - - return $this; - } - - /** - * The machine type to create the VM with. - * - * Generated from protobuf field string machine_type = 5; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * The machine type to create the VM with. - * - * Generated from protobuf field string machine_type = 5; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * A map of network tags to associate with the VM. - * - * Generated from protobuf field repeated string network_tags = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkTags() - { - return $this->network_tags; - } - - /** - * A map of network tags to associate with the VM. - * - * Generated from protobuf field repeated string network_tags = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->network_tags = $arr; - - return $this; - } - - /** - * List of NICs connected to this VM. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkInterfaces() - { - return $this->network_interfaces; - } - - /** - * List of NICs connected to this VM. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; - * @param array<\Google\Cloud\VMMigration\V1\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkInterfaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\NetworkInterface::class); - $this->network_interfaces = $arr; - - return $this; - } - - /** - * The service account to associate the VM with. - * - * Generated from protobuf field string service_account = 8; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * The service account to associate the VM with. - * - * Generated from protobuf field string service_account = 8; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * The disk type to use in the VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; - * @return int - */ - public function getDiskType() - { - return $this->disk_type; - } - - /** - * The disk type to use in the VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; - * @param int $var - * @return $this - */ - public function setDiskType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineDiskType::class); - $this->disk_type = $var; - - return $this; - } - - /** - * A map of labels to associate with the VM. - * - * Generated from protobuf field map labels = 10; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * A map of labels to associate with the VM. - * - * Generated from protobuf field map labels = 10; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * The license type to use in OS adaptation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; - * @return int - */ - public function getLicenseType() - { - return $this->license_type; - } - - /** - * The license type to use in OS adaptation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; - * @param int $var - * @return $this - */ - public function setLicenseType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineLicenseType::class); - $this->license_type = $var; - - return $this; - } - - /** - * Output only. The OS license returned from the adaptation module report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\AppliedLicense|null - */ - public function getAppliedLicense() - { - return $this->applied_license; - } - - public function hasAppliedLicense() - { - return isset($this->applied_license); - } - - public function clearAppliedLicense() - { - unset($this->applied_license); - } - - /** - * Output only. The OS license returned from the adaptation module report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\AppliedLicense $var - * @return $this - */ - public function setAppliedLicense($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AppliedLicense::class); - $this->applied_license = $var; - - return $this; - } - - /** - * Compute instance scheduling information (if empty default is used). - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; - * @return \Google\Cloud\VMMigration\V1\ComputeScheduling|null - */ - public function getComputeScheduling() - { - return $this->compute_scheduling; - } - - public function hasComputeScheduling() - { - return isset($this->compute_scheduling); - } - - public function clearComputeScheduling() - { - unset($this->compute_scheduling); - } - - /** - * Compute instance scheduling information (if empty default is used). - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; - * @param \Google\Cloud\VMMigration\V1\ComputeScheduling $var - * @return $this - */ - public function setComputeScheduling($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeScheduling::class); - $this->compute_scheduling = $var; - - return $this; - } - - /** - * Defines whether the instance has Secure Boot enabled. - * This can be set to true only if the vm boot option is EFI. - * - * Generated from protobuf field bool secure_boot = 14; - * @return bool - */ - public function getSecureBoot() - { - return $this->secure_boot; - } - - /** - * Defines whether the instance has Secure Boot enabled. - * This can be set to true only if the vm boot option is EFI. - * - * Generated from protobuf field bool secure_boot = 14; - * @param bool $var - * @return $this - */ - public function setSecureBoot($var) - { - GPBUtil::checkBool($var); - $this->secure_boot = $var; - - return $this; - } - - /** - * Output only. The VM Boot Option, as set in the source vm. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getBootOption() - { - return $this->boot_option; - } - - /** - * Output only. The VM Boot Option, as set in the source vm. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setBootOption($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineBootOption::class); - $this->boot_option = $var; - - return $this; - } - - /** - * The metadata key/value pairs to assign to the VM. - * - * Generated from protobuf field map metadata = 16; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * The metadata key/value pairs to assign to the VM. - * - * Generated from protobuf field map metadata = 16; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata = $arr; - - return $this; - } - - /** - * Additional licenses to assign to the VM. - * - * Generated from protobuf field repeated string additional_licenses = 17; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdditionalLicenses() - { - return $this->additional_licenses; - } - - /** - * Additional licenses to assign to the VM. - * - * Generated from protobuf field repeated string additional_licenses = 17; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdditionalLicenses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->additional_licenses = $arr; - - return $this; - } - - /** - * The hostname to assign to the VM. - * - * Generated from protobuf field string hostname = 18; - * @return string - */ - public function getHostname() - { - return $this->hostname; - } - - /** - * The hostname to assign to the VM. - * - * Generated from protobuf field string hostname = 18; - * @param string $var - * @return $this - */ - public function setHostname($var) - { - GPBUtil::checkString($var, True); - $this->hostname = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDetails.php deleted file mode 100644 index aaca78c78818..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDetails.php +++ /dev/null @@ -1,670 +0,0 @@ -google.cloud.vmmigration.v1.ComputeEngineTargetDetails - */ -class ComputeEngineTargetDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the VM to create. - * - * Generated from protobuf field string vm_name = 1; - */ - protected $vm_name = ''; - /** - * The Google Cloud target project ID or project name. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * The zone in which to create the VM. - * - * Generated from protobuf field string zone = 3; - */ - protected $zone = ''; - /** - * The machine type series to create the VM with. - * - * Generated from protobuf field string machine_type_series = 4; - */ - protected $machine_type_series = ''; - /** - * The machine type to create the VM with. - * - * Generated from protobuf field string machine_type = 5; - */ - protected $machine_type = ''; - /** - * A map of network tags to associate with the VM. - * - * Generated from protobuf field repeated string network_tags = 6; - */ - private $network_tags; - /** - * List of NICs connected to this VM. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; - */ - private $network_interfaces; - /** - * The service account to associate the VM with. - * - * Generated from protobuf field string service_account = 8; - */ - protected $service_account = ''; - /** - * The disk type to use in the VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; - */ - protected $disk_type = 0; - /** - * A map of labels to associate with the VM. - * - * Generated from protobuf field map labels = 10; - */ - private $labels; - /** - * The license type to use in OS adaptation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; - */ - protected $license_type = 0; - /** - * The OS license returned from the adaptation module report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12; - */ - protected $applied_license = null; - /** - * Compute instance scheduling information (if empty default is used). - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; - */ - protected $compute_scheduling = null; - /** - * Defines whether the instance has Secure Boot enabled. - * This can be set to true only if the vm boot option is EFI. - * - * Generated from protobuf field bool secure_boot = 14; - */ - protected $secure_boot = false; - /** - * The VM Boot Option, as set in the source vm. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15; - */ - protected $boot_option = 0; - /** - * The metadata key/value pairs to assign to the VM. - * - * Generated from protobuf field map metadata = 16; - */ - private $metadata; - /** - * Additional licenses to assign to the VM. - * - * Generated from protobuf field repeated string additional_licenses = 17; - */ - private $additional_licenses; - /** - * The hostname to assign to the VM. - * - * Generated from protobuf field string hostname = 18; - */ - protected $hostname = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $vm_name - * The name of the VM to create. - * @type string $project - * The Google Cloud target project ID or project name. - * @type string $zone - * The zone in which to create the VM. - * @type string $machine_type_series - * The machine type series to create the VM with. - * @type string $machine_type - * The machine type to create the VM with. - * @type array|\Google\Protobuf\Internal\RepeatedField $network_tags - * A map of network tags to associate with the VM. - * @type array<\Google\Cloud\VMMigration\V1\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $network_interfaces - * List of NICs connected to this VM. - * @type string $service_account - * The service account to associate the VM with. - * @type int $disk_type - * The disk type to use in the VM. - * @type array|\Google\Protobuf\Internal\MapField $labels - * A map of labels to associate with the VM. - * @type int $license_type - * The license type to use in OS adaptation. - * @type \Google\Cloud\VMMigration\V1\AppliedLicense $applied_license - * The OS license returned from the adaptation module report. - * @type \Google\Cloud\VMMigration\V1\ComputeScheduling $compute_scheduling - * Compute instance scheduling information (if empty default is used). - * @type bool $secure_boot - * Defines whether the instance has Secure Boot enabled. - * This can be set to true only if the vm boot option is EFI. - * @type int $boot_option - * The VM Boot Option, as set in the source vm. - * @type array|\Google\Protobuf\Internal\MapField $metadata - * The metadata key/value pairs to assign to the VM. - * @type array|\Google\Protobuf\Internal\RepeatedField $additional_licenses - * Additional licenses to assign to the VM. - * @type string $hostname - * The hostname to assign to the VM. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The name of the VM to create. - * - * Generated from protobuf field string vm_name = 1; - * @return string - */ - public function getVmName() - { - return $this->vm_name; - } - - /** - * The name of the VM to create. - * - * Generated from protobuf field string vm_name = 1; - * @param string $var - * @return $this - */ - public function setVmName($var) - { - GPBUtil::checkString($var, True); - $this->vm_name = $var; - - return $this; - } - - /** - * The Google Cloud target project ID or project name. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * The Google Cloud target project ID or project name. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * The zone in which to create the VM. - * - * Generated from protobuf field string zone = 3; - * @return string - */ - public function getZone() - { - return $this->zone; - } - - /** - * The zone in which to create the VM. - * - * Generated from protobuf field string zone = 3; - * @param string $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkString($var, True); - $this->zone = $var; - - return $this; - } - - /** - * The machine type series to create the VM with. - * - * Generated from protobuf field string machine_type_series = 4; - * @return string - */ - public function getMachineTypeSeries() - { - return $this->machine_type_series; - } - - /** - * The machine type series to create the VM with. - * - * Generated from protobuf field string machine_type_series = 4; - * @param string $var - * @return $this - */ - public function setMachineTypeSeries($var) - { - GPBUtil::checkString($var, True); - $this->machine_type_series = $var; - - return $this; - } - - /** - * The machine type to create the VM with. - * - * Generated from protobuf field string machine_type = 5; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * The machine type to create the VM with. - * - * Generated from protobuf field string machine_type = 5; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * A map of network tags to associate with the VM. - * - * Generated from protobuf field repeated string network_tags = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkTags() - { - return $this->network_tags; - } - - /** - * A map of network tags to associate with the VM. - * - * Generated from protobuf field repeated string network_tags = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->network_tags = $arr; - - return $this; - } - - /** - * List of NICs connected to this VM. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkInterfaces() - { - return $this->network_interfaces; - } - - /** - * List of NICs connected to this VM. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; - * @param array<\Google\Cloud\VMMigration\V1\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkInterfaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\NetworkInterface::class); - $this->network_interfaces = $arr; - - return $this; - } - - /** - * The service account to associate the VM with. - * - * Generated from protobuf field string service_account = 8; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * The service account to associate the VM with. - * - * Generated from protobuf field string service_account = 8; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * The disk type to use in the VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; - * @return int - */ - public function getDiskType() - { - return $this->disk_type; - } - - /** - * The disk type to use in the VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; - * @param int $var - * @return $this - */ - public function setDiskType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineDiskType::class); - $this->disk_type = $var; - - return $this; - } - - /** - * A map of labels to associate with the VM. - * - * Generated from protobuf field map labels = 10; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * A map of labels to associate with the VM. - * - * Generated from protobuf field map labels = 10; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * The license type to use in OS adaptation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; - * @return int - */ - public function getLicenseType() - { - return $this->license_type; - } - - /** - * The license type to use in OS adaptation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; - * @param int $var - * @return $this - */ - public function setLicenseType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineLicenseType::class); - $this->license_type = $var; - - return $this; - } - - /** - * The OS license returned from the adaptation module report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12; - * @return \Google\Cloud\VMMigration\V1\AppliedLicense|null - */ - public function getAppliedLicense() - { - return $this->applied_license; - } - - public function hasAppliedLicense() - { - return isset($this->applied_license); - } - - public function clearAppliedLicense() - { - unset($this->applied_license); - } - - /** - * The OS license returned from the adaptation module report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12; - * @param \Google\Cloud\VMMigration\V1\AppliedLicense $var - * @return $this - */ - public function setAppliedLicense($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AppliedLicense::class); - $this->applied_license = $var; - - return $this; - } - - /** - * Compute instance scheduling information (if empty default is used). - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; - * @return \Google\Cloud\VMMigration\V1\ComputeScheduling|null - */ - public function getComputeScheduling() - { - return $this->compute_scheduling; - } - - public function hasComputeScheduling() - { - return isset($this->compute_scheduling); - } - - public function clearComputeScheduling() - { - unset($this->compute_scheduling); - } - - /** - * Compute instance scheduling information (if empty default is used). - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; - * @param \Google\Cloud\VMMigration\V1\ComputeScheduling $var - * @return $this - */ - public function setComputeScheduling($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeScheduling::class); - $this->compute_scheduling = $var; - - return $this; - } - - /** - * Defines whether the instance has Secure Boot enabled. - * This can be set to true only if the vm boot option is EFI. - * - * Generated from protobuf field bool secure_boot = 14; - * @return bool - */ - public function getSecureBoot() - { - return $this->secure_boot; - } - - /** - * Defines whether the instance has Secure Boot enabled. - * This can be set to true only if the vm boot option is EFI. - * - * Generated from protobuf field bool secure_boot = 14; - * @param bool $var - * @return $this - */ - public function setSecureBoot($var) - { - GPBUtil::checkBool($var); - $this->secure_boot = $var; - - return $this; - } - - /** - * The VM Boot Option, as set in the source vm. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15; - * @return int - */ - public function getBootOption() - { - return $this->boot_option; - } - - /** - * The VM Boot Option, as set in the source vm. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15; - * @param int $var - * @return $this - */ - public function setBootOption($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineBootOption::class); - $this->boot_option = $var; - - return $this; - } - - /** - * The metadata key/value pairs to assign to the VM. - * - * Generated from protobuf field map metadata = 16; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * The metadata key/value pairs to assign to the VM. - * - * Generated from protobuf field map metadata = 16; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata = $arr; - - return $this; - } - - /** - * Additional licenses to assign to the VM. - * - * Generated from protobuf field repeated string additional_licenses = 17; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdditionalLicenses() - { - return $this->additional_licenses; - } - - /** - * Additional licenses to assign to the VM. - * - * Generated from protobuf field repeated string additional_licenses = 17; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdditionalLicenses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->additional_licenses = $arr; - - return $this; - } - - /** - * The hostname to assign to the VM. - * - * Generated from protobuf field string hostname = 18; - * @return string - */ - public function getHostname() - { - return $this->hostname; - } - - /** - * The hostname to assign to the VM. - * - * Generated from protobuf field string hostname = 18; - * @param string $var - * @return $this - */ - public function setHostname($var) - { - GPBUtil::checkString($var, True); - $this->hostname = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling.php deleted file mode 100644 index bc30aaa06e34..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling.php +++ /dev/null @@ -1,206 +0,0 @@ -google.cloud.vmmigration.v1.ComputeScheduling - */ -class ComputeScheduling extends \Google\Protobuf\Internal\Message -{ - /** - * How the instance should behave when the host machine undergoes - * maintenance that may temporarily impact instance performance. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.OnHostMaintenance on_host_maintenance = 1; - */ - protected $on_host_maintenance = 0; - /** - * Whether the Instance should be automatically restarted whenever it is - * terminated by Compute Engine (not terminated by user). - * This configuration is identical to `automaticRestart` field in Compute - * Engine create instance under scheduling. - * It was changed to an enum (instead of a boolean) to match the default - * value in Compute Engine which is automatic restart. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.RestartType restart_type = 5; - */ - protected $restart_type = 0; - /** - * A set of node affinity and anti-affinity configurations for sole tenant - * nodes. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.SchedulingNodeAffinity node_affinities = 3; - */ - private $node_affinities; - /** - * The minimum number of virtual CPUs this instance will consume when - * running on a sole-tenant node. Ignored if no node_affinites are - * configured. - * - * Generated from protobuf field int32 min_node_cpus = 4; - */ - protected $min_node_cpus = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $on_host_maintenance - * How the instance should behave when the host machine undergoes - * maintenance that may temporarily impact instance performance. - * @type int $restart_type - * Whether the Instance should be automatically restarted whenever it is - * terminated by Compute Engine (not terminated by user). - * This configuration is identical to `automaticRestart` field in Compute - * Engine create instance under scheduling. - * It was changed to an enum (instead of a boolean) to match the default - * value in Compute Engine which is automatic restart. - * @type array<\Google\Cloud\VMMigration\V1\SchedulingNodeAffinity>|\Google\Protobuf\Internal\RepeatedField $node_affinities - * A set of node affinity and anti-affinity configurations for sole tenant - * nodes. - * @type int $min_node_cpus - * The minimum number of virtual CPUs this instance will consume when - * running on a sole-tenant node. Ignored if no node_affinites are - * configured. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * How the instance should behave when the host machine undergoes - * maintenance that may temporarily impact instance performance. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.OnHostMaintenance on_host_maintenance = 1; - * @return int - */ - public function getOnHostMaintenance() - { - return $this->on_host_maintenance; - } - - /** - * How the instance should behave when the host machine undergoes - * maintenance that may temporarily impact instance performance. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.OnHostMaintenance on_host_maintenance = 1; - * @param int $var - * @return $this - */ - public function setOnHostMaintenance($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeScheduling\OnHostMaintenance::class); - $this->on_host_maintenance = $var; - - return $this; - } - - /** - * Whether the Instance should be automatically restarted whenever it is - * terminated by Compute Engine (not terminated by user). - * This configuration is identical to `automaticRestart` field in Compute - * Engine create instance under scheduling. - * It was changed to an enum (instead of a boolean) to match the default - * value in Compute Engine which is automatic restart. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.RestartType restart_type = 5; - * @return int - */ - public function getRestartType() - { - return $this->restart_type; - } - - /** - * Whether the Instance should be automatically restarted whenever it is - * terminated by Compute Engine (not terminated by user). - * This configuration is identical to `automaticRestart` field in Compute - * Engine create instance under scheduling. - * It was changed to an enum (instead of a boolean) to match the default - * value in Compute Engine which is automatic restart. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.RestartType restart_type = 5; - * @param int $var - * @return $this - */ - public function setRestartType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeScheduling\RestartType::class); - $this->restart_type = $var; - - return $this; - } - - /** - * A set of node affinity and anti-affinity configurations for sole tenant - * nodes. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.SchedulingNodeAffinity node_affinities = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNodeAffinities() - { - return $this->node_affinities; - } - - /** - * A set of node affinity and anti-affinity configurations for sole tenant - * nodes. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.SchedulingNodeAffinity node_affinities = 3; - * @param array<\Google\Cloud\VMMigration\V1\SchedulingNodeAffinity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNodeAffinities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\SchedulingNodeAffinity::class); - $this->node_affinities = $arr; - - return $this; - } - - /** - * The minimum number of virtual CPUs this instance will consume when - * running on a sole-tenant node. Ignored if no node_affinites are - * configured. - * - * Generated from protobuf field int32 min_node_cpus = 4; - * @return int - */ - public function getMinNodeCpus() - { - return $this->min_node_cpus; - } - - /** - * The minimum number of virtual CPUs this instance will consume when - * running on a sole-tenant node. Ignored if no node_affinites are - * configured. - * - * Generated from protobuf field int32 min_node_cpus = 4; - * @param int $var - * @return $this - */ - public function setMinNodeCpus($var) - { - GPBUtil::checkInt32($var); - $this->min_node_cpus = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/OnHostMaintenance.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/OnHostMaintenance.php deleted file mode 100644 index 2289facddca5..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/OnHostMaintenance.php +++ /dev/null @@ -1,62 +0,0 @@ -google.cloud.vmmigration.v1.ComputeScheduling.OnHostMaintenance - */ -class OnHostMaintenance -{ - /** - * An unknown, unexpected behavior. - * - * Generated from protobuf enum ON_HOST_MAINTENANCE_UNSPECIFIED = 0; - */ - const ON_HOST_MAINTENANCE_UNSPECIFIED = 0; - /** - * Terminate the instance when the host machine undergoes maintenance. - * - * Generated from protobuf enum TERMINATE = 1; - */ - const TERMINATE = 1; - /** - * Migrate the instance when the host machine undergoes maintenance. - * - * Generated from protobuf enum MIGRATE = 2; - */ - const MIGRATE = 2; - - private static $valueToName = [ - self::ON_HOST_MAINTENANCE_UNSPECIFIED => 'ON_HOST_MAINTENANCE_UNSPECIFIED', - self::TERMINATE => 'TERMINATE', - self::MIGRATE => 'MIGRATE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OnHostMaintenance::class, \Google\Cloud\VMMigration\V1\ComputeScheduling_OnHostMaintenance::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/RestartType.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/RestartType.php deleted file mode 100644 index f84ad38270f2..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/RestartType.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.vmmigration.v1.ComputeScheduling.RestartType - */ -class RestartType -{ - /** - * Unspecified behavior. This will use the default. - * - * Generated from protobuf enum RESTART_TYPE_UNSPECIFIED = 0; - */ - const RESTART_TYPE_UNSPECIFIED = 0; - /** - * The Instance should be automatically restarted whenever it is - * terminated by Compute Engine. - * - * Generated from protobuf enum AUTOMATIC_RESTART = 1; - */ - const AUTOMATIC_RESTART = 1; - /** - * The Instance isn't automatically restarted whenever it is - * terminated by Compute Engine. - * - * Generated from protobuf enum NO_AUTOMATIC_RESTART = 2; - */ - const NO_AUTOMATIC_RESTART = 2; - - private static $valueToName = [ - self::RESTART_TYPE_UNSPECIFIED => 'RESTART_TYPE_UNSPECIFIED', - self::AUTOMATIC_RESTART => 'AUTOMATIC_RESTART', - self::NO_AUTOMATIC_RESTART => 'NO_AUTOMATIC_RESTART', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RestartType::class, \Google\Cloud\VMMigration\V1\ComputeScheduling_RestartType::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCloneJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCloneJobRequest.php deleted file mode 100644 index 41851b8961e2..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCloneJobRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.vmmigration.v1.CreateCloneJobRequest - */ -class CreateCloneJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Clone's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The clone job identifier. - * - * Generated from protobuf field string clone_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $clone_job_id = ''; - /** - * Required. The clone request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob clone_job = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $clone_job = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The Clone's parent. Please see - * {@see VmMigrationClient::migratingVmName()} for help formatting this field. - * @param \Google\Cloud\VMMigration\V1\CloneJob $cloneJob Required. The clone request body. - * @param string $cloneJobId Required. The clone job identifier. - * - * @return \Google\Cloud\VMMigration\V1\CreateCloneJobRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VMMigration\V1\CloneJob $cloneJob, string $cloneJobId): self - { - return (new self()) - ->setParent($parent) - ->setCloneJob($cloneJob) - ->setCloneJobId($cloneJobId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The Clone's parent. - * @type string $clone_job_id - * Required. The clone job identifier. - * @type \Google\Cloud\VMMigration\V1\CloneJob $clone_job - * Required. The clone request body. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Clone's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The Clone's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The clone job identifier. - * - * Generated from protobuf field string clone_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCloneJobId() - { - return $this->clone_job_id; - } - - /** - * Required. The clone job identifier. - * - * Generated from protobuf field string clone_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCloneJobId($var) - { - GPBUtil::checkString($var, True); - $this->clone_job_id = $var; - - return $this; - } - - /** - * Required. The clone request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob clone_job = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\CloneJob|null - */ - public function getCloneJob() - { - return $this->clone_job; - } - - public function hasCloneJob() - { - return isset($this->clone_job); - } - - public function clearCloneJob() - { - unset($this->clone_job); - } - - /** - * Required. The clone request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob clone_job = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\CloneJob $var - * @return $this - */ - public function setCloneJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\CloneJob::class); - $this->clone_job = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCutoverJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCutoverJobRequest.php deleted file mode 100644 index ca9cc7598345..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCutoverJobRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.vmmigration.v1.CreateCutoverJobRequest - */ -class CreateCutoverJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Cutover's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The cutover job identifier. - * - * Generated from protobuf field string cutover_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cutover_job_id = ''; - /** - * Required. The cutover request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob cutover_job = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cutover_job = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The Cutover's parent. Please see - * {@see VmMigrationClient::migratingVmName()} for help formatting this field. - * @param \Google\Cloud\VMMigration\V1\CutoverJob $cutoverJob Required. The cutover request body. - * @param string $cutoverJobId Required. The cutover job identifier. - * - * @return \Google\Cloud\VMMigration\V1\CreateCutoverJobRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VMMigration\V1\CutoverJob $cutoverJob, string $cutoverJobId): self - { - return (new self()) - ->setParent($parent) - ->setCutoverJob($cutoverJob) - ->setCutoverJobId($cutoverJobId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The Cutover's parent. - * @type string $cutover_job_id - * Required. The cutover job identifier. - * @type \Google\Cloud\VMMigration\V1\CutoverJob $cutover_job - * Required. The cutover request body. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Cutover's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The Cutover's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The cutover job identifier. - * - * Generated from protobuf field string cutover_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCutoverJobId() - { - return $this->cutover_job_id; - } - - /** - * Required. The cutover job identifier. - * - * Generated from protobuf field string cutover_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCutoverJobId($var) - { - GPBUtil::checkString($var, True); - $this->cutover_job_id = $var; - - return $this; - } - - /** - * Required. The cutover request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob cutover_job = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\CutoverJob|null - */ - public function getCutoverJob() - { - return $this->cutover_job; - } - - public function hasCutoverJob() - { - return isset($this->cutover_job); - } - - public function clearCutoverJob() - { - unset($this->cutover_job); - } - - /** - * Required. The cutover request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob cutover_job = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\CutoverJob $var - * @return $this - */ - public function setCutoverJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\CutoverJob::class); - $this->cutover_job = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateDatacenterConnectorRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateDatacenterConnectorRequest.php deleted file mode 100644 index ec4aaf84d99f..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateDatacenterConnectorRequest.php +++ /dev/null @@ -1,252 +0,0 @@ -google.cloud.vmmigration.v1.CreateDatacenterConnectorRequest - */ -class CreateDatacenterConnectorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The DatacenterConnector's parent. - * Required. The Source in where the new DatacenterConnector will be created. - * For example: - * `projects/my-project/locations/us-central1/sources/my-source` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The datacenterConnector identifier. - * - * Generated from protobuf field string datacenter_connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $datacenter_connector_id = ''; - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connector = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $datacenter_connector = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The DatacenterConnector's parent. - * Required. The Source in where the new DatacenterConnector will be created. - * For example: - * `projects/my-project/locations/us-central1/sources/my-source` - * Please see {@see VmMigrationClient::sourceName()} for help formatting this field. - * @param \Google\Cloud\VMMigration\V1\DatacenterConnector $datacenterConnector Required. The create request body. - * @param string $datacenterConnectorId Required. The datacenterConnector identifier. - * - * @return \Google\Cloud\VMMigration\V1\CreateDatacenterConnectorRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VMMigration\V1\DatacenterConnector $datacenterConnector, string $datacenterConnectorId): self - { - return (new self()) - ->setParent($parent) - ->setDatacenterConnector($datacenterConnector) - ->setDatacenterConnectorId($datacenterConnectorId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The DatacenterConnector's parent. - * Required. The Source in where the new DatacenterConnector will be created. - * For example: - * `projects/my-project/locations/us-central1/sources/my-source` - * @type string $datacenter_connector_id - * Required. The datacenterConnector identifier. - * @type \Google\Cloud\VMMigration\V1\DatacenterConnector $datacenter_connector - * Required. The create request body. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The DatacenterConnector's parent. - * Required. The Source in where the new DatacenterConnector will be created. - * For example: - * `projects/my-project/locations/us-central1/sources/my-source` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The DatacenterConnector's parent. - * Required. The Source in where the new DatacenterConnector will be created. - * For example: - * `projects/my-project/locations/us-central1/sources/my-source` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The datacenterConnector identifier. - * - * Generated from protobuf field string datacenter_connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatacenterConnectorId() - { - return $this->datacenter_connector_id; - } - - /** - * Required. The datacenterConnector identifier. - * - * Generated from protobuf field string datacenter_connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatacenterConnectorId($var) - { - GPBUtil::checkString($var, True); - $this->datacenter_connector_id = $var; - - return $this; - } - - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connector = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\DatacenterConnector|null - */ - public function getDatacenterConnector() - { - return $this->datacenter_connector; - } - - public function hasDatacenterConnector() - { - return isset($this->datacenter_connector); - } - - public function clearDatacenterConnector() - { - unset($this->datacenter_connector); - } - - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connector = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\DatacenterConnector $var - * @return $this - */ - public function setDatacenterConnector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\DatacenterConnector::class); - $this->datacenter_connector = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateGroupRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateGroupRequest.php deleted file mode 100644 index de9bfaea8932..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateGroupRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.vmmigration.v1.CreateGroupRequest - */ -class CreateGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Group's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The group identifier. - * - * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group_id = ''; - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The Group's parent. Please see - * {@see VmMigrationClient::locationName()} for help formatting this field. - * @param \Google\Cloud\VMMigration\V1\Group $group Required. The create request body. - * @param string $groupId Required. The group identifier. - * - * @return \Google\Cloud\VMMigration\V1\CreateGroupRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VMMigration\V1\Group $group, string $groupId): self - { - return (new self()) - ->setParent($parent) - ->setGroup($group) - ->setGroupId($groupId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The Group's parent. - * @type string $group_id - * Required. The group identifier. - * @type \Google\Cloud\VMMigration\V1\Group $group - * Required. The create request body. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Group's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The Group's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The group identifier. - * - * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGroupId() - { - return $this->group_id; - } - - /** - * Required. The group identifier. - * - * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setGroupId($var) - { - GPBUtil::checkString($var, True); - $this->group_id = $var; - - return $this; - } - - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\Group|null - */ - public function getGroup() - { - return $this->group; - } - - public function hasGroup() - { - return isset($this->group); - } - - public function clearGroup() - { - unset($this->group); - } - - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\Group $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Group::class); - $this->group = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateMigratingVmRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateMigratingVmRequest.php deleted file mode 100644 index c12c649f5023..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateMigratingVmRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.vmmigration.v1.CreateMigratingVmRequest - */ -class CreateMigratingVmRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The MigratingVm's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The migratingVm identifier. - * - * Generated from protobuf field string migrating_vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $migrating_vm_id = ''; - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $migrating_vm = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The MigratingVm's parent. Please see - * {@see VmMigrationClient::sourceName()} for help formatting this field. - * @param \Google\Cloud\VMMigration\V1\MigratingVm $migratingVm Required. The create request body. - * @param string $migratingVmId Required. The migratingVm identifier. - * - * @return \Google\Cloud\VMMigration\V1\CreateMigratingVmRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VMMigration\V1\MigratingVm $migratingVm, string $migratingVmId): self - { - return (new self()) - ->setParent($parent) - ->setMigratingVm($migratingVm) - ->setMigratingVmId($migratingVmId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The MigratingVm's parent. - * @type string $migrating_vm_id - * Required. The migratingVm identifier. - * @type \Google\Cloud\VMMigration\V1\MigratingVm $migrating_vm - * Required. The create request body. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The MigratingVm's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The MigratingVm's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The migratingVm identifier. - * - * Generated from protobuf field string migrating_vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMigratingVmId() - { - return $this->migrating_vm_id; - } - - /** - * Required. The migratingVm identifier. - * - * Generated from protobuf field string migrating_vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMigratingVmId($var) - { - GPBUtil::checkString($var, True); - $this->migrating_vm_id = $var; - - return $this; - } - - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\MigratingVm|null - */ - public function getMigratingVm() - { - return $this->migrating_vm; - } - - public function hasMigratingVm() - { - return isset($this->migrating_vm); - } - - public function clearMigratingVm() - { - unset($this->migrating_vm); - } - - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\MigratingVm $var - * @return $this - */ - public function setMigratingVm($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\MigratingVm::class); - $this->migrating_vm = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateSourceRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateSourceRequest.php deleted file mode 100644 index 525bb5819b4a..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateSourceRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.vmmigration.v1.CreateSourceRequest - */ -class CreateSourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Source's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The source identifier. - * - * Generated from protobuf field string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source_id = ''; - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The Source's parent. Please see - * {@see VmMigrationClient::locationName()} for help formatting this field. - * @param \Google\Cloud\VMMigration\V1\Source $source Required. The create request body. - * @param string $sourceId Required. The source identifier. - * - * @return \Google\Cloud\VMMigration\V1\CreateSourceRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VMMigration\V1\Source $source, string $sourceId): self - { - return (new self()) - ->setParent($parent) - ->setSource($source) - ->setSourceId($sourceId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The Source's parent. - * @type string $source_id - * Required. The source identifier. - * @type \Google\Cloud\VMMigration\V1\Source $source - * Required. The create request body. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Source's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The Source's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The source identifier. - * - * Generated from protobuf field string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSourceId() - { - return $this->source_id; - } - - /** - * Required. The source identifier. - * - * Generated from protobuf field string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSourceId($var) - { - GPBUtil::checkString($var, True); - $this->source_id = $var; - - return $this; - } - - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\Source|null - */ - public function getSource() - { - return $this->source; - } - - public function hasSource() - { - return isset($this->source); - } - - public function clearSource() - { - unset($this->source); - } - - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\Source $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Source::class); - $this->source = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateTargetProjectRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateTargetProjectRequest.php deleted file mode 100644 index fa7e25ef6158..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateTargetProjectRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.vmmigration.v1.CreateTargetProjectRequest - */ -class CreateTargetProjectRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The TargetProject's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The target_project identifier. - * - * Generated from protobuf field string target_project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $target_project_id = ''; - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $target_project = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The TargetProject's parent. Please see - * {@see VmMigrationClient::locationName()} for help formatting this field. - * @param \Google\Cloud\VMMigration\V1\TargetProject $targetProject Required. The create request body. - * @param string $targetProjectId Required. The target_project identifier. - * - * @return \Google\Cloud\VMMigration\V1\CreateTargetProjectRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VMMigration\V1\TargetProject $targetProject, string $targetProjectId): self - { - return (new self()) - ->setParent($parent) - ->setTargetProject($targetProject) - ->setTargetProjectId($targetProjectId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The TargetProject's parent. - * @type string $target_project_id - * Required. The target_project identifier. - * @type \Google\Cloud\VMMigration\V1\TargetProject $target_project - * Required. The create request body. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The TargetProject's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The TargetProject's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The target_project identifier. - * - * Generated from protobuf field string target_project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTargetProjectId() - { - return $this->target_project_id; - } - - /** - * Required. The target_project identifier. - * - * Generated from protobuf field string target_project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTargetProjectId($var) - { - GPBUtil::checkString($var, True); - $this->target_project_id = $var; - - return $this; - } - - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\TargetProject|null - */ - public function getTargetProject() - { - return $this->target_project; - } - - public function hasTargetProject() - { - return isset($this->target_project); - } - - public function clearTargetProject() - { - unset($this->target_project); - } - - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\TargetProject $var - * @return $this - */ - public function setTargetProject($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\TargetProject::class); - $this->target_project = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateUtilizationReportRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateUtilizationReportRequest.php deleted file mode 100644 index 80a507c49703..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateUtilizationReportRequest.php +++ /dev/null @@ -1,258 +0,0 @@ -google.cloud.vmmigration.v1.CreateUtilizationReportRequest - */ -class CreateUtilizationReportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Utilization Report's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The report to create. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport utilization_report = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $utilization_report = null; - /** - * Required. The ID to use for the report, which will become the final - * component of the reports's resource name. - * This value maximum length is 63 characters, and valid characters - * are /[a-z][0-9]-/. It must start with an english letter and must not - * end with a hyphen. - * - * Generated from protobuf field string utilization_report_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $utilization_report_id = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The Utilization Report's parent. Please see - * {@see VmMigrationClient::sourceName()} for help formatting this field. - * @param \Google\Cloud\VMMigration\V1\UtilizationReport $utilizationReport Required. The report to create. - * @param string $utilizationReportId Required. The ID to use for the report, which will become the final - * component of the reports's resource name. - * - * This value maximum length is 63 characters, and valid characters - * are /[a-z][0-9]-/. It must start with an english letter and must not - * end with a hyphen. - * - * @return \Google\Cloud\VMMigration\V1\CreateUtilizationReportRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VMMigration\V1\UtilizationReport $utilizationReport, string $utilizationReportId): self - { - return (new self()) - ->setParent($parent) - ->setUtilizationReport($utilizationReport) - ->setUtilizationReportId($utilizationReportId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The Utilization Report's parent. - * @type \Google\Cloud\VMMigration\V1\UtilizationReport $utilization_report - * Required. The report to create. - * @type string $utilization_report_id - * Required. The ID to use for the report, which will become the final - * component of the reports's resource name. - * This value maximum length is 63 characters, and valid characters - * are /[a-z][0-9]-/. It must start with an english letter and must not - * end with a hyphen. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Utilization Report's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The Utilization Report's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The report to create. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport utilization_report = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\UtilizationReport|null - */ - public function getUtilizationReport() - { - return $this->utilization_report; - } - - public function hasUtilizationReport() - { - return isset($this->utilization_report); - } - - public function clearUtilizationReport() - { - unset($this->utilization_report); - } - - /** - * Required. The report to create. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport utilization_report = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\UtilizationReport $var - * @return $this - */ - public function setUtilizationReport($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\UtilizationReport::class); - $this->utilization_report = $var; - - return $this; - } - - /** - * Required. The ID to use for the report, which will become the final - * component of the reports's resource name. - * This value maximum length is 63 characters, and valid characters - * are /[a-z][0-9]-/. It must start with an english letter and must not - * end with a hyphen. - * - * Generated from protobuf field string utilization_report_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUtilizationReportId() - { - return $this->utilization_report_id; - } - - /** - * Required. The ID to use for the report, which will become the final - * component of the reports's resource name. - * This value maximum length is 63 characters, and valid characters - * are /[a-z][0-9]-/. It must start with an english letter and must not - * end with a hyphen. - * - * Generated from protobuf field string utilization_report_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUtilizationReportId($var) - { - GPBUtil::checkString($var, True); - $this->utilization_report_id = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob.php deleted file mode 100644 index 3fafe9c8c7e7..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob.php +++ /dev/null @@ -1,435 +0,0 @@ -google.cloud.vmmigration.v1.CutoverJob - */ -class CutoverJob extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the cutover job was created (as an API call, not when - * it was actually created in the target). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the cutover job had finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. The name of the cutover job. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. State of the cutover job. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time the state was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_time = null; - /** - * Output only. The current progress in percentage of the cutover job. - * - * Generated from protobuf field int32 progress_percent = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $progress_percent = 0; - /** - * Output only. Provides details for the errors that led to the Cutover Job's - * state. - * - * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - /** - * Output only. A message providing possible extra details about the current - * state. - * - * Generated from protobuf field string state_message = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_message = ''; - /** - * Output only. The cutover steps list representing its progress. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverStep steps = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $steps; - protected $target_vm_details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails $compute_engine_target_details - * Output only. Details of the target VM in Compute Engine. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the cutover job was created (as an API call, not when - * it was actually created in the target). - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the cutover job had finished. - * @type string $name - * Output only. The name of the cutover job. - * @type int $state - * Output only. State of the cutover job. - * @type \Google\Protobuf\Timestamp $state_time - * Output only. The time the state was last updated. - * @type int $progress_percent - * Output only. The current progress in percentage of the cutover job. - * @type \Google\Rpc\Status $error - * Output only. Provides details for the errors that led to the Cutover Job's - * state. - * @type string $state_message - * Output only. A message providing possible extra details about the current - * state. - * @type array<\Google\Cloud\VMMigration\V1\CutoverStep>|\Google\Protobuf\Internal\RepeatedField $steps - * Output only. The cutover steps list representing its progress. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Details of the target VM in Compute Engine. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDetails compute_engine_target_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails|null - */ - public function getComputeEngineTargetDetails() - { - return $this->readOneof(14); - } - - public function hasComputeEngineTargetDetails() - { - return $this->hasOneof(14); - } - - /** - * Output only. Details of the target VM in Compute Engine. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDetails compute_engine_target_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails $var - * @return $this - */ - public function setComputeEngineTargetDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails::class); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * Output only. The time the cutover job was created (as an API call, not when - * it was actually created in the target). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the cutover job was created (as an API call, not when - * it was actually created in the target). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the cutover job had finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the cutover job had finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. The name of the cutover job. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the cutover job. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. State of the cutover job. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the cutover job. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\CutoverJob\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time the state was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStateTime() - { - return $this->state_time; - } - - public function hasStateTime() - { - return isset($this->state_time); - } - - public function clearStateTime() - { - unset($this->state_time); - } - - /** - * Output only. The time the state was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->state_time = $var; - - return $this; - } - - /** - * Output only. The current progress in percentage of the cutover job. - * - * Generated from protobuf field int32 progress_percent = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getProgressPercent() - { - return $this->progress_percent; - } - - /** - * Output only. The current progress in percentage of the cutover job. - * - * Generated from protobuf field int32 progress_percent = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setProgressPercent($var) - { - GPBUtil::checkInt32($var); - $this->progress_percent = $var; - - return $this; - } - - /** - * Output only. Provides details for the errors that led to the Cutover Job's - * state. - * - * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. Provides details for the errors that led to the Cutover Job's - * state. - * - * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * Output only. A message providing possible extra details about the current - * state. - * - * Generated from protobuf field string state_message = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateMessage() - { - return $this->state_message; - } - - /** - * Output only. A message providing possible extra details about the current - * state. - * - * Generated from protobuf field string state_message = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateMessage($var) - { - GPBUtil::checkString($var, True); - $this->state_message = $var; - - return $this; - } - - /** - * Output only. The cutover steps list representing its progress. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverStep steps = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSteps() - { - return $this->steps; - } - - /** - * Output only. The cutover steps list representing its progress. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverStep steps = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\CutoverStep>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSteps($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CutoverStep::class); - $this->steps = $arr; - - return $this; - } - - /** - * @return string - */ - public function getTargetVmDetails() - { - return $this->whichOneof("target_vm_details"); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob/State.php deleted file mode 100644 index b1810e6a5d30..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob/State.php +++ /dev/null @@ -1,100 +0,0 @@ -google.cloud.vmmigration.v1.CutoverJob.State - */ -class State -{ - /** - * The state is unknown. This is used for API compatibility only and is not - * used by the system. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The cutover job has not yet started. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The cutover job finished with errors. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - /** - * The cutover job finished successfully. - * - * Generated from protobuf enum SUCCEEDED = 3; - */ - const SUCCEEDED = 3; - /** - * The cutover job was cancelled. - * - * Generated from protobuf enum CANCELLED = 4; - */ - const CANCELLED = 4; - /** - * The cutover job is being cancelled. - * - * Generated from protobuf enum CANCELLING = 5; - */ - const CANCELLING = 5; - /** - * The cutover job is active and running. - * - * Generated from protobuf enum ACTIVE = 6; - */ - const ACTIVE = 6; - /** - * OS adaptation is running as part of the cutover job to generate license. - * - * Generated from protobuf enum ADAPTING_OS = 7; - */ - const ADAPTING_OS = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::FAILED => 'FAILED', - self::SUCCEEDED => 'SUCCEEDED', - self::CANCELLED => 'CANCELLED', - self::CANCELLING => 'CANCELLING', - self::ACTIVE => 'ACTIVE', - self::ADAPTING_OS => 'ADAPTING_OS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VMMigration\V1\CutoverJob_State::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverStep.php deleted file mode 100644 index 68550eca3b97..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverStep.php +++ /dev/null @@ -1,295 +0,0 @@ -google.cloud.vmmigration.v1.CutoverStep - */ -class CutoverStep extends \Google\Protobuf\Internal\Message -{ - /** - * The time the step has started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time the step has ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - protected $step; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VMMigration\V1\ReplicationCycle $previous_replication_cycle - * A replication cycle prior cutover step. - * @type \Google\Cloud\VMMigration\V1\ShuttingDownSourceVMStep $shutting_down_source_vm - * Shutting down VM step. - * @type \Google\Cloud\VMMigration\V1\ReplicationCycle $final_sync - * Final sync step. - * @type \Google\Cloud\VMMigration\V1\PreparingVMDisksStep $preparing_vm_disks - * Preparing VM disks step. - * @type \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep $instantiating_migrated_vm - * Instantiating migrated VM step. - * @type \Google\Protobuf\Timestamp $start_time - * The time the step has started. - * @type \Google\Protobuf\Timestamp $end_time - * The time the step has ended. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * A replication cycle prior cutover step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle previous_replication_cycle = 3; - * @return \Google\Cloud\VMMigration\V1\ReplicationCycle|null - */ - public function getPreviousReplicationCycle() - { - return $this->readOneof(3); - } - - public function hasPreviousReplicationCycle() - { - return $this->hasOneof(3); - } - - /** - * A replication cycle prior cutover step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle previous_replication_cycle = 3; - * @param \Google\Cloud\VMMigration\V1\ReplicationCycle $var - * @return $this - */ - public function setPreviousReplicationCycle($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicationCycle::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Shutting down VM step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ShuttingDownSourceVMStep shutting_down_source_vm = 4; - * @return \Google\Cloud\VMMigration\V1\ShuttingDownSourceVMStep|null - */ - public function getShuttingDownSourceVm() - { - return $this->readOneof(4); - } - - public function hasShuttingDownSourceVm() - { - return $this->hasOneof(4); - } - - /** - * Shutting down VM step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ShuttingDownSourceVMStep shutting_down_source_vm = 4; - * @param \Google\Cloud\VMMigration\V1\ShuttingDownSourceVMStep $var - * @return $this - */ - public function setShuttingDownSourceVm($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ShuttingDownSourceVMStep::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Final sync step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle final_sync = 5; - * @return \Google\Cloud\VMMigration\V1\ReplicationCycle|null - */ - public function getFinalSync() - { - return $this->readOneof(5); - } - - public function hasFinalSync() - { - return $this->hasOneof(5); - } - - /** - * Final sync step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle final_sync = 5; - * @param \Google\Cloud\VMMigration\V1\ReplicationCycle $var - * @return $this - */ - public function setFinalSync($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicationCycle::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Preparing VM disks step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.PreparingVMDisksStep preparing_vm_disks = 6; - * @return \Google\Cloud\VMMigration\V1\PreparingVMDisksStep|null - */ - public function getPreparingVmDisks() - { - return $this->readOneof(6); - } - - public function hasPreparingVmDisks() - { - return $this->hasOneof(6); - } - - /** - * Preparing VM disks step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.PreparingVMDisksStep preparing_vm_disks = 6; - * @param \Google\Cloud\VMMigration\V1\PreparingVMDisksStep $var - * @return $this - */ - public function setPreparingVmDisks($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\PreparingVMDisksStep::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Instantiating migrated VM step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.InstantiatingMigratedVMStep instantiating_migrated_vm = 7; - * @return \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep|null - */ - public function getInstantiatingMigratedVm() - { - return $this->readOneof(7); - } - - public function hasInstantiatingMigratedVm() - { - return $this->hasOneof(7); - } - - /** - * Instantiating migrated VM step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.InstantiatingMigratedVMStep instantiating_migrated_vm = 7; - * @param \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep $var - * @return $this - */ - public function setInstantiatingMigratedVm($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * The time the step has started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time the step has started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time the step has ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time the step has ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getStep() - { - return $this->whichOneof("step"); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CycleStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CycleStep.php deleted file mode 100644 index a081411451d2..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CycleStep.php +++ /dev/null @@ -1,229 +0,0 @@ -google.cloud.vmmigration.v1.CycleStep - */ -class CycleStep extends \Google\Protobuf\Internal\Message -{ - /** - * The time the cycle step has started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time the cycle step has ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - protected $step; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VMMigration\V1\InitializingReplicationStep $initializing_replication - * Initializing replication step. - * @type \Google\Cloud\VMMigration\V1\ReplicatingStep $replicating - * Replicating step. - * @type \Google\Cloud\VMMigration\V1\PostProcessingStep $post_processing - * Post processing step. - * @type \Google\Protobuf\Timestamp $start_time - * The time the cycle step has started. - * @type \Google\Protobuf\Timestamp $end_time - * The time the cycle step has ended. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Initializing replication step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.InitializingReplicationStep initializing_replication = 3; - * @return \Google\Cloud\VMMigration\V1\InitializingReplicationStep|null - */ - public function getInitializingReplication() - { - return $this->readOneof(3); - } - - public function hasInitializingReplication() - { - return $this->hasOneof(3); - } - - /** - * Initializing replication step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.InitializingReplicationStep initializing_replication = 3; - * @param \Google\Cloud\VMMigration\V1\InitializingReplicationStep $var - * @return $this - */ - public function setInitializingReplication($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\InitializingReplicationStep::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Replicating step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicatingStep replicating = 4; - * @return \Google\Cloud\VMMigration\V1\ReplicatingStep|null - */ - public function getReplicating() - { - return $this->readOneof(4); - } - - public function hasReplicating() - { - return $this->hasOneof(4); - } - - /** - * Replicating step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicatingStep replicating = 4; - * @param \Google\Cloud\VMMigration\V1\ReplicatingStep $var - * @return $this - */ - public function setReplicating($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicatingStep::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Post processing step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.PostProcessingStep post_processing = 5; - * @return \Google\Cloud\VMMigration\V1\PostProcessingStep|null - */ - public function getPostProcessing() - { - return $this->readOneof(5); - } - - public function hasPostProcessing() - { - return $this->hasOneof(5); - } - - /** - * Post processing step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.PostProcessingStep post_processing = 5; - * @param \Google\Cloud\VMMigration\V1\PostProcessingStep $var - * @return $this - */ - public function setPostProcessing($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\PostProcessingStep::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * The time the cycle step has started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time the cycle step has started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time the cycle step has ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time the cycle step has ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getStep() - { - return $this->whichOneof("step"); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector.php deleted file mode 100644 index 20244d65ed0b..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector.php +++ /dev/null @@ -1,620 +0,0 @@ -google.cloud.vmmigration.v1.DatacenterConnector - */ -class DatacenterConnector extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the connector was created (as an API call, not when - * it was actually installed). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last time the connector was updated with an API call. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The connector's name. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Immutable. A unique key for this connector. This key is internal to the OVA - * connector and is supplied with its creation during the registration process - * and can not be modified. - * - * Generated from protobuf field string registration_id = 12 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $registration_id = ''; - /** - * The service account to use in the connector when communicating with the - * cloud. - * - * Generated from protobuf field string service_account = 5; - */ - protected $service_account = ''; - /** - * The version running in the DatacenterConnector. This is supplied by the OVA - * connector during the registration process and can not be modified. - * - * Generated from protobuf field string version = 6; - */ - protected $version = ''; - /** - * Output only. The communication channel between the datacenter connector and - * Google Cloud. - * - * Generated from protobuf field string bucket = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $bucket = ''; - /** - * Output only. State of the DatacenterConnector, as determined by the health - * checks. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time the state was last set. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_time = null; - /** - * Output only. Provides details on the state of the Datacenter Connector in - * case of an error. - * - * Generated from protobuf field .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - /** - * Output only. Appliance OVA version. - * This is the OVA which is manually installed by the user and contains the - * infrastructure for the automatically updatable components on the appliance. - * - * Generated from protobuf field string appliance_infrastructure_version = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $appliance_infrastructure_version = ''; - /** - * Output only. Appliance last installed update bundle version. - * This is the version of the automatically updatable components on the - * appliance. - * - * Generated from protobuf field string appliance_software_version = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $appliance_software_version = ''; - /** - * Output only. The available versions for updating this appliance. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AvailableUpdates available_versions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $available_versions = null; - /** - * Output only. The status of the current / last upgradeAppliance operation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus upgrade_status = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $upgrade_status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the connector was created (as an API call, not when - * it was actually installed). - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last time the connector was updated with an API call. - * @type string $name - * Output only. The connector's name. - * @type string $registration_id - * Immutable. A unique key for this connector. This key is internal to the OVA - * connector and is supplied with its creation during the registration process - * and can not be modified. - * @type string $service_account - * The service account to use in the connector when communicating with the - * cloud. - * @type string $version - * The version running in the DatacenterConnector. This is supplied by the OVA - * connector during the registration process and can not be modified. - * @type string $bucket - * Output only. The communication channel between the datacenter connector and - * Google Cloud. - * @type int $state - * Output only. State of the DatacenterConnector, as determined by the health - * checks. - * @type \Google\Protobuf\Timestamp $state_time - * Output only. The time the state was last set. - * @type \Google\Rpc\Status $error - * Output only. Provides details on the state of the Datacenter Connector in - * case of an error. - * @type string $appliance_infrastructure_version - * Output only. Appliance OVA version. - * This is the OVA which is manually installed by the user and contains the - * infrastructure for the automatically updatable components on the appliance. - * @type string $appliance_software_version - * Output only. Appliance last installed update bundle version. - * This is the version of the automatically updatable components on the - * appliance. - * @type \Google\Cloud\VMMigration\V1\AvailableUpdates $available_versions - * Output only. The available versions for updating this appliance. - * @type \Google\Cloud\VMMigration\V1\UpgradeStatus $upgrade_status - * Output only. The status of the current / last upgradeAppliance operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the connector was created (as an API call, not when - * it was actually installed). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the connector was created (as an API call, not when - * it was actually installed). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The last time the connector was updated with an API call. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last time the connector was updated with an API call. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. The connector's name. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The connector's name. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Immutable. A unique key for this connector. This key is internal to the OVA - * connector and is supplied with its creation during the registration process - * and can not be modified. - * - * Generated from protobuf field string registration_id = 12 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getRegistrationId() - { - return $this->registration_id; - } - - /** - * Immutable. A unique key for this connector. This key is internal to the OVA - * connector and is supplied with its creation during the registration process - * and can not be modified. - * - * Generated from protobuf field string registration_id = 12 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setRegistrationId($var) - { - GPBUtil::checkString($var, True); - $this->registration_id = $var; - - return $this; - } - - /** - * The service account to use in the connector when communicating with the - * cloud. - * - * Generated from protobuf field string service_account = 5; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * The service account to use in the connector when communicating with the - * cloud. - * - * Generated from protobuf field string service_account = 5; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * The version running in the DatacenterConnector. This is supplied by the OVA - * connector during the registration process and can not be modified. - * - * Generated from protobuf field string version = 6; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The version running in the DatacenterConnector. This is supplied by the OVA - * connector during the registration process and can not be modified. - * - * Generated from protobuf field string version = 6; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Output only. The communication channel between the datacenter connector and - * Google Cloud. - * - * Generated from protobuf field string bucket = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getBucket() - { - return $this->bucket; - } - - /** - * Output only. The communication channel between the datacenter connector and - * Google Cloud. - * - * Generated from protobuf field string bucket = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setBucket($var) - { - GPBUtil::checkString($var, True); - $this->bucket = $var; - - return $this; - } - - /** - * Output only. State of the DatacenterConnector, as determined by the health - * checks. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the DatacenterConnector, as determined by the health - * checks. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\DatacenterConnector\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time the state was last set. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStateTime() - { - return $this->state_time; - } - - public function hasStateTime() - { - return isset($this->state_time); - } - - public function clearStateTime() - { - unset($this->state_time); - } - - /** - * Output only. The time the state was last set. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->state_time = $var; - - return $this; - } - - /** - * Output only. Provides details on the state of the Datacenter Connector in - * case of an error. - * - * Generated from protobuf field .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. Provides details on the state of the Datacenter Connector in - * case of an error. - * - * Generated from protobuf field .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * Output only. Appliance OVA version. - * This is the OVA which is manually installed by the user and contains the - * infrastructure for the automatically updatable components on the appliance. - * - * Generated from protobuf field string appliance_infrastructure_version = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApplianceInfrastructureVersion() - { - return $this->appliance_infrastructure_version; - } - - /** - * Output only. Appliance OVA version. - * This is the OVA which is manually installed by the user and contains the - * infrastructure for the automatically updatable components on the appliance. - * - * Generated from protobuf field string appliance_infrastructure_version = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApplianceInfrastructureVersion($var) - { - GPBUtil::checkString($var, True); - $this->appliance_infrastructure_version = $var; - - return $this; - } - - /** - * Output only. Appliance last installed update bundle version. - * This is the version of the automatically updatable components on the - * appliance. - * - * Generated from protobuf field string appliance_software_version = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApplianceSoftwareVersion() - { - return $this->appliance_software_version; - } - - /** - * Output only. Appliance last installed update bundle version. - * This is the version of the automatically updatable components on the - * appliance. - * - * Generated from protobuf field string appliance_software_version = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApplianceSoftwareVersion($var) - { - GPBUtil::checkString($var, True); - $this->appliance_software_version = $var; - - return $this; - } - - /** - * Output only. The available versions for updating this appliance. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AvailableUpdates available_versions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\AvailableUpdates|null - */ - public function getAvailableVersions() - { - return $this->available_versions; - } - - public function hasAvailableVersions() - { - return isset($this->available_versions); - } - - public function clearAvailableVersions() - { - unset($this->available_versions); - } - - /** - * Output only. The available versions for updating this appliance. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AvailableUpdates available_versions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\AvailableUpdates $var - * @return $this - */ - public function setAvailableVersions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AvailableUpdates::class); - $this->available_versions = $var; - - return $this; - } - - /** - * Output only. The status of the current / last upgradeAppliance operation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus upgrade_status = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\UpgradeStatus|null - */ - public function getUpgradeStatus() - { - return $this->upgrade_status; - } - - public function hasUpgradeStatus() - { - return isset($this->upgrade_status); - } - - public function clearUpgradeStatus() - { - unset($this->upgrade_status); - } - - /** - * Output only. The status of the current / last upgradeAppliance operation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus upgrade_status = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\UpgradeStatus $var - * @return $this - */ - public function setUpgradeStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\UpgradeStatus::class); - $this->upgrade_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector/State.php deleted file mode 100644 index 836a87465021..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector/State.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.DatacenterConnector.State - */ -class State -{ - /** - * The state is unknown. This is used for API compatibility only and is not - * used by the system. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The state was not sampled by the health checks yet. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The source was sampled by health checks and is not available. - * - * Generated from protobuf enum OFFLINE = 2; - */ - const OFFLINE = 2; - /** - * The source is available but might not be usable yet due to unvalidated - * credentials or another reason. The credentials referred to are the ones - * to the Source. The error message will contain further details. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * The source exists and its credentials were verified. - * - * Generated from protobuf enum ACTIVE = 4; - */ - const ACTIVE = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::OFFLINE => 'OFFLINE', - self::FAILED => 'FAILED', - self::ACTIVE => 'ACTIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VMMigration\V1\DatacenterConnector_State::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteDatacenterConnectorRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteDatacenterConnectorRequest.php deleted file mode 100644 index 3a18f26d864c..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteDatacenterConnectorRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.vmmigration.v1.DeleteDatacenterConnectorRequest - */ -class DeleteDatacenterConnectorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The DatacenterConnector name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The DatacenterConnector name. Please see - * {@see VmMigrationClient::datacenterConnectorName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\DeleteDatacenterConnectorRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The DatacenterConnector name. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The DatacenterConnector name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The DatacenterConnector name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteGroupRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteGroupRequest.php deleted file mode 100644 index 58ed1909db6e..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteGroupRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.vmmigration.v1.DeleteGroupRequest - */ -class DeleteGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Group name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The Group name. Please see - * {@see VmMigrationClient::groupName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\DeleteGroupRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The Group name. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Group name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The Group name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteMigratingVmRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteMigratingVmRequest.php deleted file mode 100644 index d92845c4cd69..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteMigratingVmRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.DeleteMigratingVmRequest - */ -class DeleteMigratingVmRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the MigratingVm. Please see - * {@see VmMigrationClient::migratingVmName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\DeleteMigratingVmRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the MigratingVm. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteSourceRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteSourceRequest.php deleted file mode 100644 index 73363cfd5bc7..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteSourceRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.vmmigration.v1.DeleteSourceRequest - */ -class DeleteSourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Source name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The Source name. Please see - * {@see VmMigrationClient::sourceName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\DeleteSourceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The Source name. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Source name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The Source name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteTargetProjectRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteTargetProjectRequest.php deleted file mode 100644 index d1c390849152..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteTargetProjectRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.vmmigration.v1.DeleteTargetProjectRequest - */ -class DeleteTargetProjectRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The TargetProject name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The TargetProject name. Please see - * {@see VmMigrationClient::targetProjectName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\DeleteTargetProjectRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The TargetProject name. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The TargetProject name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The TargetProject name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteUtilizationReportRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteUtilizationReportRequest.php deleted file mode 100644 index 8341c1a7702f..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteUtilizationReportRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.vmmigration.v1.DeleteUtilizationReportRequest - */ -class DeleteUtilizationReportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Utilization Report name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The Utilization Report name. Please see - * {@see VmMigrationClient::utilizationReportName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\DeleteUtilizationReportRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The Utilization Report name. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Utilization Report name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The Utilization Report name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryRequest.php deleted file mode 100644 index 3ccec18360e1..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.vmmigration.v1.FetchInventoryRequest - */ -class FetchInventoryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Source. - * - * Generated from protobuf field string source = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $source = ''; - /** - * If this flag is set to true, the source will be queried instead of using - * cached results. Using this flag will make the call slower. - * - * Generated from protobuf field bool force_refresh = 2; - */ - protected $force_refresh = false; - - /** - * @param string $source Required. The name of the Source. Please see - * {@see VmMigrationClient::sourceName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\FetchInventoryRequest - * - * @experimental - */ - public static function build(string $source): self - { - return (new self()) - ->setSource($source); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $source - * Required. The name of the Source. - * @type bool $force_refresh - * If this flag is set to true, the source will be queried instead of using - * cached results. Using this flag will make the call slower. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Source. - * - * Generated from protobuf field string source = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSource() - { - return $this->source; - } - - /** - * Required. The name of the Source. - * - * Generated from protobuf field string source = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkString($var, True); - $this->source = $var; - - return $this; - } - - /** - * If this flag is set to true, the source will be queried instead of using - * cached results. Using this flag will make the call slower. - * - * Generated from protobuf field bool force_refresh = 2; - * @return bool - */ - public function getForceRefresh() - { - return $this->force_refresh; - } - - /** - * If this flag is set to true, the source will be queried instead of using - * cached results. Using this flag will make the call slower. - * - * Generated from protobuf field bool force_refresh = 2; - * @param bool $var - * @return $this - */ - public function setForceRefresh($var) - { - GPBUtil::checkBool($var); - $this->force_refresh = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryResponse.php deleted file mode 100644 index ce1bdac4c8c1..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryResponse.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.vmmigration.v1.FetchInventoryResponse - */ -class FetchInventoryResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The timestamp when the source was last queried (if the result - * is from the cache). - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - protected $SourceVms; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VMMigration\V1\VmwareVmsDetails $vmware_vms - * The description of the VMs in a Source of type Vmware. - * @type \Google\Cloud\VMMigration\V1\AwsVmsDetails $aws_vms - * The description of the VMs in a Source of type AWS. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the source was last queried (if the result - * is from the cache). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The description of the VMs in a Source of type Vmware. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmsDetails vmware_vms = 1; - * @return \Google\Cloud\VMMigration\V1\VmwareVmsDetails|null - */ - public function getVmwareVms() - { - return $this->readOneof(1); - } - - public function hasVmwareVms() - { - return $this->hasOneof(1); - } - - /** - * The description of the VMs in a Source of type Vmware. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmsDetails vmware_vms = 1; - * @param \Google\Cloud\VMMigration\V1\VmwareVmsDetails $var - * @return $this - */ - public function setVmwareVms($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmwareVmsDetails::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The description of the VMs in a Source of type AWS. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmsDetails aws_vms = 3; - * @return \Google\Cloud\VMMigration\V1\AwsVmsDetails|null - */ - public function getAwsVms() - { - return $this->readOneof(3); - } - - public function hasAwsVms() - { - return $this->hasOneof(3); - } - - /** - * The description of the VMs in a Source of type AWS. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmsDetails aws_vms = 3; - * @param \Google\Cloud\VMMigration\V1\AwsVmsDetails $var - * @return $this - */ - public function setAwsVms($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AwsVmsDetails::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Output only. The timestamp when the source was last queried (if the result - * is from the cache). - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when the source was last queried (if the result - * is from the cache). - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getSourceVms() - { - return $this->whichOneof("SourceVms"); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationRequest.php deleted file mode 100644 index d71b82ccb9b5..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.FinalizeMigrationRequest - */ -class FinalizeMigrationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $migrating_vm = ''; - - /** - * @param string $migratingVm Required. The name of the MigratingVm. Please see - * {@see VmMigrationClient::migratingVmName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\FinalizeMigrationRequest - * - * @experimental - */ - public static function build(string $migratingVm): self - { - return (new self()) - ->setMigratingVm($migratingVm); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $migrating_vm - * Required. The name of the MigratingVm. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getMigratingVm() - { - return $this->migrating_vm; - } - - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setMigratingVm($var) - { - GPBUtil::checkString($var, True); - $this->migrating_vm = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationResponse.php deleted file mode 100644 index bdfdb9430da7..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.FinalizeMigrationResponse - */ -class FinalizeMigrationResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCloneJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCloneJobRequest.php deleted file mode 100644 index 48dce1bf1c80..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCloneJobRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.GetCloneJobRequest - */ -class GetCloneJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the CloneJob. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the CloneJob. Please see - * {@see VmMigrationClient::cloneJobName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\GetCloneJobRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the CloneJob. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the CloneJob. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the CloneJob. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCutoverJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCutoverJobRequest.php deleted file mode 100644 index 9d30019287a5..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCutoverJobRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.GetCutoverJobRequest - */ -class GetCutoverJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the CutoverJob. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the CutoverJob. Please see - * {@see VmMigrationClient::cutoverJobName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\GetCutoverJobRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the CutoverJob. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the CutoverJob. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the CutoverJob. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetDatacenterConnectorRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetDatacenterConnectorRequest.php deleted file mode 100644 index 7aa5823e702a..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetDatacenterConnectorRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.GetDatacenterConnectorRequest - */ -class GetDatacenterConnectorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the DatacenterConnector. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the DatacenterConnector. Please see - * {@see VmMigrationClient::datacenterConnectorName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\GetDatacenterConnectorRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the DatacenterConnector. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the DatacenterConnector. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the DatacenterConnector. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetGroupRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetGroupRequest.php deleted file mode 100644 index fbf5c771c2d6..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetGroupRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.GetGroupRequest - */ -class GetGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The group name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The group name. Please see - * {@see VmMigrationClient::groupName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\GetGroupRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The group name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The group name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The group name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetMigratingVmRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetMigratingVmRequest.php deleted file mode 100644 index 3e59f540c798..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetMigratingVmRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.vmmigration.v1.GetMigratingVmRequest - */ -class GetMigratingVmRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The level of details of the migrating VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $name Required. The name of the MigratingVm. Please see - * {@see VmMigrationClient::migratingVmName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\GetMigratingVmRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the MigratingVm. - * @type int $view - * Optional. The level of details of the migrating VM. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The level of details of the migrating VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. The level of details of the migrating VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\MigratingVmView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetReplicationCycleRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetReplicationCycleRequest.php deleted file mode 100644 index c86a34b32a7b..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetReplicationCycleRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.GetReplicationCycleRequest - */ -class GetReplicationCycleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the ReplicationCycle. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the ReplicationCycle. Please see - * {@see VmMigrationClient::replicationCycleName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\GetReplicationCycleRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the ReplicationCycle. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the ReplicationCycle. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the ReplicationCycle. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetSourceRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetSourceRequest.php deleted file mode 100644 index 28346a94ac29..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetSourceRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.GetSourceRequest - */ -class GetSourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Source name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The Source name. Please see - * {@see VmMigrationClient::sourceName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\GetSourceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The Source name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Source name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The Source name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetTargetProjectRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetTargetProjectRequest.php deleted file mode 100644 index 244edd28be21..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetTargetProjectRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.GetTargetProjectRequest - */ -class GetTargetProjectRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The TargetProject name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The TargetProject name. Please see - * {@see VmMigrationClient::targetProjectName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\GetTargetProjectRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The TargetProject name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The TargetProject name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The TargetProject name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetUtilizationReportRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetUtilizationReportRequest.php deleted file mode 100644 index eb7bac23ec7d..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetUtilizationReportRequest.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.vmmigration.v1.GetUtilizationReportRequest - */ -class GetUtilizationReportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Utilization Report name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The level of details of the report. - * Defaults to FULL - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $name Required. The Utilization Report name. Please see - * {@see VmMigrationClient::utilizationReportName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\GetUtilizationReportRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The Utilization Report name. - * @type int $view - * Optional. The level of details of the report. - * Defaults to FULL - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Utilization Report name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The Utilization Report name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The level of details of the report. - * Defaults to FULL - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. The level of details of the report. - * Defaults to FULL - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\UtilizationReportView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group.php deleted file mode 100644 index ea661a9c1fef..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group.php +++ /dev/null @@ -1,224 +0,0 @@ -google.cloud.vmmigration.v1.Group - */ -class Group extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The Group name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The create time timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update time timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User-provided description of the group. - * - * Generated from protobuf field string description = 4; - */ - protected $description = ''; - /** - * Display name is a user defined name for this group which can be updated. - * - * Generated from protobuf field string display_name = 5; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The Group name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The create time timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update time timestamp. - * @type string $description - * User-provided description of the group. - * @type string $display_name - * Display name is a user defined name for this group which can be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The Group name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The Group name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The create time timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The create time timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The update time timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The update time timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * User-provided description of the group. - * - * Generated from protobuf field string description = 4; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User-provided description of the group. - * - * Generated from protobuf field string description = 4; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Display name is a user defined name for this group which can be updated. - * - * Generated from protobuf field string display_name = 5; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Display name is a user defined name for this group which can be updated. - * - * Generated from protobuf field string display_name = 5; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InitializingReplicationStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InitializingReplicationStep.php deleted file mode 100644 index d25d4156a11d..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InitializingReplicationStep.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.InitializingReplicationStep - */ -class InitializingReplicationStep extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InstantiatingMigratedVMStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InstantiatingMigratedVMStep.php deleted file mode 100644 index d4b0ac54435f..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InstantiatingMigratedVMStep.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.InstantiatingMigratedVMStep - */ -class InstantiatingMigratedVMStep extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsRequest.php deleted file mode 100644 index 3d8d4efa2f3e..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.vmmigration.v1.ListCloneJobsRequest - */ -class ListCloneJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of source VMs. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of clone jobs to return. The service may - * return fewer than this value. If unspecified, at most 500 clone jobs will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Required. A page token, received from a previous `ListCloneJobs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListCloneJobs` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page_token = ''; - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of source VMs. Please see - * {@see VmMigrationClient::migratingVmName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\ListCloneJobsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent, which owns this collection of source VMs. - * @type int $page_size - * Optional. The maximum number of clone jobs to return. The service may - * return fewer than this value. If unspecified, at most 500 clone jobs will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * @type string $page_token - * Required. A page token, received from a previous `ListCloneJobs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListCloneJobs` must - * match the call that provided the page token. - * @type string $filter - * Optional. The filter request. - * @type string $order_by - * Optional. the order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of source VMs. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent, which owns this collection of source VMs. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of clone jobs to return. The service may - * return fewer than this value. If unspecified, at most 500 clone jobs will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of clone jobs to return. The service may - * return fewer than this value. If unspecified, at most 500 clone jobs will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Required. A page token, received from a previous `ListCloneJobs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListCloneJobs` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Required. A page token, received from a previous `ListCloneJobs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListCloneJobs` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsResponse.php deleted file mode 100644 index 5c89b1f50d7c..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.vmmigration.v1.ListCloneJobsResponse - */ -class ListCloneJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The list of clone jobs response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob clone_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $clone_jobs; - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VMMigration\V1\CloneJob>|\Google\Protobuf\Internal\RepeatedField $clone_jobs - * Output only. The list of clone jobs response. - * @type string $next_page_token - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The list of clone jobs response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob clone_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCloneJobs() - { - return $this->clone_jobs; - } - - /** - * Output only. The list of clone jobs response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob clone_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\CloneJob>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCloneJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CloneJob::class); - $this->clone_jobs = $arr; - - return $this; - } - - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsRequest.php deleted file mode 100644 index 07b28f2c7d31..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.vmmigration.v1.ListCutoverJobsRequest - */ -class ListCutoverJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of migrating VMs. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of cutover jobs to return. The service may - * return fewer than this value. If unspecified, at most 500 cutover jobs will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Required. A page token, received from a previous `ListCutoverJobs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListCutoverJobs` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page_token = ''; - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of migrating VMs. Please see - * {@see VmMigrationClient::migratingVmName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\ListCutoverJobsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent, which owns this collection of migrating VMs. - * @type int $page_size - * Optional. The maximum number of cutover jobs to return. The service may - * return fewer than this value. If unspecified, at most 500 cutover jobs will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * @type string $page_token - * Required. A page token, received from a previous `ListCutoverJobs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListCutoverJobs` must - * match the call that provided the page token. - * @type string $filter - * Optional. The filter request. - * @type string $order_by - * Optional. the order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of migrating VMs. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent, which owns this collection of migrating VMs. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of cutover jobs to return. The service may - * return fewer than this value. If unspecified, at most 500 cutover jobs will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of cutover jobs to return. The service may - * return fewer than this value. If unspecified, at most 500 cutover jobs will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Required. A page token, received from a previous `ListCutoverJobs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListCutoverJobs` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Required. A page token, received from a previous `ListCutoverJobs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListCutoverJobs` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsResponse.php deleted file mode 100644 index 0eb0adebbb36..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.vmmigration.v1.ListCutoverJobsResponse - */ -class ListCutoverJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The list of cutover jobs response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob cutover_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $cutover_jobs; - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VMMigration\V1\CutoverJob>|\Google\Protobuf\Internal\RepeatedField $cutover_jobs - * Output only. The list of cutover jobs response. - * @type string $next_page_token - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The list of cutover jobs response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob cutover_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCutoverJobs() - { - return $this->cutover_jobs; - } - - /** - * Output only. The list of cutover jobs response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob cutover_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\CutoverJob>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCutoverJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CutoverJob::class); - $this->cutover_jobs = $arr; - - return $this; - } - - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsRequest.php deleted file mode 100644 index ec0686fe621f..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsRequest.php +++ /dev/null @@ -1,245 +0,0 @@ -google.cloud.vmmigration.v1.ListDatacenterConnectorsRequest - */ -class ListDatacenterConnectorsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of connectors. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of connectors to return. The service may - * return fewer than this value. If unspecified, at most 500 sources will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Required. A page token, received from a previous `ListDatacenterConnectors` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListDatacenterConnectors` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page_token = ''; - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of connectors. Please see - * {@see VmMigrationClient::sourceName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\ListDatacenterConnectorsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent, which owns this collection of connectors. - * @type int $page_size - * Optional. The maximum number of connectors to return. The service may - * return fewer than this value. If unspecified, at most 500 sources will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * Required. A page token, received from a previous `ListDatacenterConnectors` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListDatacenterConnectors` must match the call that provided the page - * token. - * @type string $filter - * Optional. The filter request. - * @type string $order_by - * Optional. the order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of connectors. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent, which owns this collection of connectors. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of connectors to return. The service may - * return fewer than this value. If unspecified, at most 500 sources will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of connectors to return. The service may - * return fewer than this value. If unspecified, at most 500 sources will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Required. A page token, received from a previous `ListDatacenterConnectors` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListDatacenterConnectors` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Required. A page token, received from a previous `ListDatacenterConnectors` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListDatacenterConnectors` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsResponse.php deleted file mode 100644 index 8aa1c27e3113..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.vmmigration.v1.ListDatacenterConnectorsResponse - */ -class ListDatacenterConnectorsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The list of sources response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connectors = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $datacenter_connectors; - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VMMigration\V1\DatacenterConnector>|\Google\Protobuf\Internal\RepeatedField $datacenter_connectors - * Output only. The list of sources response. - * @type string $next_page_token - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The list of sources response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connectors = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDatacenterConnectors() - { - return $this->datacenter_connectors; - } - - /** - * Output only. The list of sources response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connectors = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\DatacenterConnector>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDatacenterConnectors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\DatacenterConnector::class); - $this->datacenter_connectors = $arr; - - return $this; - } - - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsRequest.php deleted file mode 100644 index 11b8be3b9a9b..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.vmmigration.v1.ListGroupsRequest - */ -class ListGroupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of groups. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of groups to return. The service may return - * fewer than this value. If unspecified, at most 500 groups will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Required. A page token, received from a previous `ListGroups` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListGroups` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page_token = ''; - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of groups. Please see - * {@see VmMigrationClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\ListGroupsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent, which owns this collection of groups. - * @type int $page_size - * Optional. The maximum number of groups to return. The service may return - * fewer than this value. If unspecified, at most 500 groups will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * Required. A page token, received from a previous `ListGroups` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListGroups` must - * match the call that provided the page token. - * @type string $filter - * Optional. The filter request. - * @type string $order_by - * Optional. the order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of groups. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent, which owns this collection of groups. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of groups to return. The service may return - * fewer than this value. If unspecified, at most 500 groups will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of groups to return. The service may return - * fewer than this value. If unspecified, at most 500 groups will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Required. A page token, received from a previous `ListGroups` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListGroups` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Required. A page token, received from a previous `ListGroups` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListGroups` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsResponse.php deleted file mode 100644 index 3296fe31b740..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.vmmigration.v1.ListGroupsResponse - */ -class ListGroupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The list of groups response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Group groups = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $groups; - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VMMigration\V1\Group>|\Google\Protobuf\Internal\RepeatedField $groups - * Output only. The list of groups response. - * @type string $next_page_token - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The list of groups response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Group groups = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGroups() - { - return $this->groups; - } - - /** - * Output only. The list of groups response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Group groups = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\Group>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\Group::class); - $this->groups = $arr; - - return $this; - } - - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsRequest.php deleted file mode 100644 index 51052e3a9534..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsRequest.php +++ /dev/null @@ -1,275 +0,0 @@ -google.cloud.vmmigration.v1.ListMigratingVmsRequest - */ -class ListMigratingVmsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of MigratingVms. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of migrating VMs to return. The service may - * return fewer than this value. If unspecified, at most 500 migrating VMs - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Required. A page token, received from a previous `ListMigratingVms` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMigratingVms` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page_token = ''; - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - /** - * Optional. The level of details of each migrating VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $parent Required. The parent, which owns this collection of MigratingVms. Please see - * {@see VmMigrationClient::sourceName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\ListMigratingVmsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent, which owns this collection of MigratingVms. - * @type int $page_size - * Optional. The maximum number of migrating VMs to return. The service may - * return fewer than this value. If unspecified, at most 500 migrating VMs - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * @type string $page_token - * Required. A page token, received from a previous `ListMigratingVms` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMigratingVms` - * must match the call that provided the page token. - * @type string $filter - * Optional. The filter request. - * @type string $order_by - * Optional. the order by fields for the result. - * @type int $view - * Optional. The level of details of each migrating VM. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of MigratingVms. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent, which owns this collection of MigratingVms. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of migrating VMs to return. The service may - * return fewer than this value. If unspecified, at most 500 migrating VMs - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of migrating VMs to return. The service may - * return fewer than this value. If unspecified, at most 500 migrating VMs - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Required. A page token, received from a previous `ListMigratingVms` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMigratingVms` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Required. A page token, received from a previous `ListMigratingVms` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMigratingVms` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Optional. The level of details of each migrating VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. The level of details of each migrating VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\MigratingVmView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsResponse.php deleted file mode 100644 index 3f42ab8737dc..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.vmmigration.v1.ListMigratingVmsResponse - */ -class ListMigratingVmsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The list of Migrating VMs response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigratingVm migrating_vms = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $migrating_vms; - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VMMigration\V1\MigratingVm>|\Google\Protobuf\Internal\RepeatedField $migrating_vms - * Output only. The list of Migrating VMs response. - * @type string $next_page_token - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The list of Migrating VMs response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigratingVm migrating_vms = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMigratingVms() - { - return $this->migrating_vms; - } - - /** - * Output only. The list of Migrating VMs response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigratingVm migrating_vms = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\MigratingVm>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMigratingVms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\MigratingVm::class); - $this->migrating_vms = $arr; - - return $this; - } - - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesRequest.php deleted file mode 100644 index 816d448a57c1..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.vmmigration.v1.ListReplicationCyclesRequest - */ -class ListReplicationCyclesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of ReplicationCycles. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of replication cycles to return. The service - * may return fewer than this value. If unspecified, at most 100 migrating VMs - * will be returned. The maximum value is 100; values above 100 will be - * coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Required. A page token, received from a previous `ListReplicationCycles` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListReplicationCycles` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page_token = ''; - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of ReplicationCycles. Please see - * {@see VmMigrationClient::migratingVmName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\ListReplicationCyclesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent, which owns this collection of ReplicationCycles. - * @type int $page_size - * Optional. The maximum number of replication cycles to return. The service - * may return fewer than this value. If unspecified, at most 100 migrating VMs - * will be returned. The maximum value is 100; values above 100 will be - * coerced to 100. - * @type string $page_token - * Required. A page token, received from a previous `ListReplicationCycles` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListReplicationCycles` - * must match the call that provided the page token. - * @type string $filter - * Optional. The filter request. - * @type string $order_by - * Optional. the order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of ReplicationCycles. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent, which owns this collection of ReplicationCycles. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of replication cycles to return. The service - * may return fewer than this value. If unspecified, at most 100 migrating VMs - * will be returned. The maximum value is 100; values above 100 will be - * coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of replication cycles to return. The service - * may return fewer than this value. If unspecified, at most 100 migrating VMs - * will be returned. The maximum value is 100; values above 100 will be - * coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Required. A page token, received from a previous `ListReplicationCycles` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListReplicationCycles` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Required. A page token, received from a previous `ListReplicationCycles` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListReplicationCycles` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesResponse.php deleted file mode 100644 index 2e8b8b96042f..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.vmmigration.v1.ListReplicationCyclesResponse - */ -class ListReplicationCyclesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The list of replication cycles response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.ReplicationCycle replication_cycles = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $replication_cycles; - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VMMigration\V1\ReplicationCycle>|\Google\Protobuf\Internal\RepeatedField $replication_cycles - * Output only. The list of replication cycles response. - * @type string $next_page_token - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The list of replication cycles response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.ReplicationCycle replication_cycles = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReplicationCycles() - { - return $this->replication_cycles; - } - - /** - * Output only. The list of replication cycles response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.ReplicationCycle replication_cycles = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\ReplicationCycle>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReplicationCycles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\ReplicationCycle::class); - $this->replication_cycles = $arr; - - return $this; - } - - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesRequest.php deleted file mode 100644 index 8286f34c3e6c..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.vmmigration.v1.ListSourcesRequest - */ -class ListSourcesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of sources. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of sources to return. The service may return - * fewer than this value. If unspecified, at most 500 sources will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Required. A page token, received from a previous `ListSources` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListSources` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page_token = ''; - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of sources. Please see - * {@see VmMigrationClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\ListSourcesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent, which owns this collection of sources. - * @type int $page_size - * Optional. The maximum number of sources to return. The service may return - * fewer than this value. If unspecified, at most 500 sources will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * Required. A page token, received from a previous `ListSources` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListSources` must - * match the call that provided the page token. - * @type string $filter - * Optional. The filter request. - * @type string $order_by - * Optional. the order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of sources. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent, which owns this collection of sources. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of sources to return. The service may return - * fewer than this value. If unspecified, at most 500 sources will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of sources to return. The service may return - * fewer than this value. If unspecified, at most 500 sources will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Required. A page token, received from a previous `ListSources` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListSources` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Required. A page token, received from a previous `ListSources` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListSources` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesResponse.php deleted file mode 100644 index 413cd7b0d15d..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.vmmigration.v1.ListSourcesResponse - */ -class ListSourcesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The list of sources response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Source sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $sources; - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VMMigration\V1\Source>|\Google\Protobuf\Internal\RepeatedField $sources - * Output only. The list of sources response. - * @type string $next_page_token - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The list of sources response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Source sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSources() - { - return $this->sources; - } - - /** - * Output only. The list of sources response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Source sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\Source>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\Source::class); - $this->sources = $arr; - - return $this; - } - - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsRequest.php deleted file mode 100644 index 82fa22a9be68..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.vmmigration.v1.ListTargetProjectsRequest - */ -class ListTargetProjectsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of targets. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of targets to return. The service may return - * fewer than this value. If unspecified, at most 500 targets will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Required. A page token, received from a previous `ListTargets` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListTargets` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page_token = ''; - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of targets. Please see - * {@see VmMigrationClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\ListTargetProjectsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent, which owns this collection of targets. - * @type int $page_size - * Optional. The maximum number of targets to return. The service may return - * fewer than this value. If unspecified, at most 500 targets will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * Required. A page token, received from a previous `ListTargets` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListTargets` must - * match the call that provided the page token. - * @type string $filter - * Optional. The filter request. - * @type string $order_by - * Optional. the order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of targets. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent, which owns this collection of targets. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of targets to return. The service may return - * fewer than this value. If unspecified, at most 500 targets will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of targets to return. The service may return - * fewer than this value. If unspecified, at most 500 targets will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Required. A page token, received from a previous `ListTargets` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListTargets` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Required. A page token, received from a previous `ListTargets` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListTargets` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsResponse.php deleted file mode 100644 index a51c7c607f95..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.vmmigration.v1.ListTargetProjectsResponse - */ -class ListTargetProjectsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The list of target response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.TargetProject target_projects = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $target_projects; - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VMMigration\V1\TargetProject>|\Google\Protobuf\Internal\RepeatedField $target_projects - * Output only. The list of target response. - * @type string $next_page_token - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The list of target response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.TargetProject target_projects = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargetProjects() - { - return $this->target_projects; - } - - /** - * Output only. The list of target response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.TargetProject target_projects = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\TargetProject>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargetProjects($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\TargetProject::class); - $this->target_projects = $arr; - - return $this; - } - - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsRequest.php deleted file mode 100644 index a1b2d9ef827f..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsRequest.php +++ /dev/null @@ -1,279 +0,0 @@ -google.cloud.vmmigration.v1.ListUtilizationReportsRequest - */ -class ListUtilizationReportsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Utilization Reports parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The level of details of each report. - * Defaults to BASIC. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - /** - * Optional. The maximum number of reports to return. The service may return - * fewer than this value. If unspecified, at most 500 reports will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Required. A page token, received from a previous `ListUtilizationReports` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListUtilizationReports` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page_token = ''; - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The Utilization Reports parent. Please see - * {@see VmMigrationClient::sourceName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\ListUtilizationReportsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The Utilization Reports parent. - * @type int $view - * Optional. The level of details of each report. - * Defaults to BASIC. - * @type int $page_size - * Optional. The maximum number of reports to return. The service may return - * fewer than this value. If unspecified, at most 500 reports will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * Required. A page token, received from a previous `ListUtilizationReports` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListUtilizationReports` - * must match the call that provided the page token. - * @type string $filter - * Optional. The filter request. - * @type string $order_by - * Optional. the order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Utilization Reports parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The Utilization Reports parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The level of details of each report. - * Defaults to BASIC. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. The level of details of each report. - * Defaults to BASIC. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\UtilizationReportView::class); - $this->view = $var; - - return $this; - } - - /** - * Optional. The maximum number of reports to return. The service may return - * fewer than this value. If unspecified, at most 500 reports will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of reports to return. The service may return - * fewer than this value. If unspecified, at most 500 reports will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Required. A page token, received from a previous `ListUtilizationReports` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListUtilizationReports` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Required. A page token, received from a previous `ListUtilizationReports` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListUtilizationReports` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsResponse.php deleted file mode 100644 index a82c22f473b4..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.vmmigration.v1.ListUtilizationReportsResponse - */ -class ListUtilizationReportsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The list of reports. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.UtilizationReport utilization_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $utilization_reports; - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VMMigration\V1\UtilizationReport>|\Google\Protobuf\Internal\RepeatedField $utilization_reports - * Output only. The list of reports. - * @type string $next_page_token - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The list of reports. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.UtilizationReport utilization_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUtilizationReports() - { - return $this->utilization_reports; - } - - /** - * Output only. The list of reports. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.UtilizationReport utilization_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\UtilizationReport>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUtilizationReports($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\UtilizationReport::class); - $this->utilization_reports = $arr; - - return $this; - } - - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm.php deleted file mode 100644 index a86771ba3c43..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm.php +++ /dev/null @@ -1,796 +0,0 @@ -google.cloud.vmmigration.v1.MigratingVm - */ -class MigratingVm extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The identifier of the MigratingVm. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The unique ID of the VM in the source. - * The VM's name in vSphere can be changed, so this is not the VM's name but - * rather its moRef id. This id is of the form vm-. - * - * Generated from protobuf field string source_vm_id = 2; - */ - protected $source_vm_id = ''; - /** - * The display name attached to the MigratingVm by the user. - * - * Generated from protobuf field string display_name = 18; - */ - protected $display_name = ''; - /** - * The description attached to the migrating VM by the user. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * The replication schedule policy. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulePolicy policy = 8; - */ - protected $policy = null; - /** - * Output only. The time the migrating VM was created (this refers to this - * resource and not to the time it was installed in the source). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last time the migrating VM resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The most updated snapshot created time in the source that - * finished replication. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationSync last_sync = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_sync = null; - /** - * Output only. State of the MigratingVm. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm.State state = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The last time the migrating VM state was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_time = null; - /** - * Output only. The percentage progress of the current running replication - * cycle. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle current_sync_info = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $current_sync_info = null; - /** - * Output only. The group this migrating vm is included in, if any. The group - * is represented by the full path of the appropriate - * [Group][google.cloud.vmmigration.v1.Group] resource. - * - * Generated from protobuf field string group = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $group = ''; - /** - * The labels of the migrating VM. - * - * Generated from protobuf field map labels = 16; - */ - private $labels; - /** - * Output only. The recent [clone jobs][google.cloud.vmmigration.v1.CloneJob] - * performed on the migrating VM. This field holds the vm's last completed - * clone job and the vm's running clone job, if one exists. - * Note: To have this field populated you need to explicitly request it via - * the "view" parameter of the Get/List request. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob recent_clone_jobs = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $recent_clone_jobs; - /** - * Output only. Provides details on the state of the Migrating VM in case of - * an error in replication. - * - * Generated from protobuf field .google.rpc.Status error = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - /** - * Output only. The recent cutover jobs performed on the migrating VM. - * This field holds the vm's last completed cutover job and the vm's - * running cutover job, if one exists. - * Note: To have this field populated you need to explicitly request it via - * the "view" parameter of the Get/List request. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob recent_cutover_jobs = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $recent_cutover_jobs; - protected $target_vm_defaults; - protected $source_vm_details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VMMigration\V1\ComputeEngineTargetDefaults $compute_engine_target_defaults - * Details of the target VM in Compute Engine. - * @type \Google\Cloud\VMMigration\V1\AwsSourceVmDetails $aws_source_vm_details - * Output only. Details of the VM from an AWS source. - * @type string $name - * Output only. The identifier of the MigratingVm. - * @type string $source_vm_id - * The unique ID of the VM in the source. - * The VM's name in vSphere can be changed, so this is not the VM's name but - * rather its moRef id. This id is of the form vm-. - * @type string $display_name - * The display name attached to the MigratingVm by the user. - * @type string $description - * The description attached to the migrating VM by the user. - * @type \Google\Cloud\VMMigration\V1\SchedulePolicy $policy - * The replication schedule policy. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the migrating VM was created (this refers to this - * resource and not to the time it was installed in the source). - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last time the migrating VM resource was updated. - * @type \Google\Cloud\VMMigration\V1\ReplicationSync $last_sync - * Output only. The most updated snapshot created time in the source that - * finished replication. - * @type int $state - * Output only. State of the MigratingVm. - * @type \Google\Protobuf\Timestamp $state_time - * Output only. The last time the migrating VM state was updated. - * @type \Google\Cloud\VMMigration\V1\ReplicationCycle $current_sync_info - * Output only. The percentage progress of the current running replication - * cycle. - * @type string $group - * Output only. The group this migrating vm is included in, if any. The group - * is represented by the full path of the appropriate - * [Group][google.cloud.vmmigration.v1.Group] resource. - * @type array|\Google\Protobuf\Internal\MapField $labels - * The labels of the migrating VM. - * @type array<\Google\Cloud\VMMigration\V1\CloneJob>|\Google\Protobuf\Internal\RepeatedField $recent_clone_jobs - * Output only. The recent [clone jobs][google.cloud.vmmigration.v1.CloneJob] - * performed on the migrating VM. This field holds the vm's last completed - * clone job and the vm's running clone job, if one exists. - * Note: To have this field populated you need to explicitly request it via - * the "view" parameter of the Get/List request. - * @type \Google\Rpc\Status $error - * Output only. Provides details on the state of the Migrating VM in case of - * an error in replication. - * @type array<\Google\Cloud\VMMigration\V1\CutoverJob>|\Google\Protobuf\Internal\RepeatedField $recent_cutover_jobs - * Output only. The recent cutover jobs performed on the migrating VM. - * This field holds the vm's last completed cutover job and the vm's - * running cutover job, if one exists. - * Note: To have this field populated you need to explicitly request it via - * the "view" parameter of the Get/List request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Details of the target VM in Compute Engine. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDefaults compute_engine_target_defaults = 26; - * @return \Google\Cloud\VMMigration\V1\ComputeEngineTargetDefaults|null - */ - public function getComputeEngineTargetDefaults() - { - return $this->readOneof(26); - } - - public function hasComputeEngineTargetDefaults() - { - return $this->hasOneof(26); - } - - /** - * Details of the target VM in Compute Engine. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDefaults compute_engine_target_defaults = 26; - * @param \Google\Cloud\VMMigration\V1\ComputeEngineTargetDefaults $var - * @return $this - */ - public function setComputeEngineTargetDefaults($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeEngineTargetDefaults::class); - $this->writeOneof(26, $var); - - return $this; - } - - /** - * Output only. Details of the VM from an AWS source. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails aws_source_vm_details = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\AwsSourceVmDetails|null - */ - public function getAwsSourceVmDetails() - { - return $this->readOneof(29); - } - - public function hasAwsSourceVmDetails() - { - return $this->hasOneof(29); - } - - /** - * Output only. Details of the VM from an AWS source. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails aws_source_vm_details = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\AwsSourceVmDetails $var - * @return $this - */ - public function setAwsSourceVmDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AwsSourceVmDetails::class); - $this->writeOneof(29, $var); - - return $this; - } - - /** - * Output only. The identifier of the MigratingVm. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The identifier of the MigratingVm. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The unique ID of the VM in the source. - * The VM's name in vSphere can be changed, so this is not the VM's name but - * rather its moRef id. This id is of the form vm-. - * - * Generated from protobuf field string source_vm_id = 2; - * @return string - */ - public function getSourceVmId() - { - return $this->source_vm_id; - } - - /** - * The unique ID of the VM in the source. - * The VM's name in vSphere can be changed, so this is not the VM's name but - * rather its moRef id. This id is of the form vm-. - * - * Generated from protobuf field string source_vm_id = 2; - * @param string $var - * @return $this - */ - public function setSourceVmId($var) - { - GPBUtil::checkString($var, True); - $this->source_vm_id = $var; - - return $this; - } - - /** - * The display name attached to the MigratingVm by the user. - * - * Generated from protobuf field string display_name = 18; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name attached to the MigratingVm by the user. - * - * Generated from protobuf field string display_name = 18; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The description attached to the migrating VM by the user. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description attached to the migrating VM by the user. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The replication schedule policy. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulePolicy policy = 8; - * @return \Google\Cloud\VMMigration\V1\SchedulePolicy|null - */ - public function getPolicy() - { - return $this->policy; - } - - public function hasPolicy() - { - return isset($this->policy); - } - - public function clearPolicy() - { - unset($this->policy); - } - - /** - * The replication schedule policy. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulePolicy policy = 8; - * @param \Google\Cloud\VMMigration\V1\SchedulePolicy $var - * @return $this - */ - public function setPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\SchedulePolicy::class); - $this->policy = $var; - - return $this; - } - - /** - * Output only. The time the migrating VM was created (this refers to this - * resource and not to the time it was installed in the source). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the migrating VM was created (this refers to this - * resource and not to the time it was installed in the source). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The last time the migrating VM resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last time the migrating VM resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. The most updated snapshot created time in the source that - * finished replication. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationSync last_sync = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\ReplicationSync|null - */ - public function getLastSync() - { - return $this->last_sync; - } - - public function hasLastSync() - { - return isset($this->last_sync); - } - - public function clearLastSync() - { - unset($this->last_sync); - } - - /** - * Output only. The most updated snapshot created time in the source that - * finished replication. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationSync last_sync = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\ReplicationSync $var - * @return $this - */ - public function setLastSync($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicationSync::class); - $this->last_sync = $var; - - return $this; - } - - /** - * Output only. State of the MigratingVm. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm.State state = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the MigratingVm. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm.State state = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\MigratingVm\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The last time the migrating VM state was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStateTime() - { - return $this->state_time; - } - - public function hasStateTime() - { - return isset($this->state_time); - } - - public function clearStateTime() - { - unset($this->state_time); - } - - /** - * Output only. The last time the migrating VM state was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->state_time = $var; - - return $this; - } - - /** - * Output only. The percentage progress of the current running replication - * cycle. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle current_sync_info = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\ReplicationCycle|null - */ - public function getCurrentSyncInfo() - { - return $this->current_sync_info; - } - - public function hasCurrentSyncInfo() - { - return isset($this->current_sync_info); - } - - public function clearCurrentSyncInfo() - { - unset($this->current_sync_info); - } - - /** - * Output only. The percentage progress of the current running replication - * cycle. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle current_sync_info = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\ReplicationCycle $var - * @return $this - */ - public function setCurrentSyncInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicationCycle::class); - $this->current_sync_info = $var; - - return $this; - } - - /** - * Output only. The group this migrating vm is included in, if any. The group - * is represented by the full path of the appropriate - * [Group][google.cloud.vmmigration.v1.Group] resource. - * - * Generated from protobuf field string group = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getGroup() - { - return $this->group; - } - - /** - * Output only. The group this migrating vm is included in, if any. The group - * is represented by the full path of the appropriate - * [Group][google.cloud.vmmigration.v1.Group] resource. - * - * Generated from protobuf field string group = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkString($var, True); - $this->group = $var; - - return $this; - } - - /** - * The labels of the migrating VM. - * - * Generated from protobuf field map labels = 16; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * The labels of the migrating VM. - * - * Generated from protobuf field map labels = 16; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. The recent [clone jobs][google.cloud.vmmigration.v1.CloneJob] - * performed on the migrating VM. This field holds the vm's last completed - * clone job and the vm's running clone job, if one exists. - * Note: To have this field populated you need to explicitly request it via - * the "view" parameter of the Get/List request. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob recent_clone_jobs = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRecentCloneJobs() - { - return $this->recent_clone_jobs; - } - - /** - * Output only. The recent [clone jobs][google.cloud.vmmigration.v1.CloneJob] - * performed on the migrating VM. This field holds the vm's last completed - * clone job and the vm's running clone job, if one exists. - * Note: To have this field populated you need to explicitly request it via - * the "view" parameter of the Get/List request. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob recent_clone_jobs = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\CloneJob>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRecentCloneJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CloneJob::class); - $this->recent_clone_jobs = $arr; - - return $this; - } - - /** - * Output only. Provides details on the state of the Migrating VM in case of - * an error in replication. - * - * Generated from protobuf field .google.rpc.Status error = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. Provides details on the state of the Migrating VM in case of - * an error in replication. - * - * Generated from protobuf field .google.rpc.Status error = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * Output only. The recent cutover jobs performed on the migrating VM. - * This field holds the vm's last completed cutover job and the vm's - * running cutover job, if one exists. - * Note: To have this field populated you need to explicitly request it via - * the "view" parameter of the Get/List request. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob recent_cutover_jobs = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRecentCutoverJobs() - { - return $this->recent_cutover_jobs; - } - - /** - * Output only. The recent cutover jobs performed on the migrating VM. - * This field holds the vm's last completed cutover job and the vm's - * running cutover job, if one exists. - * Note: To have this field populated you need to explicitly request it via - * the "view" parameter of the Get/List request. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob recent_cutover_jobs = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\CutoverJob>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRecentCutoverJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CutoverJob::class); - $this->recent_cutover_jobs = $arr; - - return $this; - } - - /** - * @return string - */ - public function getTargetVmDefaults() - { - return $this->whichOneof("target_vm_defaults"); - } - - /** - * @return string - */ - public function getSourceVmDetails() - { - return $this->whichOneof("source_vm_details"); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/State.php deleted file mode 100644 index 1677e69889d1..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/State.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.vmmigration.v1.MigratingVm.State - */ -class State -{ - /** - * The state was not sampled by the health checks yet. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The VM in the source is being verified. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The source VM was verified, and it's ready to start replication. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * Migration is going through the first sync cycle. - * - * Generated from protobuf enum FIRST_SYNC = 3; - */ - const FIRST_SYNC = 3; - /** - * The replication is active, and it's running or scheduled to run. - * - * Generated from protobuf enum ACTIVE = 4; - */ - const ACTIVE = 4; - /** - * The source VM is being turned off, and a final replication is currently - * running. - * - * Generated from protobuf enum CUTTING_OVER = 7; - */ - const CUTTING_OVER = 7; - /** - * The source VM was stopped and replicated. The replication is currently - * paused. - * - * Generated from protobuf enum CUTOVER = 8; - */ - const CUTOVER = 8; - /** - * A cutover job is active and replication cycle is running the final sync. - * - * Generated from protobuf enum FINAL_SYNC = 9; - */ - const FINAL_SYNC = 9; - /** - * The replication was paused by the user and no cycles are scheduled to - * run. - * - * Generated from protobuf enum PAUSED = 10; - */ - const PAUSED = 10; - /** - * The migrating VM is being finalized and migration resources are being - * removed. - * - * Generated from protobuf enum FINALIZING = 11; - */ - const FINALIZING = 11; - /** - * The replication process is done. The migrating VM is finalized and no - * longer consumes billable resources. - * - * Generated from protobuf enum FINALIZED = 12; - */ - const FINALIZED = 12; - /** - * The replication process encountered an unrecoverable error and was - * aborted. - * - * Generated from protobuf enum ERROR = 13; - */ - const ERROR = 13; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::READY => 'READY', - self::FIRST_SYNC => 'FIRST_SYNC', - self::ACTIVE => 'ACTIVE', - self::CUTTING_OVER => 'CUTTING_OVER', - self::CUTOVER => 'CUTOVER', - self::FINAL_SYNC => 'FINAL_SYNC', - self::PAUSED => 'PAUSED', - self::FINALIZING => 'FINALIZING', - self::FINALIZED => 'FINALIZED', - self::ERROR => 'ERROR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VMMigration\V1\MigratingVm_State::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVmView.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVmView.php deleted file mode 100644 index b856588e1ba6..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVmView.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.vmmigration.v1.MigratingVmView - */ -class MigratingVmView -{ - /** - * View is unspecified. The API will fallback to the default value. - * - * Generated from protobuf enum MIGRATING_VM_VIEW_UNSPECIFIED = 0; - */ - const MIGRATING_VM_VIEW_UNSPECIFIED = 0; - /** - * Get the migrating VM basic details. - * The basic details do not include the recent clone jobs and recent cutover - * jobs lists. - * - * Generated from protobuf enum MIGRATING_VM_VIEW_BASIC = 1; - */ - const MIGRATING_VM_VIEW_BASIC = 1; - /** - * Include everything. - * - * Generated from protobuf enum MIGRATING_VM_VIEW_FULL = 2; - */ - const MIGRATING_VM_VIEW_FULL = 2; - - private static $valueToName = [ - self::MIGRATING_VM_VIEW_UNSPECIFIED => 'MIGRATING_VM_VIEW_UNSPECIFIED', - self::MIGRATING_VM_VIEW_BASIC => 'MIGRATING_VM_VIEW_BASIC', - self::MIGRATING_VM_VIEW_FULL => 'MIGRATING_VM_VIEW_FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError.php deleted file mode 100644 index 55181c0327d9..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError.php +++ /dev/null @@ -1,239 +0,0 @@ -google.cloud.vmmigration.v1.MigrationError - */ -class MigrationError extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The error code. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigrationError.ErrorCode code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $code = 0; - /** - * Output only. The localized error message. - * - * Generated from protobuf field .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error_message = null; - /** - * Output only. Suggested action for solving the error. - * - * Generated from protobuf field .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $action_item = null; - /** - * Output only. URL(s) pointing to additional information on handling the - * current error. - * - * Generated from protobuf field repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $help_links; - /** - * Output only. The time the error occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * Output only. The error code. - * @type \Google\Rpc\LocalizedMessage $error_message - * Output only. The localized error message. - * @type \Google\Rpc\LocalizedMessage $action_item - * Output only. Suggested action for solving the error. - * @type array<\Google\Rpc\Help\Link>|\Google\Protobuf\Internal\RepeatedField $help_links - * Output only. URL(s) pointing to additional information on handling the - * current error. - * @type \Google\Protobuf\Timestamp $error_time - * Output only. The time the error occurred. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The error code. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigrationError.ErrorCode code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Output only. The error code. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigrationError.ErrorCode code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\MigrationError\ErrorCode::class); - $this->code = $var; - - return $this; - } - - /** - * Output only. The localized error message. - * - * Generated from protobuf field .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\LocalizedMessage|null - */ - public function getErrorMessage() - { - return $this->error_message; - } - - public function hasErrorMessage() - { - return isset($this->error_message); - } - - public function clearErrorMessage() - { - unset($this->error_message); - } - - /** - * Output only. The localized error message. - * - * Generated from protobuf field .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\LocalizedMessage $var - * @return $this - */ - public function setErrorMessage($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\LocalizedMessage::class); - $this->error_message = $var; - - return $this; - } - - /** - * Output only. Suggested action for solving the error. - * - * Generated from protobuf field .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\LocalizedMessage|null - */ - public function getActionItem() - { - return $this->action_item; - } - - public function hasActionItem() - { - return isset($this->action_item); - } - - public function clearActionItem() - { - unset($this->action_item); - } - - /** - * Output only. Suggested action for solving the error. - * - * Generated from protobuf field .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\LocalizedMessage $var - * @return $this - */ - public function setActionItem($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\LocalizedMessage::class); - $this->action_item = $var; - - return $this; - } - - /** - * Output only. URL(s) pointing to additional information on handling the - * current error. - * - * Generated from protobuf field repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHelpLinks() - { - return $this->help_links; - } - - /** - * Output only. URL(s) pointing to additional information on handling the - * current error. - * - * Generated from protobuf field repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Rpc\Help\Link>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHelpLinks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Help\Link::class); - $this->help_links = $arr; - - return $this; - } - - /** - * Output only. The time the error occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getErrorTime() - { - return $this->error_time; - } - - public function hasErrorTime() - { - return isset($this->error_time); - } - - public function clearErrorTime() - { - unset($this->error_time); - } - - /** - * Output only. The time the error occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setErrorTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->error_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError/ErrorCode.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError/ErrorCode.php deleted file mode 100644 index b7f0736328fd..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError/ErrorCode.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.vmmigration.v1.MigrationError.ErrorCode - */ -class ErrorCode -{ - /** - * Default value. This value is not used. - * - * Generated from protobuf enum ERROR_CODE_UNSPECIFIED = 0; - */ - const ERROR_CODE_UNSPECIFIED = 0; - /** - * Migrate for Compute encountered an unknown error. - * - * Generated from protobuf enum UNKNOWN_ERROR = 1; - */ - const UNKNOWN_ERROR = 1; - /** - * Migrate for Compute encountered an error while validating replication - * source health. - * - * Generated from protobuf enum SOURCE_VALIDATION_ERROR = 2; - */ - const SOURCE_VALIDATION_ERROR = 2; - /** - * Migrate for Compute encountered an error during source data operation. - * - * Generated from protobuf enum SOURCE_REPLICATION_ERROR = 3; - */ - const SOURCE_REPLICATION_ERROR = 3; - /** - * Migrate for Compute encountered an error during target data operation. - * - * Generated from protobuf enum TARGET_REPLICATION_ERROR = 4; - */ - const TARGET_REPLICATION_ERROR = 4; - /** - * Migrate for Compute encountered an error during OS adaptation. - * - * Generated from protobuf enum OS_ADAPTATION_ERROR = 5; - */ - const OS_ADAPTATION_ERROR = 5; - /** - * Migrate for Compute encountered an error in clone operation. - * - * Generated from protobuf enum CLONE_ERROR = 6; - */ - const CLONE_ERROR = 6; - /** - * Migrate for Compute encountered an error in cutover operation. - * - * Generated from protobuf enum CUTOVER_ERROR = 7; - */ - const CUTOVER_ERROR = 7; - /** - * Migrate for Compute encountered an error during utilization report - * creation. - * - * Generated from protobuf enum UTILIZATION_REPORT_ERROR = 8; - */ - const UTILIZATION_REPORT_ERROR = 8; - /** - * Migrate for Compute encountered an error during appliance upgrade. - * - * Generated from protobuf enum APPLIANCE_UPGRADE_ERROR = 9; - */ - const APPLIANCE_UPGRADE_ERROR = 9; - - private static $valueToName = [ - self::ERROR_CODE_UNSPECIFIED => 'ERROR_CODE_UNSPECIFIED', - self::UNKNOWN_ERROR => 'UNKNOWN_ERROR', - self::SOURCE_VALIDATION_ERROR => 'SOURCE_VALIDATION_ERROR', - self::SOURCE_REPLICATION_ERROR => 'SOURCE_REPLICATION_ERROR', - self::TARGET_REPLICATION_ERROR => 'TARGET_REPLICATION_ERROR', - self::OS_ADAPTATION_ERROR => 'OS_ADAPTATION_ERROR', - self::CLONE_ERROR => 'CLONE_ERROR', - self::CUTOVER_ERROR => 'CUTOVER_ERROR', - self::UTILIZATION_REPORT_ERROR => 'UTILIZATION_REPORT_ERROR', - self::APPLIANCE_UPGRADE_ERROR => 'APPLIANCE_UPGRADE_ERROR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ErrorCode::class, \Google\Cloud\VMMigration\V1\MigrationError_ErrorCode::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/NetworkInterface.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/NetworkInterface.php deleted file mode 100644 index e70ad652db3a..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/NetworkInterface.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.vmmigration.v1.NetworkInterface - */ -class NetworkInterface extends \Google\Protobuf\Internal\Message -{ - /** - * The network to connect the NIC to. - * - * Generated from protobuf field string network = 1; - */ - protected $network = ''; - /** - * The subnetwork to connect the NIC to. - * - * Generated from protobuf field string subnetwork = 2; - */ - protected $subnetwork = ''; - /** - * The internal IP to define in the NIC. - * The formats accepted are: `ephemeral` \ ipv4 address \ a named address - * resource full path. - * - * Generated from protobuf field string internal_ip = 3; - */ - protected $internal_ip = ''; - /** - * The external IP to define in the NIC. - * - * Generated from protobuf field string external_ip = 4; - */ - protected $external_ip = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network - * The network to connect the NIC to. - * @type string $subnetwork - * The subnetwork to connect the NIC to. - * @type string $internal_ip - * The internal IP to define in the NIC. - * The formats accepted are: `ephemeral` \ ipv4 address \ a named address - * resource full path. - * @type string $external_ip - * The external IP to define in the NIC. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The network to connect the NIC to. - * - * Generated from protobuf field string network = 1; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * The network to connect the NIC to. - * - * Generated from protobuf field string network = 1; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * The subnetwork to connect the NIC to. - * - * Generated from protobuf field string subnetwork = 2; - * @return string - */ - public function getSubnetwork() - { - return $this->subnetwork; - } - - /** - * The subnetwork to connect the NIC to. - * - * Generated from protobuf field string subnetwork = 2; - * @param string $var - * @return $this - */ - public function setSubnetwork($var) - { - GPBUtil::checkString($var, True); - $this->subnetwork = $var; - - return $this; - } - - /** - * The internal IP to define in the NIC. - * The formats accepted are: `ephemeral` \ ipv4 address \ a named address - * resource full path. - * - * Generated from protobuf field string internal_ip = 3; - * @return string - */ - public function getInternalIp() - { - return $this->internal_ip; - } - - /** - * The internal IP to define in the NIC. - * The formats accepted are: `ephemeral` \ ipv4 address \ a named address - * resource full path. - * - * Generated from protobuf field string internal_ip = 3; - * @param string $var - * @return $this - */ - public function setInternalIp($var) - { - GPBUtil::checkString($var, True); - $this->internal_ip = $var; - - return $this; - } - - /** - * The external IP to define in the NIC. - * - * Generated from protobuf field string external_ip = 4; - * @return string - */ - public function getExternalIp() - { - return $this->external_ip; - } - - /** - * The external IP to define in the NIC. - * - * Generated from protobuf field string external_ip = 4; - * @param string $var - * @return $this - */ - public function setExternalIp($var) - { - GPBUtil::checkString($var, True); - $this->external_ip = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/OperationMetadata.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/OperationMetadata.php deleted file mode 100644 index 3174fc524175..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.vmmigration.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationRequest.php deleted file mode 100644 index bd578e77b383..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.vmmigration.v1.PauseMigrationRequest - */ -class PauseMigrationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $migrating_vm = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $migrating_vm - * Required. The name of the MigratingVm. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getMigratingVm() - { - return $this->migrating_vm; - } - - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setMigratingVm($var) - { - GPBUtil::checkString($var, True); - $this->migrating_vm = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationResponse.php deleted file mode 100644 index 943c6192f115..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.PauseMigrationResponse - */ -class PauseMigrationResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PostProcessingStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PostProcessingStep.php deleted file mode 100644 index 6fea26e74280..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PostProcessingStep.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.PostProcessingStep - */ -class PostProcessingStep extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PreparingVMDisksStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PreparingVMDisksStep.php deleted file mode 100644 index 1fd2f8bc8cae..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PreparingVMDisksStep.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.PreparingVMDisksStep - */ -class PreparingVMDisksStep extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationRequest.php deleted file mode 100644 index 5aa1a199ff07..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.vmmigration.v1.RemoveGroupMigrationRequest - */ -class RemoveGroupMigrationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Group. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $group = ''; - /** - * The MigratingVm to remove. - * - * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { - */ - protected $migrating_vm = ''; - - /** - * @param string $group Required. The name of the Group. Please see - * {@see VmMigrationClient::groupName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\RemoveGroupMigrationRequest - * - * @experimental - */ - public static function build(string $group): self - { - return (new self()) - ->setGroup($group); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $group - * Required. The name of the Group. - * @type string $migrating_vm - * The MigratingVm to remove. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Group. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getGroup() - { - return $this->group; - } - - /** - * Required. The name of the Group. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkString($var, True); - $this->group = $var; - - return $this; - } - - /** - * The MigratingVm to remove. - * - * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getMigratingVm() - { - return $this->migrating_vm; - } - - /** - * The MigratingVm to remove. - * - * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setMigratingVm($var) - { - GPBUtil::checkString($var, True); - $this->migrating_vm = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationResponse.php deleted file mode 100644 index 76fe02aad40a..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.RemoveGroupMigrationResponse - */ -class RemoveGroupMigrationResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicatingStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicatingStep.php deleted file mode 100644 index c0191fc596f3..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicatingStep.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.vmmigration.v1.ReplicatingStep - */ -class ReplicatingStep extends \Google\Protobuf\Internal\Message -{ - /** - * Total bytes to be handled in the step. - * - * Generated from protobuf field int64 total_bytes = 1; - */ - protected $total_bytes = 0; - /** - * Replicated bytes in the step. - * - * Generated from protobuf field int64 replicated_bytes = 2; - */ - protected $replicated_bytes = 0; - /** - * The source disks replication rate for the last 2 minutes in bytes per - * second. - * - * Generated from protobuf field int64 last_two_minutes_average_bytes_per_second = 3; - */ - protected $last_two_minutes_average_bytes_per_second = 0; - /** - * The source disks replication rate for the last 30 minutes in bytes per - * second. - * - * Generated from protobuf field int64 last_thirty_minutes_average_bytes_per_second = 4; - */ - protected $last_thirty_minutes_average_bytes_per_second = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $total_bytes - * Total bytes to be handled in the step. - * @type int|string $replicated_bytes - * Replicated bytes in the step. - * @type int|string $last_two_minutes_average_bytes_per_second - * The source disks replication rate for the last 2 minutes in bytes per - * second. - * @type int|string $last_thirty_minutes_average_bytes_per_second - * The source disks replication rate for the last 30 minutes in bytes per - * second. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Total bytes to be handled in the step. - * - * Generated from protobuf field int64 total_bytes = 1; - * @return int|string - */ - public function getTotalBytes() - { - return $this->total_bytes; - } - - /** - * Total bytes to be handled in the step. - * - * Generated from protobuf field int64 total_bytes = 1; - * @param int|string $var - * @return $this - */ - public function setTotalBytes($var) - { - GPBUtil::checkInt64($var); - $this->total_bytes = $var; - - return $this; - } - - /** - * Replicated bytes in the step. - * - * Generated from protobuf field int64 replicated_bytes = 2; - * @return int|string - */ - public function getReplicatedBytes() - { - return $this->replicated_bytes; - } - - /** - * Replicated bytes in the step. - * - * Generated from protobuf field int64 replicated_bytes = 2; - * @param int|string $var - * @return $this - */ - public function setReplicatedBytes($var) - { - GPBUtil::checkInt64($var); - $this->replicated_bytes = $var; - - return $this; - } - - /** - * The source disks replication rate for the last 2 minutes in bytes per - * second. - * - * Generated from protobuf field int64 last_two_minutes_average_bytes_per_second = 3; - * @return int|string - */ - public function getLastTwoMinutesAverageBytesPerSecond() - { - return $this->last_two_minutes_average_bytes_per_second; - } - - /** - * The source disks replication rate for the last 2 minutes in bytes per - * second. - * - * Generated from protobuf field int64 last_two_minutes_average_bytes_per_second = 3; - * @param int|string $var - * @return $this - */ - public function setLastTwoMinutesAverageBytesPerSecond($var) - { - GPBUtil::checkInt64($var); - $this->last_two_minutes_average_bytes_per_second = $var; - - return $this; - } - - /** - * The source disks replication rate for the last 30 minutes in bytes per - * second. - * - * Generated from protobuf field int64 last_thirty_minutes_average_bytes_per_second = 4; - * @return int|string - */ - public function getLastThirtyMinutesAverageBytesPerSecond() - { - return $this->last_thirty_minutes_average_bytes_per_second; - } - - /** - * The source disks replication rate for the last 30 minutes in bytes per - * second. - * - * Generated from protobuf field int64 last_thirty_minutes_average_bytes_per_second = 4; - * @param int|string $var - * @return $this - */ - public function setLastThirtyMinutesAverageBytesPerSecond($var) - { - GPBUtil::checkInt64($var); - $this->last_thirty_minutes_average_bytes_per_second = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle.php deleted file mode 100644 index 54c3bf4c6ee3..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle.php +++ /dev/null @@ -1,393 +0,0 @@ -google.cloud.vmmigration.v1.ReplicationCycle - */ -class ReplicationCycle extends \Google\Protobuf\Internal\Message -{ - /** - * The identifier of the ReplicationCycle. - * - * Generated from protobuf field string name = 13; - */ - protected $name = ''; - /** - * The cycle's ordinal number. - * - * Generated from protobuf field int32 cycle_number = 10; - */ - protected $cycle_number = 0; - /** - * The time the replication cycle has started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time the replication cycle has ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; - */ - protected $end_time = null; - /** - * The accumulated duration the replication cycle was paused. - * - * Generated from protobuf field .google.protobuf.Duration total_pause_duration = 7; - */ - protected $total_pause_duration = null; - /** - * The current progress in percentage of this cycle. - * Was replaced by 'steps' field, which breaks down the cycle progression more - * accurately. - * - * Generated from protobuf field int32 progress_percent = 5 [deprecated = true]; - * @deprecated - */ - protected $progress_percent = 0; - /** - * The cycle's steps list representing its progress. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CycleStep steps = 9; - */ - private $steps; - /** - * State of the ReplicationCycle. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle.State state = 11; - */ - protected $state = 0; - /** - * Provides details on the state of the cycle in case of an error. - * - * Generated from protobuf field .google.rpc.Status error = 12; - */ - protected $error = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The identifier of the ReplicationCycle. - * @type int $cycle_number - * The cycle's ordinal number. - * @type \Google\Protobuf\Timestamp $start_time - * The time the replication cycle has started. - * @type \Google\Protobuf\Timestamp $end_time - * The time the replication cycle has ended. - * @type \Google\Protobuf\Duration $total_pause_duration - * The accumulated duration the replication cycle was paused. - * @type int $progress_percent - * The current progress in percentage of this cycle. - * Was replaced by 'steps' field, which breaks down the cycle progression more - * accurately. - * @type array<\Google\Cloud\VMMigration\V1\CycleStep>|\Google\Protobuf\Internal\RepeatedField $steps - * The cycle's steps list representing its progress. - * @type int $state - * State of the ReplicationCycle. - * @type \Google\Rpc\Status $error - * Provides details on the state of the cycle in case of an error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The identifier of the ReplicationCycle. - * - * Generated from protobuf field string name = 13; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The identifier of the ReplicationCycle. - * - * Generated from protobuf field string name = 13; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The cycle's ordinal number. - * - * Generated from protobuf field int32 cycle_number = 10; - * @return int - */ - public function getCycleNumber() - { - return $this->cycle_number; - } - - /** - * The cycle's ordinal number. - * - * Generated from protobuf field int32 cycle_number = 10; - * @param int $var - * @return $this - */ - public function setCycleNumber($var) - { - GPBUtil::checkInt32($var); - $this->cycle_number = $var; - - return $this; - } - - /** - * The time the replication cycle has started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time the replication cycle has started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time the replication cycle has ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time the replication cycle has ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The accumulated duration the replication cycle was paused. - * - * Generated from protobuf field .google.protobuf.Duration total_pause_duration = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getTotalPauseDuration() - { - return $this->total_pause_duration; - } - - public function hasTotalPauseDuration() - { - return isset($this->total_pause_duration); - } - - public function clearTotalPauseDuration() - { - unset($this->total_pause_duration); - } - - /** - * The accumulated duration the replication cycle was paused. - * - * Generated from protobuf field .google.protobuf.Duration total_pause_duration = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTotalPauseDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->total_pause_duration = $var; - - return $this; - } - - /** - * The current progress in percentage of this cycle. - * Was replaced by 'steps' field, which breaks down the cycle progression more - * accurately. - * - * Generated from protobuf field int32 progress_percent = 5 [deprecated = true]; - * @return int - * @deprecated - */ - public function getProgressPercent() - { - @trigger_error('progress_percent is deprecated.', E_USER_DEPRECATED); - return $this->progress_percent; - } - - /** - * The current progress in percentage of this cycle. - * Was replaced by 'steps' field, which breaks down the cycle progression more - * accurately. - * - * Generated from protobuf field int32 progress_percent = 5 [deprecated = true]; - * @param int $var - * @return $this - * @deprecated - */ - public function setProgressPercent($var) - { - @trigger_error('progress_percent is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkInt32($var); - $this->progress_percent = $var; - - return $this; - } - - /** - * The cycle's steps list representing its progress. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CycleStep steps = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSteps() - { - return $this->steps; - } - - /** - * The cycle's steps list representing its progress. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CycleStep steps = 9; - * @param array<\Google\Cloud\VMMigration\V1\CycleStep>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSteps($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CycleStep::class); - $this->steps = $arr; - - return $this; - } - - /** - * State of the ReplicationCycle. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle.State state = 11; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * State of the ReplicationCycle. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle.State state = 11; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ReplicationCycle\State::class); - $this->state = $var; - - return $this; - } - - /** - * Provides details on the state of the cycle in case of an error. - * - * Generated from protobuf field .google.rpc.Status error = 12; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Provides details on the state of the cycle in case of an error. - * - * Generated from protobuf field .google.rpc.Status error = 12; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle/State.php deleted file mode 100644 index b4eb3dbe09e8..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle/State.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.vmmigration.v1.ReplicationCycle.State - */ -class State -{ - /** - * The state is unknown. This is used for API compatibility only and is not - * used by the system. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The replication cycle is running. - * - * Generated from protobuf enum RUNNING = 1; - */ - const RUNNING = 1; - /** - * The replication cycle is paused. - * - * Generated from protobuf enum PAUSED = 2; - */ - const PAUSED = 2; - /** - * The replication cycle finished with errors. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * The replication cycle finished successfully. - * - * Generated from protobuf enum SUCCEEDED = 4; - */ - const SUCCEEDED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::RUNNING => 'RUNNING', - self::PAUSED => 'PAUSED', - self::FAILED => 'FAILED', - self::SUCCEEDED => 'SUCCEEDED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VMMigration\V1\ReplicationCycle_State::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationSync.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationSync.php deleted file mode 100644 index 5723d6e67f45..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationSync.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.ReplicationSync - */ -class ReplicationSync extends \Google\Protobuf\Internal\Message -{ - /** - * The most updated snapshot created time in the source that finished - * replication. - * - * Generated from protobuf field .google.protobuf.Timestamp last_sync_time = 1; - */ - protected $last_sync_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $last_sync_time - * The most updated snapshot created time in the source that finished - * replication. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The most updated snapshot created time in the source that finished - * replication. - * - * Generated from protobuf field .google.protobuf.Timestamp last_sync_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastSyncTime() - { - return $this->last_sync_time; - } - - public function hasLastSyncTime() - { - return isset($this->last_sync_time); - } - - public function clearLastSyncTime() - { - unset($this->last_sync_time); - } - - /** - * The most updated snapshot created time in the source that finished - * replication. - * - * Generated from protobuf field .google.protobuf.Timestamp last_sync_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastSyncTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_sync_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationRequest.php deleted file mode 100644 index b907eb8348b4..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.vmmigration.v1.ResumeMigrationRequest - */ -class ResumeMigrationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $migrating_vm = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $migrating_vm - * Required. The name of the MigratingVm. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getMigratingVm() - { - return $this->migrating_vm; - } - - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setMigratingVm($var) - { - GPBUtil::checkString($var, True); - $this->migrating_vm = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationResponse.php deleted file mode 100644 index 7f8969564462..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.ResumeMigrationResponse - */ -class ResumeMigrationResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulePolicy.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulePolicy.php deleted file mode 100644 index 0ef6fde8d9da..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulePolicy.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.vmmigration.v1.SchedulePolicy - */ -class SchedulePolicy extends \Google\Protobuf\Internal\Message -{ - /** - * The idle duration between replication stages. - * - * Generated from protobuf field .google.protobuf.Duration idle_duration = 1; - */ - protected $idle_duration = null; - /** - * A flag to indicate whether to skip OS adaptation during the replication - * sync. OS adaptation is a process where the VM's operating system undergoes - * changes and adaptations to fully function on Compute Engine. - * - * Generated from protobuf field bool skip_os_adaptation = 2; - */ - protected $skip_os_adaptation = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $idle_duration - * The idle duration between replication stages. - * @type bool $skip_os_adaptation - * A flag to indicate whether to skip OS adaptation during the replication - * sync. OS adaptation is a process where the VM's operating system undergoes - * changes and adaptations to fully function on Compute Engine. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The idle duration between replication stages. - * - * Generated from protobuf field .google.protobuf.Duration idle_duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getIdleDuration() - { - return $this->idle_duration; - } - - public function hasIdleDuration() - { - return isset($this->idle_duration); - } - - public function clearIdleDuration() - { - unset($this->idle_duration); - } - - /** - * The idle duration between replication stages. - * - * Generated from protobuf field .google.protobuf.Duration idle_duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setIdleDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->idle_duration = $var; - - return $this; - } - - /** - * A flag to indicate whether to skip OS adaptation during the replication - * sync. OS adaptation is a process where the VM's operating system undergoes - * changes and adaptations to fully function on Compute Engine. - * - * Generated from protobuf field bool skip_os_adaptation = 2; - * @return bool - */ - public function getSkipOsAdaptation() - { - return $this->skip_os_adaptation; - } - - /** - * A flag to indicate whether to skip OS adaptation during the replication - * sync. OS adaptation is a process where the VM's operating system undergoes - * changes and adaptations to fully function on Compute Engine. - * - * Generated from protobuf field bool skip_os_adaptation = 2; - * @param bool $var - * @return $this - */ - public function setSkipOsAdaptation($var) - { - GPBUtil::checkBool($var); - $this->skip_os_adaptation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity.php deleted file mode 100644 index d66ecb3f057e..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.vmmigration.v1.SchedulingNodeAffinity - */ -class SchedulingNodeAffinity extends \Google\Protobuf\Internal\Message -{ - /** - * The label key of Node resource to reference. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * The operator to use for the node resources specified in the `values` - * parameter. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulingNodeAffinity.Operator operator = 2; - */ - protected $operator = 0; - /** - * Corresponds to the label values of Node resource. - * - * Generated from protobuf field repeated string values = 3; - */ - private $values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * The label key of Node resource to reference. - * @type int $operator - * The operator to use for the node resources specified in the `values` - * parameter. - * @type array|\Google\Protobuf\Internal\RepeatedField $values - * Corresponds to the label values of Node resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The label key of Node resource to reference. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * The label key of Node resource to reference. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * The operator to use for the node resources specified in the `values` - * parameter. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulingNodeAffinity.Operator operator = 2; - * @return int - */ - public function getOperator() - { - return $this->operator; - } - - /** - * The operator to use for the node resources specified in the `values` - * parameter. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulingNodeAffinity.Operator operator = 2; - * @param int $var - * @return $this - */ - public function setOperator($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\SchedulingNodeAffinity\Operator::class); - $this->operator = $var; - - return $this; - } - - /** - * Corresponds to the label values of Node resource. - * - * Generated from protobuf field repeated string values = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValues() - { - return $this->values; - } - - /** - * Corresponds to the label values of Node resource. - * - * Generated from protobuf field repeated string values = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->values = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity/Operator.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity/Operator.php deleted file mode 100644 index ac3acae966da..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity/Operator.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.vmmigration.v1.SchedulingNodeAffinity.Operator - */ -class Operator -{ - /** - * An unknown, unexpected behavior. - * - * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; - */ - const OPERATOR_UNSPECIFIED = 0; - /** - * The node resource group should be in these resources affinity. - * - * Generated from protobuf enum IN = 1; - */ - const IN = 1; - /** - * The node resource group should not be in these resources affinity. - * - * Generated from protobuf enum NOT_IN = 2; - */ - const NOT_IN = 2; - - private static $valueToName = [ - self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', - self::IN => 'IN', - self::NOT_IN => 'NOT_IN', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Operator::class, \Google\Cloud\VMMigration\V1\SchedulingNodeAffinity_Operator::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShuttingDownSourceVMStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShuttingDownSourceVMStep.php deleted file mode 100644 index 64c6ddafe8b3..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShuttingDownSourceVMStep.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.ShuttingDownSourceVMStep - */ -class ShuttingDownSourceVMStep extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Source.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Source.php deleted file mode 100644 index ae1ab78c28ca..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Source.php +++ /dev/null @@ -1,299 +0,0 @@ -google.cloud.vmmigration.v1.Source - */ -class Source extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The Source name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The create time timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update time timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * The labels of the source. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * User-provided description of the source. - * - * Generated from protobuf field string description = 6; - */ - protected $description = ''; - protected $source_details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VMMigration\V1\VmwareSourceDetails $vmware - * Vmware type source details. - * @type \Google\Cloud\VMMigration\V1\AwsSourceDetails $aws - * AWS type source details. - * @type string $name - * Output only. The Source name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The create time timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update time timestamp. - * @type array|\Google\Protobuf\Internal\MapField $labels - * The labels of the source. - * @type string $description - * User-provided description of the source. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Vmware type source details. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareSourceDetails vmware = 10; - * @return \Google\Cloud\VMMigration\V1\VmwareSourceDetails|null - */ - public function getVmware() - { - return $this->readOneof(10); - } - - public function hasVmware() - { - return $this->hasOneof(10); - } - - /** - * Vmware type source details. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareSourceDetails vmware = 10; - * @param \Google\Cloud\VMMigration\V1\VmwareSourceDetails $var - * @return $this - */ - public function setVmware($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmwareSourceDetails::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * AWS type source details. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails aws = 12; - * @return \Google\Cloud\VMMigration\V1\AwsSourceDetails|null - */ - public function getAws() - { - return $this->readOneof(12); - } - - public function hasAws() - { - return $this->hasOneof(12); - } - - /** - * AWS type source details. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails aws = 12; - * @param \Google\Cloud\VMMigration\V1\AwsSourceDetails $var - * @return $this - */ - public function setAws($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AwsSourceDetails::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Output only. The Source name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The Source name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The create time timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The create time timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The update time timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The update time timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * The labels of the source. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * The labels of the source. - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * User-provided description of the source. - * - * Generated from protobuf field string description = 6; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User-provided description of the source. - * - * Generated from protobuf field string description = 6; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * @return string - */ - public function getSourceDetails() - { - return $this->whichOneof("source_details"); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationRequest.php deleted file mode 100644 index 4e456d7c4f89..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.StartMigrationRequest - */ -class StartMigrationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $migrating_vm = ''; - - /** - * @param string $migratingVm Required. The name of the MigratingVm. Please see - * {@see VmMigrationClient::migratingVmName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\StartMigrationRequest - * - * @experimental - */ - public static function build(string $migratingVm): self - { - return (new self()) - ->setMigratingVm($migratingVm); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $migrating_vm - * Required. The name of the MigratingVm. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getMigratingVm() - { - return $this->migrating_vm; - } - - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setMigratingVm($var) - { - GPBUtil::checkString($var, True); - $this->migrating_vm = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationResponse.php deleted file mode 100644 index 80c1997ca0cd..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.StartMigrationResponse - */ -class StartMigrationResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/TargetProject.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/TargetProject.php deleted file mode 100644 index d19fb184997d..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/TargetProject.php +++ /dev/null @@ -1,228 +0,0 @@ -google.cloud.vmmigration.v1.TargetProject - */ -class TargetProject extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the target project. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The target project ID (number) or project name. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * The target project's description. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Output only. The time this target project resource was created (not related - * to when the Compute Engine project it points to was created). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last time the target project resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the target project. - * @type string $project - * The target project ID (number) or project name. - * @type string $description - * The target project's description. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time this target project resource was created (not related - * to when the Compute Engine project it points to was created). - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last time the target project resource was updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the target project. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the target project. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The target project ID (number) or project name. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * The target project ID (number) or project name. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * The target project's description. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The target project's description. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The time this target project resource was created (not related - * to when the Compute Engine project it points to was created). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time this target project resource was created (not related - * to when the Compute Engine project it points to was created). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The last time the target project resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last time the target project resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateGroupRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateGroupRequest.php deleted file mode 100644 index c3566d1bd515..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateGroupRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.vmmigration.v1.UpdateGroupRequest - */ -class UpdateGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Field mask is used to specify the fields to be overwritten in the - * Group resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - */ - protected $update_mask = null; - /** - * Required. The update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\VMMigration\V1\Group $group Required. The update request body. - * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the - * Group resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\VMMigration\V1\UpdateGroupRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VMMigration\V1\Group $group, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setGroup($group) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Field mask is used to specify the fields to be overwritten in the - * Group resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\VMMigration\V1\Group $group - * Required. The update request body. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Field mask is used to specify the fields to be overwritten in the - * Group resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Field mask is used to specify the fields to be overwritten in the - * Group resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\Group|null - */ - public function getGroup() - { - return $this->group; - } - - public function hasGroup() - { - return isset($this->group); - } - - public function clearGroup() - { - unset($this->group); - } - - /** - * Required. The update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\Group $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Group::class); - $this->group = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateMigratingVmRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateMigratingVmRequest.php deleted file mode 100644 index 4dc83e8dfef2..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateMigratingVmRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.vmmigration.v1.UpdateMigratingVmRequest - */ -class UpdateMigratingVmRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Field mask is used to specify the fields to be overwritten in the - * MigratingVm resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - */ - protected $update_mask = null; - /** - * Required. The update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $migrating_vm = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\VMMigration\V1\MigratingVm $migratingVm Required. The update request body. - * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the - * MigratingVm resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\VMMigration\V1\UpdateMigratingVmRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VMMigration\V1\MigratingVm $migratingVm, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setMigratingVm($migratingVm) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Field mask is used to specify the fields to be overwritten in the - * MigratingVm resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\VMMigration\V1\MigratingVm $migrating_vm - * Required. The update request body. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Field mask is used to specify the fields to be overwritten in the - * MigratingVm resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Field mask is used to specify the fields to be overwritten in the - * MigratingVm resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\MigratingVm|null - */ - public function getMigratingVm() - { - return $this->migrating_vm; - } - - public function hasMigratingVm() - { - return isset($this->migrating_vm); - } - - public function clearMigratingVm() - { - unset($this->migrating_vm); - } - - /** - * Required. The update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\MigratingVm $var - * @return $this - */ - public function setMigratingVm($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\MigratingVm::class); - $this->migrating_vm = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateSourceRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateSourceRequest.php deleted file mode 100644 index 6fedf6b84370..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateSourceRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.vmmigration.v1.UpdateSourceRequest - */ -class UpdateSourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Field mask is used to specify the fields to be overwritten in the - * Source resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - */ - protected $update_mask = null; - /** - * Required. The update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\VMMigration\V1\Source $source Required. The update request body. - * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the - * Source resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\VMMigration\V1\UpdateSourceRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VMMigration\V1\Source $source, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSource($source) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Field mask is used to specify the fields to be overwritten in the - * Source resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\VMMigration\V1\Source $source - * Required. The update request body. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Field mask is used to specify the fields to be overwritten in the - * Source resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Field mask is used to specify the fields to be overwritten in the - * Source resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\Source|null - */ - public function getSource() - { - return $this->source; - } - - public function hasSource() - { - return isset($this->source); - } - - public function clearSource() - { - unset($this->source); - } - - /** - * Required. The update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\Source $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Source::class); - $this->source = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateTargetProjectRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateTargetProjectRequest.php deleted file mode 100644 index 64f7eaec9709..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateTargetProjectRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.vmmigration.v1.UpdateTargetProjectRequest - */ -class UpdateTargetProjectRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Field mask is used to specify the fields to be overwritten in the - * TargetProject resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - */ - protected $update_mask = null; - /** - * Required. The update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $target_project = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\VMMigration\V1\TargetProject $targetProject Required. The update request body. - * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the - * TargetProject resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\VMMigration\V1\UpdateTargetProjectRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VMMigration\V1\TargetProject $targetProject, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setTargetProject($targetProject) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Field mask is used to specify the fields to be overwritten in the - * TargetProject resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\VMMigration\V1\TargetProject $target_project - * Required. The update request body. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Field mask is used to specify the fields to be overwritten in the - * TargetProject resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Field mask is used to specify the fields to be overwritten in the - * TargetProject resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\TargetProject|null - */ - public function getTargetProject() - { - return $this->target_project; - } - - public function hasTargetProject() - { - return isset($this->target_project); - } - - public function clearTargetProject() - { - unset($this->target_project); - } - - /** - * Required. The update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\TargetProject $var - * @return $this - */ - public function setTargetProject($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\TargetProject::class); - $this->target_project = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceRequest.php deleted file mode 100644 index ceb9df3af2cf..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.vmmigration.v1.UpgradeApplianceRequest - */ -class UpgradeApplianceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The DatacenterConnector name. - * - * Generated from protobuf field string datacenter_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $datacenter_connector = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2; - */ - protected $request_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $datacenter_connector - * Required. The DatacenterConnector name. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The DatacenterConnector name. - * - * Generated from protobuf field string datacenter_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getDatacenterConnector() - { - return $this->datacenter_connector; - } - - /** - * Required. The DatacenterConnector name. - * - * Generated from protobuf field string datacenter_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDatacenterConnector($var) - { - GPBUtil::checkString($var, True); - $this->datacenter_connector = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceResponse.php deleted file mode 100644 index caff9fe4988f..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.UpgradeApplianceResponse - */ -class UpgradeApplianceResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus.php deleted file mode 100644 index ed6bf097167b..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus.php +++ /dev/null @@ -1,223 +0,0 @@ -google.cloud.vmmigration.v1.UpgradeStatus - */ -class UpgradeStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The version to upgrade to. - * - * Generated from protobuf field string version = 1; - */ - protected $version = ''; - /** - * The state of the upgradeAppliance operation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus.State state = 2; - */ - protected $state = 0; - /** - * Provides details on the state of the upgrade operation in case of an error. - * - * Generated from protobuf field .google.rpc.Status error = 3; - */ - protected $error = null; - /** - * The time the operation was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - */ - protected $start_time = null; - /** - * The version from which we upgraded. - * - * Generated from protobuf field string previous_version = 5; - */ - protected $previous_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * The version to upgrade to. - * @type int $state - * The state of the upgradeAppliance operation. - * @type \Google\Rpc\Status $error - * Provides details on the state of the upgrade operation in case of an error. - * @type \Google\Protobuf\Timestamp $start_time - * The time the operation was started. - * @type string $previous_version - * The version from which we upgraded. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The version to upgrade to. - * - * Generated from protobuf field string version = 1; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The version to upgrade to. - * - * Generated from protobuf field string version = 1; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * The state of the upgradeAppliance operation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus.State state = 2; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the upgradeAppliance operation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus.State state = 2; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\UpgradeStatus\State::class); - $this->state = $var; - - return $this; - } - - /** - * Provides details on the state of the upgrade operation in case of an error. - * - * Generated from protobuf field .google.rpc.Status error = 3; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Provides details on the state of the upgrade operation in case of an error. - * - * Generated from protobuf field .google.rpc.Status error = 3; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * The time the operation was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time the operation was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The version from which we upgraded. - * - * Generated from protobuf field string previous_version = 5; - * @return string - */ - public function getPreviousVersion() - { - return $this->previous_version; - } - - /** - * The version from which we upgraded. - * - * Generated from protobuf field string previous_version = 5; - * @param string $var - * @return $this - */ - public function setPreviousVersion($var) - { - GPBUtil::checkString($var, True); - $this->previous_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus/State.php deleted file mode 100644 index d35e49d9ae63..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.vmmigration.v1.UpgradeStatus.State - */ -class State -{ - /** - * The state was not sampled by the health checks yet. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The upgrade has started. - * - * Generated from protobuf enum RUNNING = 1; - */ - const RUNNING = 1; - /** - * The upgrade failed. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - /** - * The upgrade finished successfully. - * - * Generated from protobuf enum SUCCEEDED = 3; - */ - const SUCCEEDED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::RUNNING => 'RUNNING', - self::FAILED => 'FAILED', - self::SUCCEEDED => 'SUCCEEDED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VMMigration\V1\UpgradeStatus_State::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport.php deleted file mode 100644 index 322d7e9820a8..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport.php +++ /dev/null @@ -1,446 +0,0 @@ -google.cloud.vmmigration.v1.UtilizationReport - */ -class UtilizationReport extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The report unique name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The report display name, as assigned by the user. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Output only. Current state of the report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time the state was last set. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_time = null; - /** - * Output only. Provides details on the state of the report in case of an - * error. - * - * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - /** - * Output only. The time the report was created (this refers to the time of - * the request, not the time the report creation completed). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Time frame of the report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.TimeFrame time_frame = 7; - */ - protected $time_frame = 0; - /** - * Output only. The point in time when the time frame ends. Notice that the - * time frame is counted backwards. For instance if the "frame_end_time" value - * is 2021/01/20 and the time frame is WEEK then the report covers the week - * between 2021/01/20 and 2021/01/14. - * - * Generated from protobuf field .google.protobuf.Timestamp frame_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $frame_end_time = null; - /** - * Output only. Total number of VMs included in the report. - * - * Generated from protobuf field int32 vm_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $vm_count = 0; - /** - * List of utilization information per VM. - * When sent as part of the request, the "vm_id" field is used in order to - * specify which VMs to include in the report. In that case all other fields - * are ignored. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmUtilizationInfo vms = 10; - */ - private $vms; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The report unique name. - * @type string $display_name - * The report display name, as assigned by the user. - * @type int $state - * Output only. Current state of the report. - * @type \Google\Protobuf\Timestamp $state_time - * Output only. The time the state was last set. - * @type \Google\Rpc\Status $error - * Output only. Provides details on the state of the report in case of an - * error. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the report was created (this refers to the time of - * the request, not the time the report creation completed). - * @type int $time_frame - * Time frame of the report. - * @type \Google\Protobuf\Timestamp $frame_end_time - * Output only. The point in time when the time frame ends. Notice that the - * time frame is counted backwards. For instance if the "frame_end_time" value - * is 2021/01/20 and the time frame is WEEK then the report covers the week - * between 2021/01/20 and 2021/01/14. - * @type int $vm_count - * Output only. Total number of VMs included in the report. - * @type array<\Google\Cloud\VMMigration\V1\VmUtilizationInfo>|\Google\Protobuf\Internal\RepeatedField $vms - * List of utilization information per VM. - * When sent as part of the request, the "vm_id" field is used in order to - * specify which VMs to include in the report. In that case all other fields - * are ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The report unique name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The report unique name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The report display name, as assigned by the user. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The report display name, as assigned by the user. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. Current state of the report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\UtilizationReport\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time the state was last set. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStateTime() - { - return $this->state_time; - } - - public function hasStateTime() - { - return isset($this->state_time); - } - - public function clearStateTime() - { - unset($this->state_time); - } - - /** - * Output only. The time the state was last set. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->state_time = $var; - - return $this; - } - - /** - * Output only. Provides details on the state of the report in case of an - * error. - * - * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. Provides details on the state of the report in case of an - * error. - * - * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * Output only. The time the report was created (this refers to the time of - * the request, not the time the report creation completed). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the report was created (this refers to the time of - * the request, not the time the report creation completed). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Time frame of the report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.TimeFrame time_frame = 7; - * @return int - */ - public function getTimeFrame() - { - return $this->time_frame; - } - - /** - * Time frame of the report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.TimeFrame time_frame = 7; - * @param int $var - * @return $this - */ - public function setTimeFrame($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\UtilizationReport\TimeFrame::class); - $this->time_frame = $var; - - return $this; - } - - /** - * Output only. The point in time when the time frame ends. Notice that the - * time frame is counted backwards. For instance if the "frame_end_time" value - * is 2021/01/20 and the time frame is WEEK then the report covers the week - * between 2021/01/20 and 2021/01/14. - * - * Generated from protobuf field .google.protobuf.Timestamp frame_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFrameEndTime() - { - return $this->frame_end_time; - } - - public function hasFrameEndTime() - { - return isset($this->frame_end_time); - } - - public function clearFrameEndTime() - { - unset($this->frame_end_time); - } - - /** - * Output only. The point in time when the time frame ends. Notice that the - * time frame is counted backwards. For instance if the "frame_end_time" value - * is 2021/01/20 and the time frame is WEEK then the report covers the week - * between 2021/01/20 and 2021/01/14. - * - * Generated from protobuf field .google.protobuf.Timestamp frame_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFrameEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->frame_end_time = $var; - - return $this; - } - - /** - * Output only. Total number of VMs included in the report. - * - * Generated from protobuf field int32 vm_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getVmCount() - { - return $this->vm_count; - } - - /** - * Output only. Total number of VMs included in the report. - * - * Generated from protobuf field int32 vm_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setVmCount($var) - { - GPBUtil::checkInt32($var); - $this->vm_count = $var; - - return $this; - } - - /** - * List of utilization information per VM. - * When sent as part of the request, the "vm_id" field is used in order to - * specify which VMs to include in the report. In that case all other fields - * are ignored. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmUtilizationInfo vms = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVms() - { - return $this->vms; - } - - /** - * List of utilization information per VM. - * When sent as part of the request, the "vm_id" field is used in order to - * specify which VMs to include in the report. In that case all other fields - * are ignored. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmUtilizationInfo vms = 10; - * @param array<\Google\Cloud\VMMigration\V1\VmUtilizationInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\VmUtilizationInfo::class); - $this->vms = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/State.php deleted file mode 100644 index 2e6f82fb524c..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.vmmigration.v1.UtilizationReport.State - */ -class State -{ - /** - * The state is unknown. This value is not in use. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The report is in the making. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Report creation completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 2; - */ - const SUCCEEDED = 2; - /** - * Report creation failed. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VMMigration\V1\UtilizationReport_State::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/TimeFrame.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/TimeFrame.php deleted file mode 100644 index 6f7489bf7c3c..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/TimeFrame.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.vmmigration.v1.UtilizationReport.TimeFrame - */ -class TimeFrame -{ - /** - * The time frame was not specified and will default to WEEK. - * - * Generated from protobuf enum TIME_FRAME_UNSPECIFIED = 0; - */ - const TIME_FRAME_UNSPECIFIED = 0; - /** - * One week. - * - * Generated from protobuf enum WEEK = 1; - */ - const WEEK = 1; - /** - * One month. - * - * Generated from protobuf enum MONTH = 2; - */ - const MONTH = 2; - /** - * One year. - * - * Generated from protobuf enum YEAR = 3; - */ - const YEAR = 3; - - private static $valueToName = [ - self::TIME_FRAME_UNSPECIFIED => 'TIME_FRAME_UNSPECIFIED', - self::WEEK => 'WEEK', - self::MONTH => 'MONTH', - self::YEAR => 'YEAR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TimeFrame::class, \Google\Cloud\VMMigration\V1\UtilizationReport_TimeFrame::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReportView.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReportView.php deleted file mode 100644 index bb5048154cd8..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReportView.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.vmmigration.v1.UtilizationReportView - */ -class UtilizationReportView -{ - /** - * The default / unset value. - * The API will default to FULL on single report request and BASIC for - * multiple reports request. - * - * Generated from protobuf enum UTILIZATION_REPORT_VIEW_UNSPECIFIED = 0; - */ - const UTILIZATION_REPORT_VIEW_UNSPECIFIED = 0; - /** - * Get the report metadata, without the list of VMs and their utilization - * info. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * Include everything. - * - * Generated from protobuf enum FULL = 2; - */ - const FULL = 2; - - private static $valueToName = [ - self::UTILIZATION_REPORT_VIEW_UNSPECIFIED => 'UTILIZATION_REPORT_VIEW_UNSPECIFIED', - self::BASIC => 'BASIC', - self::FULL => 'FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmMigrationGrpcClient.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmMigrationGrpcClient.php deleted file mode 100644 index 31e838c4c938..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmMigrationGrpcClient.php +++ /dev/null @@ -1,754 +0,0 @@ -_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/ListSources', - $argument, - ['\Google\Cloud\VMMigration\V1\ListSourcesResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets details of a single Source. - * @param \Google\Cloud\VMMigration\V1\GetSourceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetSource(\Google\Cloud\VMMigration\V1\GetSourceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/GetSource', - $argument, - ['\Google\Cloud\VMMigration\V1\Source', 'decode'], - $metadata, $options); - } - - /** - * Creates a new Source in a given project and location. - * @param \Google\Cloud\VMMigration\V1\CreateSourceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateSource(\Google\Cloud\VMMigration\V1\CreateSourceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/CreateSource', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates the parameters of a single Source. - * @param \Google\Cloud\VMMigration\V1\UpdateSourceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateSource(\Google\Cloud\VMMigration\V1\UpdateSourceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/UpdateSource', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes a single Source. - * @param \Google\Cloud\VMMigration\V1\DeleteSourceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteSource(\Google\Cloud\VMMigration\V1\DeleteSourceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/DeleteSource', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * List remote source's inventory of VMs. - * The remote source is the onprem vCenter (remote in the sense it's not in - * Compute Engine). The inventory describes the list of existing VMs in that - * source. Note that this operation lists the VMs on the remote source, as - * opposed to listing the MigratingVms resources in the vmmigration service. - * @param \Google\Cloud\VMMigration\V1\FetchInventoryRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function FetchInventory(\Google\Cloud\VMMigration\V1\FetchInventoryRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/FetchInventory', - $argument, - ['\Google\Cloud\VMMigration\V1\FetchInventoryResponse', 'decode'], - $metadata, $options); - } - - /** - * Lists Utilization Reports of the given Source. - * @param \Google\Cloud\VMMigration\V1\ListUtilizationReportsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListUtilizationReports(\Google\Cloud\VMMigration\V1\ListUtilizationReportsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/ListUtilizationReports', - $argument, - ['\Google\Cloud\VMMigration\V1\ListUtilizationReportsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets a single Utilization Report. - * @param \Google\Cloud\VMMigration\V1\GetUtilizationReportRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetUtilizationReport(\Google\Cloud\VMMigration\V1\GetUtilizationReportRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/GetUtilizationReport', - $argument, - ['\Google\Cloud\VMMigration\V1\UtilizationReport', 'decode'], - $metadata, $options); - } - - /** - * Creates a new UtilizationReport. - * @param \Google\Cloud\VMMigration\V1\CreateUtilizationReportRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateUtilizationReport(\Google\Cloud\VMMigration\V1\CreateUtilizationReportRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/CreateUtilizationReport', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes a single Utilization Report. - * @param \Google\Cloud\VMMigration\V1\DeleteUtilizationReportRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteUtilizationReport(\Google\Cloud\VMMigration\V1\DeleteUtilizationReportRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/DeleteUtilizationReport', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists DatacenterConnectors in a given Source. - * @param \Google\Cloud\VMMigration\V1\ListDatacenterConnectorsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListDatacenterConnectors(\Google\Cloud\VMMigration\V1\ListDatacenterConnectorsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/ListDatacenterConnectors', - $argument, - ['\Google\Cloud\VMMigration\V1\ListDatacenterConnectorsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets details of a single DatacenterConnector. - * @param \Google\Cloud\VMMigration\V1\GetDatacenterConnectorRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetDatacenterConnector(\Google\Cloud\VMMigration\V1\GetDatacenterConnectorRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/GetDatacenterConnector', - $argument, - ['\Google\Cloud\VMMigration\V1\DatacenterConnector', 'decode'], - $metadata, $options); - } - - /** - * Creates a new DatacenterConnector in a given Source. - * @param \Google\Cloud\VMMigration\V1\CreateDatacenterConnectorRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateDatacenterConnector(\Google\Cloud\VMMigration\V1\CreateDatacenterConnectorRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/CreateDatacenterConnector', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes a single DatacenterConnector. - * @param \Google\Cloud\VMMigration\V1\DeleteDatacenterConnectorRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteDatacenterConnector(\Google\Cloud\VMMigration\V1\DeleteDatacenterConnectorRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/DeleteDatacenterConnector', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Upgrades the appliance relate to this DatacenterConnector to the in-place - * updateable version. - * @param \Google\Cloud\VMMigration\V1\UpgradeApplianceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpgradeAppliance(\Google\Cloud\VMMigration\V1\UpgradeApplianceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/UpgradeAppliance', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Creates a new MigratingVm in a given Source. - * @param \Google\Cloud\VMMigration\V1\CreateMigratingVmRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateMigratingVm(\Google\Cloud\VMMigration\V1\CreateMigratingVmRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/CreateMigratingVm', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists MigratingVms in a given Source. - * @param \Google\Cloud\VMMigration\V1\ListMigratingVmsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListMigratingVms(\Google\Cloud\VMMigration\V1\ListMigratingVmsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/ListMigratingVms', - $argument, - ['\Google\Cloud\VMMigration\V1\ListMigratingVmsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets details of a single MigratingVm. - * @param \Google\Cloud\VMMigration\V1\GetMigratingVmRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetMigratingVm(\Google\Cloud\VMMigration\V1\GetMigratingVmRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/GetMigratingVm', - $argument, - ['\Google\Cloud\VMMigration\V1\MigratingVm', 'decode'], - $metadata, $options); - } - - /** - * Updates the parameters of a single MigratingVm. - * @param \Google\Cloud\VMMigration\V1\UpdateMigratingVmRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateMigratingVm(\Google\Cloud\VMMigration\V1\UpdateMigratingVmRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/UpdateMigratingVm', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes a single MigratingVm. - * @param \Google\Cloud\VMMigration\V1\DeleteMigratingVmRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteMigratingVm(\Google\Cloud\VMMigration\V1\DeleteMigratingVmRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/DeleteMigratingVm', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Starts migration for a VM. Starts the process of uploading - * data and creating snapshots, in replication cycles scheduled by the policy. - * @param \Google\Cloud\VMMigration\V1\StartMigrationRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function StartMigration(\Google\Cloud\VMMigration\V1\StartMigrationRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/StartMigration', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Resumes a migration for a VM. When called on a paused migration, will start - * the process of uploading data and creating snapshots; when called on a - * completed cut-over migration, will update the migration to active state and - * start the process of uploading data and creating snapshots. - * @param \Google\Cloud\VMMigration\V1\ResumeMigrationRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ResumeMigration(\Google\Cloud\VMMigration\V1\ResumeMigrationRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/ResumeMigration', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Pauses a migration for a VM. If cycle tasks are running they will be - * cancelled, preserving source task data. Further replication cycles will not - * be triggered while the VM is paused. - * @param \Google\Cloud\VMMigration\V1\PauseMigrationRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function PauseMigration(\Google\Cloud\VMMigration\V1\PauseMigrationRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/PauseMigration', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Marks a migration as completed, deleting migration resources that are no - * longer being used. Only applicable after cutover is done. - * @param \Google\Cloud\VMMigration\V1\FinalizeMigrationRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function FinalizeMigration(\Google\Cloud\VMMigration\V1\FinalizeMigrationRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/FinalizeMigration', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Initiates a Clone of a specific migrating VM. - * @param \Google\Cloud\VMMigration\V1\CreateCloneJobRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateCloneJob(\Google\Cloud\VMMigration\V1\CreateCloneJobRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/CreateCloneJob', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Initiates the cancellation of a running clone job. - * @param \Google\Cloud\VMMigration\V1\CancelCloneJobRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CancelCloneJob(\Google\Cloud\VMMigration\V1\CancelCloneJobRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/CancelCloneJob', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists CloneJobs of a given migrating VM. - * @param \Google\Cloud\VMMigration\V1\ListCloneJobsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListCloneJobs(\Google\Cloud\VMMigration\V1\ListCloneJobsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/ListCloneJobs', - $argument, - ['\Google\Cloud\VMMigration\V1\ListCloneJobsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets details of a single CloneJob. - * @param \Google\Cloud\VMMigration\V1\GetCloneJobRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetCloneJob(\Google\Cloud\VMMigration\V1\GetCloneJobRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/GetCloneJob', - $argument, - ['\Google\Cloud\VMMigration\V1\CloneJob', 'decode'], - $metadata, $options); - } - - /** - * Initiates a Cutover of a specific migrating VM. - * The returned LRO is completed when the cutover job resource is created - * and the job is initiated. - * @param \Google\Cloud\VMMigration\V1\CreateCutoverJobRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateCutoverJob(\Google\Cloud\VMMigration\V1\CreateCutoverJobRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/CreateCutoverJob', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Initiates the cancellation of a running cutover job. - * @param \Google\Cloud\VMMigration\V1\CancelCutoverJobRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CancelCutoverJob(\Google\Cloud\VMMigration\V1\CancelCutoverJobRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/CancelCutoverJob', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists CutoverJobs of a given migrating VM. - * @param \Google\Cloud\VMMigration\V1\ListCutoverJobsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListCutoverJobs(\Google\Cloud\VMMigration\V1\ListCutoverJobsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/ListCutoverJobs', - $argument, - ['\Google\Cloud\VMMigration\V1\ListCutoverJobsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets details of a single CutoverJob. - * @param \Google\Cloud\VMMigration\V1\GetCutoverJobRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetCutoverJob(\Google\Cloud\VMMigration\V1\GetCutoverJobRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/GetCutoverJob', - $argument, - ['\Google\Cloud\VMMigration\V1\CutoverJob', 'decode'], - $metadata, $options); - } - - /** - * Lists Groups in a given project and location. - * @param \Google\Cloud\VMMigration\V1\ListGroupsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListGroups(\Google\Cloud\VMMigration\V1\ListGroupsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/ListGroups', - $argument, - ['\Google\Cloud\VMMigration\V1\ListGroupsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets details of a single Group. - * @param \Google\Cloud\VMMigration\V1\GetGroupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetGroup(\Google\Cloud\VMMigration\V1\GetGroupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/GetGroup', - $argument, - ['\Google\Cloud\VMMigration\V1\Group', 'decode'], - $metadata, $options); - } - - /** - * Creates a new Group in a given project and location. - * @param \Google\Cloud\VMMigration\V1\CreateGroupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateGroup(\Google\Cloud\VMMigration\V1\CreateGroupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/CreateGroup', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates the parameters of a single Group. - * @param \Google\Cloud\VMMigration\V1\UpdateGroupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateGroup(\Google\Cloud\VMMigration\V1\UpdateGroupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/UpdateGroup', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes a single Group. - * @param \Google\Cloud\VMMigration\V1\DeleteGroupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteGroup(\Google\Cloud\VMMigration\V1\DeleteGroupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/DeleteGroup', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Adds a MigratingVm to a Group. - * @param \Google\Cloud\VMMigration\V1\AddGroupMigrationRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function AddGroupMigration(\Google\Cloud\VMMigration\V1\AddGroupMigrationRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/AddGroupMigration', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Removes a MigratingVm from a Group. - * @param \Google\Cloud\VMMigration\V1\RemoveGroupMigrationRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function RemoveGroupMigration(\Google\Cloud\VMMigration\V1\RemoveGroupMigrationRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/RemoveGroupMigration', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists TargetProjects in a given project. - * - * NOTE: TargetProject is a global resource; hence the only supported value - * for location is `global`. - * @param \Google\Cloud\VMMigration\V1\ListTargetProjectsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListTargetProjects(\Google\Cloud\VMMigration\V1\ListTargetProjectsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/ListTargetProjects', - $argument, - ['\Google\Cloud\VMMigration\V1\ListTargetProjectsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets details of a single TargetProject. - * - * NOTE: TargetProject is a global resource; hence the only supported value - * for location is `global`. - * @param \Google\Cloud\VMMigration\V1\GetTargetProjectRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetTargetProject(\Google\Cloud\VMMigration\V1\GetTargetProjectRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/GetTargetProject', - $argument, - ['\Google\Cloud\VMMigration\V1\TargetProject', 'decode'], - $metadata, $options); - } - - /** - * Creates a new TargetProject in a given project. - * - * NOTE: TargetProject is a global resource; hence the only supported value - * for location is `global`. - * @param \Google\Cloud\VMMigration\V1\CreateTargetProjectRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateTargetProject(\Google\Cloud\VMMigration\V1\CreateTargetProjectRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/CreateTargetProject', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates the parameters of a single TargetProject. - * - * NOTE: TargetProject is a global resource; hence the only supported value - * for location is `global`. - * @param \Google\Cloud\VMMigration\V1\UpdateTargetProjectRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateTargetProject(\Google\Cloud\VMMigration\V1\UpdateTargetProjectRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/UpdateTargetProject', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes a single TargetProject. - * - * NOTE: TargetProject is a global resource; hence the only supported value - * for location is `global`. - * @param \Google\Cloud\VMMigration\V1\DeleteTargetProjectRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteTargetProject(\Google\Cloud\VMMigration\V1\DeleteTargetProjectRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/DeleteTargetProject', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists ReplicationCycles in a given MigratingVM. - * @param \Google\Cloud\VMMigration\V1\ListReplicationCyclesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListReplicationCycles(\Google\Cloud\VMMigration\V1\ListReplicationCyclesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/ListReplicationCycles', - $argument, - ['\Google\Cloud\VMMigration\V1\ListReplicationCyclesResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets details of a single ReplicationCycle. - * @param \Google\Cloud\VMMigration\V1\GetReplicationCycleRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetReplicationCycle(\Google\Cloud\VMMigration\V1\GetReplicationCycleRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmmigration.v1.VmMigration/GetReplicationCycle', - $argument, - ['\Google\Cloud\VMMigration\V1\ReplicationCycle', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationInfo.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationInfo.php deleted file mode 100644 index 8ba1b02d4c1d..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationInfo.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.vmmigration.v1.VmUtilizationInfo - */ -class VmUtilizationInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The VM's ID in the source. - * - * Generated from protobuf field string vm_id = 3; - */ - protected $vm_id = ''; - /** - * Utilization metrics for this VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmUtilizationMetrics utilization = 2; - */ - protected $utilization = null; - protected $VmDetails; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VMMigration\V1\VmwareVmDetails $vmware_vm_details - * The description of the VM in a Source of type Vmware. - * @type string $vm_id - * The VM's ID in the source. - * @type \Google\Cloud\VMMigration\V1\VmUtilizationMetrics $utilization - * Utilization metrics for this VM. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The description of the VM in a Source of type Vmware. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails vmware_vm_details = 1; - * @return \Google\Cloud\VMMigration\V1\VmwareVmDetails|null - */ - public function getVmwareVmDetails() - { - return $this->readOneof(1); - } - - public function hasVmwareVmDetails() - { - return $this->hasOneof(1); - } - - /** - * The description of the VM in a Source of type Vmware. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails vmware_vm_details = 1; - * @param \Google\Cloud\VMMigration\V1\VmwareVmDetails $var - * @return $this - */ - public function setVmwareVmDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmwareVmDetails::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The VM's ID in the source. - * - * Generated from protobuf field string vm_id = 3; - * @return string - */ - public function getVmId() - { - return $this->vm_id; - } - - /** - * The VM's ID in the source. - * - * Generated from protobuf field string vm_id = 3; - * @param string $var - * @return $this - */ - public function setVmId($var) - { - GPBUtil::checkString($var, True); - $this->vm_id = $var; - - return $this; - } - - /** - * Utilization metrics for this VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmUtilizationMetrics utilization = 2; - * @return \Google\Cloud\VMMigration\V1\VmUtilizationMetrics|null - */ - public function getUtilization() - { - return $this->utilization; - } - - public function hasUtilization() - { - return isset($this->utilization); - } - - public function clearUtilization() - { - unset($this->utilization); - } - - /** - * Utilization metrics for this VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmUtilizationMetrics utilization = 2; - * @param \Google\Cloud\VMMigration\V1\VmUtilizationMetrics $var - * @return $this - */ - public function setUtilization($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmUtilizationMetrics::class); - $this->utilization = $var; - - return $this; - } - - /** - * @return string - */ - public function getVmDetails() - { - return $this->whichOneof("VmDetails"); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationMetrics.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationMetrics.php deleted file mode 100644 index e81a156532d9..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationMetrics.php +++ /dev/null @@ -1,313 +0,0 @@ -google.cloud.vmmigration.v1.VmUtilizationMetrics - */ -class VmUtilizationMetrics extends \Google\Protobuf\Internal\Message -{ - /** - * Max CPU usage, percent. - * - * Generated from protobuf field int32 cpu_max_percent = 9; - */ - protected $cpu_max_percent = 0; - /** - * Average CPU usage, percent. - * - * Generated from protobuf field int32 cpu_average_percent = 10; - */ - protected $cpu_average_percent = 0; - /** - * Max memory usage, percent. - * - * Generated from protobuf field int32 memory_max_percent = 11; - */ - protected $memory_max_percent = 0; - /** - * Average memory usage, percent. - * - * Generated from protobuf field int32 memory_average_percent = 12; - */ - protected $memory_average_percent = 0; - /** - * Max disk IO rate, in kilobytes per second. - * - * Generated from protobuf field int64 disk_io_rate_max_kbps = 13; - */ - protected $disk_io_rate_max_kbps = 0; - /** - * Average disk IO rate, in kilobytes per second. - * - * Generated from protobuf field int64 disk_io_rate_average_kbps = 14; - */ - protected $disk_io_rate_average_kbps = 0; - /** - * Max network throughput (combined transmit-rates and receive-rates), in - * kilobytes per second. - * - * Generated from protobuf field int64 network_throughput_max_kbps = 15; - */ - protected $network_throughput_max_kbps = 0; - /** - * Average network throughput (combined transmit-rates and receive-rates), in - * kilobytes per second. - * - * Generated from protobuf field int64 network_throughput_average_kbps = 16; - */ - protected $network_throughput_average_kbps = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $cpu_max_percent - * Max CPU usage, percent. - * @type int $cpu_average_percent - * Average CPU usage, percent. - * @type int $memory_max_percent - * Max memory usage, percent. - * @type int $memory_average_percent - * Average memory usage, percent. - * @type int|string $disk_io_rate_max_kbps - * Max disk IO rate, in kilobytes per second. - * @type int|string $disk_io_rate_average_kbps - * Average disk IO rate, in kilobytes per second. - * @type int|string $network_throughput_max_kbps - * Max network throughput (combined transmit-rates and receive-rates), in - * kilobytes per second. - * @type int|string $network_throughput_average_kbps - * Average network throughput (combined transmit-rates and receive-rates), in - * kilobytes per second. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Max CPU usage, percent. - * - * Generated from protobuf field int32 cpu_max_percent = 9; - * @return int - */ - public function getCpuMaxPercent() - { - return $this->cpu_max_percent; - } - - /** - * Max CPU usage, percent. - * - * Generated from protobuf field int32 cpu_max_percent = 9; - * @param int $var - * @return $this - */ - public function setCpuMaxPercent($var) - { - GPBUtil::checkInt32($var); - $this->cpu_max_percent = $var; - - return $this; - } - - /** - * Average CPU usage, percent. - * - * Generated from protobuf field int32 cpu_average_percent = 10; - * @return int - */ - public function getCpuAveragePercent() - { - return $this->cpu_average_percent; - } - - /** - * Average CPU usage, percent. - * - * Generated from protobuf field int32 cpu_average_percent = 10; - * @param int $var - * @return $this - */ - public function setCpuAveragePercent($var) - { - GPBUtil::checkInt32($var); - $this->cpu_average_percent = $var; - - return $this; - } - - /** - * Max memory usage, percent. - * - * Generated from protobuf field int32 memory_max_percent = 11; - * @return int - */ - public function getMemoryMaxPercent() - { - return $this->memory_max_percent; - } - - /** - * Max memory usage, percent. - * - * Generated from protobuf field int32 memory_max_percent = 11; - * @param int $var - * @return $this - */ - public function setMemoryMaxPercent($var) - { - GPBUtil::checkInt32($var); - $this->memory_max_percent = $var; - - return $this; - } - - /** - * Average memory usage, percent. - * - * Generated from protobuf field int32 memory_average_percent = 12; - * @return int - */ - public function getMemoryAveragePercent() - { - return $this->memory_average_percent; - } - - /** - * Average memory usage, percent. - * - * Generated from protobuf field int32 memory_average_percent = 12; - * @param int $var - * @return $this - */ - public function setMemoryAveragePercent($var) - { - GPBUtil::checkInt32($var); - $this->memory_average_percent = $var; - - return $this; - } - - /** - * Max disk IO rate, in kilobytes per second. - * - * Generated from protobuf field int64 disk_io_rate_max_kbps = 13; - * @return int|string - */ - public function getDiskIoRateMaxKbps() - { - return $this->disk_io_rate_max_kbps; - } - - /** - * Max disk IO rate, in kilobytes per second. - * - * Generated from protobuf field int64 disk_io_rate_max_kbps = 13; - * @param int|string $var - * @return $this - */ - public function setDiskIoRateMaxKbps($var) - { - GPBUtil::checkInt64($var); - $this->disk_io_rate_max_kbps = $var; - - return $this; - } - - /** - * Average disk IO rate, in kilobytes per second. - * - * Generated from protobuf field int64 disk_io_rate_average_kbps = 14; - * @return int|string - */ - public function getDiskIoRateAverageKbps() - { - return $this->disk_io_rate_average_kbps; - } - - /** - * Average disk IO rate, in kilobytes per second. - * - * Generated from protobuf field int64 disk_io_rate_average_kbps = 14; - * @param int|string $var - * @return $this - */ - public function setDiskIoRateAverageKbps($var) - { - GPBUtil::checkInt64($var); - $this->disk_io_rate_average_kbps = $var; - - return $this; - } - - /** - * Max network throughput (combined transmit-rates and receive-rates), in - * kilobytes per second. - * - * Generated from protobuf field int64 network_throughput_max_kbps = 15; - * @return int|string - */ - public function getNetworkThroughputMaxKbps() - { - return $this->network_throughput_max_kbps; - } - - /** - * Max network throughput (combined transmit-rates and receive-rates), in - * kilobytes per second. - * - * Generated from protobuf field int64 network_throughput_max_kbps = 15; - * @param int|string $var - * @return $this - */ - public function setNetworkThroughputMaxKbps($var) - { - GPBUtil::checkInt64($var); - $this->network_throughput_max_kbps = $var; - - return $this; - } - - /** - * Average network throughput (combined transmit-rates and receive-rates), in - * kilobytes per second. - * - * Generated from protobuf field int64 network_throughput_average_kbps = 16; - * @return int|string - */ - public function getNetworkThroughputAverageKbps() - { - return $this->network_throughput_average_kbps; - } - - /** - * Average network throughput (combined transmit-rates and receive-rates), in - * kilobytes per second. - * - * Generated from protobuf field int64 network_throughput_average_kbps = 16; - * @param int|string $var - * @return $this - */ - public function setNetworkThroughputAverageKbps($var) - { - GPBUtil::checkInt64($var); - $this->network_throughput_average_kbps = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceDetails.php deleted file mode 100644 index 751c4aebdc1a..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceDetails.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.vmmigration.v1.VmwareSourceDetails - */ -class VmwareSourceDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The credentials username. - * - * Generated from protobuf field string username = 1; - */ - protected $username = ''; - /** - * Input only. The credentials password. This is write only and can not be - * read in a GET operation. - * - * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $password = ''; - /** - * The ip address of the vcenter this Source represents. - * - * Generated from protobuf field string vcenter_ip = 3; - */ - protected $vcenter_ip = ''; - /** - * The thumbprint representing the certificate for the vcenter. - * - * Generated from protobuf field string thumbprint = 4; - */ - protected $thumbprint = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $username - * The credentials username. - * @type string $password - * Input only. The credentials password. This is write only and can not be - * read in a GET operation. - * @type string $vcenter_ip - * The ip address of the vcenter this Source represents. - * @type string $thumbprint - * The thumbprint representing the certificate for the vcenter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The credentials username. - * - * Generated from protobuf field string username = 1; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * The credentials username. - * - * Generated from protobuf field string username = 1; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - - /** - * Input only. The credentials password. This is write only and can not be - * read in a GET operation. - * - * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * Input only. The credentials password. This is write only and can not be - * read in a GET operation. - * - * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPassword($var) - { - GPBUtil::checkString($var, True); - $this->password = $var; - - return $this; - } - - /** - * The ip address of the vcenter this Source represents. - * - * Generated from protobuf field string vcenter_ip = 3; - * @return string - */ - public function getVcenterIp() - { - return $this->vcenter_ip; - } - - /** - * The ip address of the vcenter this Source represents. - * - * Generated from protobuf field string vcenter_ip = 3; - * @param string $var - * @return $this - */ - public function setVcenterIp($var) - { - GPBUtil::checkString($var, True); - $this->vcenter_ip = $var; - - return $this; - } - - /** - * The thumbprint representing the certificate for the vcenter. - * - * Generated from protobuf field string thumbprint = 4; - * @return string - */ - public function getThumbprint() - { - return $this->thumbprint; - } - - /** - * The thumbprint representing the certificate for the vcenter. - * - * Generated from protobuf field string thumbprint = 4; - * @param string $var - * @return $this - */ - public function setThumbprint($var) - { - GPBUtil::checkString($var, True); - $this->thumbprint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails.php deleted file mode 100644 index d35cf1bfd3eb..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails.php +++ /dev/null @@ -1,453 +0,0 @@ -google.cloud.vmmigration.v1.VmwareVmDetails - */ -class VmwareVmDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The VM's id in the source (note that this is not the MigratingVm's id). - * This is the moref id of the VM. - * - * Generated from protobuf field string vm_id = 1; - */ - protected $vm_id = ''; - /** - * The id of the vCenter's datacenter this VM is contained in. - * - * Generated from protobuf field string datacenter_id = 2; - */ - protected $datacenter_id = ''; - /** - * The descriptive name of the vCenter's datacenter this VM is contained in. - * - * Generated from protobuf field string datacenter_description = 3; - */ - protected $datacenter_description = ''; - /** - * The unique identifier of the VM in vCenter. - * - * Generated from protobuf field string uuid = 4; - */ - protected $uuid = ''; - /** - * The display name of the VM. Note that this is not necessarily unique. - * - * Generated from protobuf field string display_name = 5; - */ - protected $display_name = ''; - /** - * The power state of the VM at the moment list was taken. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.PowerState power_state = 6; - */ - protected $power_state = 0; - /** - * The number of cpus in the VM. - * - * Generated from protobuf field int32 cpu_count = 7; - */ - protected $cpu_count = 0; - /** - * The size of the memory of the VM in MB. - * - * Generated from protobuf field int32 memory_mb = 8; - */ - protected $memory_mb = 0; - /** - * The number of disks the VM has. - * - * Generated from protobuf field int32 disk_count = 9; - */ - protected $disk_count = 0; - /** - * The total size of the storage allocated to the VM in MB. - * - * Generated from protobuf field int64 committed_storage_mb = 12; - */ - protected $committed_storage_mb = 0; - /** - * The VM's OS. See for example - * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html - * for types of strings this might hold. - * - * Generated from protobuf field string guest_description = 11; - */ - protected $guest_description = ''; - /** - * Output only. The VM Boot Option. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.BootOption boot_option = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $boot_option = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $vm_id - * The VM's id in the source (note that this is not the MigratingVm's id). - * This is the moref id of the VM. - * @type string $datacenter_id - * The id of the vCenter's datacenter this VM is contained in. - * @type string $datacenter_description - * The descriptive name of the vCenter's datacenter this VM is contained in. - * @type string $uuid - * The unique identifier of the VM in vCenter. - * @type string $display_name - * The display name of the VM. Note that this is not necessarily unique. - * @type int $power_state - * The power state of the VM at the moment list was taken. - * @type int $cpu_count - * The number of cpus in the VM. - * @type int $memory_mb - * The size of the memory of the VM in MB. - * @type int $disk_count - * The number of disks the VM has. - * @type int|string $committed_storage_mb - * The total size of the storage allocated to the VM in MB. - * @type string $guest_description - * The VM's OS. See for example - * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html - * for types of strings this might hold. - * @type int $boot_option - * Output only. The VM Boot Option. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The VM's id in the source (note that this is not the MigratingVm's id). - * This is the moref id of the VM. - * - * Generated from protobuf field string vm_id = 1; - * @return string - */ - public function getVmId() - { - return $this->vm_id; - } - - /** - * The VM's id in the source (note that this is not the MigratingVm's id). - * This is the moref id of the VM. - * - * Generated from protobuf field string vm_id = 1; - * @param string $var - * @return $this - */ - public function setVmId($var) - { - GPBUtil::checkString($var, True); - $this->vm_id = $var; - - return $this; - } - - /** - * The id of the vCenter's datacenter this VM is contained in. - * - * Generated from protobuf field string datacenter_id = 2; - * @return string - */ - public function getDatacenterId() - { - return $this->datacenter_id; - } - - /** - * The id of the vCenter's datacenter this VM is contained in. - * - * Generated from protobuf field string datacenter_id = 2; - * @param string $var - * @return $this - */ - public function setDatacenterId($var) - { - GPBUtil::checkString($var, True); - $this->datacenter_id = $var; - - return $this; - } - - /** - * The descriptive name of the vCenter's datacenter this VM is contained in. - * - * Generated from protobuf field string datacenter_description = 3; - * @return string - */ - public function getDatacenterDescription() - { - return $this->datacenter_description; - } - - /** - * The descriptive name of the vCenter's datacenter this VM is contained in. - * - * Generated from protobuf field string datacenter_description = 3; - * @param string $var - * @return $this - */ - public function setDatacenterDescription($var) - { - GPBUtil::checkString($var, True); - $this->datacenter_description = $var; - - return $this; - } - - /** - * The unique identifier of the VM in vCenter. - * - * Generated from protobuf field string uuid = 4; - * @return string - */ - public function getUuid() - { - return $this->uuid; - } - - /** - * The unique identifier of the VM in vCenter. - * - * Generated from protobuf field string uuid = 4; - * @param string $var - * @return $this - */ - public function setUuid($var) - { - GPBUtil::checkString($var, True); - $this->uuid = $var; - - return $this; - } - - /** - * The display name of the VM. Note that this is not necessarily unique. - * - * Generated from protobuf field string display_name = 5; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the VM. Note that this is not necessarily unique. - * - * Generated from protobuf field string display_name = 5; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The power state of the VM at the moment list was taken. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.PowerState power_state = 6; - * @return int - */ - public function getPowerState() - { - return $this->power_state; - } - - /** - * The power state of the VM at the moment list was taken. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.PowerState power_state = 6; - * @param int $var - * @return $this - */ - public function setPowerState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\VmwareVmDetails\PowerState::class); - $this->power_state = $var; - - return $this; - } - - /** - * The number of cpus in the VM. - * - * Generated from protobuf field int32 cpu_count = 7; - * @return int - */ - public function getCpuCount() - { - return $this->cpu_count; - } - - /** - * The number of cpus in the VM. - * - * Generated from protobuf field int32 cpu_count = 7; - * @param int $var - * @return $this - */ - public function setCpuCount($var) - { - GPBUtil::checkInt32($var); - $this->cpu_count = $var; - - return $this; - } - - /** - * The size of the memory of the VM in MB. - * - * Generated from protobuf field int32 memory_mb = 8; - * @return int - */ - public function getMemoryMb() - { - return $this->memory_mb; - } - - /** - * The size of the memory of the VM in MB. - * - * Generated from protobuf field int32 memory_mb = 8; - * @param int $var - * @return $this - */ - public function setMemoryMb($var) - { - GPBUtil::checkInt32($var); - $this->memory_mb = $var; - - return $this; - } - - /** - * The number of disks the VM has. - * - * Generated from protobuf field int32 disk_count = 9; - * @return int - */ - public function getDiskCount() - { - return $this->disk_count; - } - - /** - * The number of disks the VM has. - * - * Generated from protobuf field int32 disk_count = 9; - * @param int $var - * @return $this - */ - public function setDiskCount($var) - { - GPBUtil::checkInt32($var); - $this->disk_count = $var; - - return $this; - } - - /** - * The total size of the storage allocated to the VM in MB. - * - * Generated from protobuf field int64 committed_storage_mb = 12; - * @return int|string - */ - public function getCommittedStorageMb() - { - return $this->committed_storage_mb; - } - - /** - * The total size of the storage allocated to the VM in MB. - * - * Generated from protobuf field int64 committed_storage_mb = 12; - * @param int|string $var - * @return $this - */ - public function setCommittedStorageMb($var) - { - GPBUtil::checkInt64($var); - $this->committed_storage_mb = $var; - - return $this; - } - - /** - * The VM's OS. See for example - * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html - * for types of strings this might hold. - * - * Generated from protobuf field string guest_description = 11; - * @return string - */ - public function getGuestDescription() - { - return $this->guest_description; - } - - /** - * The VM's OS. See for example - * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html - * for types of strings this might hold. - * - * Generated from protobuf field string guest_description = 11; - * @param string $var - * @return $this - */ - public function setGuestDescription($var) - { - GPBUtil::checkString($var, True); - $this->guest_description = $var; - - return $this; - } - - /** - * Output only. The VM Boot Option. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.BootOption boot_option = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getBootOption() - { - return $this->boot_option; - } - - /** - * Output only. The VM Boot Option. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.BootOption boot_option = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setBootOption($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\VmwareVmDetails\BootOption::class); - $this->boot_option = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/BootOption.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/BootOption.php deleted file mode 100644 index a83392180524..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/BootOption.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.vmmigration.v1.VmwareVmDetails.BootOption - */ -class BootOption -{ - /** - * The boot option is unknown. - * - * Generated from protobuf enum BOOT_OPTION_UNSPECIFIED = 0; - */ - const BOOT_OPTION_UNSPECIFIED = 0; - /** - * The boot option is EFI. - * - * Generated from protobuf enum EFI = 1; - */ - const EFI = 1; - /** - * The boot option is BIOS. - * - * Generated from protobuf enum BIOS = 2; - */ - const BIOS = 2; - - private static $valueToName = [ - self::BOOT_OPTION_UNSPECIFIED => 'BOOT_OPTION_UNSPECIFIED', - self::EFI => 'EFI', - self::BIOS => 'BIOS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BootOption::class, \Google\Cloud\VMMigration\V1\VmwareVmDetails_BootOption::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/PowerState.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/PowerState.php deleted file mode 100644 index 925c1f5a6f43..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/PowerState.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.vmmigration.v1.VmwareVmDetails.PowerState - */ -class PowerState -{ - /** - * Power state is not specified. - * - * Generated from protobuf enum POWER_STATE_UNSPECIFIED = 0; - */ - const POWER_STATE_UNSPECIFIED = 0; - /** - * The VM is turned ON. - * - * Generated from protobuf enum ON = 1; - */ - const ON = 1; - /** - * The VM is turned OFF. - * - * Generated from protobuf enum OFF = 2; - */ - const OFF = 2; - /** - * The VM is suspended. This is similar to hibernation or sleep mode. - * - * Generated from protobuf enum SUSPENDED = 3; - */ - const SUSPENDED = 3; - - private static $valueToName = [ - self::POWER_STATE_UNSPECIFIED => 'POWER_STATE_UNSPECIFIED', - self::ON => 'ON', - self::OFF => 'OFF', - self::SUSPENDED => 'SUSPENDED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PowerState::class, \Google\Cloud\VMMigration\V1\VmwareVmDetails_PowerState::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmsDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmsDetails.php deleted file mode 100644 index 96796ec1c12c..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmsDetails.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.vmmigration.v1.VmwareVmsDetails - */ -class VmwareVmsDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The details of the vmware VMs. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmwareVmDetails details = 1; - */ - private $details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VMMigration\V1\VmwareVmDetails>|\Google\Protobuf\Internal\RepeatedField $details - * The details of the vmware VMs. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The details of the vmware VMs. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmwareVmDetails details = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDetails() - { - return $this->details; - } - - /** - * The details of the vmware VMs. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmwareVmDetails details = 1; - * @param array<\Google\Cloud\VMMigration\V1\VmwareVmDetails>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\VmwareVmDetails::class); - $this->details = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/add_group_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/add_group_migration.php deleted file mode 100644 index a1a8741258c7..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/add_group_migration.php +++ /dev/null @@ -1,83 +0,0 @@ -setGroup($formattedGroup); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->addGroupMigration($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AddGroupMigrationResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedGroup = VmMigrationClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - - add_group_migration_sample($formattedGroup); -} -// [END vmmigration_v1_generated_VmMigration_AddGroupMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_clone_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_clone_job.php deleted file mode 100644 index 9e6643ad4b42..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_clone_job.php +++ /dev/null @@ -1,89 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->cancelCloneJob($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CancelCloneJobResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmMigrationClient::cloneJobName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]', - '[CLONE_JOB]' - ); - - cancel_clone_job_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_CancelCloneJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_cutover_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_cutover_job.php deleted file mode 100644 index 3ff9deaaece3..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_cutover_job.php +++ /dev/null @@ -1,89 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->cancelCutoverJob($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CancelCutoverJobResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmMigrationClient::cutoverJobName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]', - '[CUTOVER_JOB]' - ); - - cancel_cutover_job_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_CancelCutoverJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_clone_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_clone_job.php deleted file mode 100644 index 29d881791d3d..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_clone_job.php +++ /dev/null @@ -1,93 +0,0 @@ -setParent($formattedParent) - ->setCloneJobId($cloneJobId) - ->setCloneJob($cloneJob); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->createCloneJob($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CloneJob $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmMigrationClient::migratingVmName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]' - ); - $cloneJobId = '[CLONE_JOB_ID]'; - - create_clone_job_sample($formattedParent, $cloneJobId); -} -// [END vmmigration_v1_generated_VmMigration_CreateCloneJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_cutover_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_cutover_job.php deleted file mode 100644 index cc008172cc72..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_cutover_job.php +++ /dev/null @@ -1,95 +0,0 @@ -setParent($formattedParent) - ->setCutoverJobId($cutoverJobId) - ->setCutoverJob($cutoverJob); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->createCutoverJob($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CutoverJob $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmMigrationClient::migratingVmName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]' - ); - $cutoverJobId = '[CUTOVER_JOB_ID]'; - - create_cutover_job_sample($formattedParent, $cutoverJobId); -} -// [END vmmigration_v1_generated_VmMigration_CreateCutoverJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_datacenter_connector.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_datacenter_connector.php deleted file mode 100644 index d444bfc0631d..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_datacenter_connector.php +++ /dev/null @@ -1,93 +0,0 @@ -setParent($formattedParent) - ->setDatacenterConnectorId($datacenterConnectorId) - ->setDatacenterConnector($datacenterConnector); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->createDatacenterConnector($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DatacenterConnector $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $datacenterConnectorId = '[DATACENTER_CONNECTOR_ID]'; - - create_datacenter_connector_sample($formattedParent, $datacenterConnectorId); -} -// [END vmmigration_v1_generated_VmMigration_CreateDatacenterConnector_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_group.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_group.php deleted file mode 100644 index 20d445748f18..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_group.php +++ /dev/null @@ -1,88 +0,0 @@ -setParent($formattedParent) - ->setGroupId($groupId) - ->setGroup($group); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->createGroup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Group $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); - $groupId = '[GROUP_ID]'; - - create_group_sample($formattedParent, $groupId); -} -// [END vmmigration_v1_generated_VmMigration_CreateGroup_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_migrating_vm.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_migrating_vm.php deleted file mode 100644 index 2d2c27a95522..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_migrating_vm.php +++ /dev/null @@ -1,88 +0,0 @@ -setParent($formattedParent) - ->setMigratingVmId($migratingVmId) - ->setMigratingVm($migratingVm); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->createMigratingVm($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var MigratingVm $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $migratingVmId = '[MIGRATING_VM_ID]'; - - create_migrating_vm_sample($formattedParent, $migratingVmId); -} -// [END vmmigration_v1_generated_VmMigration_CreateMigratingVm_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_source.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_source.php deleted file mode 100644 index 3c3d97485585..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_source.php +++ /dev/null @@ -1,88 +0,0 @@ -setParent($formattedParent) - ->setSourceId($sourceId) - ->setSource($source); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->createSource($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Source $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); - $sourceId = '[SOURCE_ID]'; - - create_source_sample($formattedParent, $sourceId); -} -// [END vmmigration_v1_generated_VmMigration_CreateSource_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_target_project.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_target_project.php deleted file mode 100644 index f6ad069ca106..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_target_project.php +++ /dev/null @@ -1,91 +0,0 @@ -setParent($formattedParent) - ->setTargetProjectId($targetProjectId) - ->setTargetProject($targetProject); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->createTargetProject($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var TargetProject $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); - $targetProjectId = '[TARGET_PROJECT_ID]'; - - create_target_project_sample($formattedParent, $targetProjectId); -} -// [END vmmigration_v1_generated_VmMigration_CreateTargetProject_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_utilization_report.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_utilization_report.php deleted file mode 100644 index af010a34c25a..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_utilization_report.php +++ /dev/null @@ -1,95 +0,0 @@ -setParent($formattedParent) - ->setUtilizationReport($utilizationReport) - ->setUtilizationReportId($utilizationReportId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->createUtilizationReport($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var UtilizationReport $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $utilizationReportId = '[UTILIZATION_REPORT_ID]'; - - create_utilization_report_sample($formattedParent, $utilizationReportId); -} -// [END vmmigration_v1_generated_VmMigration_CreateUtilizationReport_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_datacenter_connector.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_datacenter_connector.php deleted file mode 100644 index f3dd02835d3f..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_datacenter_connector.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->deleteDatacenterConnector($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmMigrationClient::datacenterConnectorName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[DATACENTER_CONNECTOR]' - ); - - delete_datacenter_connector_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_DeleteDatacenterConnector_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_group.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_group.php deleted file mode 100644 index d5fb9f1d6afe..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_group.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->deleteGroup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmMigrationClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - - delete_group_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_DeleteGroup_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_migrating_vm.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_migrating_vm.php deleted file mode 100644 index 031232f1c65b..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_migrating_vm.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->deleteMigratingVm($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmMigrationClient::migratingVmName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]' - ); - - delete_migrating_vm_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_DeleteMigratingVm_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_source.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_source.php deleted file mode 100644 index 8247e923197b..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_source.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->deleteSource($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - - delete_source_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_DeleteSource_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_target_project.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_target_project.php deleted file mode 100644 index 884ad6b93dd1..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_target_project.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->deleteTargetProject($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmMigrationClient::targetProjectName( - '[PROJECT]', - '[LOCATION]', - '[TARGET_PROJECT]' - ); - - delete_target_project_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_DeleteTargetProject_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_utilization_report.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_utilization_report.php deleted file mode 100644 index dccbcdb27538..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_utilization_report.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->deleteUtilizationReport($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmMigrationClient::utilizationReportName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[UTILIZATION_REPORT]' - ); - - delete_utilization_report_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_DeleteUtilizationReport_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/fetch_inventory.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/fetch_inventory.php deleted file mode 100644 index 4fff8f8c4a7f..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/fetch_inventory.php +++ /dev/null @@ -1,75 +0,0 @@ -setSource($formattedSource); - - // Call the API and handle any network failures. - try { - /** @var FetchInventoryResponse $response */ - $response = $vmMigrationClient->fetchInventory($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedSource = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - - fetch_inventory_sample($formattedSource); -} -// [END vmmigration_v1_generated_VmMigration_FetchInventory_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/finalize_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/finalize_migration.php deleted file mode 100644 index a732c41f7895..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/finalize_migration.php +++ /dev/null @@ -1,89 +0,0 @@ -setMigratingVm($formattedMigratingVm); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->finalizeMigration($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var FinalizeMigrationResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedMigratingVm = VmMigrationClient::migratingVmName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]' - ); - - finalize_migration_sample($formattedMigratingVm); -} -// [END vmmigration_v1_generated_VmMigration_FinalizeMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_clone_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_clone_job.php deleted file mode 100644 index bc0cb0cbf3bd..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_clone_job.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var CloneJob $response */ - $response = $vmMigrationClient->getCloneJob($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmMigrationClient::cloneJobName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]', - '[CLONE_JOB]' - ); - - get_clone_job_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_GetCloneJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_cutover_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_cutover_job.php deleted file mode 100644 index a39488ab204a..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_cutover_job.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var CutoverJob $response */ - $response = $vmMigrationClient->getCutoverJob($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmMigrationClient::cutoverJobName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]', - '[CUTOVER_JOB]' - ); - - get_cutover_job_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_GetCutoverJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_datacenter_connector.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_datacenter_connector.php deleted file mode 100644 index 172a781030a3..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_datacenter_connector.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DatacenterConnector $response */ - $response = $vmMigrationClient->getDatacenterConnector($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmMigrationClient::datacenterConnectorName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[DATACENTER_CONNECTOR]' - ); - - get_datacenter_connector_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_GetDatacenterConnector_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_group.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_group.php deleted file mode 100644 index db065ea1d051..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_group.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Group $response */ - $response = $vmMigrationClient->getGroup($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmMigrationClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - - get_group_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_GetGroup_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_location.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_location.php deleted file mode 100644 index 95a44e7266d7..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vmmigration_v1_generated_VmMigration_GetLocation_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_migrating_vm.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_migrating_vm.php deleted file mode 100644 index 068dc323f120..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_migrating_vm.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var MigratingVm $response */ - $response = $vmMigrationClient->getMigratingVm($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmMigrationClient::migratingVmName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]' - ); - - get_migrating_vm_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_GetMigratingVm_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_replication_cycle.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_replication_cycle.php deleted file mode 100644 index 819a1a61da08..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_replication_cycle.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ReplicationCycle $response */ - $response = $vmMigrationClient->getReplicationCycle($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmMigrationClient::replicationCycleName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]', - '[REPLICATION_CYCLE]' - ); - - get_replication_cycle_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_GetReplicationCycle_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_source.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_source.php deleted file mode 100644 index 53b51dee1834..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_source.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Source $response */ - $response = $vmMigrationClient->getSource($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - - get_source_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_GetSource_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_target_project.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_target_project.php deleted file mode 100644 index 8cd6ce806eac..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_target_project.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var TargetProject $response */ - $response = $vmMigrationClient->getTargetProject($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmMigrationClient::targetProjectName( - '[PROJECT]', - '[LOCATION]', - '[TARGET_PROJECT]' - ); - - get_target_project_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_GetTargetProject_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_utilization_report.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_utilization_report.php deleted file mode 100644 index d7c9f5061301..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_utilization_report.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var UtilizationReport $response */ - $response = $vmMigrationClient->getUtilizationReport($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmMigrationClient::utilizationReportName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[UTILIZATION_REPORT]' - ); - - get_utilization_report_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_GetUtilizationReport_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_clone_jobs.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_clone_jobs.php deleted file mode 100644 index 151bee5ea743..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_clone_jobs.php +++ /dev/null @@ -1,87 +0,0 @@ -setParent($formattedParent) - ->setPageToken($pageToken); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmMigrationClient->listCloneJobs($request); - - /** @var CloneJob $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmMigrationClient::migratingVmName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]' - ); - $pageToken = '[PAGE_TOKEN]'; - - list_clone_jobs_sample($formattedParent, $pageToken); -} -// [END vmmigration_v1_generated_VmMigration_ListCloneJobs_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_cutover_jobs.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_cutover_jobs.php deleted file mode 100644 index 26d656154916..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_cutover_jobs.php +++ /dev/null @@ -1,87 +0,0 @@ -setParent($formattedParent) - ->setPageToken($pageToken); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmMigrationClient->listCutoverJobs($request); - - /** @var CutoverJob $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmMigrationClient::migratingVmName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]' - ); - $pageToken = '[PAGE_TOKEN]'; - - list_cutover_jobs_sample($formattedParent, $pageToken); -} -// [END vmmigration_v1_generated_VmMigration_ListCutoverJobs_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_datacenter_connectors.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_datacenter_connectors.php deleted file mode 100644 index f235ae694aff..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_datacenter_connectors.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent) - ->setPageToken($pageToken); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmMigrationClient->listDatacenterConnectors($request); - - /** @var DatacenterConnector $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = '[PAGE_TOKEN]'; - - list_datacenter_connectors_sample($formattedParent, $pageToken); -} -// [END vmmigration_v1_generated_VmMigration_ListDatacenterConnectors_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_groups.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_groups.php deleted file mode 100644 index 1a7f38ac641e..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_groups.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent) - ->setPageToken($pageToken); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmMigrationClient->listGroups($request); - - /** @var Group $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); - $pageToken = '[PAGE_TOKEN]'; - - list_groups_sample($formattedParent, $pageToken); -} -// [END vmmigration_v1_generated_VmMigration_ListGroups_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_locations.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_locations.php deleted file mode 100644 index 5c4c202109a8..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vmmigration_v1_generated_VmMigration_ListLocations_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_migrating_vms.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_migrating_vms.php deleted file mode 100644 index d7af7c5e3bd9..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_migrating_vms.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent) - ->setPageToken($pageToken); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmMigrationClient->listMigratingVms($request); - - /** @var MigratingVm $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = '[PAGE_TOKEN]'; - - list_migrating_vms_sample($formattedParent, $pageToken); -} -// [END vmmigration_v1_generated_VmMigration_ListMigratingVms_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_replication_cycles.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_replication_cycles.php deleted file mode 100644 index 19f44cce5f68..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_replication_cycles.php +++ /dev/null @@ -1,87 +0,0 @@ -setParent($formattedParent) - ->setPageToken($pageToken); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmMigrationClient->listReplicationCycles($request); - - /** @var ReplicationCycle $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmMigrationClient::migratingVmName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]' - ); - $pageToken = '[PAGE_TOKEN]'; - - list_replication_cycles_sample($formattedParent, $pageToken); -} -// [END vmmigration_v1_generated_VmMigration_ListReplicationCycles_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_sources.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_sources.php deleted file mode 100644 index 50a8ab3d957f..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_sources.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent) - ->setPageToken($pageToken); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmMigrationClient->listSources($request); - - /** @var Source $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); - $pageToken = '[PAGE_TOKEN]'; - - list_sources_sample($formattedParent, $pageToken); -} -// [END vmmigration_v1_generated_VmMigration_ListSources_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_target_projects.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_target_projects.php deleted file mode 100644 index 84bdd61b878a..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_target_projects.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent) - ->setPageToken($pageToken); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmMigrationClient->listTargetProjects($request); - - /** @var TargetProject $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); - $pageToken = '[PAGE_TOKEN]'; - - list_target_projects_sample($formattedParent, $pageToken); -} -// [END vmmigration_v1_generated_VmMigration_ListTargetProjects_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_utilization_reports.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_utilization_reports.php deleted file mode 100644 index a720652d7591..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_utilization_reports.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent) - ->setPageToken($pageToken); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmMigrationClient->listUtilizationReports($request); - - /** @var UtilizationReport $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = '[PAGE_TOKEN]'; - - list_utilization_reports_sample($formattedParent, $pageToken); -} -// [END vmmigration_v1_generated_VmMigration_ListUtilizationReports_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/pause_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/pause_migration.php deleted file mode 100644 index fe967d8da6cf..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/pause_migration.php +++ /dev/null @@ -1,90 +0,0 @@ -setMigratingVm($formattedMigratingVm); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->pauseMigration($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PauseMigrationResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedMigratingVm = VmMigrationClient::migratingVmName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]' - ); - - pause_migration_sample($formattedMigratingVm); -} -// [END vmmigration_v1_generated_VmMigration_PauseMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/remove_group_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/remove_group_migration.php deleted file mode 100644 index 9ca4cdc0e7a9..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/remove_group_migration.php +++ /dev/null @@ -1,83 +0,0 @@ -setGroup($formattedGroup); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->removeGroupMigration($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var RemoveGroupMigrationResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedGroup = VmMigrationClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - - remove_group_migration_sample($formattedGroup); -} -// [END vmmigration_v1_generated_VmMigration_RemoveGroupMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/resume_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/resume_migration.php deleted file mode 100644 index 7c034d25b26e..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/resume_migration.php +++ /dev/null @@ -1,91 +0,0 @@ -setMigratingVm($formattedMigratingVm); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->resumeMigration($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ResumeMigrationResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedMigratingVm = VmMigrationClient::migratingVmName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]' - ); - - resume_migration_sample($formattedMigratingVm); -} -// [END vmmigration_v1_generated_VmMigration_ResumeMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/start_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/start_migration.php deleted file mode 100644 index 5eb05242666e..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/start_migration.php +++ /dev/null @@ -1,89 +0,0 @@ -setMigratingVm($formattedMigratingVm); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->startMigration($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var StartMigrationResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedMigratingVm = VmMigrationClient::migratingVmName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]' - ); - - start_migration_sample($formattedMigratingVm); -} -// [END vmmigration_v1_generated_VmMigration_StartMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_group.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_group.php deleted file mode 100644 index 057c33af15de..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_group.php +++ /dev/null @@ -1,71 +0,0 @@ -setGroup($group); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->updateGroup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Group $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vmmigration_v1_generated_VmMigration_UpdateGroup_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_migrating_vm.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_migrating_vm.php deleted file mode 100644 index 47358140d96a..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_migrating_vm.php +++ /dev/null @@ -1,71 +0,0 @@ -setMigratingVm($migratingVm); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->updateMigratingVm($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var MigratingVm $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vmmigration_v1_generated_VmMigration_UpdateMigratingVm_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_source.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_source.php deleted file mode 100644 index 15f2cd1a6447..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_source.php +++ /dev/null @@ -1,71 +0,0 @@ -setSource($source); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->updateSource($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Source $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vmmigration_v1_generated_VmMigration_UpdateSource_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_target_project.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_target_project.php deleted file mode 100644 index 860d5327351f..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_target_project.php +++ /dev/null @@ -1,74 +0,0 @@ -setTargetProject($targetProject); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->updateTargetProject($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var TargetProject $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vmmigration_v1_generated_VmMigration_UpdateTargetProject_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/upgrade_appliance.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/upgrade_appliance.php deleted file mode 100644 index 29ad7a881e0a..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/upgrade_appliance.php +++ /dev/null @@ -1,89 +0,0 @@ -setDatacenterConnector($formattedDatacenterConnector); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->upgradeAppliance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var UpgradeApplianceResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedDatacenterConnector = VmMigrationClient::datacenterConnectorName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[DATACENTER_CONNECTOR]' - ); - - upgrade_appliance_sample($formattedDatacenterConnector); -} -// [END vmmigration_v1_generated_VmMigration_UpgradeAppliance_sync] diff --git a/owl-bot-staging/VmMigration/v1/src/V1/Client/BaseClient/VmMigrationBaseClient.php b/owl-bot-staging/VmMigration/v1/src/V1/Client/BaseClient/VmMigrationBaseClient.php deleted file mode 100644 index a9d8ce66cc8c..000000000000 --- a/owl-bot-staging/VmMigration/v1/src/V1/Client/BaseClient/VmMigrationBaseClient.php +++ /dev/null @@ -1,1729 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/vm_migration_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/vm_migration_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/vm_migration_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/vm_migration_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a clone_job - * resource. - * - * @param string $project - * @param string $location - * @param string $source - * @param string $migratingVm - * @param string $cloneJob - * - * @return string The formatted clone_job resource. - */ - public static function cloneJobName(string $project, string $location, string $source, string $migratingVm, string $cloneJob): string - { - return self::getPathTemplate('cloneJob')->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - 'migrating_vm' => $migratingVm, - 'clone_job' => $cloneJob, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a cutover_job - * resource. - * - * @param string $project - * @param string $location - * @param string $source - * @param string $migratingVm - * @param string $cutoverJob - * - * @return string The formatted cutover_job resource. - */ - public static function cutoverJobName(string $project, string $location, string $source, string $migratingVm, string $cutoverJob): string - { - return self::getPathTemplate('cutoverJob')->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - 'migrating_vm' => $migratingVm, - 'cutover_job' => $cutoverJob, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * datacenter_connector resource. - * - * @param string $project - * @param string $location - * @param string $source - * @param string $datacenterConnector - * - * @return string The formatted datacenter_connector resource. - */ - public static function datacenterConnectorName(string $project, string $location, string $source, string $datacenterConnector): string - { - return self::getPathTemplate('datacenterConnector')->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - 'datacenter_connector' => $datacenterConnector, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a group - * resource. - * - * @param string $project - * @param string $location - * @param string $group - * - * @return string The formatted group resource. - */ - public static function groupName(string $project, string $location, string $group): string - { - return self::getPathTemplate('group')->render([ - 'project' => $project, - 'location' => $location, - 'group' => $group, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a migrating_vm - * resource. - * - * @param string $project - * @param string $location - * @param string $source - * @param string $migratingVm - * - * @return string The formatted migrating_vm resource. - */ - public static function migratingVmName(string $project, string $location, string $source, string $migratingVm): string - { - return self::getPathTemplate('migratingVm')->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - 'migrating_vm' => $migratingVm, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * replication_cycle resource. - * - * @param string $project - * @param string $location - * @param string $source - * @param string $migratingVm - * @param string $replicationCycle - * - * @return string The formatted replication_cycle resource. - */ - public static function replicationCycleName(string $project, string $location, string $source, string $migratingVm, string $replicationCycle): string - { - return self::getPathTemplate('replicationCycle')->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - 'migrating_vm' => $migratingVm, - 'replication_cycle' => $replicationCycle, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a source - * resource. - * - * @param string $project - * @param string $location - * @param string $source - * - * @return string The formatted source resource. - */ - public static function sourceName(string $project, string $location, string $source): string - { - return self::getPathTemplate('source')->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * target_project resource. - * - * @param string $project - * @param string $location - * @param string $targetProject - * - * @return string The formatted target_project resource. - */ - public static function targetProjectName(string $project, string $location, string $targetProject): string - { - return self::getPathTemplate('targetProject')->render([ - 'project' => $project, - 'location' => $location, - 'target_project' => $targetProject, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * utilization_report resource. - * - * @param string $project - * @param string $location - * @param string $source - * @param string $utilizationReport - * - * @return string The formatted utilization_report resource. - */ - public static function utilizationReportName(string $project, string $location, string $source, string $utilizationReport): string - { - return self::getPathTemplate('utilizationReport')->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - 'utilization_report' => $utilizationReport, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - cloneJob: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cloneJobs/{clone_job} - * - cutoverJob: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cutoverJobs/{cutover_job} - * - datacenterConnector: projects/{project}/locations/{location}/sources/{source}/datacenterConnectors/{datacenter_connector} - * - group: projects/{project}/locations/{location}/groups/{group} - * - location: projects/{project}/locations/{location} - * - migratingVm: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm} - * - replicationCycle: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/replicationCycles/{replication_cycle} - * - source: projects/{project}/locations/{location}/sources/{source} - * - targetProject: projects/{project}/locations/{location}/targetProjects/{target_project} - * - utilizationReport: projects/{project}/locations/{location}/sources/{source}/utilizationReports/{utilization_report} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'vmmigration.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Adds a MigratingVm to a Group. - * - * The async variant is {@see self::addGroupMigrationAsync()} . - * - * @param AddGroupMigrationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function addGroupMigration(AddGroupMigrationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('AddGroupMigration', $request, $callOptions)->wait(); - } - - /** - * Initiates the cancellation of a running clone job. - * - * The async variant is {@see self::cancelCloneJobAsync()} . - * - * @param CancelCloneJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function cancelCloneJob(CancelCloneJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CancelCloneJob', $request, $callOptions)->wait(); - } - - /** - * Initiates the cancellation of a running cutover job. - * - * The async variant is {@see self::cancelCutoverJobAsync()} . - * - * @param CancelCutoverJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function cancelCutoverJob(CancelCutoverJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CancelCutoverJob', $request, $callOptions)->wait(); - } - - /** - * Initiates a Clone of a specific migrating VM. - * - * The async variant is {@see self::createCloneJobAsync()} . - * - * @param CreateCloneJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createCloneJob(CreateCloneJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateCloneJob', $request, $callOptions)->wait(); - } - - /** - * Initiates a Cutover of a specific migrating VM. - * The returned LRO is completed when the cutover job resource is created - * and the job is initiated. - * - * The async variant is {@see self::createCutoverJobAsync()} . - * - * @param CreateCutoverJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createCutoverJob(CreateCutoverJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateCutoverJob', $request, $callOptions)->wait(); - } - - /** - * Creates a new DatacenterConnector in a given Source. - * - * The async variant is {@see self::createDatacenterConnectorAsync()} . - * - * @param CreateDatacenterConnectorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createDatacenterConnector(CreateDatacenterConnectorRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateDatacenterConnector', $request, $callOptions)->wait(); - } - - /** - * Creates a new Group in a given project and location. - * - * The async variant is {@see self::createGroupAsync()} . - * - * @param CreateGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createGroup(CreateGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateGroup', $request, $callOptions)->wait(); - } - - /** - * Creates a new MigratingVm in a given Source. - * - * The async variant is {@see self::createMigratingVmAsync()} . - * - * @param CreateMigratingVmRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createMigratingVm(CreateMigratingVmRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateMigratingVm', $request, $callOptions)->wait(); - } - - /** - * Creates a new Source in a given project and location. - * - * The async variant is {@see self::createSourceAsync()} . - * - * @param CreateSourceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSource(CreateSourceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateSource', $request, $callOptions)->wait(); - } - - /** - * Creates a new TargetProject in a given project. - * - * NOTE: TargetProject is a global resource; hence the only supported value - * for location is `global`. - * - * The async variant is {@see self::createTargetProjectAsync()} . - * - * @param CreateTargetProjectRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createTargetProject(CreateTargetProjectRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateTargetProject', $request, $callOptions)->wait(); - } - - /** - * Creates a new UtilizationReport. - * - * The async variant is {@see self::createUtilizationReportAsync()} . - * - * @param CreateUtilizationReportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createUtilizationReport(CreateUtilizationReportRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateUtilizationReport', $request, $callOptions)->wait(); - } - - /** - * Deletes a single DatacenterConnector. - * - * The async variant is {@see self::deleteDatacenterConnectorAsync()} . - * - * @param DeleteDatacenterConnectorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteDatacenterConnector(DeleteDatacenterConnectorRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteDatacenterConnector', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Group. - * - * The async variant is {@see self::deleteGroupAsync()} . - * - * @param DeleteGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteGroup(DeleteGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteGroup', $request, $callOptions)->wait(); - } - - /** - * Deletes a single MigratingVm. - * - * The async variant is {@see self::deleteMigratingVmAsync()} . - * - * @param DeleteMigratingVmRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteMigratingVm(DeleteMigratingVmRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteMigratingVm', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Source. - * - * The async variant is {@see self::deleteSourceAsync()} . - * - * @param DeleteSourceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteSource(DeleteSourceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteSource', $request, $callOptions)->wait(); - } - - /** - * Deletes a single TargetProject. - * - * NOTE: TargetProject is a global resource; hence the only supported value - * for location is `global`. - * - * The async variant is {@see self::deleteTargetProjectAsync()} . - * - * @param DeleteTargetProjectRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteTargetProject(DeleteTargetProjectRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteTargetProject', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Utilization Report. - * - * The async variant is {@see self::deleteUtilizationReportAsync()} . - * - * @param DeleteUtilizationReportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteUtilizationReport(DeleteUtilizationReportRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteUtilizationReport', $request, $callOptions)->wait(); - } - - /** - * List remote source's inventory of VMs. - * The remote source is the onprem vCenter (remote in the sense it's not in - * Compute Engine). The inventory describes the list of existing VMs in that - * source. Note that this operation lists the VMs on the remote source, as - * opposed to listing the MigratingVms resources in the vmmigration service. - * - * The async variant is {@see self::fetchInventoryAsync()} . - * - * @param FetchInventoryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return FetchInventoryResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function fetchInventory(FetchInventoryRequest $request, array $callOptions = []): FetchInventoryResponse - { - return $this->startApiCall('FetchInventory', $request, $callOptions)->wait(); - } - - /** - * Marks a migration as completed, deleting migration resources that are no - * longer being used. Only applicable after cutover is done. - * - * The async variant is {@see self::finalizeMigrationAsync()} . - * - * @param FinalizeMigrationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function finalizeMigration(FinalizeMigrationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('FinalizeMigration', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single CloneJob. - * - * The async variant is {@see self::getCloneJobAsync()} . - * - * @param GetCloneJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CloneJob - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCloneJob(GetCloneJobRequest $request, array $callOptions = []): CloneJob - { - return $this->startApiCall('GetCloneJob', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single CutoverJob. - * - * The async variant is {@see self::getCutoverJobAsync()} . - * - * @param GetCutoverJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CutoverJob - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCutoverJob(GetCutoverJobRequest $request, array $callOptions = []): CutoverJob - { - return $this->startApiCall('GetCutoverJob', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single DatacenterConnector. - * - * The async variant is {@see self::getDatacenterConnectorAsync()} . - * - * @param GetDatacenterConnectorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DatacenterConnector - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDatacenterConnector(GetDatacenterConnectorRequest $request, array $callOptions = []): DatacenterConnector - { - return $this->startApiCall('GetDatacenterConnector', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Group. - * - * The async variant is {@see self::getGroupAsync()} . - * - * @param GetGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Group - * - * @throws ApiException Thrown if the API call fails. - */ - public function getGroup(GetGroupRequest $request, array $callOptions = []): Group - { - return $this->startApiCall('GetGroup', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single MigratingVm. - * - * The async variant is {@see self::getMigratingVmAsync()} . - * - * @param GetMigratingVmRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return MigratingVm - * - * @throws ApiException Thrown if the API call fails. - */ - public function getMigratingVm(GetMigratingVmRequest $request, array $callOptions = []): MigratingVm - { - return $this->startApiCall('GetMigratingVm', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single ReplicationCycle. - * - * The async variant is {@see self::getReplicationCycleAsync()} . - * - * @param GetReplicationCycleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ReplicationCycle - * - * @throws ApiException Thrown if the API call fails. - */ - public function getReplicationCycle(GetReplicationCycleRequest $request, array $callOptions = []): ReplicationCycle - { - return $this->startApiCall('GetReplicationCycle', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Source. - * - * The async variant is {@see self::getSourceAsync()} . - * - * @param GetSourceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Source - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSource(GetSourceRequest $request, array $callOptions = []): Source - { - return $this->startApiCall('GetSource', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single TargetProject. - * - * NOTE: TargetProject is a global resource; hence the only supported value - * for location is `global`. - * - * The async variant is {@see self::getTargetProjectAsync()} . - * - * @param GetTargetProjectRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TargetProject - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTargetProject(GetTargetProjectRequest $request, array $callOptions = []): TargetProject - { - return $this->startApiCall('GetTargetProject', $request, $callOptions)->wait(); - } - - /** - * Gets a single Utilization Report. - * - * The async variant is {@see self::getUtilizationReportAsync()} . - * - * @param GetUtilizationReportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UtilizationReport - * - * @throws ApiException Thrown if the API call fails. - */ - public function getUtilizationReport(GetUtilizationReportRequest $request, array $callOptions = []): UtilizationReport - { - return $this->startApiCall('GetUtilizationReport', $request, $callOptions)->wait(); - } - - /** - * Lists CloneJobs of a given migrating VM. - * - * The async variant is {@see self::listCloneJobsAsync()} . - * - * @param ListCloneJobsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listCloneJobs(ListCloneJobsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCloneJobs', $request, $callOptions); - } - - /** - * Lists CutoverJobs of a given migrating VM. - * - * The async variant is {@see self::listCutoverJobsAsync()} . - * - * @param ListCutoverJobsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listCutoverJobs(ListCutoverJobsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCutoverJobs', $request, $callOptions); - } - - /** - * Lists DatacenterConnectors in a given Source. - * - * The async variant is {@see self::listDatacenterConnectorsAsync()} . - * - * @param ListDatacenterConnectorsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listDatacenterConnectors(ListDatacenterConnectorsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDatacenterConnectors', $request, $callOptions); - } - - /** - * Lists Groups in a given project and location. - * - * The async variant is {@see self::listGroupsAsync()} . - * - * @param ListGroupsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listGroups(ListGroupsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListGroups', $request, $callOptions); - } - - /** - * Lists MigratingVms in a given Source. - * - * The async variant is {@see self::listMigratingVmsAsync()} . - * - * @param ListMigratingVmsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listMigratingVms(ListMigratingVmsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListMigratingVms', $request, $callOptions); - } - - /** - * Lists ReplicationCycles in a given MigratingVM. - * - * The async variant is {@see self::listReplicationCyclesAsync()} . - * - * @param ListReplicationCyclesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listReplicationCycles(ListReplicationCyclesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListReplicationCycles', $request, $callOptions); - } - - /** - * Lists Sources in a given project and location. - * - * The async variant is {@see self::listSourcesAsync()} . - * - * @param ListSourcesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listSources(ListSourcesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSources', $request, $callOptions); - } - - /** - * Lists TargetProjects in a given project. - * - * NOTE: TargetProject is a global resource; hence the only supported value - * for location is `global`. - * - * The async variant is {@see self::listTargetProjectsAsync()} . - * - * @param ListTargetProjectsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listTargetProjects(ListTargetProjectsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTargetProjects', $request, $callOptions); - } - - /** - * Lists Utilization Reports of the given Source. - * - * The async variant is {@see self::listUtilizationReportsAsync()} . - * - * @param ListUtilizationReportsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listUtilizationReports(ListUtilizationReportsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListUtilizationReports', $request, $callOptions); - } - - /** - * Pauses a migration for a VM. If cycle tasks are running they will be - * cancelled, preserving source task data. Further replication cycles will not - * be triggered while the VM is paused. - * - * The async variant is {@see self::pauseMigrationAsync()} . - * - * @param PauseMigrationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function pauseMigration(PauseMigrationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('PauseMigration', $request, $callOptions)->wait(); - } - - /** - * Removes a MigratingVm from a Group. - * - * The async variant is {@see self::removeGroupMigrationAsync()} . - * - * @param RemoveGroupMigrationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function removeGroupMigration(RemoveGroupMigrationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RemoveGroupMigration', $request, $callOptions)->wait(); - } - - /** - * Resumes a migration for a VM. When called on a paused migration, will start - * the process of uploading data and creating snapshots; when called on a - * completed cut-over migration, will update the migration to active state and - * start the process of uploading data and creating snapshots. - * - * The async variant is {@see self::resumeMigrationAsync()} . - * - * @param ResumeMigrationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function resumeMigration(ResumeMigrationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ResumeMigration', $request, $callOptions)->wait(); - } - - /** - * Starts migration for a VM. Starts the process of uploading - * data and creating snapshots, in replication cycles scheduled by the policy. - * - * The async variant is {@see self::startMigrationAsync()} . - * - * @param StartMigrationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function startMigration(StartMigrationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('StartMigration', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single Group. - * - * The async variant is {@see self::updateGroupAsync()} . - * - * @param UpdateGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateGroup(UpdateGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateGroup', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single MigratingVm. - * - * The async variant is {@see self::updateMigratingVmAsync()} . - * - * @param UpdateMigratingVmRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateMigratingVm(UpdateMigratingVmRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateMigratingVm', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single Source. - * - * The async variant is {@see self::updateSourceAsync()} . - * - * @param UpdateSourceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSource(UpdateSourceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateSource', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single TargetProject. - * - * NOTE: TargetProject is a global resource; hence the only supported value - * for location is `global`. - * - * The async variant is {@see self::updateTargetProjectAsync()} . - * - * @param UpdateTargetProjectRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateTargetProject(UpdateTargetProjectRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateTargetProject', $request, $callOptions)->wait(); - } - - /** - * Upgrades the appliance relate to this DatacenterConnector to the in-place - * updateable version. - * - * The async variant is {@see self::upgradeApplianceAsync()} . - * - * @param UpgradeApplianceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function upgradeAppliance(UpgradeApplianceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpgradeAppliance', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see self::getLocationAsync()} . - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see self::listLocationsAsync()} . - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/VmMigration/v1/src/V1/Client/VmMigrationClient.php b/owl-bot-staging/VmMigration/v1/src/V1/Client/VmMigrationClient.php deleted file mode 100644 index bb4815e7acdb..000000000000 --- a/owl-bot-staging/VmMigration/v1/src/V1/Client/VmMigrationClient.php +++ /dev/null @@ -1,40 +0,0 @@ -groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - * $operationResponse = $vmMigrationClient->addGroupMigration($formattedGroup); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->addGroupMigration($formattedGroup); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'addGroupMigration'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - */ -class VmMigrationGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.vmmigration.v1.VmMigration'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'vmmigration.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $cloneJobNameTemplate; - - private static $cutoverJobNameTemplate; - - private static $datacenterConnectorNameTemplate; - - private static $groupNameTemplate; - - private static $locationNameTemplate; - - private static $migratingVmNameTemplate; - - private static $replicationCycleNameTemplate; - - private static $sourceNameTemplate; - - private static $targetProjectNameTemplate; - - private static $utilizationReportNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/vm_migration_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/vm_migration_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/vm_migration_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/vm_migration_rest_client_config.php', - ], - ], - ]; - } - - private static function getCloneJobNameTemplate() - { - if (self::$cloneJobNameTemplate == null) { - self::$cloneJobNameTemplate = new PathTemplate('projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cloneJobs/{clone_job}'); - } - - return self::$cloneJobNameTemplate; - } - - private static function getCutoverJobNameTemplate() - { - if (self::$cutoverJobNameTemplate == null) { - self::$cutoverJobNameTemplate = new PathTemplate('projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cutoverJobs/{cutover_job}'); - } - - return self::$cutoverJobNameTemplate; - } - - private static function getDatacenterConnectorNameTemplate() - { - if (self::$datacenterConnectorNameTemplate == null) { - self::$datacenterConnectorNameTemplate = new PathTemplate('projects/{project}/locations/{location}/sources/{source}/datacenterConnectors/{datacenter_connector}'); - } - - return self::$datacenterConnectorNameTemplate; - } - - private static function getGroupNameTemplate() - { - if (self::$groupNameTemplate == null) { - self::$groupNameTemplate = new PathTemplate('projects/{project}/locations/{location}/groups/{group}'); - } - - return self::$groupNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getMigratingVmNameTemplate() - { - if (self::$migratingVmNameTemplate == null) { - self::$migratingVmNameTemplate = new PathTemplate('projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}'); - } - - return self::$migratingVmNameTemplate; - } - - private static function getReplicationCycleNameTemplate() - { - if (self::$replicationCycleNameTemplate == null) { - self::$replicationCycleNameTemplate = new PathTemplate('projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/replicationCycles/{replication_cycle}'); - } - - return self::$replicationCycleNameTemplate; - } - - private static function getSourceNameTemplate() - { - if (self::$sourceNameTemplate == null) { - self::$sourceNameTemplate = new PathTemplate('projects/{project}/locations/{location}/sources/{source}'); - } - - return self::$sourceNameTemplate; - } - - private static function getTargetProjectNameTemplate() - { - if (self::$targetProjectNameTemplate == null) { - self::$targetProjectNameTemplate = new PathTemplate('projects/{project}/locations/{location}/targetProjects/{target_project}'); - } - - return self::$targetProjectNameTemplate; - } - - private static function getUtilizationReportNameTemplate() - { - if (self::$utilizationReportNameTemplate == null) { - self::$utilizationReportNameTemplate = new PathTemplate('projects/{project}/locations/{location}/sources/{source}/utilizationReports/{utilization_report}'); - } - - return self::$utilizationReportNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'cloneJob' => self::getCloneJobNameTemplate(), - 'cutoverJob' => self::getCutoverJobNameTemplate(), - 'datacenterConnector' => self::getDatacenterConnectorNameTemplate(), - 'group' => self::getGroupNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'migratingVm' => self::getMigratingVmNameTemplate(), - 'replicationCycle' => self::getReplicationCycleNameTemplate(), - 'source' => self::getSourceNameTemplate(), - 'targetProject' => self::getTargetProjectNameTemplate(), - 'utilizationReport' => self::getUtilizationReportNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a clone_job - * resource. - * - * @param string $project - * @param string $location - * @param string $source - * @param string $migratingVm - * @param string $cloneJob - * - * @return string The formatted clone_job resource. - */ - public static function cloneJobName($project, $location, $source, $migratingVm, $cloneJob) - { - return self::getCloneJobNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - 'migrating_vm' => $migratingVm, - 'clone_job' => $cloneJob, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a cutover_job - * resource. - * - * @param string $project - * @param string $location - * @param string $source - * @param string $migratingVm - * @param string $cutoverJob - * - * @return string The formatted cutover_job resource. - */ - public static function cutoverJobName($project, $location, $source, $migratingVm, $cutoverJob) - { - return self::getCutoverJobNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - 'migrating_vm' => $migratingVm, - 'cutover_job' => $cutoverJob, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * datacenter_connector resource. - * - * @param string $project - * @param string $location - * @param string $source - * @param string $datacenterConnector - * - * @return string The formatted datacenter_connector resource. - */ - public static function datacenterConnectorName($project, $location, $source, $datacenterConnector) - { - return self::getDatacenterConnectorNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - 'datacenter_connector' => $datacenterConnector, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a group - * resource. - * - * @param string $project - * @param string $location - * @param string $group - * - * @return string The formatted group resource. - */ - public static function groupName($project, $location, $group) - { - return self::getGroupNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'group' => $group, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a migrating_vm - * resource. - * - * @param string $project - * @param string $location - * @param string $source - * @param string $migratingVm - * - * @return string The formatted migrating_vm resource. - */ - public static function migratingVmName($project, $location, $source, $migratingVm) - { - return self::getMigratingVmNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - 'migrating_vm' => $migratingVm, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * replication_cycle resource. - * - * @param string $project - * @param string $location - * @param string $source - * @param string $migratingVm - * @param string $replicationCycle - * - * @return string The formatted replication_cycle resource. - */ - public static function replicationCycleName($project, $location, $source, $migratingVm, $replicationCycle) - { - return self::getReplicationCycleNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - 'migrating_vm' => $migratingVm, - 'replication_cycle' => $replicationCycle, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a source - * resource. - * - * @param string $project - * @param string $location - * @param string $source - * - * @return string The formatted source resource. - */ - public static function sourceName($project, $location, $source) - { - return self::getSourceNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * target_project resource. - * - * @param string $project - * @param string $location - * @param string $targetProject - * - * @return string The formatted target_project resource. - */ - public static function targetProjectName($project, $location, $targetProject) - { - return self::getTargetProjectNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'target_project' => $targetProject, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * utilization_report resource. - * - * @param string $project - * @param string $location - * @param string $source - * @param string $utilizationReport - * - * @return string The formatted utilization_report resource. - */ - public static function utilizationReportName($project, $location, $source, $utilizationReport) - { - return self::getUtilizationReportNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - 'utilization_report' => $utilizationReport, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - cloneJob: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cloneJobs/{clone_job} - * - cutoverJob: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cutoverJobs/{cutover_job} - * - datacenterConnector: projects/{project}/locations/{location}/sources/{source}/datacenterConnectors/{datacenter_connector} - * - group: projects/{project}/locations/{location}/groups/{group} - * - location: projects/{project}/locations/{location} - * - migratingVm: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm} - * - replicationCycle: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/replicationCycles/{replication_cycle} - * - source: projects/{project}/locations/{location}/sources/{source} - * - targetProject: projects/{project}/locations/{location}/targetProjects/{target_project} - * - utilizationReport: projects/{project}/locations/{location}/sources/{source}/utilizationReports/{utilization_report} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'vmmigration.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Adds a MigratingVm to a Group. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedGroup = $vmMigrationClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - * $operationResponse = $vmMigrationClient->addGroupMigration($formattedGroup); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->addGroupMigration($formattedGroup); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'addGroupMigration'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $group Required. The full path name of the Group to add to. - * @param array $optionalArgs { - * Optional. - * - * @type string $migratingVm - * The full path name of the MigratingVm to add. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function addGroupMigration($group, array $optionalArgs = []) - { - $request = new AddGroupMigrationRequest(); - $requestParamHeaders = []; - $request->setGroup($group); - $requestParamHeaders['group'] = $group; - if (isset($optionalArgs['migratingVm'])) { - $request->setMigratingVm($optionalArgs['migratingVm']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('AddGroupMigration', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Initiates the cancellation of a running clone job. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedName = $vmMigrationClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); - * $operationResponse = $vmMigrationClient->cancelCloneJob($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->cancelCloneJob($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'cancelCloneJob'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $name Required. The clone job id - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function cancelCloneJob($name, array $optionalArgs = []) - { - $request = new CancelCloneJobRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CancelCloneJob', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Initiates the cancellation of a running cutover job. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedName = $vmMigrationClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); - * $operationResponse = $vmMigrationClient->cancelCutoverJob($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->cancelCutoverJob($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'cancelCutoverJob'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $name Required. The cutover job id - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function cancelCutoverJob($name, array $optionalArgs = []) - { - $request = new CancelCutoverJobRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CancelCutoverJob', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Initiates a Clone of a specific migrating VM. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedParent = $vmMigrationClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - * $cloneJobId = 'clone_job_id'; - * $cloneJob = new CloneJob(); - * $operationResponse = $vmMigrationClient->createCloneJob($formattedParent, $cloneJobId, $cloneJob); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->createCloneJob($formattedParent, $cloneJobId, $cloneJob); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'createCloneJob'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $parent Required. The Clone's parent. - * @param string $cloneJobId Required. The clone job identifier. - * @param CloneJob $cloneJob Required. The clone request body. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createCloneJob($parent, $cloneJobId, $cloneJob, array $optionalArgs = []) - { - $request = new CreateCloneJobRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setCloneJobId($cloneJobId); - $request->setCloneJob($cloneJob); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateCloneJob', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Initiates a Cutover of a specific migrating VM. - * The returned LRO is completed when the cutover job resource is created - * and the job is initiated. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedParent = $vmMigrationClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - * $cutoverJobId = 'cutover_job_id'; - * $cutoverJob = new CutoverJob(); - * $operationResponse = $vmMigrationClient->createCutoverJob($formattedParent, $cutoverJobId, $cutoverJob); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->createCutoverJob($formattedParent, $cutoverJobId, $cutoverJob); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'createCutoverJob'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $parent Required. The Cutover's parent. - * @param string $cutoverJobId Required. The cutover job identifier. - * @param CutoverJob $cutoverJob Required. The cutover request body. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createCutoverJob($parent, $cutoverJobId, $cutoverJob, array $optionalArgs = []) - { - $request = new CreateCutoverJobRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setCutoverJobId($cutoverJobId); - $request->setCutoverJob($cutoverJob); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateCutoverJob', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a new DatacenterConnector in a given Source. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedParent = $vmMigrationClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - * $datacenterConnectorId = 'datacenter_connector_id'; - * $datacenterConnector = new DatacenterConnector(); - * $operationResponse = $vmMigrationClient->createDatacenterConnector($formattedParent, $datacenterConnectorId, $datacenterConnector); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->createDatacenterConnector($formattedParent, $datacenterConnectorId, $datacenterConnector); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'createDatacenterConnector'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $parent Required. The DatacenterConnector's parent. - * Required. The Source in where the new DatacenterConnector will be created. - * For example: - * `projects/my-project/locations/us-central1/sources/my-source` - * @param string $datacenterConnectorId Required. The datacenterConnector identifier. - * @param DatacenterConnector $datacenterConnector Required. The create request body. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createDatacenterConnector($parent, $datacenterConnectorId, $datacenterConnector, array $optionalArgs = []) - { - $request = new CreateDatacenterConnectorRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDatacenterConnectorId($datacenterConnectorId); - $request->setDatacenterConnector($datacenterConnector); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateDatacenterConnector', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a new Group in a given project and location. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedParent = $vmMigrationClient->locationName('[PROJECT]', '[LOCATION]'); - * $groupId = 'group_id'; - * $group = new Group(); - * $operationResponse = $vmMigrationClient->createGroup($formattedParent, $groupId, $group); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->createGroup($formattedParent, $groupId, $group); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'createGroup'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $parent Required. The Group's parent. - * @param string $groupId Required. The group identifier. - * @param Group $group Required. The create request body. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createGroup($parent, $groupId, $group, array $optionalArgs = []) - { - $request = new CreateGroupRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setGroupId($groupId); - $request->setGroup($group); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateGroup', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a new MigratingVm in a given Source. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedParent = $vmMigrationClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - * $migratingVmId = 'migrating_vm_id'; - * $migratingVm = new MigratingVm(); - * $operationResponse = $vmMigrationClient->createMigratingVm($formattedParent, $migratingVmId, $migratingVm); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->createMigratingVm($formattedParent, $migratingVmId, $migratingVm); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'createMigratingVm'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $parent Required. The MigratingVm's parent. - * @param string $migratingVmId Required. The migratingVm identifier. - * @param MigratingVm $migratingVm Required. The create request body. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createMigratingVm($parent, $migratingVmId, $migratingVm, array $optionalArgs = []) - { - $request = new CreateMigratingVmRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setMigratingVmId($migratingVmId); - $request->setMigratingVm($migratingVm); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateMigratingVm', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a new Source in a given project and location. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedParent = $vmMigrationClient->locationName('[PROJECT]', '[LOCATION]'); - * $sourceId = 'source_id'; - * $source = new Source(); - * $operationResponse = $vmMigrationClient->createSource($formattedParent, $sourceId, $source); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->createSource($formattedParent, $sourceId, $source); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'createSource'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $parent Required. The Source's parent. - * @param string $sourceId Required. The source identifier. - * @param Source $source Required. The create request body. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createSource($parent, $sourceId, $source, array $optionalArgs = []) - { - $request = new CreateSourceRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setSourceId($sourceId); - $request->setSource($source); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateSource', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a new TargetProject in a given project. - * - * NOTE: TargetProject is a global resource; hence the only supported value - * for location is `global`. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedParent = $vmMigrationClient->locationName('[PROJECT]', '[LOCATION]'); - * $targetProjectId = 'target_project_id'; - * $targetProject = new TargetProject(); - * $operationResponse = $vmMigrationClient->createTargetProject($formattedParent, $targetProjectId, $targetProject); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->createTargetProject($formattedParent, $targetProjectId, $targetProject); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'createTargetProject'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $parent Required. The TargetProject's parent. - * @param string $targetProjectId Required. The target_project identifier. - * @param TargetProject $targetProject Required. The create request body. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createTargetProject($parent, $targetProjectId, $targetProject, array $optionalArgs = []) - { - $request = new CreateTargetProjectRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setTargetProjectId($targetProjectId); - $request->setTargetProject($targetProject); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateTargetProject', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a new UtilizationReport. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedParent = $vmMigrationClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - * $utilizationReport = new UtilizationReport(); - * $utilizationReportId = 'utilization_report_id'; - * $operationResponse = $vmMigrationClient->createUtilizationReport($formattedParent, $utilizationReport, $utilizationReportId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->createUtilizationReport($formattedParent, $utilizationReport, $utilizationReportId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'createUtilizationReport'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $parent Required. The Utilization Report's parent. - * @param UtilizationReport $utilizationReport Required. The report to create. - * @param string $utilizationReportId Required. The ID to use for the report, which will become the final - * component of the reports's resource name. - * - * This value maximum length is 63 characters, and valid characters - * are /[a-z][0-9]-/. It must start with an english letter and must not - * end with a hyphen. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createUtilizationReport($parent, $utilizationReport, $utilizationReportId, array $optionalArgs = []) - { - $request = new CreateUtilizationReportRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setUtilizationReport($utilizationReport); - $request->setUtilizationReportId($utilizationReportId); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateUtilizationReport', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a single DatacenterConnector. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedName = $vmMigrationClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); - * $operationResponse = $vmMigrationClient->deleteDatacenterConnector($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->deleteDatacenterConnector($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'deleteDatacenterConnector'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $name Required. The DatacenterConnector name. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteDatacenterConnector($name, array $optionalArgs = []) - { - $request = new DeleteDatacenterConnectorRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteDatacenterConnector', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a single Group. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedName = $vmMigrationClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - * $operationResponse = $vmMigrationClient->deleteGroup($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->deleteGroup($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'deleteGroup'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $name Required. The Group name. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteGroup($name, array $optionalArgs = []) - { - $request = new DeleteGroupRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteGroup', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a single MigratingVm. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedName = $vmMigrationClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - * $operationResponse = $vmMigrationClient->deleteMigratingVm($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->deleteMigratingVm($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'deleteMigratingVm'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the MigratingVm. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteMigratingVm($name, array $optionalArgs = []) - { - $request = new DeleteMigratingVmRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteMigratingVm', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a single Source. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedName = $vmMigrationClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - * $operationResponse = $vmMigrationClient->deleteSource($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->deleteSource($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'deleteSource'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $name Required. The Source name. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteSource($name, array $optionalArgs = []) - { - $request = new DeleteSourceRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteSource', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a single TargetProject. - * - * NOTE: TargetProject is a global resource; hence the only supported value - * for location is `global`. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedName = $vmMigrationClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); - * $operationResponse = $vmMigrationClient->deleteTargetProject($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->deleteTargetProject($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'deleteTargetProject'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $name Required. The TargetProject name. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteTargetProject($name, array $optionalArgs = []) - { - $request = new DeleteTargetProjectRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteTargetProject', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a single Utilization Report. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedName = $vmMigrationClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); - * $operationResponse = $vmMigrationClient->deleteUtilizationReport($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->deleteUtilizationReport($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'deleteUtilizationReport'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $name Required. The Utilization Report name. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteUtilizationReport($name, array $optionalArgs = []) - { - $request = new DeleteUtilizationReportRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteUtilizationReport', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * List remote source's inventory of VMs. - * The remote source is the onprem vCenter (remote in the sense it's not in - * Compute Engine). The inventory describes the list of existing VMs in that - * source. Note that this operation lists the VMs on the remote source, as - * opposed to listing the MigratingVms resources in the vmmigration service. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedSource = $vmMigrationClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - * $response = $vmMigrationClient->fetchInventory($formattedSource); - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $source Required. The name of the Source. - * @param array $optionalArgs { - * Optional. - * - * @type bool $forceRefresh - * If this flag is set to true, the source will be queried instead of using - * cached results. Using this flag will make the call slower. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\VMMigration\V1\FetchInventoryResponse - * - * @throws ApiException if the remote call fails - */ - public function fetchInventory($source, array $optionalArgs = []) - { - $request = new FetchInventoryRequest(); - $requestParamHeaders = []; - $request->setSource($source); - $requestParamHeaders['source'] = $source; - if (isset($optionalArgs['forceRefresh'])) { - $request->setForceRefresh($optionalArgs['forceRefresh']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('FetchInventory', FetchInventoryResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Marks a migration as completed, deleting migration resources that are no - * longer being used. Only applicable after cutover is done. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedMigratingVm = $vmMigrationClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - * $operationResponse = $vmMigrationClient->finalizeMigration($formattedMigratingVm); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->finalizeMigration($formattedMigratingVm); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'finalizeMigration'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $migratingVm Required. The name of the MigratingVm. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function finalizeMigration($migratingVm, array $optionalArgs = []) - { - $request = new FinalizeMigrationRequest(); - $requestParamHeaders = []; - $request->setMigratingVm($migratingVm); - $requestParamHeaders['migrating_vm'] = $migratingVm; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('FinalizeMigration', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets details of a single CloneJob. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedName = $vmMigrationClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); - * $response = $vmMigrationClient->getCloneJob($formattedName); - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the CloneJob. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\VMMigration\V1\CloneJob - * - * @throws ApiException if the remote call fails - */ - public function getCloneJob($name, array $optionalArgs = []) - { - $request = new GetCloneJobRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetCloneJob', CloneJob::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets details of a single CutoverJob. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedName = $vmMigrationClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); - * $response = $vmMigrationClient->getCutoverJob($formattedName); - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the CutoverJob. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\VMMigration\V1\CutoverJob - * - * @throws ApiException if the remote call fails - */ - public function getCutoverJob($name, array $optionalArgs = []) - { - $request = new GetCutoverJobRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetCutoverJob', CutoverJob::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets details of a single DatacenterConnector. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedName = $vmMigrationClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); - * $response = $vmMigrationClient->getDatacenterConnector($formattedName); - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the DatacenterConnector. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\VMMigration\V1\DatacenterConnector - * - * @throws ApiException if the remote call fails - */ - public function getDatacenterConnector($name, array $optionalArgs = []) - { - $request = new GetDatacenterConnectorRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDatacenterConnector', DatacenterConnector::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets details of a single Group. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedName = $vmMigrationClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - * $response = $vmMigrationClient->getGroup($formattedName); - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $name Required. The group name. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\VMMigration\V1\Group - * - * @throws ApiException if the remote call fails - */ - public function getGroup($name, array $optionalArgs = []) - { - $request = new GetGroupRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetGroup', Group::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets details of a single MigratingVm. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedName = $vmMigrationClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - * $response = $vmMigrationClient->getMigratingVm($formattedName); - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the MigratingVm. - * @param array $optionalArgs { - * Optional. - * - * @type int $view - * Optional. The level of details of the migrating VM. - * For allowed values, use constants defined on {@see \Google\Cloud\VMMigration\V1\MigratingVmView} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\VMMigration\V1\MigratingVm - * - * @throws ApiException if the remote call fails - */ - public function getMigratingVm($name, array $optionalArgs = []) - { - $request = new GetMigratingVmRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetMigratingVm', MigratingVm::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets details of a single ReplicationCycle. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedName = $vmMigrationClient->replicationCycleName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[REPLICATION_CYCLE]'); - * $response = $vmMigrationClient->getReplicationCycle($formattedName); - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the ReplicationCycle. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\VMMigration\V1\ReplicationCycle - * - * @throws ApiException if the remote call fails - */ - public function getReplicationCycle($name, array $optionalArgs = []) - { - $request = new GetReplicationCycleRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetReplicationCycle', ReplicationCycle::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets details of a single Source. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedName = $vmMigrationClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - * $response = $vmMigrationClient->getSource($formattedName); - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $name Required. The Source name. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\VMMigration\V1\Source - * - * @throws ApiException if the remote call fails - */ - public function getSource($name, array $optionalArgs = []) - { - $request = new GetSourceRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetSource', Source::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets details of a single TargetProject. - * - * NOTE: TargetProject is a global resource; hence the only supported value - * for location is `global`. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedName = $vmMigrationClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); - * $response = $vmMigrationClient->getTargetProject($formattedName); - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $name Required. The TargetProject name. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\VMMigration\V1\TargetProject - * - * @throws ApiException if the remote call fails - */ - public function getTargetProject($name, array $optionalArgs = []) - { - $request = new GetTargetProjectRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetTargetProject', TargetProject::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a single Utilization Report. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedName = $vmMigrationClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); - * $response = $vmMigrationClient->getUtilizationReport($formattedName); - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $name Required. The Utilization Report name. - * @param array $optionalArgs { - * Optional. - * - * @type int $view - * Optional. The level of details of the report. - * Defaults to FULL - * For allowed values, use constants defined on {@see \Google\Cloud\VMMigration\V1\UtilizationReportView} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\VMMigration\V1\UtilizationReport - * - * @throws ApiException if the remote call fails - */ - public function getUtilizationReport($name, array $optionalArgs = []) - { - $request = new GetUtilizationReportRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetUtilizationReport', UtilizationReport::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists CloneJobs of a given migrating VM. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedParent = $vmMigrationClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - * $pageToken = 'page_token'; - * // Iterate over pages of elements - * $pagedResponse = $vmMigrationClient->listCloneJobs($formattedParent, $pageToken); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $vmMigrationClient->listCloneJobs($formattedParent, $pageToken); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent, which owns this collection of source VMs. - * @param string $pageToken A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $filter - * Optional. The filter request. - * @type string $orderBy - * Optional. the order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listCloneJobs($parent, $pageToken, array $optionalArgs = []) - { - $request = new ListCloneJobsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setPageToken($pageToken); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListCloneJobs', $optionalArgs, ListCloneJobsResponse::class, $request); - } - - /** - * Lists CutoverJobs of a given migrating VM. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedParent = $vmMigrationClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - * $pageToken = 'page_token'; - * // Iterate over pages of elements - * $pagedResponse = $vmMigrationClient->listCutoverJobs($formattedParent, $pageToken); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $vmMigrationClient->listCutoverJobs($formattedParent, $pageToken); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent, which owns this collection of migrating VMs. - * @param string $pageToken A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $filter - * Optional. The filter request. - * @type string $orderBy - * Optional. the order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listCutoverJobs($parent, $pageToken, array $optionalArgs = []) - { - $request = new ListCutoverJobsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setPageToken($pageToken); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListCutoverJobs', $optionalArgs, ListCutoverJobsResponse::class, $request); - } - - /** - * Lists DatacenterConnectors in a given Source. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedParent = $vmMigrationClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - * $pageToken = 'page_token'; - * // Iterate over pages of elements - * $pagedResponse = $vmMigrationClient->listDatacenterConnectors($formattedParent, $pageToken); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $vmMigrationClient->listDatacenterConnectors($formattedParent, $pageToken); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent, which owns this collection of connectors. - * @param string $pageToken A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $filter - * Optional. The filter request. - * @type string $orderBy - * Optional. the order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listDatacenterConnectors($parent, $pageToken, array $optionalArgs = []) - { - $request = new ListDatacenterConnectorsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setPageToken($pageToken); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListDatacenterConnectors', $optionalArgs, ListDatacenterConnectorsResponse::class, $request); - } - - /** - * Lists Groups in a given project and location. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedParent = $vmMigrationClient->locationName('[PROJECT]', '[LOCATION]'); - * $pageToken = 'page_token'; - * // Iterate over pages of elements - * $pagedResponse = $vmMigrationClient->listGroups($formattedParent, $pageToken); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $vmMigrationClient->listGroups($formattedParent, $pageToken); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent, which owns this collection of groups. - * @param string $pageToken A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $filter - * Optional. The filter request. - * @type string $orderBy - * Optional. the order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listGroups($parent, $pageToken, array $optionalArgs = []) - { - $request = new ListGroupsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setPageToken($pageToken); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListGroups', $optionalArgs, ListGroupsResponse::class, $request); - } - - /** - * Lists MigratingVms in a given Source. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedParent = $vmMigrationClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - * $pageToken = 'page_token'; - * // Iterate over pages of elements - * $pagedResponse = $vmMigrationClient->listMigratingVms($formattedParent, $pageToken); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $vmMigrationClient->listMigratingVms($formattedParent, $pageToken); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent, which owns this collection of MigratingVms. - * @param string $pageToken A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $filter - * Optional. The filter request. - * @type string $orderBy - * Optional. the order by fields for the result. - * @type int $view - * Optional. The level of details of each migrating VM. - * For allowed values, use constants defined on {@see \Google\Cloud\VMMigration\V1\MigratingVmView} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listMigratingVms($parent, $pageToken, array $optionalArgs = []) - { - $request = new ListMigratingVmsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setPageToken($pageToken); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListMigratingVms', $optionalArgs, ListMigratingVmsResponse::class, $request); - } - - /** - * Lists ReplicationCycles in a given MigratingVM. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedParent = $vmMigrationClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - * $pageToken = 'page_token'; - * // Iterate over pages of elements - * $pagedResponse = $vmMigrationClient->listReplicationCycles($formattedParent, $pageToken); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $vmMigrationClient->listReplicationCycles($formattedParent, $pageToken); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent, which owns this collection of ReplicationCycles. - * @param string $pageToken A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $filter - * Optional. The filter request. - * @type string $orderBy - * Optional. the order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listReplicationCycles($parent, $pageToken, array $optionalArgs = []) - { - $request = new ListReplicationCyclesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setPageToken($pageToken); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListReplicationCycles', $optionalArgs, ListReplicationCyclesResponse::class, $request); - } - - /** - * Lists Sources in a given project and location. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedParent = $vmMigrationClient->locationName('[PROJECT]', '[LOCATION]'); - * $pageToken = 'page_token'; - * // Iterate over pages of elements - * $pagedResponse = $vmMigrationClient->listSources($formattedParent, $pageToken); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $vmMigrationClient->listSources($formattedParent, $pageToken); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent, which owns this collection of sources. - * @param string $pageToken A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $filter - * Optional. The filter request. - * @type string $orderBy - * Optional. the order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listSources($parent, $pageToken, array $optionalArgs = []) - { - $request = new ListSourcesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setPageToken($pageToken); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListSources', $optionalArgs, ListSourcesResponse::class, $request); - } - - /** - * Lists TargetProjects in a given project. - * - * NOTE: TargetProject is a global resource; hence the only supported value - * for location is `global`. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedParent = $vmMigrationClient->locationName('[PROJECT]', '[LOCATION]'); - * $pageToken = 'page_token'; - * // Iterate over pages of elements - * $pagedResponse = $vmMigrationClient->listTargetProjects($formattedParent, $pageToken); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $vmMigrationClient->listTargetProjects($formattedParent, $pageToken); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent, which owns this collection of targets. - * @param string $pageToken A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $filter - * Optional. The filter request. - * @type string $orderBy - * Optional. the order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listTargetProjects($parent, $pageToken, array $optionalArgs = []) - { - $request = new ListTargetProjectsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setPageToken($pageToken); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListTargetProjects', $optionalArgs, ListTargetProjectsResponse::class, $request); - } - - /** - * Lists Utilization Reports of the given Source. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedParent = $vmMigrationClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - * $pageToken = 'page_token'; - * // Iterate over pages of elements - * $pagedResponse = $vmMigrationClient->listUtilizationReports($formattedParent, $pageToken); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $vmMigrationClient->listUtilizationReports($formattedParent, $pageToken); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $parent Required. The Utilization Reports parent. - * @param string $pageToken A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @param array $optionalArgs { - * Optional. - * - * @type int $view - * Optional. The level of details of each report. - * Defaults to BASIC. - * For allowed values, use constants defined on {@see \Google\Cloud\VMMigration\V1\UtilizationReportView} - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $filter - * Optional. The filter request. - * @type string $orderBy - * Optional. the order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listUtilizationReports($parent, $pageToken, array $optionalArgs = []) - { - $request = new ListUtilizationReportsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setPageToken($pageToken); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListUtilizationReports', $optionalArgs, ListUtilizationReportsResponse::class, $request); - } - - /** - * Pauses a migration for a VM. If cycle tasks are running they will be - * cancelled, preserving source task data. Further replication cycles will not - * be triggered while the VM is paused. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedMigratingVm = $vmMigrationClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - * $operationResponse = $vmMigrationClient->pauseMigration($formattedMigratingVm); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->pauseMigration($formattedMigratingVm); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'pauseMigration'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $migratingVm Required. The name of the MigratingVm. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function pauseMigration($migratingVm, array $optionalArgs = []) - { - $request = new PauseMigrationRequest(); - $requestParamHeaders = []; - $request->setMigratingVm($migratingVm); - $requestParamHeaders['migrating_vm'] = $migratingVm; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('PauseMigration', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Removes a MigratingVm from a Group. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedGroup = $vmMigrationClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - * $operationResponse = $vmMigrationClient->removeGroupMigration($formattedGroup); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->removeGroupMigration($formattedGroup); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'removeGroupMigration'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $group Required. The name of the Group. - * @param array $optionalArgs { - * Optional. - * - * @type string $migratingVm - * The MigratingVm to remove. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function removeGroupMigration($group, array $optionalArgs = []) - { - $request = new RemoveGroupMigrationRequest(); - $requestParamHeaders = []; - $request->setGroup($group); - $requestParamHeaders['group'] = $group; - if (isset($optionalArgs['migratingVm'])) { - $request->setMigratingVm($optionalArgs['migratingVm']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('RemoveGroupMigration', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Resumes a migration for a VM. When called on a paused migration, will start - * the process of uploading data and creating snapshots; when called on a - * completed cut-over migration, will update the migration to active state and - * start the process of uploading data and creating snapshots. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedMigratingVm = $vmMigrationClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - * $operationResponse = $vmMigrationClient->resumeMigration($formattedMigratingVm); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->resumeMigration($formattedMigratingVm); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'resumeMigration'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $migratingVm Required. The name of the MigratingVm. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function resumeMigration($migratingVm, array $optionalArgs = []) - { - $request = new ResumeMigrationRequest(); - $requestParamHeaders = []; - $request->setMigratingVm($migratingVm); - $requestParamHeaders['migrating_vm'] = $migratingVm; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ResumeMigration', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Starts migration for a VM. Starts the process of uploading - * data and creating snapshots, in replication cycles scheduled by the policy. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedMigratingVm = $vmMigrationClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - * $operationResponse = $vmMigrationClient->startMigration($formattedMigratingVm); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->startMigration($formattedMigratingVm); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'startMigration'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $migratingVm Required. The name of the MigratingVm. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function startMigration($migratingVm, array $optionalArgs = []) - { - $request = new StartMigrationRequest(); - $requestParamHeaders = []; - $request->setMigratingVm($migratingVm); - $requestParamHeaders['migrating_vm'] = $migratingVm; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('StartMigration', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates the parameters of a single Group. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $group = new Group(); - * $operationResponse = $vmMigrationClient->updateGroup($group); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->updateGroup($group); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'updateGroup'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param Group $group Required. The update request body. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Field mask is used to specify the fields to be overwritten in the - * Group resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateGroup($group, array $optionalArgs = []) - { - $request = new UpdateGroupRequest(); - $requestParamHeaders = []; - $request->setGroup($group); - $requestParamHeaders['group.name'] = $group->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateGroup', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates the parameters of a single MigratingVm. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $migratingVm = new MigratingVm(); - * $operationResponse = $vmMigrationClient->updateMigratingVm($migratingVm); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->updateMigratingVm($migratingVm); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'updateMigratingVm'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param MigratingVm $migratingVm Required. The update request body. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Field mask is used to specify the fields to be overwritten in the - * MigratingVm resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateMigratingVm($migratingVm, array $optionalArgs = []) - { - $request = new UpdateMigratingVmRequest(); - $requestParamHeaders = []; - $request->setMigratingVm($migratingVm); - $requestParamHeaders['migrating_vm.name'] = $migratingVm->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateMigratingVm', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates the parameters of a single Source. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $source = new Source(); - * $operationResponse = $vmMigrationClient->updateSource($source); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->updateSource($source); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'updateSource'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param Source $source Required. The update request body. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Field mask is used to specify the fields to be overwritten in the - * Source resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateSource($source, array $optionalArgs = []) - { - $request = new UpdateSourceRequest(); - $requestParamHeaders = []; - $request->setSource($source); - $requestParamHeaders['source.name'] = $source->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateSource', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates the parameters of a single TargetProject. - * - * NOTE: TargetProject is a global resource; hence the only supported value - * for location is `global`. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $targetProject = new TargetProject(); - * $operationResponse = $vmMigrationClient->updateTargetProject($targetProject); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->updateTargetProject($targetProject); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'updateTargetProject'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param TargetProject $targetProject Required. The update request body. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Field mask is used to specify the fields to be overwritten in the - * TargetProject resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateTargetProject($targetProject, array $optionalArgs = []) - { - $request = new UpdateTargetProjectRequest(); - $requestParamHeaders = []; - $request->setTargetProject($targetProject); - $requestParamHeaders['target_project.name'] = $targetProject->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateTargetProject', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Upgrades the appliance relate to this DatacenterConnector to the in-place - * updateable version. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $formattedDatacenterConnector = $vmMigrationClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); - * $operationResponse = $vmMigrationClient->upgradeAppliance($formattedDatacenterConnector); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmMigrationClient->upgradeAppliance($formattedDatacenterConnector); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmMigrationClient->resumeOperation($operationName, 'upgradeAppliance'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param string $datacenterConnector Required. The DatacenterConnector name. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function upgradeAppliance($datacenterConnector, array $optionalArgs = []) - { - $request = new UpgradeApplianceRequest(); - $requestParamHeaders = []; - $request->setDatacenterConnector($datacenterConnector); - $requestParamHeaders['datacenter_connector'] = $datacenterConnector; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpgradeAppliance', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * $response = $vmMigrationClient->getLocation(); - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $vmMigrationClient = new VmMigrationClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $vmMigrationClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $vmMigrationClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $vmMigrationClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/VmMigration/v1/src/V1/VmMigrationClient.php b/owl-bot-staging/VmMigration/v1/src/V1/VmMigrationClient.php deleted file mode 100644 index 5ab90a3acc18..000000000000 --- a/owl-bot-staging/VmMigration/v1/src/V1/VmMigrationClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.vmmigration.v1.VmMigration' => [ - 'AddGroupMigration' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\AddGroupMigrationResponse', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'group', - 'fieldAccessors' => [ - 'getGroup', - ], - ], - ], - ], - 'CancelCloneJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\CancelCloneJobResponse', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CancelCutoverJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\CancelCutoverJobResponse', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateCloneJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\CloneJob', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateCutoverJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\CutoverJob', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDatacenterConnector' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\DatacenterConnector', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\Group', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateMigratingVm' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\MigratingVm', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSource' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\Source', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateTargetProject' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\TargetProject', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateUtilizationReport' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\UtilizationReport', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDatacenterConnector' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteMigratingVm' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSource' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTargetProject' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteUtilizationReport' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'FinalizeMigration' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\FinalizeMigrationResponse', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'migrating_vm', - 'fieldAccessors' => [ - 'getMigratingVm', - ], - ], - ], - ], - 'PauseMigration' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\PauseMigrationResponse', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'migrating_vm', - 'fieldAccessors' => [ - 'getMigratingVm', - ], - ], - ], - ], - 'RemoveGroupMigration' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\RemoveGroupMigrationResponse', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'group', - 'fieldAccessors' => [ - 'getGroup', - ], - ], - ], - ], - 'ResumeMigration' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\ResumeMigrationResponse', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'migrating_vm', - 'fieldAccessors' => [ - 'getMigratingVm', - ], - ], - ], - ], - 'StartMigration' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\StartMigrationResponse', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'migrating_vm', - 'fieldAccessors' => [ - 'getMigratingVm', - ], - ], - ], - ], - 'UpdateGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\Group', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'group.name', - 'fieldAccessors' => [ - 'getGroup', - 'getName', - ], - ], - ], - ], - 'UpdateMigratingVm' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\MigratingVm', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'migrating_vm.name', - 'fieldAccessors' => [ - 'getMigratingVm', - 'getName', - ], - ], - ], - ], - 'UpdateSource' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\Source', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'source.name', - 'fieldAccessors' => [ - 'getSource', - 'getName', - ], - ], - ], - ], - 'UpdateTargetProject' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\TargetProject', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'target_project.name', - 'fieldAccessors' => [ - 'getTargetProject', - 'getName', - ], - ], - ], - ], - 'UpgradeAppliance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\UpgradeApplianceResponse', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'datacenter_connector', - 'fieldAccessors' => [ - 'getDatacenterConnector', - ], - ], - ], - ], - 'FetchInventory' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\FetchInventoryResponse', - 'headerParams' => [ - [ - 'keyName' => 'source', - 'fieldAccessors' => [ - 'getSource', - ], - ], - ], - ], - 'GetCloneJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\CloneJob', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCutoverJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\CutoverJob', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDatacenterConnector' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\DatacenterConnector', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\Group', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetMigratingVm' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\MigratingVm', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetReplicationCycle' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ReplicationCycle', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSource' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\Source', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetTargetProject' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\TargetProject', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetUtilizationReport' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\UtilizationReport', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListCloneJobs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCloneJobs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ListCloneJobsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListCutoverJobs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCutoverJobs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ListCutoverJobsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDatacenterConnectors' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDatacenterConnectors', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ListDatacenterConnectorsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListGroups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getGroups', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ListGroupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListMigratingVms' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getMigratingVms', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ListMigratingVmsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListReplicationCycles' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getReplicationCycles', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ListReplicationCyclesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSources' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSources', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ListSourcesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListTargetProjects' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTargetProjects', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ListTargetProjectsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListUtilizationReports' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getUtilizationReports', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ListUtilizationReportsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'cloneJob' => 'projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cloneJobs/{clone_job}', - 'cutoverJob' => 'projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cutoverJobs/{cutover_job}', - 'datacenterConnector' => 'projects/{project}/locations/{location}/sources/{source}/datacenterConnectors/{datacenter_connector}', - 'group' => 'projects/{project}/locations/{location}/groups/{group}', - 'location' => 'projects/{project}/locations/{location}', - 'migratingVm' => 'projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}', - 'replicationCycle' => 'projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/replicationCycles/{replication_cycle}', - 'source' => 'projects/{project}/locations/{location}/sources/{source}', - 'targetProject' => 'projects/{project}/locations/{location}/targetProjects/{target_project}', - 'utilizationReport' => 'projects/{project}/locations/{location}/sources/{source}/utilizationReports/{utilization_report}', - ], - ], - ], -]; diff --git a/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_rest_client_config.php b/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_rest_client_config.php deleted file mode 100644 index 04df0194c57a..000000000000 --- a/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_rest_client_config.php +++ /dev/null @@ -1,662 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.vmmigration.v1.VmMigration' => [ - 'AddGroupMigration' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{group=projects/*/locations/*/groups/*}:addGroupMigration', - 'body' => '*', - 'placeholders' => [ - 'group' => [ - 'getters' => [ - 'getGroup', - ], - ], - ], - ], - 'CancelCloneJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*/cloneJobs/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CancelCutoverJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*/cutoverJobs/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateCloneJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*/migratingVms/*}/cloneJobs', - 'body' => 'clone_job', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'clone_job_id', - ], - ], - 'CreateCutoverJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*/migratingVms/*}/cutoverJobs', - 'body' => 'cutover_job', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'cutover_job_id', - ], - ], - 'CreateDatacenterConnector' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/datacenterConnectors', - 'body' => 'datacenter_connector', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'datacenter_connector_id', - ], - ], - 'CreateGroup' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/groups', - 'body' => 'group', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'group_id', - ], - ], - 'CreateMigratingVm' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/migratingVms', - 'body' => 'migrating_vm', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'migrating_vm_id', - ], - ], - 'CreateSource' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/sources', - 'body' => 'source', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'source_id', - ], - ], - 'CreateTargetProject' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/targetProjects', - 'body' => 'target_project', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'target_project_id', - ], - ], - 'CreateUtilizationReport' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/utilizationReports', - 'body' => 'utilization_report', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'utilization_report_id', - ], - ], - 'DeleteDatacenterConnector' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/datacenterConnectors/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteGroup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/groups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteMigratingVm' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSource' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTargetProject' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/targetProjects/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteUtilizationReport' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/utilizationReports/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'FetchInventory' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{source=projects/*/locations/*/sources/*}:fetchInventory', - 'placeholders' => [ - 'source' => [ - 'getters' => [ - 'getSource', - ], - ], - ], - ], - 'FinalizeMigration' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:finalizeMigration', - 'body' => '*', - 'placeholders' => [ - 'migrating_vm' => [ - 'getters' => [ - 'getMigratingVm', - ], - ], - ], - ], - 'GetCloneJob' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*/cloneJobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCutoverJob' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*/cutoverJobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDatacenterConnector' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/datacenterConnectors/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetGroup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/groups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetMigratingVm' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetReplicationCycle' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*/replicationCycles/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSource' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTargetProject' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/targetProjects/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetUtilizationReport' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/utilizationReports/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListCloneJobs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*/migratingVms/*}/cloneJobs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'page_token', - ], - ], - 'ListCutoverJobs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*/migratingVms/*}/cutoverJobs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'page_token', - ], - ], - 'ListDatacenterConnectors' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/datacenterConnectors', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'page_token', - ], - ], - 'ListGroups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/groups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'page_token', - ], - ], - 'ListMigratingVms' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/migratingVms', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'page_token', - ], - ], - 'ListReplicationCycles' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*/migratingVms/*}/replicationCycles', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'page_token', - ], - ], - 'ListSources' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/sources', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'page_token', - ], - ], - 'ListTargetProjects' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/targetProjects', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'page_token', - ], - ], - 'ListUtilizationReports' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/utilizationReports', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'page_token', - ], - ], - 'PauseMigration' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:pauseMigration', - 'body' => '*', - 'placeholders' => [ - 'migrating_vm' => [ - 'getters' => [ - 'getMigratingVm', - ], - ], - ], - ], - 'RemoveGroupMigration' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{group=projects/*/locations/*/groups/*}:removeGroupMigration', - 'body' => '*', - 'placeholders' => [ - 'group' => [ - 'getters' => [ - 'getGroup', - ], - ], - ], - ], - 'ResumeMigration' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:resumeMigration', - 'body' => '*', - 'placeholders' => [ - 'migrating_vm' => [ - 'getters' => [ - 'getMigratingVm', - ], - ], - ], - ], - 'StartMigration' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:startMigration', - 'body' => '*', - 'placeholders' => [ - 'migrating_vm' => [ - 'getters' => [ - 'getMigratingVm', - ], - ], - ], - ], - 'UpdateGroup' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{group.name=projects/*/locations/*/groups/*}', - 'body' => 'group', - 'placeholders' => [ - 'group.name' => [ - 'getters' => [ - 'getGroup', - 'getName', - ], - ], - ], - ], - 'UpdateMigratingVm' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{migrating_vm.name=projects/*/locations/*/sources/*/migratingVms/*}', - 'body' => 'migrating_vm', - 'placeholders' => [ - 'migrating_vm.name' => [ - 'getters' => [ - 'getMigratingVm', - 'getName', - ], - ], - ], - ], - 'UpdateSource' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{source.name=projects/*/locations/*/sources/*}', - 'body' => 'source', - 'placeholders' => [ - 'source.name' => [ - 'getters' => [ - 'getSource', - 'getName', - ], - ], - ], - ], - 'UpdateTargetProject' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{target_project.name=projects/*/locations/*/targetProjects/*}', - 'body' => 'target_project', - 'placeholders' => [ - 'target_project.name' => [ - 'getters' => [ - 'getTargetProject', - 'getName', - ], - ], - ], - ], - 'UpgradeAppliance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{datacenter_connector=projects/*/locations/*/sources/*/datacenterConnectors/*}:upgradeAppliance', - 'body' => '*', - 'placeholders' => [ - 'datacenter_connector' => [ - 'getters' => [ - 'getDatacenterConnector', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/VmMigration/v1/tests/Unit/V1/Client/VmMigrationClientTest.php b/owl-bot-staging/VmMigration/v1/tests/Unit/V1/Client/VmMigrationClientTest.php deleted file mode 100644 index ec429bc784e9..000000000000 --- a/owl-bot-staging/VmMigration/v1/tests/Unit/V1/Client/VmMigrationClientTest.php +++ /dev/null @@ -1,5156 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return VmMigrationClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new VmMigrationClient($options); - } - - /** @test */ - public function addGroupMigrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/addGroupMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new AddGroupMigrationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/addGroupMigrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new AddGroupMigrationRequest()) - ->setGroup($formattedGroup); - $response = $gapicClient->addGroupMigration($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/AddGroupMigration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGroup(); - $this->assertProtobufEquals($formattedGroup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/addGroupMigrationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function addGroupMigrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/addGroupMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new AddGroupMigrationRequest()) - ->setGroup($formattedGroup); - $response = $gapicClient->addGroupMigration($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/addGroupMigrationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function cancelCloneJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cancelCloneJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new CancelCloneJobResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/cancelCloneJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); - $request = (new CancelCloneJobRequest()) - ->setName($formattedName); - $response = $gapicClient->cancelCloneJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CancelCloneJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cancelCloneJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function cancelCloneJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cancelCloneJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); - $request = (new CancelCloneJobRequest()) - ->setName($formattedName); - $response = $gapicClient->cancelCloneJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cancelCloneJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function cancelCutoverJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cancelCutoverJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new CancelCutoverJobResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/cancelCutoverJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); - $request = (new CancelCutoverJobRequest()) - ->setName($formattedName); - $response = $gapicClient->cancelCutoverJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CancelCutoverJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cancelCutoverJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function cancelCutoverJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cancelCutoverJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); - $request = (new CancelCutoverJobRequest()) - ->setName($formattedName); - $response = $gapicClient->cancelCutoverJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cancelCutoverJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createCloneJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCloneJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new CloneJob(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createCloneJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $cloneJobId = 'cloneJobId-1008685569'; - $cloneJob = new CloneJob(); - $request = (new CreateCloneJobRequest()) - ->setParent($formattedParent) - ->setCloneJobId($cloneJobId) - ->setCloneJob($cloneJob); - $response = $gapicClient->createCloneJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateCloneJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getCloneJobId(); - $this->assertProtobufEquals($cloneJobId, $actualValue); - $actualValue = $actualApiRequestObject->getCloneJob(); - $this->assertProtobufEquals($cloneJob, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCloneJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createCloneJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCloneJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $cloneJobId = 'cloneJobId-1008685569'; - $cloneJob = new CloneJob(); - $request = (new CreateCloneJobRequest()) - ->setParent($formattedParent) - ->setCloneJobId($cloneJobId) - ->setCloneJob($cloneJob); - $response = $gapicClient->createCloneJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCloneJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createCutoverJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCutoverJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $progressPercent = 2137894861; - $stateMessage = 'stateMessage29641305'; - $expectedResponse = new CutoverJob(); - $expectedResponse->setName($name); - $expectedResponse->setProgressPercent($progressPercent); - $expectedResponse->setStateMessage($stateMessage); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createCutoverJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $cutoverJobId = 'cutoverJobId504048422'; - $cutoverJob = new CutoverJob(); - $request = (new CreateCutoverJobRequest()) - ->setParent($formattedParent) - ->setCutoverJobId($cutoverJobId) - ->setCutoverJob($cutoverJob); - $response = $gapicClient->createCutoverJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateCutoverJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getCutoverJobId(); - $this->assertProtobufEquals($cutoverJobId, $actualValue); - $actualValue = $actualApiRequestObject->getCutoverJob(); - $this->assertProtobufEquals($cutoverJob, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCutoverJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createCutoverJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCutoverJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $cutoverJobId = 'cutoverJobId504048422'; - $cutoverJob = new CutoverJob(); - $request = (new CreateCutoverJobRequest()) - ->setParent($formattedParent) - ->setCutoverJobId($cutoverJobId) - ->setCutoverJob($cutoverJob); - $response = $gapicClient->createCutoverJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCutoverJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createDatacenterConnectorTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDatacenterConnectorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $registrationId = 'registrationId-412573087'; - $serviceAccount = 'serviceAccount-1948028253'; - $version = 'version351608024'; - $bucket = 'bucket-1378203158'; - $applianceInfrastructureVersion = 'applianceInfrastructureVersion662625550'; - $applianceSoftwareVersion = 'applianceSoftwareVersion-641402222'; - $expectedResponse = new DatacenterConnector(); - $expectedResponse->setName($name); - $expectedResponse->setRegistrationId($registrationId); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setVersion($version); - $expectedResponse->setBucket($bucket); - $expectedResponse->setApplianceInfrastructureVersion($applianceInfrastructureVersion); - $expectedResponse->setApplianceSoftwareVersion($applianceSoftwareVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDatacenterConnectorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $datacenterConnectorId = 'datacenterConnectorId1629428237'; - $datacenterConnector = new DatacenterConnector(); - $request = (new CreateDatacenterConnectorRequest()) - ->setParent($formattedParent) - ->setDatacenterConnectorId($datacenterConnectorId) - ->setDatacenterConnector($datacenterConnector); - $response = $gapicClient->createDatacenterConnector($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateDatacenterConnector', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDatacenterConnectorId(); - $this->assertProtobufEquals($datacenterConnectorId, $actualValue); - $actualValue = $actualApiRequestObject->getDatacenterConnector(); - $this->assertProtobufEquals($datacenterConnector, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDatacenterConnectorTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createDatacenterConnectorExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDatacenterConnectorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $datacenterConnectorId = 'datacenterConnectorId1629428237'; - $datacenterConnector = new DatacenterConnector(); - $request = (new CreateDatacenterConnectorRequest()) - ->setParent($formattedParent) - ->setDatacenterConnectorId($datacenterConnectorId) - ->setDatacenterConnector($datacenterConnector); - $response = $gapicClient->createDatacenterConnector($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDatacenterConnectorTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Group(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $groupId = 'groupId506361563'; - $group = new Group(); - $request = (new CreateGroupRequest()) - ->setParent($formattedParent) - ->setGroupId($groupId) - ->setGroup($group); - $response = $gapicClient->createGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getGroupId(); - $this->assertProtobufEquals($groupId, $actualValue); - $actualValue = $actualApiRequestObject->getGroup(); - $this->assertProtobufEquals($group, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $groupId = 'groupId506361563'; - $group = new Group(); - $request = (new CreateGroupRequest()) - ->setParent($formattedParent) - ->setGroupId($groupId) - ->setGroup($group); - $response = $gapicClient->createGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createMigratingVmTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createMigratingVmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $sourceVmId = 'sourceVmId1673059967'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $group = 'group98629247'; - $expectedResponse = new MigratingVm(); - $expectedResponse->setName($name); - $expectedResponse->setSourceVmId($sourceVmId); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setGroup($group); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createMigratingVmTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $migratingVmId = 'migratingVmId-899085236'; - $migratingVm = new MigratingVm(); - $request = (new CreateMigratingVmRequest()) - ->setParent($formattedParent) - ->setMigratingVmId($migratingVmId) - ->setMigratingVm($migratingVm); - $response = $gapicClient->createMigratingVm($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateMigratingVm', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getMigratingVmId(); - $this->assertProtobufEquals($migratingVmId, $actualValue); - $actualValue = $actualApiRequestObject->getMigratingVm(); - $this->assertProtobufEquals($migratingVm, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createMigratingVmTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createMigratingVmExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createMigratingVmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $migratingVmId = 'migratingVmId-899085236'; - $migratingVm = new MigratingVm(); - $request = (new CreateMigratingVmRequest()) - ->setParent($formattedParent) - ->setMigratingVmId($migratingVmId) - ->setMigratingVm($migratingVm); - $response = $gapicClient->createMigratingVm($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createMigratingVmTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createSourceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSourceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new Source(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createSourceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $sourceId = 'sourceId-1698410561'; - $source = new Source(); - $request = (new CreateSourceRequest()) - ->setParent($formattedParent) - ->setSourceId($sourceId) - ->setSource($source); - $response = $gapicClient->createSource($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateSource', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSourceId(); - $this->assertProtobufEquals($sourceId, $actualValue); - $actualValue = $actualApiRequestObject->getSource(); - $this->assertProtobufEquals($source, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSourceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createSourceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSourceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $sourceId = 'sourceId-1698410561'; - $source = new Source(); - $request = (new CreateSourceRequest()) - ->setParent($formattedParent) - ->setSourceId($sourceId) - ->setSource($source); - $response = $gapicClient->createSource($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSourceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createTargetProjectTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createTargetProjectTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $project = 'project-309310695'; - $description = 'description-1724546052'; - $expectedResponse = new TargetProject(); - $expectedResponse->setName($name); - $expectedResponse->setProject($project); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createTargetProjectTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $targetProjectId = 'targetProjectId1255314287'; - $targetProject = new TargetProject(); - $request = (new CreateTargetProjectRequest()) - ->setParent($formattedParent) - ->setTargetProjectId($targetProjectId) - ->setTargetProject($targetProject); - $response = $gapicClient->createTargetProject($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateTargetProject', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTargetProjectId(); - $this->assertProtobufEquals($targetProjectId, $actualValue); - $actualValue = $actualApiRequestObject->getTargetProject(); - $this->assertProtobufEquals($targetProject, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTargetProjectTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createTargetProjectExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createTargetProjectTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $targetProjectId = 'targetProjectId1255314287'; - $targetProject = new TargetProject(); - $request = (new CreateTargetProjectRequest()) - ->setParent($formattedParent) - ->setTargetProjectId($targetProjectId) - ->setTargetProject($targetProject); - $response = $gapicClient->createTargetProject($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTargetProjectTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createUtilizationReportTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createUtilizationReportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $vmCount = 261463431; - $expectedResponse = new UtilizationReport(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setVmCount($vmCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createUtilizationReportTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $utilizationReport = new UtilizationReport(); - $utilizationReportId = 'utilizationReportId-1346894295'; - $request = (new CreateUtilizationReportRequest()) - ->setParent($formattedParent) - ->setUtilizationReport($utilizationReport) - ->setUtilizationReportId($utilizationReportId); - $response = $gapicClient->createUtilizationReport($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateUtilizationReport', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getUtilizationReport(); - $this->assertProtobufEquals($utilizationReport, $actualValue); - $actualValue = $actualApiRequestObject->getUtilizationReportId(); - $this->assertProtobufEquals($utilizationReportId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createUtilizationReportTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createUtilizationReportExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createUtilizationReportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $utilizationReport = new UtilizationReport(); - $utilizationReportId = 'utilizationReportId-1346894295'; - $request = (new CreateUtilizationReportRequest()) - ->setParent($formattedParent) - ->setUtilizationReport($utilizationReport) - ->setUtilizationReportId($utilizationReportId); - $response = $gapicClient->createUtilizationReport($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createUtilizationReportTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDatacenterConnectorTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDatacenterConnectorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDatacenterConnectorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); - $request = (new DeleteDatacenterConnectorRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDatacenterConnector($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteDatacenterConnector', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDatacenterConnectorTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDatacenterConnectorExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDatacenterConnectorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); - $request = (new DeleteDatacenterConnectorRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDatacenterConnector($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDatacenterConnectorTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new DeleteGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new DeleteGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteMigratingVmTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteMigratingVmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteMigratingVmTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new DeleteMigratingVmRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteMigratingVm($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteMigratingVm', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteMigratingVmTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteMigratingVmExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteMigratingVmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new DeleteMigratingVmRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteMigratingVm($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteMigratingVmTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteSourceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSourceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteSourceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $request = (new DeleteSourceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSource($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteSource', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSourceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteSourceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSourceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $request = (new DeleteSourceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSource($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSourceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteTargetProjectTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteTargetProjectTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteTargetProjectTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); - $request = (new DeleteTargetProjectRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteTargetProject($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteTargetProject', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTargetProjectTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteTargetProjectExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteTargetProjectTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); - $request = (new DeleteTargetProjectRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteTargetProject($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTargetProjectTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteUtilizationReportTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteUtilizationReportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteUtilizationReportTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); - $request = (new DeleteUtilizationReportRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteUtilizationReport($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteUtilizationReport', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteUtilizationReportTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteUtilizationReportExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteUtilizationReportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); - $request = (new DeleteUtilizationReportRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteUtilizationReport($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteUtilizationReportTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function fetchInventoryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new FetchInventoryResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $request = (new FetchInventoryRequest()) - ->setSource($formattedSource); - $response = $gapicClient->fetchInventory($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/FetchInventory', $actualFuncCall); - $actualValue = $actualRequestObject->getSource(); - $this->assertProtobufEquals($formattedSource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function fetchInventoryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $request = (new FetchInventoryRequest()) - ->setSource($formattedSource); - try { - $gapicClient->fetchInventory($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function finalizeMigrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/finalizeMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new FinalizeMigrationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/finalizeMigrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new FinalizeMigrationRequest()) - ->setMigratingVm($formattedMigratingVm); - $response = $gapicClient->finalizeMigration($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/FinalizeMigration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getMigratingVm(); - $this->assertProtobufEquals($formattedMigratingVm, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/finalizeMigrationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function finalizeMigrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/finalizeMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new FinalizeMigrationRequest()) - ->setMigratingVm($formattedMigratingVm); - $response = $gapicClient->finalizeMigration($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/finalizeMigrationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getCloneJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new CloneJob(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); - $request = (new GetCloneJobRequest()) - ->setName($formattedName); - $response = $gapicClient->getCloneJob($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetCloneJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCloneJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); - $request = (new GetCloneJobRequest()) - ->setName($formattedName); - try { - $gapicClient->getCloneJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCutoverJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $progressPercent = 2137894861; - $stateMessage = 'stateMessage29641305'; - $expectedResponse = new CutoverJob(); - $expectedResponse->setName($name2); - $expectedResponse->setProgressPercent($progressPercent); - $expectedResponse->setStateMessage($stateMessage); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); - $request = (new GetCutoverJobRequest()) - ->setName($formattedName); - $response = $gapicClient->getCutoverJob($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetCutoverJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCutoverJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); - $request = (new GetCutoverJobRequest()) - ->setName($formattedName); - try { - $gapicClient->getCutoverJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDatacenterConnectorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $registrationId = 'registrationId-412573087'; - $serviceAccount = 'serviceAccount-1948028253'; - $version = 'version351608024'; - $bucket = 'bucket-1378203158'; - $applianceInfrastructureVersion = 'applianceInfrastructureVersion662625550'; - $applianceSoftwareVersion = 'applianceSoftwareVersion-641402222'; - $expectedResponse = new DatacenterConnector(); - $expectedResponse->setName($name2); - $expectedResponse->setRegistrationId($registrationId); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setVersion($version); - $expectedResponse->setBucket($bucket); - $expectedResponse->setApplianceInfrastructureVersion($applianceInfrastructureVersion); - $expectedResponse->setApplianceSoftwareVersion($applianceSoftwareVersion); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); - $request = (new GetDatacenterConnectorRequest()) - ->setName($formattedName); - $response = $gapicClient->getDatacenterConnector($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetDatacenterConnector', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDatacenterConnectorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); - $request = (new GetDatacenterConnectorRequest()) - ->setName($formattedName); - try { - $gapicClient->getDatacenterConnector($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Group(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new GetGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->getGroup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new GetGroupRequest()) - ->setName($formattedName); - try { - $gapicClient->getGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMigratingVmTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $sourceVmId = 'sourceVmId1673059967'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $group = 'group98629247'; - $expectedResponse = new MigratingVm(); - $expectedResponse->setName($name2); - $expectedResponse->setSourceVmId($sourceVmId); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setGroup($group); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new GetMigratingVmRequest()) - ->setName($formattedName); - $response = $gapicClient->getMigratingVm($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetMigratingVm', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMigratingVmExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new GetMigratingVmRequest()) - ->setName($formattedName); - try { - $gapicClient->getMigratingVm($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReplicationCycleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $cycleNumber = 1095724862; - $progressPercent = 2137894861; - $expectedResponse = new ReplicationCycle(); - $expectedResponse->setName($name2); - $expectedResponse->setCycleNumber($cycleNumber); - $expectedResponse->setProgressPercent($progressPercent); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->replicationCycleName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[REPLICATION_CYCLE]'); - $request = (new GetReplicationCycleRequest()) - ->setName($formattedName); - $response = $gapicClient->getReplicationCycle($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetReplicationCycle', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReplicationCycleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->replicationCycleName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[REPLICATION_CYCLE]'); - $request = (new GetReplicationCycleRequest()) - ->setName($formattedName); - try { - $gapicClient->getReplicationCycle($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSourceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new Source(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $request = (new GetSourceRequest()) - ->setName($formattedName); - $response = $gapicClient->getSource($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetSource', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSourceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $request = (new GetSourceRequest()) - ->setName($formattedName); - try { - $gapicClient->getSource($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTargetProjectTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $project = 'project-309310695'; - $description = 'description-1724546052'; - $expectedResponse = new TargetProject(); - $expectedResponse->setName($name2); - $expectedResponse->setProject($project); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); - $request = (new GetTargetProjectRequest()) - ->setName($formattedName); - $response = $gapicClient->getTargetProject($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetTargetProject', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTargetProjectExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); - $request = (new GetTargetProjectRequest()) - ->setName($formattedName); - try { - $gapicClient->getTargetProject($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getUtilizationReportTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $vmCount = 261463431; - $expectedResponse = new UtilizationReport(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setVmCount($vmCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); - $request = (new GetUtilizationReportRequest()) - ->setName($formattedName); - $response = $gapicClient->getUtilizationReport($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetUtilizationReport', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getUtilizationReportExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); - $request = (new GetUtilizationReportRequest()) - ->setName($formattedName); - try { - $gapicClient->getUtilizationReport($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCloneJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $cloneJobsElement = new CloneJob(); - $cloneJobs = [ - $cloneJobsElement, - ]; - $expectedResponse = new ListCloneJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCloneJobs($cloneJobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListCloneJobsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - $response = $gapicClient->listCloneJobs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCloneJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListCloneJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCloneJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListCloneJobsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - try { - $gapicClient->listCloneJobs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCutoverJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $cutoverJobsElement = new CutoverJob(); - $cutoverJobs = [ - $cutoverJobsElement, - ]; - $expectedResponse = new ListCutoverJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCutoverJobs($cutoverJobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListCutoverJobsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - $response = $gapicClient->listCutoverJobs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCutoverJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListCutoverJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCutoverJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListCutoverJobsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - try { - $gapicClient->listCutoverJobs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDatacenterConnectorsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $datacenterConnectorsElement = new DatacenterConnector(); - $datacenterConnectors = [ - $datacenterConnectorsElement, - ]; - $expectedResponse = new ListDatacenterConnectorsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDatacenterConnectors($datacenterConnectors); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListDatacenterConnectorsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - $response = $gapicClient->listDatacenterConnectors($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDatacenterConnectors()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListDatacenterConnectors', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDatacenterConnectorsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListDatacenterConnectorsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - try { - $gapicClient->listDatacenterConnectors($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGroupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $groupsElement = new Group(); - $groups = [ - $groupsElement, - ]; - $expectedResponse = new ListGroupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGroups($groups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListGroupsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - $response = $gapicClient->listGroups($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGroups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListGroups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGroupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListGroupsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - try { - $gapicClient->listGroups($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMigratingVmsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $migratingVmsElement = new MigratingVm(); - $migratingVms = [ - $migratingVmsElement, - ]; - $expectedResponse = new ListMigratingVmsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setMigratingVms($migratingVms); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListMigratingVmsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - $response = $gapicClient->listMigratingVms($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getMigratingVms()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListMigratingVms', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMigratingVmsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListMigratingVmsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - try { - $gapicClient->listMigratingVms($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReplicationCyclesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $replicationCyclesElement = new ReplicationCycle(); - $replicationCycles = [ - $replicationCyclesElement, - ]; - $expectedResponse = new ListReplicationCyclesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setReplicationCycles($replicationCycles); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListReplicationCyclesRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - $response = $gapicClient->listReplicationCycles($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getReplicationCycles()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListReplicationCycles', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReplicationCyclesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListReplicationCyclesRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - try { - $gapicClient->listReplicationCycles($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSourcesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $sourcesElement = new Source(); - $sources = [ - $sourcesElement, - ]; - $expectedResponse = new ListSourcesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSources($sources); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListSourcesRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - $response = $gapicClient->listSources($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSources()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListSources', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSourcesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListSourcesRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - try { - $gapicClient->listSources($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTargetProjectsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $targetProjectsElement = new TargetProject(); - $targetProjects = [ - $targetProjectsElement, - ]; - $expectedResponse = new ListTargetProjectsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTargetProjects($targetProjects); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListTargetProjectsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - $response = $gapicClient->listTargetProjects($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTargetProjects()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListTargetProjects', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTargetProjectsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListTargetProjectsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - try { - $gapicClient->listTargetProjects($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUtilizationReportsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $utilizationReportsElement = new UtilizationReport(); - $utilizationReports = [ - $utilizationReportsElement, - ]; - $expectedResponse = new ListUtilizationReportsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setUtilizationReports($utilizationReports); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListUtilizationReportsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - $response = $gapicClient->listUtilizationReports($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getUtilizationReports()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListUtilizationReports', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUtilizationReportsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListUtilizationReportsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - try { - $gapicClient->listUtilizationReports($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function pauseMigrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/pauseMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new PauseMigrationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/pauseMigrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new PauseMigrationRequest()) - ->setMigratingVm($formattedMigratingVm); - $response = $gapicClient->pauseMigration($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/PauseMigration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getMigratingVm(); - $this->assertProtobufEquals($formattedMigratingVm, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/pauseMigrationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function pauseMigrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/pauseMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new PauseMigrationRequest()) - ->setMigratingVm($formattedMigratingVm); - $response = $gapicClient->pauseMigration($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/pauseMigrationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function removeGroupMigrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/removeGroupMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new RemoveGroupMigrationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/removeGroupMigrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new RemoveGroupMigrationRequest()) - ->setGroup($formattedGroup); - $response = $gapicClient->removeGroupMigration($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/RemoveGroupMigration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGroup(); - $this->assertProtobufEquals($formattedGroup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/removeGroupMigrationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function removeGroupMigrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/removeGroupMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new RemoveGroupMigrationRequest()) - ->setGroup($formattedGroup); - $response = $gapicClient->removeGroupMigration($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/removeGroupMigrationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resumeMigrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resumeMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ResumeMigrationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/resumeMigrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new ResumeMigrationRequest()) - ->setMigratingVm($formattedMigratingVm); - $response = $gapicClient->resumeMigration($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ResumeMigration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getMigratingVm(); - $this->assertProtobufEquals($formattedMigratingVm, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resumeMigrationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resumeMigrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resumeMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new ResumeMigrationRequest()) - ->setMigratingVm($formattedMigratingVm); - $response = $gapicClient->resumeMigration($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resumeMigrationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function startMigrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new StartMigrationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/startMigrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new StartMigrationRequest()) - ->setMigratingVm($formattedMigratingVm); - $response = $gapicClient->startMigration($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/StartMigration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getMigratingVm(); - $this->assertProtobufEquals($formattedMigratingVm, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startMigrationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function startMigrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new StartMigrationRequest()) - ->setMigratingVm($formattedMigratingVm); - $response = $gapicClient->startMigration($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startMigrationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Group(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $group = new Group(); - $request = (new UpdateGroupRequest()) - ->setGroup($group); - $response = $gapicClient->updateGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/UpdateGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGroup(); - $this->assertProtobufEquals($group, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $group = new Group(); - $request = (new UpdateGroupRequest()) - ->setGroup($group); - $response = $gapicClient->updateGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateMigratingVmTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateMigratingVmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $sourceVmId = 'sourceVmId1673059967'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $group = 'group98629247'; - $expectedResponse = new MigratingVm(); - $expectedResponse->setName($name); - $expectedResponse->setSourceVmId($sourceVmId); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setGroup($group); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateMigratingVmTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $migratingVm = new MigratingVm(); - $request = (new UpdateMigratingVmRequest()) - ->setMigratingVm($migratingVm); - $response = $gapicClient->updateMigratingVm($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/UpdateMigratingVm', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getMigratingVm(); - $this->assertProtobufEquals($migratingVm, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateMigratingVmTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateMigratingVmExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateMigratingVmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $migratingVm = new MigratingVm(); - $request = (new UpdateMigratingVmRequest()) - ->setMigratingVm($migratingVm); - $response = $gapicClient->updateMigratingVm($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateMigratingVmTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateSourceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSourceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new Source(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateSourceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $source = new Source(); - $request = (new UpdateSourceRequest()) - ->setSource($source); - $response = $gapicClient->updateSource($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/UpdateSource', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getSource(); - $this->assertProtobufEquals($source, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSourceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateSourceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSourceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $source = new Source(); - $request = (new UpdateSourceRequest()) - ->setSource($source); - $response = $gapicClient->updateSource($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSourceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateTargetProjectTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateTargetProjectTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $project = 'project-309310695'; - $description = 'description-1724546052'; - $expectedResponse = new TargetProject(); - $expectedResponse->setName($name); - $expectedResponse->setProject($project); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateTargetProjectTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $targetProject = new TargetProject(); - $request = (new UpdateTargetProjectRequest()) - ->setTargetProject($targetProject); - $response = $gapicClient->updateTargetProject($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/UpdateTargetProject', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getTargetProject(); - $this->assertProtobufEquals($targetProject, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTargetProjectTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateTargetProjectExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateTargetProjectTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $targetProject = new TargetProject(); - $request = (new UpdateTargetProjectRequest()) - ->setTargetProject($targetProject); - $response = $gapicClient->updateTargetProject($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTargetProjectTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function upgradeApplianceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/upgradeApplianceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new UpgradeApplianceResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/upgradeApplianceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedDatacenterConnector = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); - $request = (new UpgradeApplianceRequest()) - ->setDatacenterConnector($formattedDatacenterConnector); - $response = $gapicClient->upgradeAppliance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/UpgradeAppliance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getDatacenterConnector(); - $this->assertProtobufEquals($formattedDatacenterConnector, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/upgradeApplianceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function upgradeApplianceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/upgradeApplianceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedDatacenterConnector = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); - $request = (new UpgradeApplianceRequest()) - ->setDatacenterConnector($formattedDatacenterConnector); - $response = $gapicClient->upgradeAppliance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/upgradeApplianceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function addGroupMigrationAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/addGroupMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new AddGroupMigrationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/addGroupMigrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new AddGroupMigrationRequest()) - ->setGroup($formattedGroup); - $response = $gapicClient->addGroupMigrationAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/AddGroupMigration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGroup(); - $this->assertProtobufEquals($formattedGroup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/addGroupMigrationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/VmMigration/v1/tests/Unit/V1/VmMigrationClientTest.php b/owl-bot-staging/VmMigration/v1/tests/Unit/V1/VmMigrationClientTest.php deleted file mode 100644 index 0a0298c7e3c3..000000000000 --- a/owl-bot-staging/VmMigration/v1/tests/Unit/V1/VmMigrationClientTest.php +++ /dev/null @@ -1,4806 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return VmMigrationClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new VmMigrationClient($options); - } - - /** @test */ - public function addGroupMigrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/addGroupMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new AddGroupMigrationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/addGroupMigrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $response = $gapicClient->addGroupMigration($formattedGroup); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/AddGroupMigration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGroup(); - $this->assertProtobufEquals($formattedGroup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/addGroupMigrationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function addGroupMigrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/addGroupMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $response = $gapicClient->addGroupMigration($formattedGroup); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/addGroupMigrationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function cancelCloneJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cancelCloneJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new CancelCloneJobResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/cancelCloneJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); - $response = $gapicClient->cancelCloneJob($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CancelCloneJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cancelCloneJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function cancelCloneJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cancelCloneJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); - $response = $gapicClient->cancelCloneJob($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cancelCloneJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function cancelCutoverJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cancelCutoverJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new CancelCutoverJobResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/cancelCutoverJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); - $response = $gapicClient->cancelCutoverJob($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CancelCutoverJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cancelCutoverJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function cancelCutoverJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cancelCutoverJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); - $response = $gapicClient->cancelCutoverJob($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cancelCutoverJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createCloneJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCloneJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new CloneJob(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createCloneJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $cloneJobId = 'cloneJobId-1008685569'; - $cloneJob = new CloneJob(); - $response = $gapicClient->createCloneJob($formattedParent, $cloneJobId, $cloneJob); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateCloneJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getCloneJobId(); - $this->assertProtobufEquals($cloneJobId, $actualValue); - $actualValue = $actualApiRequestObject->getCloneJob(); - $this->assertProtobufEquals($cloneJob, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCloneJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createCloneJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCloneJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $cloneJobId = 'cloneJobId-1008685569'; - $cloneJob = new CloneJob(); - $response = $gapicClient->createCloneJob($formattedParent, $cloneJobId, $cloneJob); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCloneJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createCutoverJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCutoverJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $progressPercent = 2137894861; - $stateMessage = 'stateMessage29641305'; - $expectedResponse = new CutoverJob(); - $expectedResponse->setName($name); - $expectedResponse->setProgressPercent($progressPercent); - $expectedResponse->setStateMessage($stateMessage); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createCutoverJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $cutoverJobId = 'cutoverJobId504048422'; - $cutoverJob = new CutoverJob(); - $response = $gapicClient->createCutoverJob($formattedParent, $cutoverJobId, $cutoverJob); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateCutoverJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getCutoverJobId(); - $this->assertProtobufEquals($cutoverJobId, $actualValue); - $actualValue = $actualApiRequestObject->getCutoverJob(); - $this->assertProtobufEquals($cutoverJob, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCutoverJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createCutoverJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCutoverJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $cutoverJobId = 'cutoverJobId504048422'; - $cutoverJob = new CutoverJob(); - $response = $gapicClient->createCutoverJob($formattedParent, $cutoverJobId, $cutoverJob); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCutoverJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createDatacenterConnectorTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDatacenterConnectorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $registrationId = 'registrationId-412573087'; - $serviceAccount = 'serviceAccount-1948028253'; - $version = 'version351608024'; - $bucket = 'bucket-1378203158'; - $applianceInfrastructureVersion = 'applianceInfrastructureVersion662625550'; - $applianceSoftwareVersion = 'applianceSoftwareVersion-641402222'; - $expectedResponse = new DatacenterConnector(); - $expectedResponse->setName($name); - $expectedResponse->setRegistrationId($registrationId); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setVersion($version); - $expectedResponse->setBucket($bucket); - $expectedResponse->setApplianceInfrastructureVersion($applianceInfrastructureVersion); - $expectedResponse->setApplianceSoftwareVersion($applianceSoftwareVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDatacenterConnectorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $datacenterConnectorId = 'datacenterConnectorId1629428237'; - $datacenterConnector = new DatacenterConnector(); - $response = $gapicClient->createDatacenterConnector($formattedParent, $datacenterConnectorId, $datacenterConnector); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateDatacenterConnector', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDatacenterConnectorId(); - $this->assertProtobufEquals($datacenterConnectorId, $actualValue); - $actualValue = $actualApiRequestObject->getDatacenterConnector(); - $this->assertProtobufEquals($datacenterConnector, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDatacenterConnectorTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createDatacenterConnectorExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDatacenterConnectorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $datacenterConnectorId = 'datacenterConnectorId1629428237'; - $datacenterConnector = new DatacenterConnector(); - $response = $gapicClient->createDatacenterConnector($formattedParent, $datacenterConnectorId, $datacenterConnector); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDatacenterConnectorTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Group(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $groupId = 'groupId506361563'; - $group = new Group(); - $response = $gapicClient->createGroup($formattedParent, $groupId, $group); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getGroupId(); - $this->assertProtobufEquals($groupId, $actualValue); - $actualValue = $actualApiRequestObject->getGroup(); - $this->assertProtobufEquals($group, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $groupId = 'groupId506361563'; - $group = new Group(); - $response = $gapicClient->createGroup($formattedParent, $groupId, $group); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createMigratingVmTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createMigratingVmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $sourceVmId = 'sourceVmId1673059967'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $group = 'group98629247'; - $expectedResponse = new MigratingVm(); - $expectedResponse->setName($name); - $expectedResponse->setSourceVmId($sourceVmId); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setGroup($group); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createMigratingVmTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $migratingVmId = 'migratingVmId-899085236'; - $migratingVm = new MigratingVm(); - $response = $gapicClient->createMigratingVm($formattedParent, $migratingVmId, $migratingVm); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateMigratingVm', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getMigratingVmId(); - $this->assertProtobufEquals($migratingVmId, $actualValue); - $actualValue = $actualApiRequestObject->getMigratingVm(); - $this->assertProtobufEquals($migratingVm, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createMigratingVmTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createMigratingVmExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createMigratingVmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $migratingVmId = 'migratingVmId-899085236'; - $migratingVm = new MigratingVm(); - $response = $gapicClient->createMigratingVm($formattedParent, $migratingVmId, $migratingVm); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createMigratingVmTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createSourceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSourceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new Source(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createSourceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $sourceId = 'sourceId-1698410561'; - $source = new Source(); - $response = $gapicClient->createSource($formattedParent, $sourceId, $source); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateSource', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSourceId(); - $this->assertProtobufEquals($sourceId, $actualValue); - $actualValue = $actualApiRequestObject->getSource(); - $this->assertProtobufEquals($source, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSourceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createSourceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSourceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $sourceId = 'sourceId-1698410561'; - $source = new Source(); - $response = $gapicClient->createSource($formattedParent, $sourceId, $source); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSourceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createTargetProjectTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createTargetProjectTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $project = 'project-309310695'; - $description = 'description-1724546052'; - $expectedResponse = new TargetProject(); - $expectedResponse->setName($name); - $expectedResponse->setProject($project); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createTargetProjectTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $targetProjectId = 'targetProjectId1255314287'; - $targetProject = new TargetProject(); - $response = $gapicClient->createTargetProject($formattedParent, $targetProjectId, $targetProject); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateTargetProject', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTargetProjectId(); - $this->assertProtobufEquals($targetProjectId, $actualValue); - $actualValue = $actualApiRequestObject->getTargetProject(); - $this->assertProtobufEquals($targetProject, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTargetProjectTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createTargetProjectExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createTargetProjectTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $targetProjectId = 'targetProjectId1255314287'; - $targetProject = new TargetProject(); - $response = $gapicClient->createTargetProject($formattedParent, $targetProjectId, $targetProject); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTargetProjectTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createUtilizationReportTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createUtilizationReportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $vmCount = 261463431; - $expectedResponse = new UtilizationReport(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setVmCount($vmCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createUtilizationReportTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $utilizationReport = new UtilizationReport(); - $utilizationReportId = 'utilizationReportId-1346894295'; - $response = $gapicClient->createUtilizationReport($formattedParent, $utilizationReport, $utilizationReportId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateUtilizationReport', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getUtilizationReport(); - $this->assertProtobufEquals($utilizationReport, $actualValue); - $actualValue = $actualApiRequestObject->getUtilizationReportId(); - $this->assertProtobufEquals($utilizationReportId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createUtilizationReportTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createUtilizationReportExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createUtilizationReportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $utilizationReport = new UtilizationReport(); - $utilizationReportId = 'utilizationReportId-1346894295'; - $response = $gapicClient->createUtilizationReport($formattedParent, $utilizationReport, $utilizationReportId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createUtilizationReportTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDatacenterConnectorTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDatacenterConnectorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDatacenterConnectorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); - $response = $gapicClient->deleteDatacenterConnector($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteDatacenterConnector', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDatacenterConnectorTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDatacenterConnectorExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDatacenterConnectorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); - $response = $gapicClient->deleteDatacenterConnector($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDatacenterConnectorTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $response = $gapicClient->deleteGroup($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $response = $gapicClient->deleteGroup($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteMigratingVmTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteMigratingVmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteMigratingVmTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $response = $gapicClient->deleteMigratingVm($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteMigratingVm', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteMigratingVmTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteMigratingVmExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteMigratingVmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $response = $gapicClient->deleteMigratingVm($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteMigratingVmTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteSourceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSourceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteSourceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $response = $gapicClient->deleteSource($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteSource', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSourceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteSourceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSourceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $response = $gapicClient->deleteSource($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSourceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteTargetProjectTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteTargetProjectTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteTargetProjectTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); - $response = $gapicClient->deleteTargetProject($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteTargetProject', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTargetProjectTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteTargetProjectExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteTargetProjectTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); - $response = $gapicClient->deleteTargetProject($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTargetProjectTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteUtilizationReportTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteUtilizationReportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteUtilizationReportTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); - $response = $gapicClient->deleteUtilizationReport($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteUtilizationReport', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteUtilizationReportTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteUtilizationReportExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteUtilizationReportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); - $response = $gapicClient->deleteUtilizationReport($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteUtilizationReportTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function fetchInventoryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new FetchInventoryResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $response = $gapicClient->fetchInventory($formattedSource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/FetchInventory', $actualFuncCall); - $actualValue = $actualRequestObject->getSource(); - $this->assertProtobufEquals($formattedSource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function fetchInventoryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - try { - $gapicClient->fetchInventory($formattedSource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function finalizeMigrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/finalizeMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new FinalizeMigrationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/finalizeMigrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $response = $gapicClient->finalizeMigration($formattedMigratingVm); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/FinalizeMigration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getMigratingVm(); - $this->assertProtobufEquals($formattedMigratingVm, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/finalizeMigrationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function finalizeMigrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/finalizeMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $response = $gapicClient->finalizeMigration($formattedMigratingVm); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/finalizeMigrationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getCloneJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new CloneJob(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); - $response = $gapicClient->getCloneJob($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetCloneJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCloneJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); - try { - $gapicClient->getCloneJob($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCutoverJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $progressPercent = 2137894861; - $stateMessage = 'stateMessage29641305'; - $expectedResponse = new CutoverJob(); - $expectedResponse->setName($name2); - $expectedResponse->setProgressPercent($progressPercent); - $expectedResponse->setStateMessage($stateMessage); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); - $response = $gapicClient->getCutoverJob($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetCutoverJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCutoverJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); - try { - $gapicClient->getCutoverJob($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDatacenterConnectorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $registrationId = 'registrationId-412573087'; - $serviceAccount = 'serviceAccount-1948028253'; - $version = 'version351608024'; - $bucket = 'bucket-1378203158'; - $applianceInfrastructureVersion = 'applianceInfrastructureVersion662625550'; - $applianceSoftwareVersion = 'applianceSoftwareVersion-641402222'; - $expectedResponse = new DatacenterConnector(); - $expectedResponse->setName($name2); - $expectedResponse->setRegistrationId($registrationId); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setVersion($version); - $expectedResponse->setBucket($bucket); - $expectedResponse->setApplianceInfrastructureVersion($applianceInfrastructureVersion); - $expectedResponse->setApplianceSoftwareVersion($applianceSoftwareVersion); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); - $response = $gapicClient->getDatacenterConnector($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetDatacenterConnector', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDatacenterConnectorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); - try { - $gapicClient->getDatacenterConnector($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Group(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $response = $gapicClient->getGroup($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - try { - $gapicClient->getGroup($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMigratingVmTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $sourceVmId = 'sourceVmId1673059967'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $group = 'group98629247'; - $expectedResponse = new MigratingVm(); - $expectedResponse->setName($name2); - $expectedResponse->setSourceVmId($sourceVmId); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setGroup($group); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $response = $gapicClient->getMigratingVm($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetMigratingVm', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMigratingVmExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - try { - $gapicClient->getMigratingVm($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReplicationCycleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $cycleNumber = 1095724862; - $progressPercent = 2137894861; - $expectedResponse = new ReplicationCycle(); - $expectedResponse->setName($name2); - $expectedResponse->setCycleNumber($cycleNumber); - $expectedResponse->setProgressPercent($progressPercent); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->replicationCycleName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[REPLICATION_CYCLE]'); - $response = $gapicClient->getReplicationCycle($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetReplicationCycle', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReplicationCycleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->replicationCycleName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[REPLICATION_CYCLE]'); - try { - $gapicClient->getReplicationCycle($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSourceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new Source(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $response = $gapicClient->getSource($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetSource', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSourceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - try { - $gapicClient->getSource($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTargetProjectTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $project = 'project-309310695'; - $description = 'description-1724546052'; - $expectedResponse = new TargetProject(); - $expectedResponse->setName($name2); - $expectedResponse->setProject($project); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); - $response = $gapicClient->getTargetProject($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetTargetProject', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTargetProjectExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); - try { - $gapicClient->getTargetProject($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getUtilizationReportTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $vmCount = 261463431; - $expectedResponse = new UtilizationReport(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setVmCount($vmCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); - $response = $gapicClient->getUtilizationReport($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetUtilizationReport', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getUtilizationReportExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); - try { - $gapicClient->getUtilizationReport($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCloneJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $cloneJobsElement = new CloneJob(); - $cloneJobs = [ - $cloneJobsElement, - ]; - $expectedResponse = new ListCloneJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCloneJobs($cloneJobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $pageToken = 'pageToken1630607433'; - $response = $gapicClient->listCloneJobs($formattedParent, $pageToken); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCloneJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListCloneJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCloneJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $pageToken = 'pageToken1630607433'; - try { - $gapicClient->listCloneJobs($formattedParent, $pageToken); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCutoverJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $cutoverJobsElement = new CutoverJob(); - $cutoverJobs = [ - $cutoverJobsElement, - ]; - $expectedResponse = new ListCutoverJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCutoverJobs($cutoverJobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $pageToken = 'pageToken1630607433'; - $response = $gapicClient->listCutoverJobs($formattedParent, $pageToken); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCutoverJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListCutoverJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCutoverJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $pageToken = 'pageToken1630607433'; - try { - $gapicClient->listCutoverJobs($formattedParent, $pageToken); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDatacenterConnectorsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $datacenterConnectorsElement = new DatacenterConnector(); - $datacenterConnectors = [ - $datacenterConnectorsElement, - ]; - $expectedResponse = new ListDatacenterConnectorsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDatacenterConnectors($datacenterConnectors); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = 'pageToken1630607433'; - $response = $gapicClient->listDatacenterConnectors($formattedParent, $pageToken); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDatacenterConnectors()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListDatacenterConnectors', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDatacenterConnectorsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = 'pageToken1630607433'; - try { - $gapicClient->listDatacenterConnectors($formattedParent, $pageToken); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGroupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $groupsElement = new Group(); - $groups = [ - $groupsElement, - ]; - $expectedResponse = new ListGroupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGroups($groups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $pageToken = 'pageToken1630607433'; - $response = $gapicClient->listGroups($formattedParent, $pageToken); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGroups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListGroups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGroupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $pageToken = 'pageToken1630607433'; - try { - $gapicClient->listGroups($formattedParent, $pageToken); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMigratingVmsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $migratingVmsElement = new MigratingVm(); - $migratingVms = [ - $migratingVmsElement, - ]; - $expectedResponse = new ListMigratingVmsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setMigratingVms($migratingVms); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = 'pageToken1630607433'; - $response = $gapicClient->listMigratingVms($formattedParent, $pageToken); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getMigratingVms()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListMigratingVms', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMigratingVmsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = 'pageToken1630607433'; - try { - $gapicClient->listMigratingVms($formattedParent, $pageToken); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReplicationCyclesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $replicationCyclesElement = new ReplicationCycle(); - $replicationCycles = [ - $replicationCyclesElement, - ]; - $expectedResponse = new ListReplicationCyclesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setReplicationCycles($replicationCycles); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $pageToken = 'pageToken1630607433'; - $response = $gapicClient->listReplicationCycles($formattedParent, $pageToken); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getReplicationCycles()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListReplicationCycles', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReplicationCyclesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $pageToken = 'pageToken1630607433'; - try { - $gapicClient->listReplicationCycles($formattedParent, $pageToken); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSourcesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $sourcesElement = new Source(); - $sources = [ - $sourcesElement, - ]; - $expectedResponse = new ListSourcesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSources($sources); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $pageToken = 'pageToken1630607433'; - $response = $gapicClient->listSources($formattedParent, $pageToken); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSources()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListSources', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSourcesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $pageToken = 'pageToken1630607433'; - try { - $gapicClient->listSources($formattedParent, $pageToken); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTargetProjectsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $targetProjectsElement = new TargetProject(); - $targetProjects = [ - $targetProjectsElement, - ]; - $expectedResponse = new ListTargetProjectsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTargetProjects($targetProjects); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $pageToken = 'pageToken1630607433'; - $response = $gapicClient->listTargetProjects($formattedParent, $pageToken); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTargetProjects()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListTargetProjects', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTargetProjectsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $pageToken = 'pageToken1630607433'; - try { - $gapicClient->listTargetProjects($formattedParent, $pageToken); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUtilizationReportsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $utilizationReportsElement = new UtilizationReport(); - $utilizationReports = [ - $utilizationReportsElement, - ]; - $expectedResponse = new ListUtilizationReportsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setUtilizationReports($utilizationReports); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = 'pageToken1630607433'; - $response = $gapicClient->listUtilizationReports($formattedParent, $pageToken); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getUtilizationReports()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListUtilizationReports', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUtilizationReportsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = 'pageToken1630607433'; - try { - $gapicClient->listUtilizationReports($formattedParent, $pageToken); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function pauseMigrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/pauseMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new PauseMigrationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/pauseMigrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $response = $gapicClient->pauseMigration($formattedMigratingVm); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/PauseMigration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getMigratingVm(); - $this->assertProtobufEquals($formattedMigratingVm, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/pauseMigrationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function pauseMigrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/pauseMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $response = $gapicClient->pauseMigration($formattedMigratingVm); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/pauseMigrationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function removeGroupMigrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/removeGroupMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new RemoveGroupMigrationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/removeGroupMigrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $response = $gapicClient->removeGroupMigration($formattedGroup); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/RemoveGroupMigration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGroup(); - $this->assertProtobufEquals($formattedGroup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/removeGroupMigrationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function removeGroupMigrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/removeGroupMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $response = $gapicClient->removeGroupMigration($formattedGroup); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/removeGroupMigrationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resumeMigrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resumeMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ResumeMigrationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/resumeMigrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $response = $gapicClient->resumeMigration($formattedMigratingVm); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ResumeMigration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getMigratingVm(); - $this->assertProtobufEquals($formattedMigratingVm, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resumeMigrationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resumeMigrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resumeMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $response = $gapicClient->resumeMigration($formattedMigratingVm); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resumeMigrationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function startMigrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new StartMigrationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/startMigrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $response = $gapicClient->startMigration($formattedMigratingVm); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/StartMigration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getMigratingVm(); - $this->assertProtobufEquals($formattedMigratingVm, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startMigrationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function startMigrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $response = $gapicClient->startMigration($formattedMigratingVm); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startMigrationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Group(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $group = new Group(); - $response = $gapicClient->updateGroup($group); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/UpdateGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGroup(); - $this->assertProtobufEquals($group, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $group = new Group(); - $response = $gapicClient->updateGroup($group); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateMigratingVmTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateMigratingVmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $sourceVmId = 'sourceVmId1673059967'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $group = 'group98629247'; - $expectedResponse = new MigratingVm(); - $expectedResponse->setName($name); - $expectedResponse->setSourceVmId($sourceVmId); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setGroup($group); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateMigratingVmTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $migratingVm = new MigratingVm(); - $response = $gapicClient->updateMigratingVm($migratingVm); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/UpdateMigratingVm', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getMigratingVm(); - $this->assertProtobufEquals($migratingVm, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateMigratingVmTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateMigratingVmExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateMigratingVmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $migratingVm = new MigratingVm(); - $response = $gapicClient->updateMigratingVm($migratingVm); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateMigratingVmTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateSourceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSourceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new Source(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateSourceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $source = new Source(); - $response = $gapicClient->updateSource($source); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/UpdateSource', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getSource(); - $this->assertProtobufEquals($source, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSourceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateSourceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSourceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $source = new Source(); - $response = $gapicClient->updateSource($source); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSourceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateTargetProjectTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateTargetProjectTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $project = 'project-309310695'; - $description = 'description-1724546052'; - $expectedResponse = new TargetProject(); - $expectedResponse->setName($name); - $expectedResponse->setProject($project); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateTargetProjectTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $targetProject = new TargetProject(); - $response = $gapicClient->updateTargetProject($targetProject); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/UpdateTargetProject', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getTargetProject(); - $this->assertProtobufEquals($targetProject, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTargetProjectTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateTargetProjectExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateTargetProjectTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $targetProject = new TargetProject(); - $response = $gapicClient->updateTargetProject($targetProject); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTargetProjectTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function upgradeApplianceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/upgradeApplianceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new UpgradeApplianceResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/upgradeApplianceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedDatacenterConnector = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); - $response = $gapicClient->upgradeAppliance($formattedDatacenterConnector); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/UpgradeAppliance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getDatacenterConnector(); - $this->assertProtobufEquals($formattedDatacenterConnector, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/upgradeApplianceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function upgradeApplianceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/upgradeApplianceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedDatacenterConnector = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); - $response = $gapicClient->upgradeAppliance($formattedDatacenterConnector); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/upgradeApplianceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/GPBMetadata/Google/Cloud/Vmwareengine/V1/Vmwareengine.php b/owl-bot-staging/VmwareEngine/v1/proto/src/GPBMetadata/Google/Cloud/Vmwareengine/V1/Vmwareengine.php deleted file mode 100644 index 45d4aafbd1d720cc07b9d79b5ad89f9c3110a75b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14986 zcmcgzTWnlM8Ro2;+c-&+aW0ONv?nJ?>$vW2?KHI6+`5ikw`yX$O&U_BQKt zmOW>kn8*lb5E4Q{JRngC6$(N;@PP6JMZ8!@Am{@WArOx|ApSG|%-M69 zJr{4%yu`a_{+a*#{>%I`|DN-gn#)acT%TqpYgHUp(-+osXPN2EmgQJgtD!Hn7Z+Je zuUae3dV{s{x;{Cp&&*!erzW4jehfrytKF)yqP}EVOAS`2Hmr87u)1=q(qhb9s++8^ zIu`hx=W`QcR#uqZtW=pkJvVWcIh9()smxFFY347x)6C!SO*4OE>>MH0M#Z*u|M%n$ z(cxdSz0jyvb=#>p@ZX8LU9OvTr(S8)KM$xb=!=zx&0vD)*u}P4b?TO>y8^Rjl?|WL zaZY#aiKYcCT+pRrb1pGJ%KY=D!&+vgF+a)dYOCIKtkxV1Ef$xUrPi+ z)Q3^WVlkrR1>I@2nSXU%Z!xFcGS6|n-3ivczvdORm74YWl4)8l3zlgYiycgzDY^+> zZq%9SWRrQe&Kk7|wp>}QTdi!OFEQadsg+bZMZihqoEeZ`vCO4b+cfLu()?`Gje=~< zc@Dv;xLUDqrl-M^yUDs2uiu!u60x$=@5KkTD$T z5fsSt_|5y{H@`YIbWluJY1SdaT{pof9(vgKVA1u3@`7*%G2oDIKucI$JUS~LC8vzC zl(dEDaUt617_VS?#uI~NO5*tjLbiYku7HWe2&ug{!jX2s0mgSUGI*tKJ9Dl2Dx^p5 zfc8u5b8WB|JxjJWA~F={Pyou&U@qc~lcvv-6Na3s=Mgx|i%| zR+d=VhU_$$1L-Z462iZ7teean>~m+NyUEtYdIR#z-~;^g9%ur|2G{l<7p zBZm|U+D(XlMkmPbCTd>hB-@~A-*ErXUVR>V{V#E6yiJw32C9@xC?N5x(_ruM0TyhHU+yMD_dp* zExVmRGu{QzFE`ysD$o(tTtD1|YEObC`66XEHaPhH@geCWGC1;Hf>QzF4vR{^2TD(} z22(5DqaT1j`g!E8h&)oVWzm9Cgc}I?qen@9jWsH3-|7az0g#&pHd#$nLR}BP)?P4~^Rb7Z!7v4Q%ZvCrL$=wdkqEC7@!^H?U8BqRVvg+f z%3OKsqTmlzzPFa$3W)E~svW>9Q(d3zqhn+{GixY<4iR;skjMbp>Qq{AMB*X9x7a>N zQV*=M)CkMn<%4+3m1&(Zu1~0eaH?OY(qgmxDB4*a>g4F6|SXctQxz%)?}Wodnh6{SI`+>(#ZahD#GqXI3R<5Wye)e znEsJ?(@Q*Ejjt}*<_Lw(-2Y8&Yfy3S>Bj zdn8YX>nSXrGjDCiGCAt5a-#|hu-5%t=?i2C4wk^teFfA#GrgvfhqwawA8U6d-qFZW z*HxdZ-Y&s?2^@zYtX^PiU|8X@FOY%d>g{sHds@B;kA?5%<9#n~$nF5%HBnY%L5t24s#d#|8fnj`e*wKQfRuXQ1D|?`>odlxP zxM9#go}HTDX}EJNfTQdXR?bR{z1qI}Ht|}H=t%AjetAE|djLWS>3Y+luziY$?HCRA z2|~9)iuveCGKi60#$H2N(jL6Sd71224io3FvH18?ER25HmHgjmM90Wb$Vw8rDut)9 z%_?<|gXLQQ1sy2{%2Xhg2y2qe)(rCLyV`*R0`!NLI-7-NERv&;*zUVd#`iVyu$$Et zD|sdD$9`_0(Tm{kft|YRDYl>&$$?cKm7#EvMOt>B%T}k2zkQbM^fO5zQuexP`>!`` z`pNi!j0lL38hR?T91>$py!QJKzmYplp;I|lxP!O)7vSRaRaSNE!brip(Jzdw7sPci zHUl@pt*a)-bL@A+JIxD#Ba~&mve+-#tx{S zz-3fIYJXH>_BChn-j###O^s_jVPxmJ7`%z!D4j%0jS7oklOy;EcHX+m>a)@9_R1U_Kdl4vFk3Y%nVR z=Na<|*(RYVlI6buFQz^@C;@L^a7w&yBHr2YN$yxeyDZ7kZz><|0WsBRAUDP%{v#m9 zB$pC#U~o#rx6vm@(7?U<npOBkn4TIWcw z(HDC}8toNC(Ebm8cA#i%(5K^}DnumCge~kXOzGE*nI6EkqOBNSDFscLsxEvpM-Fl{ zQL^ay6eL8&QWEhsB;r%XOT7{iRbjJayqhBjur3Mr6_R{kEtQgrpCc8YF{Y3T{)@V_ zF#=}Z}0>%P45k#on7h=kS$>A2`inHEfgXWX2wpEaXo-6Zub&rV7#J%`nljK3+4L@k znp_*D`A0>v5eTu{w>BF5$dimgb_FpiGR#{*2Ogh-LlZV>g-A*|zKwKTAD=+K^!F^+ zVvk<}q0ddD>x@Bu~W03NO~@u3h&$%lnrJ<>y%W;=|%my^GA_Ft6?wDe+p zX2LK~2&P2)K3e}pcwKaO0zE#vsP46Gl+K8_P_`h%Zy-XA2_7ZGWI%yOb&UNP zFo%w>5=daKt6)mzeu2y_jbm}EL>U`CC=nzRQhirGk13Z3MpSz4{_Xv0dlTGYbSVT= za_8_ED~_Pk#chRMNb)X9v)p?84o-WplPlCts(95>5^Ta%U5 zvFU~Q+~Mx+DmjTOA%MDzi~8XC0LX-Wb~XC*0oyAQhGy@U4&w-H{0m_6O`8u&`DMpx z+QmZQ)~#EihlNVpS%$koc*F4VCj4*|-Wph$_!0bW0bbFGC1_$VvV%*`xo-l_X|GIT z??BwOxv%*wS%KDf0kjIe1KC_S=hwcu@Wb4ZY5wM8p4Y5-TnKYP{>Io{`FLKu87ba+ z!vXW~ZsbR~hjD^pky=B13_AQx5zTy>@t=WN30_WTNdn=s%FQdXL-nY zW->EUY!=m4QAKg!KcG15g$pN&6K5_|@gKk`C#dp?GZ*OhF|wp+$BIcGj-6k#x%!stqgHts+BB~#Fk!N|1deAvMB!Oyq$G+{5Ag`)hRkc#B ztEH`S{SBNNdY!-`n%effwnGY*<8@kv?(tJIAjECkE-7@^hMtXp@Ht_gtpebh$0YPk zi>TYR%||3MTV`Z7x0%3ZkqT@!1_U-6Ya0NTV}_wR_%n1M8 zvO~jm?Z`GA`)9b(`|6?Tgajo$KlZTWT9NI!DxFYuEwXw?exv$0=)~Kz} zPR+6#k-#;b<`xO9!1g0AsNqmeYm=yNVftqEj#!q8vk%o(uA`W z)Ct@TrZ*MP>;Gzwv7heS%?CDdTASp^?Al(SY3I8-7xG0@W1~(!t8b3Fjc$$1V}JZy zX2$QnZwsU8tybSg4-jgr{aw*L-iE)u1>e6k#*`a;YM#L}KM2o!cWvc0A=vcoLX1uh z&Xt?u6N4%`xe&#>;sbKONx@QuL{GioanW-R?Y43Qt{j`L*(S%tjSS0f1=%T8TAkmN zpXn*30oVER1`iLz<&(41Y|Oo9y7X^-4TeG{&y_&+!aPP|fup{}!b_~Jd;&Me$~7$0 z^<3LBo$O4!f_$kJ*5KB_zHHwxTP?I!XgKDn*NKcS2|^5->>MsLO*bp&%8;&jEmA-A zi7?LBFx>HtVR;=l%1ZIjl=3<(Tb(fSj`33ve^15VrQGl4VX+q2UCdG}B`C`gq zjT>YdQlC#SYYV1nh9Jze>Gikb9gRhEe$Yz!Jvxu?^C6@K*3iThso8n9{CASY4S}0u z_!CeDkYG9JHxgulNqa9@+K_UO`e9P!GB#(P=~FaHuEIh~BvA^f1r$B6ybbb^b&_3X z>%5V?&O_^j?;0n$;Yn7RWKty*lQv+sYhm=_uCB6)-%MVu!3XmdGaz^DR`wdznY~&0 zWeS#`+pB`1AWUcAa2g6CMLdCJ79$acjc`?%omFLo%8!!uNVaZ%I2OZ_8wID#qbn`A zHtwUc0PB zGG9>uX7pmc+$d!vWfA6zyCuC|u54#g^l87g#h+w4?txz3!8y~Y;p|pvr&Py>8TwG$ z-`%EjX0_-{e*&vRxqc*%4w_3TVT%7Lv7)f>src0^IG%;%!E^Cl{Igf^2eJ?w%#xD9 zg0YwTd>Up2n!oH6^+B9AXyQ+=Ul8X)>A{SF2tAK;M4+@fHw5u?j9FRvcpPRk46|A? zPU3Zk@$&x%r}dJ+iBM&Lq#&G9mSBFjRMX45^l@7Ig>VveLHq1X|2gE6tS;=)csWK7nRU_T{6{bM_Y};<03T=c z*I?15w1}mAJPjyy5u^q`wd~MGl4UTyL-~pLgq*2s2T{j#49o8bPDPmrr(eo9AQO2J z{d!KRDCH2JzY6om%>i*}QL%`;%Io+K7@#v~1s8z1$is6a&)2^BRl0P|3htC!~c~Ob+QAAFD;= z=)$tOKg*CoilAeehl~<4{D+CtTdnNvKf=S4ow5BBSJpnqO!Zp{?j|{KRCC3d z)RBp2XyItYGw5!7Wei)Qm-~YRGO9qyVq8Vi+{9u>xq=i<6eP@Kl)Z2gP3@IlZ{EJp zD}#<$gsH_V3w!VOQ2-&Yf_5aND ztMi(N-Jq8kJOZPRh!<8VV6>LRml8y%_ zsJQl}Ivy*3k+6Tk+cUALF|81no_@Syn^Tam@U%kHPI~M`O(9@(te-_T;Si z!x$tqG}G(%l0h;~;y@p#ELbudPuwZF!no8p>C+!OHuO}r>NOWouGG>u8nv_TR0w01Cq7L2^NZ};yT?(#dA Wfh!uC;B9Nn^$Z)yFHw5X1NblDo|lvW diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster.php deleted file mode 100644 index 6c1d1107f0cd..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster.php +++ /dev/null @@ -1,319 +0,0 @@ -google.cloud.vmwareengine.v1.Cluster - */ -class Cluster extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of this cluster. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. State of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. True if the cluster is a management cluster; false otherwise. - * There can only be one management cluster in a private cloud - * and it has to be the first one. - * - * Generated from protobuf field bool management = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $management = false; - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Required. The map of cluster node types in this cluster, where the key is - * canonical identifier of the node type (corresponds to the `NodeType`). - * - * Generated from protobuf field map node_type_configs = 16 [(.google.api.field_behavior) = REQUIRED]; - */ - private $node_type_configs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of this cluster. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of this resource. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last update time of this resource. - * @type int $state - * Output only. State of the resource. - * @type bool $management - * Output only. True if the cluster is a management cluster; false otherwise. - * There can only be one management cluster in a private cloud - * and it has to be the first one. - * @type string $uid - * Output only. System-generated unique identifier for the resource. - * @type array|\Google\Protobuf\Internal\MapField $node_type_configs - * Required. The map of cluster node types in this cluster, where the key is - * canonical identifier of the node type (corresponds to the `NodeType`). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of this cluster. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of this cluster. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. State of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\Cluster\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. True if the cluster is a management cluster; false otherwise. - * There can only be one management cluster in a private cloud - * and it has to be the first one. - * - * Generated from protobuf field bool management = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getManagement() - { - return $this->management; - } - - /** - * Output only. True if the cluster is a management cluster; false otherwise. - * There can only be one management cluster in a private cloud - * and it has to be the first one. - * - * Generated from protobuf field bool management = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setManagement($var) - { - GPBUtil::checkBool($var); - $this->management = $var; - - return $this; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Required. The map of cluster node types in this cluster, where the key is - * canonical identifier of the node type (corresponds to the `NodeType`). - * - * Generated from protobuf field map node_type_configs = 16 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getNodeTypeConfigs() - { - return $this->node_type_configs; - } - - /** - * Required. The map of cluster node types in this cluster, where the key is - * canonical identifier of the node type (corresponds to the `NodeType`). - * - * Generated from protobuf field map node_type_configs = 16 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setNodeTypeConfigs($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\NodeTypeConfig::class); - $this->node_type_configs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster/State.php deleted file mode 100644 index d4cfba915406..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster/State.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.vmwareengine.v1.Cluster.State - */ -class State -{ - /** - * The default value. This value should never be used. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The Cluster is operational and can be used by the user. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The Cluster is being deployed. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * Adding or removing of a node to the cluster, any other cluster specific - * updates. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * The Cluster is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - /** - * The Cluster is undergoing maintenance, for example: a failed node is - * getting replaced. - * - * Generated from protobuf enum REPAIRING = 5; - */ - const REPAIRING = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::CREATING => 'CREATING', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - self::REPAIRING => 'REPAIRING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\Cluster_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateClusterRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateClusterRequest.php deleted file mode 100644 index 9194b7c095aa..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateClusterRequest.php +++ /dev/null @@ -1,306 +0,0 @@ -google.cloud.vmwareengine.v1.CreateClusterRequest - */ -class CreateClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud to create a new cluster - * in. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The user-provided identifier of the new `Cluster`. - * This identifier must be unique among clusters within the parent and becomes - * the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster_id = ''; - /** - * Required. The initial description of the new cluster. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster = null; - /** - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the private cloud to create a new cluster - * in. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * @param \Google\Cloud\VmwareEngine\V1\Cluster $cluster Required. The initial description of the new cluster. - * @param string $clusterId Required. The user-provided identifier of the new `Cluster`. - * This identifier must be unique among clusters within the parent and becomes - * the final token in the name URI. - * The identifier must meet the following requirements: - * - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * @return \Google\Cloud\VmwareEngine\V1\CreateClusterRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\Cluster $cluster, string $clusterId): self - { - return (new self()) - ->setParent($parent) - ->setCluster($cluster) - ->setClusterId($clusterId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the private cloud to create a new cluster - * in. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type string $cluster_id - * Required. The user-provided identifier of the new `Cluster`. - * This identifier must be unique among clusters within the parent and becomes - * the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * @type \Google\Cloud\VmwareEngine\V1\Cluster $cluster - * Required. The initial description of the new cluster. - * @type string $request_id - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud to create a new cluster - * in. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the private cloud to create a new cluster - * in. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The user-provided identifier of the new `Cluster`. - * This identifier must be unique among clusters within the parent and becomes - * the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getClusterId() - { - return $this->cluster_id; - } - - /** - * Required. The user-provided identifier of the new `Cluster`. - * This identifier must be unique among clusters within the parent and becomes - * the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setClusterId($var) - { - GPBUtil::checkString($var, True); - $this->cluster_id = $var; - - return $this; - } - - /** - * Required. The initial description of the new cluster. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\Cluster|null - */ - public function getCluster() - { - return $this->cluster; - } - - public function hasCluster() - { - return isset($this->cluster); - } - - public function clearCluster() - { - unset($this->cluster); - } - - /** - * Required. The initial description of the new cluster. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\Cluster $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Cluster::class); - $this->cluster = $var; - - return $this; - } - - /** - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateHcxActivationKeyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateHcxActivationKeyRequest.php deleted file mode 100644 index 7e2526646b8d..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateHcxActivationKeyRequest.php +++ /dev/null @@ -1,313 +0,0 @@ -google.cloud.vmwareengine.v1.CreateHcxActivationKeyRequest - */ -class CreateHcxActivationKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud to create the key for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The initial description of a new HCX activation key. When - * creating a new key, this field must be an empty object. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_key = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $hcx_activation_key = null; - /** - * Required. The user-provided identifier of the `HcxActivationKey` to be - * created. This identifier must be unique among `HcxActivationKey` resources - * within the parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string hcx_activation_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $hcx_activation_key_id = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The resource name of the private cloud to create the key for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * @param \Google\Cloud\VmwareEngine\V1\HcxActivationKey $hcxActivationKey Required. The initial description of a new HCX activation key. When - * creating a new key, this field must be an empty object. - * @param string $hcxActivationKeyId Required. The user-provided identifier of the `HcxActivationKey` to be - * created. This identifier must be unique among `HcxActivationKey` resources - * within the parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * @return \Google\Cloud\VmwareEngine\V1\CreateHcxActivationKeyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\HcxActivationKey $hcxActivationKey, string $hcxActivationKeyId): self - { - return (new self()) - ->setParent($parent) - ->setHcxActivationKey($hcxActivationKey) - ->setHcxActivationKeyId($hcxActivationKeyId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the private cloud to create the key for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud` - * @type \Google\Cloud\VmwareEngine\V1\HcxActivationKey $hcx_activation_key - * Required. The initial description of a new HCX activation key. When - * creating a new key, this field must be an empty object. - * @type string $hcx_activation_key_id - * Required. The user-provided identifier of the `HcxActivationKey` to be - * created. This identifier must be unique among `HcxActivationKey` resources - * within the parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud to create the key for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the private cloud to create the key for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The initial description of a new HCX activation key. When - * creating a new key, this field must be an empty object. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\HcxActivationKey|null - */ - public function getHcxActivationKey() - { - return $this->hcx_activation_key; - } - - public function hasHcxActivationKey() - { - return isset($this->hcx_activation_key); - } - - public function clearHcxActivationKey() - { - unset($this->hcx_activation_key); - } - - /** - * Required. The initial description of a new HCX activation key. When - * creating a new key, this field must be an empty object. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\HcxActivationKey $var - * @return $this - */ - public function setHcxActivationKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\HcxActivationKey::class); - $this->hcx_activation_key = $var; - - return $this; - } - - /** - * Required. The user-provided identifier of the `HcxActivationKey` to be - * created. This identifier must be unique among `HcxActivationKey` resources - * within the parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string hcx_activation_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getHcxActivationKeyId() - { - return $this->hcx_activation_key_id; - } - - /** - * Required. The user-provided identifier of the `HcxActivationKey` to be - * created. This identifier must be unique among `HcxActivationKey` resources - * within the parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string hcx_activation_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setHcxActivationKeyId($var) - { - GPBUtil::checkString($var, True); - $this->hcx_activation_key_id = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPolicyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPolicyRequest.php deleted file mode 100644 index de757cee24d1..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPolicyRequest.php +++ /dev/null @@ -1,318 +0,0 @@ -google.cloud.vmwareengine.v1.CreateNetworkPolicyRequest - */ -class CreateNetworkPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location (region) - * to create the new network policy in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The user-provided identifier of the network policy to be created. - * This identifier must be unique within parent - * `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes - * the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string network_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network_policy_id = ''; - /** - * Required. The network policy configuration to use in the request. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network_policy = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The resource name of the location (region) - * to create the new network policy in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1` - * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. - * @param \Google\Cloud\VmwareEngine\V1\NetworkPolicy $networkPolicy Required. The network policy configuration to use in the request. - * @param string $networkPolicyId Required. The user-provided identifier of the network policy to be created. - * This identifier must be unique within parent - * `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes - * the final token in the name URI. - * The identifier must meet the following requirements: - * - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * @return \Google\Cloud\VmwareEngine\V1\CreateNetworkPolicyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\NetworkPolicy $networkPolicy, string $networkPolicyId): self - { - return (new self()) - ->setParent($parent) - ->setNetworkPolicy($networkPolicy) - ->setNetworkPolicyId($networkPolicyId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the location (region) - * to create the new network policy in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1` - * @type string $network_policy_id - * Required. The user-provided identifier of the network policy to be created. - * This identifier must be unique within parent - * `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes - * the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * @type \Google\Cloud\VmwareEngine\V1\NetworkPolicy $network_policy - * Required. The network policy configuration to use in the request. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location (region) - * to create the new network policy in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the location (region) - * to create the new network policy in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The user-provided identifier of the network policy to be created. - * This identifier must be unique within parent - * `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes - * the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string network_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNetworkPolicyId() - { - return $this->network_policy_id; - } - - /** - * Required. The user-provided identifier of the network policy to be created. - * This identifier must be unique within parent - * `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes - * the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string network_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNetworkPolicyId($var) - { - GPBUtil::checkString($var, True); - $this->network_policy_id = $var; - - return $this; - } - - /** - * Required. The network policy configuration to use in the request. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\NetworkPolicy|null - */ - public function getNetworkPolicy() - { - return $this->network_policy; - } - - public function hasNetworkPolicy() - { - return isset($this->network_policy); - } - - public function clearNetworkPolicy() - { - unset($this->network_policy); - } - - /** - * Required. The network policy configuration to use in the request. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\NetworkPolicy $var - * @return $this - */ - public function setNetworkPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkPolicy::class); - $this->network_policy = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateCloudRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateCloudRequest.php deleted file mode 100644 index 4b306cdb6911..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateCloudRequest.php +++ /dev/null @@ -1,306 +0,0 @@ -google.cloud.vmwareengine.v1.CreatePrivateCloudRequest - */ -class CreatePrivateCloudRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location to create the new - * private cloud in. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The user-provided identifier of the private cloud to be created. - * This identifier must be unique among each `PrivateCloud` within the parent - * and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string private_cloud_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $private_cloud_id = ''; - /** - * Required. The initial description of the new private cloud. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $private_cloud = null; - /** - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the location to create the new - * private cloud in. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. - * @param \Google\Cloud\VmwareEngine\V1\PrivateCloud $privateCloud Required. The initial description of the new private cloud. - * @param string $privateCloudId Required. The user-provided identifier of the private cloud to be created. - * This identifier must be unique among each `PrivateCloud` within the parent - * and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * @return \Google\Cloud\VmwareEngine\V1\CreatePrivateCloudRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\PrivateCloud $privateCloud, string $privateCloudId): self - { - return (new self()) - ->setParent($parent) - ->setPrivateCloud($privateCloud) - ->setPrivateCloudId($privateCloudId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the location to create the new - * private cloud in. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * @type string $private_cloud_id - * Required. The user-provided identifier of the private cloud to be created. - * This identifier must be unique among each `PrivateCloud` within the parent - * and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * @type \Google\Cloud\VmwareEngine\V1\PrivateCloud $private_cloud - * Required. The initial description of the new private cloud. - * @type string $request_id - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location to create the new - * private cloud in. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the location to create the new - * private cloud in. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The user-provided identifier of the private cloud to be created. - * This identifier must be unique among each `PrivateCloud` within the parent - * and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string private_cloud_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPrivateCloudId() - { - return $this->private_cloud_id; - } - - /** - * Required. The user-provided identifier of the private cloud to be created. - * This identifier must be unique among each `PrivateCloud` within the parent - * and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string private_cloud_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPrivateCloudId($var) - { - GPBUtil::checkString($var, True); - $this->private_cloud_id = $var; - - return $this; - } - - /** - * Required. The initial description of the new private cloud. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\PrivateCloud|null - */ - public function getPrivateCloud() - { - return $this->private_cloud; - } - - public function hasPrivateCloud() - { - return isset($this->private_cloud); - } - - public function clearPrivateCloud() - { - unset($this->private_cloud); - } - - /** - * Required. The initial description of the new private cloud. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\PrivateCloud $var - * @return $this - */ - public function setPrivateCloud($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\PrivateCloud::class); - $this->private_cloud = $var; - - return $this; - } - - /** - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateVmwareEngineNetworkRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateVmwareEngineNetworkRequest.php deleted file mode 100644 index ba26cffddd41..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateVmwareEngineNetworkRequest.php +++ /dev/null @@ -1,333 +0,0 @@ -google.cloud.vmwareengine.v1.CreateVmwareEngineNetworkRequest - */ -class CreateVmwareEngineNetworkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location to create the new VMware Engine - * network in. A VMware Engine network of type - * `LEGACY` is a regional resource, and a VMware - * Engine network of type `STANDARD` is a global resource. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The user-provided identifier of the new VMware Engine network. - * This identifier must be unique among VMware Engine network resources - * within the parent and becomes the final token in the name URI. The - * identifier must meet the following requirements: - * * For networks of type LEGACY, adheres to the format: - * `{region-id}-default`. Replace `{region-id}` with the region where you want - * to create the VMware Engine network. For example, "us-central1-default". - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string vmware_engine_network_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $vmware_engine_network_id = ''; - /** - * Required. The initial description of the new VMware Engine network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $vmware_engine_network = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The resource name of the location to create the new VMware Engine - * network in. A VMware Engine network of type - * `LEGACY` is a regional resource, and a VMware - * Engine network of type `STANDARD` is a global resource. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global` - * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. - * @param \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $vmwareEngineNetwork Required. The initial description of the new VMware Engine network. - * @param string $vmwareEngineNetworkId Required. The user-provided identifier of the new VMware Engine network. - * This identifier must be unique among VMware Engine network resources - * within the parent and becomes the final token in the name URI. The - * identifier must meet the following requirements: - * - * * For networks of type LEGACY, adheres to the format: - * `{region-id}-default`. Replace `{region-id}` with the region where you want - * to create the VMware Engine network. For example, "us-central1-default". - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * @return \Google\Cloud\VmwareEngine\V1\CreateVmwareEngineNetworkRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $vmwareEngineNetwork, string $vmwareEngineNetworkId): self - { - return (new self()) - ->setParent($parent) - ->setVmwareEngineNetwork($vmwareEngineNetwork) - ->setVmwareEngineNetworkId($vmwareEngineNetworkId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the location to create the new VMware Engine - * network in. A VMware Engine network of type - * `LEGACY` is a regional resource, and a VMware - * Engine network of type `STANDARD` is a global resource. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global` - * @type string $vmware_engine_network_id - * Required. The user-provided identifier of the new VMware Engine network. - * This identifier must be unique among VMware Engine network resources - * within the parent and becomes the final token in the name URI. The - * identifier must meet the following requirements: - * * For networks of type LEGACY, adheres to the format: - * `{region-id}-default`. Replace `{region-id}` with the region where you want - * to create the VMware Engine network. For example, "us-central1-default". - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * @type \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $vmware_engine_network - * Required. The initial description of the new VMware Engine network. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location to create the new VMware Engine - * network in. A VMware Engine network of type - * `LEGACY` is a regional resource, and a VMware - * Engine network of type `STANDARD` is a global resource. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the location to create the new VMware Engine - * network in. A VMware Engine network of type - * `LEGACY` is a regional resource, and a VMware - * Engine network of type `STANDARD` is a global resource. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The user-provided identifier of the new VMware Engine network. - * This identifier must be unique among VMware Engine network resources - * within the parent and becomes the final token in the name URI. The - * identifier must meet the following requirements: - * * For networks of type LEGACY, adheres to the format: - * `{region-id}-default`. Replace `{region-id}` with the region where you want - * to create the VMware Engine network. For example, "us-central1-default". - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string vmware_engine_network_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVmwareEngineNetworkId() - { - return $this->vmware_engine_network_id; - } - - /** - * Required. The user-provided identifier of the new VMware Engine network. - * This identifier must be unique among VMware Engine network resources - * within the parent and becomes the final token in the name URI. The - * identifier must meet the following requirements: - * * For networks of type LEGACY, adheres to the format: - * `{region-id}-default`. Replace `{region-id}` with the region where you want - * to create the VMware Engine network. For example, "us-central1-default". - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string vmware_engine_network_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVmwareEngineNetworkId($var) - { - GPBUtil::checkString($var, True); - $this->vmware_engine_network_id = $var; - - return $this; - } - - /** - * Required. The initial description of the new VMware Engine network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork|null - */ - public function getVmwareEngineNetwork() - { - return $this->vmware_engine_network; - } - - public function hasVmwareEngineNetwork() - { - return isset($this->vmware_engine_network); - } - - public function clearVmwareEngineNetwork() - { - unset($this->vmware_engine_network); - } - - /** - * Required. The initial description of the new VMware Engine network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $var - * @return $this - */ - public function setVmwareEngineNetwork($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork::class); - $this->vmware_engine_network = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Credentials.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Credentials.php deleted file mode 100644 index 262d839c299f..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Credentials.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.vmwareengine.v1.Credentials - */ -class Credentials extends \Google\Protobuf\Internal\Message -{ - /** - * Initial username. - * - * Generated from protobuf field string username = 1; - */ - protected $username = ''; - /** - * Initial password. - * - * Generated from protobuf field string password = 2; - */ - protected $password = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $username - * Initial username. - * @type string $password - * Initial password. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Initial username. - * - * Generated from protobuf field string username = 1; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Initial username. - * - * Generated from protobuf field string username = 1; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - - /** - * Initial password. - * - * Generated from protobuf field string password = 2; - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * Initial password. - * - * Generated from protobuf field string password = 2; - * @param string $var - * @return $this - */ - public function setPassword($var) - { - GPBUtil::checkString($var, True); - $this->password = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteClusterRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteClusterRequest.php deleted file mode 100644 index 9338e958e48b..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteClusterRequest.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.vmwareengine.v1.DeleteClusterRequest - */ -class DeleteClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the cluster to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The resource name of the cluster to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * Please see {@see VmwareEngineClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\DeleteClusterRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the cluster to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * @type string $request_id - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the cluster to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the cluster to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPolicyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPolicyRequest.php deleted file mode 100644 index 557ee72de847..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPolicyRequest.php +++ /dev/null @@ -1,180 +0,0 @@ -google.cloud.vmwareengine.v1.DeleteNetworkPolicyRequest - */ -class DeleteNetworkPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the network policy to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The resource name of the network policy to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * Please see {@see VmwareEngineClient::networkPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\DeleteNetworkPolicyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the network policy to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the network policy to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the network policy to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateCloudRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateCloudRequest.php deleted file mode 100644 index 4421609c05c7..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateCloudRequest.php +++ /dev/null @@ -1,262 +0,0 @@ -google.cloud.vmwareengine.v1.DeletePrivateCloudRequest - */ -class DeletePrivateCloudRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. If set to true, cascade delete is enabled and all children of - * this private cloud resource are also deleted. When this flag is set to - * false, the private cloud will not be deleted if there are any children - * other than the management cluster. The management cluster is always - * deleted. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - /** - * Optional. Time delay of the deletion specified in hours. The default value - * is `3`. Specifying a non-zero value for this field changes the value of - * `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned - * deletion time. Deletion can be cancelled before `expire_time` elapses using - * [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]. - * Specifying a value of `0` for this field instead begins the deletion - * process and ceases billing immediately. During the final deletion process, - * the value of `PrivateCloud.state` becomes `PURGING`. - * - * Generated from protobuf field optional int32 delay_hours = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $delay_hours = null; - - /** - * @param string $name Required. The resource name of the private cloud to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\DeletePrivateCloudRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the private cloud to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type string $request_id - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * @type bool $force - * Optional. If set to true, cascade delete is enabled and all children of - * this private cloud resource are also deleted. When this flag is set to - * false, the private cloud will not be deleted if there are any children - * other than the management cluster. The management cluster is always - * deleted. - * @type int $delay_hours - * Optional. Time delay of the deletion specified in hours. The default value - * is `3`. Specifying a non-zero value for this field changes the value of - * `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned - * deletion time. Deletion can be cancelled before `expire_time` elapses using - * [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]. - * Specifying a value of `0` for this field instead begins the deletion - * process and ceases billing immediately. During the final deletion process, - * the value of `PrivateCloud.state` becomes `PURGING`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the private cloud to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set to true, cascade delete is enabled and all children of - * this private cloud resource are also deleted. When this flag is set to - * false, the private cloud will not be deleted if there are any children - * other than the management cluster. The management cluster is always - * deleted. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. If set to true, cascade delete is enabled and all children of - * this private cloud resource are also deleted. When this flag is set to - * false, the private cloud will not be deleted if there are any children - * other than the management cluster. The management cluster is always - * deleted. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - - /** - * Optional. Time delay of the deletion specified in hours. The default value - * is `3`. Specifying a non-zero value for this field changes the value of - * `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned - * deletion time. Deletion can be cancelled before `expire_time` elapses using - * [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]. - * Specifying a value of `0` for this field instead begins the deletion - * process and ceases billing immediately. During the final deletion process, - * the value of `PrivateCloud.state` becomes `PURGING`. - * - * Generated from protobuf field optional int32 delay_hours = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDelayHours() - { - return isset($this->delay_hours) ? $this->delay_hours : 0; - } - - public function hasDelayHours() - { - return isset($this->delay_hours); - } - - public function clearDelayHours() - { - unset($this->delay_hours); - } - - /** - * Optional. Time delay of the deletion specified in hours. The default value - * is `3`. Specifying a non-zero value for this field changes the value of - * `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned - * deletion time. Deletion can be cancelled before `expire_time` elapses using - * [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]. - * Specifying a value of `0` for this field instead begins the deletion - * process and ceases billing immediately. During the final deletion process, - * the value of `PrivateCloud.state` becomes `PURGING`. - * - * Generated from protobuf field optional int32 delay_hours = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDelayHours($var) - { - GPBUtil::checkInt32($var); - $this->delay_hours = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteVmwareEngineNetworkRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteVmwareEngineNetworkRequest.php deleted file mode 100644 index 27b7a9e393f0..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteVmwareEngineNetworkRequest.php +++ /dev/null @@ -1,226 +0,0 @@ -google.cloud.vmwareengine.v1.DeleteVmwareEngineNetworkRequest - */ -class DeleteVmwareEngineNetworkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the VMware Engine network to be deleted. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. Checksum used to ensure that the user-provided value is up to - * date before the server processes the request. The server compares provided - * checksum with the current checksum of the resource. If the user-provided - * value is out of date, this request returns an `ABORTED` error. - * - * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name of the VMware Engine network to be deleted. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * Please see {@see VmwareEngineClient::vmwareEngineNetworkName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\DeleteVmwareEngineNetworkRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the VMware Engine network to be deleted. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type string $etag - * Optional. Checksum used to ensure that the user-provided value is up to - * date before the server processes the request. The server compares provided - * checksum with the current checksum of the resource. If the user-provided - * value is out of date, this request returns an `ABORTED` error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the VMware Engine network to be deleted. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the VMware Engine network to be deleted. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. Checksum used to ensure that the user-provided value is up to - * date before the server processes the request. The server compares provided - * checksum with the current checksum of the resource. If the user-provided - * value is out of date, this request returns an `ABORTED` error. - * - * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. Checksum used to ensure that the user-provided value is up to - * date before the server processes the request. The server compares provided - * checksum with the current checksum of the resource. If the user-provided - * value is out of date, this request returns an `ABORTED` error. - * - * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetClusterRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetClusterRequest.php deleted file mode 100644 index 765ce8ca31d1..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetClusterRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.vmwareengine.v1.GetClusterRequest - */ -class GetClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The cluster resource name to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The cluster resource name to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * Please see {@see VmwareEngineClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\GetClusterRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The cluster resource name to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The cluster resource name to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The cluster resource name to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetHcxActivationKeyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetHcxActivationKeyRequest.php deleted file mode 100644 index d561638f4a50..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetHcxActivationKeyRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.vmwareengine.v1.GetHcxActivationKeyRequest - */ -class GetHcxActivationKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the HCX activation key to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the HCX activation key to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` - * Please see {@see VmwareEngineClient::hcxActivationKeyName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\GetHcxActivationKeyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the HCX activation key to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the HCX activation key to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the HCX activation key to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPolicyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPolicyRequest.php deleted file mode 100644 index ca390af59e74..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPolicyRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.vmwareengine.v1.GetNetworkPolicyRequest - */ -class GetNetworkPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the network policy to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the network policy to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * Please see {@see VmwareEngineClient::networkPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\GetNetworkPolicyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the network policy to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the network policy to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the network policy to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeTypeRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeTypeRequest.php deleted file mode 100644 index a117aa736a7c..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeTypeRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.vmwareengine.v1.GetNodeTypeRequest - */ -class GetNodeTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the node type to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the node type to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` - * Please see {@see VmwareEngineClient::nodeTypeName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\GetNodeTypeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the node type to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the node type to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the node type to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateCloudRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateCloudRequest.php deleted file mode 100644 index 16b916600d36..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateCloudRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.vmwareengine.v1.GetPrivateCloudRequest - */ -class GetPrivateCloudRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the private cloud to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\GetPrivateCloudRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the private cloud to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the private cloud to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetVmwareEngineNetworkRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetVmwareEngineNetworkRequest.php deleted file mode 100644 index d9f69bd5c370..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetVmwareEngineNetworkRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.vmwareengine.v1.GetVmwareEngineNetworkRequest - */ -class GetVmwareEngineNetworkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the VMware Engine network to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the VMware Engine network to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * Please see {@see VmwareEngineClient::vmwareEngineNetworkName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\GetVmwareEngineNetworkRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the VMware Engine network to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the VMware Engine network to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the VMware Engine network to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx.php deleted file mode 100644 index 2beef5b8868d..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.vmwareengine.v1.Hcx - */ -class Hcx extends \Google\Protobuf\Internal\Message -{ - /** - * Internal IP address of the appliance. - * - * Generated from protobuf field string internal_ip = 2; - */ - protected $internal_ip = ''; - /** - * Version of the appliance. - * - * Generated from protobuf field string version = 4; - */ - protected $version = ''; - /** - * Output only. The state of the appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Fully qualified domain name of the appliance. - * - * Generated from protobuf field string fqdn = 6; - */ - protected $fqdn = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $internal_ip - * Internal IP address of the appliance. - * @type string $version - * Version of the appliance. - * @type int $state - * Output only. The state of the appliance. - * @type string $fqdn - * Fully qualified domain name of the appliance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Internal IP address of the appliance. - * - * Generated from protobuf field string internal_ip = 2; - * @return string - */ - public function getInternalIp() - { - return $this->internal_ip; - } - - /** - * Internal IP address of the appliance. - * - * Generated from protobuf field string internal_ip = 2; - * @param string $var - * @return $this - */ - public function setInternalIp($var) - { - GPBUtil::checkString($var, True); - $this->internal_ip = $var; - - return $this; - } - - /** - * Version of the appliance. - * - * Generated from protobuf field string version = 4; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Version of the appliance. - * - * Generated from protobuf field string version = 4; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Output only. The state of the appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\Hcx\State::class); - $this->state = $var; - - return $this; - } - - /** - * Fully qualified domain name of the appliance. - * - * Generated from protobuf field string fqdn = 6; - * @return string - */ - public function getFqdn() - { - return $this->fqdn; - } - - /** - * Fully qualified domain name of the appliance. - * - * Generated from protobuf field string fqdn = 6; - * @param string $var - * @return $this - */ - public function setFqdn($var) - { - GPBUtil::checkString($var, True); - $this->fqdn = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx/State.php deleted file mode 100644 index 98ba3730325b..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx/State.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.vmwareengine.v1.Hcx.State - */ -class State -{ - /** - * Unspecified appliance state. This is the default value. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The appliance is operational and can be used. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The appliance is being deployed. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::CREATING => 'CREATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\Hcx_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey.php deleted file mode 100644 index 2ac89929e489..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey.php +++ /dev/null @@ -1,236 +0,0 @@ -google.cloud.vmwareengine.v1.HcxActivationKey - */ -class HcxActivationKey extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of this HcxActivationKey. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Creation time of HCX activation key. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. State of HCX activation key. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. HCX activation key. - * - * Generated from protobuf field string activation_key = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $activation_key = ''; - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of this HcxActivationKey. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of HCX activation key. - * @type int $state - * Output only. State of HCX activation key. - * @type string $activation_key - * Output only. HCX activation key. - * @type string $uid - * Output only. System-generated unique identifier for the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of this HcxActivationKey. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of this HcxActivationKey. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Creation time of HCX activation key. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Creation time of HCX activation key. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. State of HCX activation key. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of HCX activation key. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\HcxActivationKey\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. HCX activation key. - * - * Generated from protobuf field string activation_key = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getActivationKey() - { - return $this->activation_key; - } - - /** - * Output only. HCX activation key. - * - * Generated from protobuf field string activation_key = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setActivationKey($var) - { - GPBUtil::checkString($var, True); - $this->activation_key = $var; - - return $this; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey/State.php deleted file mode 100644 index 403d108006b2..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.vmwareengine.v1.HcxActivationKey.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * State of a newly generated activation key. - * - * Generated from protobuf enum AVAILABLE = 1; - */ - const AVAILABLE = 1; - /** - * State of key when it has been used to activate HCX appliance. - * - * Generated from protobuf enum CONSUMED = 2; - */ - const CONSUMED = 2; - /** - * State of key when it is being created. - * - * Generated from protobuf enum CREATING = 3; - */ - const CREATING = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::AVAILABLE => 'AVAILABLE', - self::CONSUMED => 'CONSUMED', - self::CREATING => 'CREATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\HcxActivationKey_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersRequest.php deleted file mode 100644 index e5a2087e9eba..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersRequest.php +++ /dev/null @@ -1,322 +0,0 @@ -google.cloud.vmwareengine.v1.ListClustersRequest - */ -class ListClustersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud to query for clusters. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of clusters to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListClusters` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListClusters` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-cluster") - * (nodeCount = "3") - * ``` - * By default, each expression is an `AND` expression. However, you can - * include `AND` and `OR` expressions explicitly. For example: - * ``` - * (name = "example-cluster-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-cluster-2") - * ``` - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Sorts list results by a certain order. By default, returned results are - * ordered by `name` in ascending order. You can also sort results in - * descending order based on the `name` value using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the private cloud to query for clusters. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ListClustersRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the private cloud to query for clusters. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type int $page_size - * The maximum number of clusters to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListClusters` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListClusters` - * must match the call that provided the page token. - * @type string $filter - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-cluster") - * (nodeCount = "3") - * ``` - * By default, each expression is an `AND` expression. However, you can - * include `AND` and `OR` expressions explicitly. For example: - * ``` - * (name = "example-cluster-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-cluster-2") - * ``` - * @type string $order_by - * Sorts list results by a certain order. By default, returned results are - * ordered by `name` in ascending order. You can also sort results in - * descending order based on the `name` value using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud to query for clusters. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the private cloud to query for clusters. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of clusters to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of clusters to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListClusters` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListClusters` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListClusters` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListClusters` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-cluster") - * (nodeCount = "3") - * ``` - * By default, each expression is an `AND` expression. However, you can - * include `AND` and `OR` expressions explicitly. For example: - * ``` - * (name = "example-cluster-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-cluster-2") - * ``` - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-cluster") - * (nodeCount = "3") - * ``` - * By default, each expression is an `AND` expression. However, you can - * include `AND` and `OR` expressions explicitly. For example: - * ``` - * (name = "example-cluster-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-cluster-2") - * ``` - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Sorts list results by a certain order. By default, returned results are - * ordered by `name` in ascending order. You can also sort results in - * descending order based on the `name` value using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sorts list results by a certain order. By default, returned results are - * ordered by `name` in ascending order. You can also sort results in - * descending order based on the `name` value using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersResponse.php deleted file mode 100644 index 1db7f0ab9272..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersResponse.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.vmwareengine.v1.ListClustersResponse - */ -class ListClustersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of private cloud clusters. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Cluster clusters = 1; - */ - private $clusters; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VmwareEngine\V1\Cluster>|\Google\Protobuf\Internal\RepeatedField $clusters - * A list of private cloud clusters. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached when making an aggregated query using - * wildcards. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * A list of private cloud clusters. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Cluster clusters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getClusters() - { - return $this->clusters; - } - - /** - * A list of private cloud clusters. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Cluster clusters = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\Cluster>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setClusters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\Cluster::class); - $this->clusters = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysRequest.php deleted file mode 100644 index 0a19130f8a2c..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysRequest.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.vmwareengine.v1.ListHcxActivationKeysRequest - */ -class ListHcxActivationKeysRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud - * to be queried for HCX activation keys. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of HCX activation keys to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListHcxActivationKeys` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListHcxActivationKeys` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name of the private cloud - * to be queried for HCX activation keys. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ListHcxActivationKeysRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the private cloud - * to be queried for HCX activation keys. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud` - * @type int $page_size - * The maximum number of HCX activation keys to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListHcxActivationKeys` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListHcxActivationKeys` must match the call that provided the page - * token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud - * to be queried for HCX activation keys. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the private cloud - * to be queried for HCX activation keys. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of HCX activation keys to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of HCX activation keys to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListHcxActivationKeys` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListHcxActivationKeys` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListHcxActivationKeys` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListHcxActivationKeys` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysResponse.php deleted file mode 100644 index d38aeee53fb8..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysResponse.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.vmwareengine.v1.ListHcxActivationKeysResponse - */ -class ListHcxActivationKeysResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of HCX activation keys. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_keys = 1; - */ - private $hcx_activation_keys; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VmwareEngine\V1\HcxActivationKey>|\Google\Protobuf\Internal\RepeatedField $hcx_activation_keys - * List of HCX activation keys. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached when making an aggregated query using - * wildcards. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * List of HCX activation keys. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_keys = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHcxActivationKeys() - { - return $this->hcx_activation_keys; - } - - /** - * List of HCX activation keys. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_keys = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\HcxActivationKey>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHcxActivationKeys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\HcxActivationKey::class); - $this->hcx_activation_keys = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesRequest.php deleted file mode 100644 index bee75e476e17..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesRequest.php +++ /dev/null @@ -1,361 +0,0 @@ -google.cloud.vmwareengine.v1.ListNetworkPoliciesRequest - */ -class ListNetworkPoliciesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location (region) to query for - * network policies. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/us-central1` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of network policies to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListNetworkPolicies` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNetworkPolicies` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of network policies, you can - * exclude the ones named `example-policy` by specifying - * `name != "example-policy"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-policy") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-policy-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-policy-2") - * ``` - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the location (region) to query for - * network policies. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/us-central1` - * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ListNetworkPoliciesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the location (region) to query for - * network policies. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/us-central1` - * @type int $page_size - * The maximum number of network policies to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListNetworkPolicies` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNetworkPolicies` must match the call that provided the page - * token. - * @type string $filter - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of network policies, you can - * exclude the ones named `example-policy` by specifying - * `name != "example-policy"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-policy") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-policy-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-policy-2") - * ``` - * @type string $order_by - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location (region) to query for - * network policies. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/us-central1` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the location (region) to query for - * network policies. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/us-central1` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of network policies to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of network policies to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListNetworkPolicies` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNetworkPolicies` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListNetworkPolicies` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNetworkPolicies` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of network policies, you can - * exclude the ones named `example-policy` by specifying - * `name != "example-policy"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-policy") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-policy-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-policy-2") - * ``` - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of network policies, you can - * exclude the ones named `example-policy` by specifying - * `name != "example-policy"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-policy") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-policy-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-policy-2") - * ``` - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesResponse.php deleted file mode 100644 index abad447203f7..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesResponse.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.vmwareengine.v1.ListNetworkPoliciesResponse - */ -class ListNetworkPoliciesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of network policies. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NetworkPolicy network_policies = 1; - */ - private $network_policies; - /** - * A token, which can be send as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VmwareEngine\V1\NetworkPolicy>|\Google\Protobuf\Internal\RepeatedField $network_policies - * A list of network policies. - * @type string $next_page_token - * A token, which can be send as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached when making an aggregated query using - * wildcards. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * A list of network policies. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NetworkPolicy network_policies = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkPolicies() - { - return $this->network_policies; - } - - /** - * A list of network policies. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NetworkPolicy network_policies = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\NetworkPolicy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkPolicies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\NetworkPolicy::class); - $this->network_policies = $arr; - - return $this; - } - - /** - * A token, which can be send as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be send as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesRequest.php deleted file mode 100644 index d8b2a072333f..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesRequest.php +++ /dev/null @@ -1,312 +0,0 @@ -google.cloud.vmwareengine.v1.ListNodeTypesRequest - */ -class ListNodeTypesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location to be queried for node types. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of node types to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListNodeTypes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNodeTypes` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of node types, you can - * exclude the ones named `standard-72` by specifying - * `name != "standard-72"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "standard-72") - * (virtual_cpu_count > 2) - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "standard-96") AND - * (virtual_cpu_count > 2) OR - * (name = "standard-72") - * ``` - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The resource name of the location to be queried for node types. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ListNodeTypesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the location to be queried for node types. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * @type int $page_size - * The maximum number of node types to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListNodeTypes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNodeTypes` must match the call that provided the page token. - * @type string $filter - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of node types, you can - * exclude the ones named `standard-72` by specifying - * `name != "standard-72"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "standard-72") - * (virtual_cpu_count > 2) - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "standard-96") AND - * (virtual_cpu_count > 2) OR - * (name = "standard-72") - * ``` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location to be queried for node types. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the location to be queried for node types. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of node types to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of node types to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListNodeTypes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNodeTypes` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListNodeTypes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNodeTypes` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of node types, you can - * exclude the ones named `standard-72` by specifying - * `name != "standard-72"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "standard-72") - * (virtual_cpu_count > 2) - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "standard-96") AND - * (virtual_cpu_count > 2) OR - * (name = "standard-72") - * ``` - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of node types, you can - * exclude the ones named `standard-72` by specifying - * `name != "standard-72"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "standard-72") - * (virtual_cpu_count > 2) - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "standard-96") AND - * (virtual_cpu_count > 2) OR - * (name = "standard-72") - * ``` - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesResponse.php deleted file mode 100644 index c8de39d538ae..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesResponse.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.vmwareengine.v1.ListNodeTypesResponse - */ -class ListNodeTypesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of Node Types. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NodeType node_types = 1; - */ - private $node_types; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VmwareEngine\V1\NodeType>|\Google\Protobuf\Internal\RepeatedField $node_types - * A list of Node Types. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached when making an aggregated query using - * wildcards. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * A list of Node Types. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NodeType node_types = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNodeTypes() - { - return $this->node_types; - } - - /** - * A list of Node Types. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NodeType node_types = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\NodeType>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNodeTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\NodeType::class); - $this->node_types = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsRequest.php deleted file mode 100644 index 8e9d635b77be..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsRequest.php +++ /dev/null @@ -1,362 +0,0 @@ -google.cloud.vmwareengine.v1.ListPrivateCloudsRequest - */ -class ListPrivateCloudsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud to be queried for - * clusters. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of private clouds to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListPrivateClouds` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListPrivateClouds` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, a - * number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or - * `<`. - * For example, if you are filtering a list of private clouds, you can exclude - * the ones named `example-pc` by specifying `name != "example-pc"`. - * You can also filter nested fields. For example, you could specify - * `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds - * only if they have a matching address in their network configuration. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-pc") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you can - * include `AND` and `OR` expressions explicitly. For example: - * ``` - * (name = "private-cloud-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "private-cloud-2") - * ``` - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Sorts list results by a certain order. By default, returned results are - * ordered by `name` in ascending order. You can also sort results in - * descending order based on the `name` value using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the private cloud to be queried for - * clusters. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ListPrivateCloudsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the private cloud to be queried for - * clusters. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * @type int $page_size - * The maximum number of private clouds to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListPrivateClouds` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListPrivateClouds` must - * match the call that provided the page token. - * @type string $filter - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, a - * number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or - * `<`. - * For example, if you are filtering a list of private clouds, you can exclude - * the ones named `example-pc` by specifying `name != "example-pc"`. - * You can also filter nested fields. For example, you could specify - * `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds - * only if they have a matching address in their network configuration. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-pc") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you can - * include `AND` and `OR` expressions explicitly. For example: - * ``` - * (name = "private-cloud-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "private-cloud-2") - * ``` - * @type string $order_by - * Sorts list results by a certain order. By default, returned results are - * ordered by `name` in ascending order. You can also sort results in - * descending order based on the `name` value using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud to be queried for - * clusters. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the private cloud to be queried for - * clusters. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of private clouds to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of private clouds to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListPrivateClouds` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListPrivateClouds` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListPrivateClouds` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListPrivateClouds` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, a - * number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or - * `<`. - * For example, if you are filtering a list of private clouds, you can exclude - * the ones named `example-pc` by specifying `name != "example-pc"`. - * You can also filter nested fields. For example, you could specify - * `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds - * only if they have a matching address in their network configuration. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-pc") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you can - * include `AND` and `OR` expressions explicitly. For example: - * ``` - * (name = "private-cloud-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "private-cloud-2") - * ``` - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, a - * number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or - * `<`. - * For example, if you are filtering a list of private clouds, you can exclude - * the ones named `example-pc` by specifying `name != "example-pc"`. - * You can also filter nested fields. For example, you could specify - * `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds - * only if they have a matching address in their network configuration. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-pc") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you can - * include `AND` and `OR` expressions explicitly. For example: - * ``` - * (name = "private-cloud-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "private-cloud-2") - * ``` - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Sorts list results by a certain order. By default, returned results are - * ordered by `name` in ascending order. You can also sort results in - * descending order based on the `name` value using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sorts list results by a certain order. By default, returned results are - * ordered by `name` in ascending order. You can also sort results in - * descending order based on the `name` value using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsResponse.php deleted file mode 100644 index bb0c02544fb4..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsResponse.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.vmwareengine.v1.ListPrivateCloudsResponse - */ -class ListPrivateCloudsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of private clouds. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PrivateCloud private_clouds = 1; - */ - private $private_clouds; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VmwareEngine\V1\PrivateCloud>|\Google\Protobuf\Internal\RepeatedField $private_clouds - * A list of private clouds. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached when making an aggregated query using - * wildcards. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * A list of private clouds. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PrivateCloud private_clouds = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPrivateClouds() - { - return $this->private_clouds; - } - - /** - * A list of private clouds. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PrivateCloud private_clouds = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\PrivateCloud>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPrivateClouds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\PrivateCloud::class); - $this->private_clouds = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsRequest.php deleted file mode 100644 index 8cd0a8dbe644..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.vmwareengine.v1.ListSubnetsRequest - */ -class ListSubnetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud to be queried for - * subnets. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of subnets to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListSubnetsRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListSubnetsRequest` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name of the private cloud to be queried for - * subnets. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ListSubnetsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the private cloud to be queried for - * subnets. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type int $page_size - * The maximum number of subnets to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListSubnetsRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListSubnetsRequest` must match the call that provided the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud to be queried for - * subnets. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the private cloud to be queried for - * subnets. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of subnets to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of subnets to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListSubnetsRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListSubnetsRequest` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListSubnetsRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListSubnetsRequest` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsResponse.php deleted file mode 100644 index d656dc7500ea..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.vmwareengine.v1.ListSubnetsResponse - */ -class ListSubnetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of subnets. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Subnet subnets = 1; - */ - private $subnets; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VmwareEngine\V1\Subnet>|\Google\Protobuf\Internal\RepeatedField $subnets - * A list of subnets. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * A list of subnets. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Subnet subnets = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSubnets() - { - return $this->subnets; - } - - /** - * A list of subnets. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Subnet subnets = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\Subnet>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSubnets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\Subnet::class); - $this->subnets = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksRequest.php deleted file mode 100644 index 5d04a5162774..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksRequest.php +++ /dev/null @@ -1,357 +0,0 @@ -google.cloud.vmwareengine.v1.ListVmwareEngineNetworksRequest - */ -class ListVmwareEngineNetworksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location to query for - * VMware Engine networks. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of results to return in one page. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListVmwareEngineNetworks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListVmwareEngineNetworks` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of network peerings, you can - * exclude the ones named `example-network` by specifying - * `name != "example-network"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-network") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-network-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-network-2") - * ``` - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the location to query for - * VMware Engine networks. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/global` - * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ListVmwareEngineNetworksRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the location to query for - * VMware Engine networks. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/global` - * @type int $page_size - * The maximum number of results to return in one page. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListVmwareEngineNetworks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListVmwareEngineNetworks` must match the call that provided the page - * token. - * @type string $filter - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of network peerings, you can - * exclude the ones named `example-network` by specifying - * `name != "example-network"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-network") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-network-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-network-2") - * ``` - * @type string $order_by - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location to query for - * VMware Engine networks. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the location to query for - * VMware Engine networks. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of results to return in one page. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in one page. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListVmwareEngineNetworks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListVmwareEngineNetworks` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListVmwareEngineNetworks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListVmwareEngineNetworks` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of network peerings, you can - * exclude the ones named `example-network` by specifying - * `name != "example-network"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-network") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-network-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-network-2") - * ``` - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of network peerings, you can - * exclude the ones named `example-network` by specifying - * `name != "example-network"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-network") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-network-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-network-2") - * ``` - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksResponse.php deleted file mode 100644 index 0ca339105be3..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksResponse.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.vmwareengine.v1.ListVmwareEngineNetworksResponse - */ -class ListVmwareEngineNetworksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of VMware Engine networks. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_networks = 1; - */ - private $vmware_engine_networks; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Unreachable resources. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork>|\Google\Protobuf\Internal\RepeatedField $vmware_engine_networks - * A list of VMware Engine networks. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Unreachable resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * A list of VMware Engine networks. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_networks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVmwareEngineNetworks() - { - return $this->vmware_engine_networks; - } - - /** - * A list of VMware Engine networks. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_networks = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVmwareEngineNetworks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork::class); - $this->vmware_engine_networks = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Unreachable resources. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Unreachable resources. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkConfig.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkConfig.php deleted file mode 100644 index 47865959a4aa..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkConfig.php +++ /dev/null @@ -1,214 +0,0 @@ -google.cloud.vmwareengine.v1.NetworkConfig - */ -class NetworkConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Management CIDR used by VMware management appliances. - * - * Generated from protobuf field string management_cidr = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $management_cidr = ''; - /** - * Optional. The relative resource name of the VMware Engine network attached - * to the private cloud. Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}` can either be a project number or a project ID. - * - * Generated from protobuf field string vmware_engine_network = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $vmware_engine_network = ''; - /** - * Output only. The canonical name of the VMware Engine network in the form: - * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * - * Generated from protobuf field string vmware_engine_network_canonical = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $vmware_engine_network_canonical = ''; - /** - * Output only. The IP address layout version of the management IP address - * range. Possible versions include: - * * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address - * layout used by some existing private clouds. This is no longer supported - * for new private clouds as it does not support all features. - * * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address - * layout used by all newly created private clouds. This version supports all - * current features. - * - * Generated from protobuf field int32 management_ip_address_layout_version = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $management_ip_address_layout_version = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $management_cidr - * Required. Management CIDR used by VMware management appliances. - * @type string $vmware_engine_network - * Optional. The relative resource name of the VMware Engine network attached - * to the private cloud. Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}` can either be a project number or a project ID. - * @type string $vmware_engine_network_canonical - * Output only. The canonical name of the VMware Engine network in the form: - * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * @type int $management_ip_address_layout_version - * Output only. The IP address layout version of the management IP address - * range. Possible versions include: - * * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address - * layout used by some existing private clouds. This is no longer supported - * for new private clouds as it does not support all features. - * * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address - * layout used by all newly created private clouds. This version supports all - * current features. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Management CIDR used by VMware management appliances. - * - * Generated from protobuf field string management_cidr = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getManagementCidr() - { - return $this->management_cidr; - } - - /** - * Required. Management CIDR used by VMware management appliances. - * - * Generated from protobuf field string management_cidr = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setManagementCidr($var) - { - GPBUtil::checkString($var, True); - $this->management_cidr = $var; - - return $this; - } - - /** - * Optional. The relative resource name of the VMware Engine network attached - * to the private cloud. Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}` can either be a project number or a project ID. - * - * Generated from protobuf field string vmware_engine_network = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getVmwareEngineNetwork() - { - return $this->vmware_engine_network; - } - - /** - * Optional. The relative resource name of the VMware Engine network attached - * to the private cloud. Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}` can either be a project number or a project ID. - * - * Generated from protobuf field string vmware_engine_network = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVmwareEngineNetwork($var) - { - GPBUtil::checkString($var, True); - $this->vmware_engine_network = $var; - - return $this; - } - - /** - * Output only. The canonical name of the VMware Engine network in the form: - * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * - * Generated from protobuf field string vmware_engine_network_canonical = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getVmwareEngineNetworkCanonical() - { - return $this->vmware_engine_network_canonical; - } - - /** - * Output only. The canonical name of the VMware Engine network in the form: - * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * - * Generated from protobuf field string vmware_engine_network_canonical = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVmwareEngineNetworkCanonical($var) - { - GPBUtil::checkString($var, True); - $this->vmware_engine_network_canonical = $var; - - return $this; - } - - /** - * Output only. The IP address layout version of the management IP address - * range. Possible versions include: - * * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address - * layout used by some existing private clouds. This is no longer supported - * for new private clouds as it does not support all features. - * * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address - * layout used by all newly created private clouds. This version supports all - * current features. - * - * Generated from protobuf field int32 management_ip_address_layout_version = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getManagementIpAddressLayoutVersion() - { - return $this->management_ip_address_layout_version; - } - - /** - * Output only. The IP address layout version of the management IP address - * range. Possible versions include: - * * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address - * layout used by some existing private clouds. This is no longer supported - * for new private clouds as it does not support all features. - * * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address - * layout used by all newly created private clouds. This version supports all - * current features. - * - * Generated from protobuf field int32 management_ip_address_layout_version = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setManagementIpAddressLayoutVersion($var) - { - GPBUtil::checkInt32($var); - $this->management_ip_address_layout_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy.php deleted file mode 100644 index a0706a1327c9..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy.php +++ /dev/null @@ -1,470 +0,0 @@ -google.cloud.vmwareengine.v1.NetworkPolicy - */ -class NetworkPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of this network policy. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Network service that allows VMware workloads to access the internet. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService internet_access = 6; - */ - protected $internet_access = null; - /** - * Network service that allows External IP addresses to be assigned to VMware - * workloads. This service can only be enabled when `internet_access` is also - * enabled. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService external_ip = 7; - */ - protected $external_ip = null; - /** - * Required. IP address range in CIDR notation used to create internet access - * and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is - * required. The range cannot overlap with any prefixes either in the consumer - * VPC network or in use by the private clouds attached to that VPC network. - * - * Generated from protobuf field string edge_services_cidr = 9 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $edge_services_cidr = ''; - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Optional. The relative resource name of the VMware Engine network. - * Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}` can either be a project number or a project ID. - * - * Generated from protobuf field string vmware_engine_network = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $vmware_engine_network = ''; - /** - * Optional. User-provided description for this network policy. - * - * Generated from protobuf field string description = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. The canonical name of the VMware Engine network in the form: - * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * - * Generated from protobuf field string vmware_engine_network_canonical = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $vmware_engine_network_canonical = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of this network policy. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of this resource. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last update time of this resource. - * @type \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService $internet_access - * Network service that allows VMware workloads to access the internet. - * @type \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService $external_ip - * Network service that allows External IP addresses to be assigned to VMware - * workloads. This service can only be enabled when `internet_access` is also - * enabled. - * @type string $edge_services_cidr - * Required. IP address range in CIDR notation used to create internet access - * and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is - * required. The range cannot overlap with any prefixes either in the consumer - * VPC network or in use by the private clouds attached to that VPC network. - * @type string $uid - * Output only. System-generated unique identifier for the resource. - * @type string $vmware_engine_network - * Optional. The relative resource name of the VMware Engine network. - * Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}` can either be a project number or a project ID. - * @type string $description - * Optional. User-provided description for this network policy. - * @type string $vmware_engine_network_canonical - * Output only. The canonical name of the VMware Engine network in the form: - * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of this network policy. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of this network policy. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Network service that allows VMware workloads to access the internet. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService internet_access = 6; - * @return \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService|null - */ - public function getInternetAccess() - { - return $this->internet_access; - } - - public function hasInternetAccess() - { - return isset($this->internet_access); - } - - public function clearInternetAccess() - { - unset($this->internet_access); - } - - /** - * Network service that allows VMware workloads to access the internet. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService internet_access = 6; - * @param \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService $var - * @return $this - */ - public function setInternetAccess($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService::class); - $this->internet_access = $var; - - return $this; - } - - /** - * Network service that allows External IP addresses to be assigned to VMware - * workloads. This service can only be enabled when `internet_access` is also - * enabled. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService external_ip = 7; - * @return \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService|null - */ - public function getExternalIp() - { - return $this->external_ip; - } - - public function hasExternalIp() - { - return isset($this->external_ip); - } - - public function clearExternalIp() - { - unset($this->external_ip); - } - - /** - * Network service that allows External IP addresses to be assigned to VMware - * workloads. This service can only be enabled when `internet_access` is also - * enabled. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService external_ip = 7; - * @param \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService $var - * @return $this - */ - public function setExternalIp($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService::class); - $this->external_ip = $var; - - return $this; - } - - /** - * Required. IP address range in CIDR notation used to create internet access - * and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is - * required. The range cannot overlap with any prefixes either in the consumer - * VPC network or in use by the private clouds attached to that VPC network. - * - * Generated from protobuf field string edge_services_cidr = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEdgeServicesCidr() - { - return $this->edge_services_cidr; - } - - /** - * Required. IP address range in CIDR notation used to create internet access - * and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is - * required. The range cannot overlap with any prefixes either in the consumer - * VPC network or in use by the private clouds attached to that VPC network. - * - * Generated from protobuf field string edge_services_cidr = 9 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEdgeServicesCidr($var) - { - GPBUtil::checkString($var, True); - $this->edge_services_cidr = $var; - - return $this; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Optional. The relative resource name of the VMware Engine network. - * Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}` can either be a project number or a project ID. - * - * Generated from protobuf field string vmware_engine_network = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getVmwareEngineNetwork() - { - return $this->vmware_engine_network; - } - - /** - * Optional. The relative resource name of the VMware Engine network. - * Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}` can either be a project number or a project ID. - * - * Generated from protobuf field string vmware_engine_network = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVmwareEngineNetwork($var) - { - GPBUtil::checkString($var, True); - $this->vmware_engine_network = $var; - - return $this; - } - - /** - * Optional. User-provided description for this network policy. - * - * Generated from protobuf field string description = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. User-provided description for this network policy. - * - * Generated from protobuf field string description = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The canonical name of the VMware Engine network in the form: - * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * - * Generated from protobuf field string vmware_engine_network_canonical = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getVmwareEngineNetworkCanonical() - { - return $this->vmware_engine_network_canonical; - } - - /** - * Output only. The canonical name of the VMware Engine network in the form: - * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * - * Generated from protobuf field string vmware_engine_network_canonical = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVmwareEngineNetworkCanonical($var) - { - GPBUtil::checkString($var, True); - $this->vmware_engine_network_canonical = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService.php deleted file mode 100644 index 7569a32d83be..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService - */ -class NetworkService extends \Google\Protobuf\Internal\Message -{ - /** - * True if the service is enabled; false otherwise. - * - * Generated from protobuf field bool enabled = 1; - */ - protected $enabled = false; - /** - * Output only. State of the service. New values may be added to this enum - * when appropriate. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * True if the service is enabled; false otherwise. - * @type int $state - * Output only. State of the service. New values may be added to this enum - * when appropriate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * True if the service is enabled; false otherwise. - * - * Generated from protobuf field bool enabled = 1; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * True if the service is enabled; false otherwise. - * - * Generated from protobuf field bool enabled = 1; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Output only. State of the service. New values may be added to this enum - * when appropriate. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the service. New values may be added to this enum - * when appropriate. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService\State::class); - $this->state = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NetworkService::class, \Google\Cloud\VmwareEngine\V1\NetworkPolicy_NetworkService::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService/State.php deleted file mode 100644 index 7254794bb492..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService/State.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State - */ -class State -{ - /** - * Unspecified service state. This is the default value. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Service is not provisioned. - * - * Generated from protobuf enum UNPROVISIONED = 1; - */ - const UNPROVISIONED = 1; - /** - * Service is in the process of being provisioned/deprovisioned. - * - * Generated from protobuf enum RECONCILING = 2; - */ - const RECONCILING = 2; - /** - * Service is active. - * - * Generated from protobuf enum ACTIVE = 3; - */ - const ACTIVE = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::UNPROVISIONED => 'UNPROVISIONED', - self::RECONCILING => 'RECONCILING', - self::ACTIVE => 'ACTIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\NetworkPolicy_NetworkService_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType.php deleted file mode 100644 index 0dd50764f83f..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType.php +++ /dev/null @@ -1,329 +0,0 @@ -google.cloud.vmwareengine.v1.NodeType - */ -class NodeType extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of this node type. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The canonical identifier of the node type - * (corresponds to the `NodeType`). For example: standard-72. - * - * Generated from protobuf field string node_type_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $node_type_id = ''; - /** - * Output only. The friendly name for this node type. - * For example: ve1-standard-72 - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - /** - * Output only. The total number of virtual CPUs in a single node. - * - * Generated from protobuf field int32 virtual_cpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $virtual_cpu_count = 0; - /** - * Output only. The total number of CPU cores in a single node. - * - * Generated from protobuf field int32 total_core_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $total_core_count = 0; - /** - * Output only. The amount of physical memory available, defined in GB. - * - * Generated from protobuf field int32 memory_gb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $memory_gb = 0; - /** - * Output only. The amount of storage available, defined in GB. - * - * Generated from protobuf field int32 disk_size_gb = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $disk_size_gb = 0; - /** - * Output only. List of possible values of custom core count. - * - * Generated from protobuf field repeated int32 available_custom_core_counts = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $available_custom_core_counts; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of this node type. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` - * @type string $node_type_id - * Output only. The canonical identifier of the node type - * (corresponds to the `NodeType`). For example: standard-72. - * @type string $display_name - * Output only. The friendly name for this node type. - * For example: ve1-standard-72 - * @type int $virtual_cpu_count - * Output only. The total number of virtual CPUs in a single node. - * @type int $total_core_count - * Output only. The total number of CPU cores in a single node. - * @type int $memory_gb - * Output only. The amount of physical memory available, defined in GB. - * @type int $disk_size_gb - * Output only. The amount of storage available, defined in GB. - * @type array|\Google\Protobuf\Internal\RepeatedField $available_custom_core_counts - * Output only. List of possible values of custom core count. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of this node type. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of this node type. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The canonical identifier of the node type - * (corresponds to the `NodeType`). For example: standard-72. - * - * Generated from protobuf field string node_type_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNodeTypeId() - { - return $this->node_type_id; - } - - /** - * Output only. The canonical identifier of the node type - * (corresponds to the `NodeType`). For example: standard-72. - * - * Generated from protobuf field string node_type_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNodeTypeId($var) - { - GPBUtil::checkString($var, True); - $this->node_type_id = $var; - - return $this; - } - - /** - * Output only. The friendly name for this node type. - * For example: ve1-standard-72 - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. The friendly name for this node type. - * For example: ve1-standard-72 - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. The total number of virtual CPUs in a single node. - * - * Generated from protobuf field int32 virtual_cpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getVirtualCpuCount() - { - return $this->virtual_cpu_count; - } - - /** - * Output only. The total number of virtual CPUs in a single node. - * - * Generated from protobuf field int32 virtual_cpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setVirtualCpuCount($var) - { - GPBUtil::checkInt32($var); - $this->virtual_cpu_count = $var; - - return $this; - } - - /** - * Output only. The total number of CPU cores in a single node. - * - * Generated from protobuf field int32 total_core_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getTotalCoreCount() - { - return $this->total_core_count; - } - - /** - * Output only. The total number of CPU cores in a single node. - * - * Generated from protobuf field int32 total_core_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTotalCoreCount($var) - { - GPBUtil::checkInt32($var); - $this->total_core_count = $var; - - return $this; - } - - /** - * Output only. The amount of physical memory available, defined in GB. - * - * Generated from protobuf field int32 memory_gb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getMemoryGb() - { - return $this->memory_gb; - } - - /** - * Output only. The amount of physical memory available, defined in GB. - * - * Generated from protobuf field int32 memory_gb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setMemoryGb($var) - { - GPBUtil::checkInt32($var); - $this->memory_gb = $var; - - return $this; - } - - /** - * Output only. The amount of storage available, defined in GB. - * - * Generated from protobuf field int32 disk_size_gb = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getDiskSizeGb() - { - return $this->disk_size_gb; - } - - /** - * Output only. The amount of storage available, defined in GB. - * - * Generated from protobuf field int32 disk_size_gb = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setDiskSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->disk_size_gb = $var; - - return $this; - } - - /** - * Output only. List of possible values of custom core count. - * - * Generated from protobuf field repeated int32 available_custom_core_counts = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAvailableCustomCoreCounts() - { - return $this->available_custom_core_counts; - } - - /** - * Output only. List of possible values of custom core count. - * - * Generated from protobuf field repeated int32 available_custom_core_counts = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAvailableCustomCoreCounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->available_custom_core_counts = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeTypeConfig.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeTypeConfig.php deleted file mode 100644 index 5308613bd056..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeTypeConfig.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.vmwareengine.v1.NodeTypeConfig - */ -class NodeTypeConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The number of nodes of this type in the cluster - * - * Generated from protobuf field int32 node_count = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $node_count = 0; - /** - * Optional. Customized number of cores available to each node of the type. - * This number must always be one of `nodeType.availableCustomCoreCounts`. - * If zero is provided max value from `nodeType.availableCustomCoreCounts` - * will be used. - * - * Generated from protobuf field int32 custom_core_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $custom_core_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $node_count - * Required. The number of nodes of this type in the cluster - * @type int $custom_core_count - * Optional. Customized number of cores available to each node of the type. - * This number must always be one of `nodeType.availableCustomCoreCounts`. - * If zero is provided max value from `nodeType.availableCustomCoreCounts` - * will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The number of nodes of this type in the cluster - * - * Generated from protobuf field int32 node_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getNodeCount() - { - return $this->node_count; - } - - /** - * Required. The number of nodes of this type in the cluster - * - * Generated from protobuf field int32 node_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->node_count = $var; - - return $this; - } - - /** - * Optional. Customized number of cores available to each node of the type. - * This number must always be one of `nodeType.availableCustomCoreCounts`. - * If zero is provided max value from `nodeType.availableCustomCoreCounts` - * will be used. - * - * Generated from protobuf field int32 custom_core_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getCustomCoreCount() - { - return $this->custom_core_count; - } - - /** - * Optional. Customized number of cores available to each node of the type. - * This number must always be one of `nodeType.availableCustomCoreCounts`. - * If zero is provided max value from `nodeType.availableCustomCoreCounts` - * will be used. - * - * Generated from protobuf field int32 custom_core_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setCustomCoreCount($var) - { - GPBUtil::checkInt32($var); - $this->custom_core_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx.php deleted file mode 100644 index 21cfc7076157..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.vmwareengine.v1.Nsx - */ -class Nsx extends \Google\Protobuf\Internal\Message -{ - /** - * Internal IP address of the appliance. - * - * Generated from protobuf field string internal_ip = 2; - */ - protected $internal_ip = ''; - /** - * Version of the appliance. - * - * Generated from protobuf field string version = 4; - */ - protected $version = ''; - /** - * Output only. The state of the appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Fully qualified domain name of the appliance. - * - * Generated from protobuf field string fqdn = 6; - */ - protected $fqdn = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $internal_ip - * Internal IP address of the appliance. - * @type string $version - * Version of the appliance. - * @type int $state - * Output only. The state of the appliance. - * @type string $fqdn - * Fully qualified domain name of the appliance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Internal IP address of the appliance. - * - * Generated from protobuf field string internal_ip = 2; - * @return string - */ - public function getInternalIp() - { - return $this->internal_ip; - } - - /** - * Internal IP address of the appliance. - * - * Generated from protobuf field string internal_ip = 2; - * @param string $var - * @return $this - */ - public function setInternalIp($var) - { - GPBUtil::checkString($var, True); - $this->internal_ip = $var; - - return $this; - } - - /** - * Version of the appliance. - * - * Generated from protobuf field string version = 4; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Version of the appliance. - * - * Generated from protobuf field string version = 4; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Output only. The state of the appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\Nsx\State::class); - $this->state = $var; - - return $this; - } - - /** - * Fully qualified domain name of the appliance. - * - * Generated from protobuf field string fqdn = 6; - * @return string - */ - public function getFqdn() - { - return $this->fqdn; - } - - /** - * Fully qualified domain name of the appliance. - * - * Generated from protobuf field string fqdn = 6; - * @param string $var - * @return $this - */ - public function setFqdn($var) - { - GPBUtil::checkString($var, True); - $this->fqdn = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx/State.php deleted file mode 100644 index 768f7cb3f320..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx/State.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.vmwareengine.v1.Nsx.State - */ -class State -{ - /** - * Unspecified appliance state. This is the default value. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The appliance is operational and can be used. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The appliance is being deployed. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::CREATING => 'CREATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\Nsx_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/OperationMetadata.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/OperationMetadata.php deleted file mode 100644 index a520f27cb3e3..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/OperationMetadata.php +++ /dev/null @@ -1,311 +0,0 @@ -google.cloud.vmwareengine.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. True if the user has requested cancellation - * of the operation; false otherwise. - * Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. True if the user has requested cancellation - * of the operation; false otherwise. - * Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. True if the user has requested cancellation - * of the operation; false otherwise. - * Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. True if the user has requested cancellation - * of the operation; false otherwise. - * Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud.php deleted file mode 100644 index 2a16bce58536..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud.php +++ /dev/null @@ -1,601 +0,0 @@ -google.cloud.vmwareengine.v1.PrivateCloud - */ -class PrivateCloud extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of this private cloud. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. Time when the resource was scheduled for deletion. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Output only. Time when the resource will be irreversibly deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - /** - * Output only. State of the resource. New values may be added to this enum - * when appropriate. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Required. Network configuration of the private cloud. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkConfig network_config = 9 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network_config = null; - /** - * Required. Input only. The management cluster for this private cloud. - * This field is required during creation of the private cloud to provide - * details for the default cluster. - * The following fields can't be changed after private cloud creation: - * `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster management_cluster = 10 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; - */ - protected $management_cluster = null; - /** - * User-provided description for this private cloud. - * - * Generated from protobuf field string description = 11; - */ - protected $description = ''; - /** - * Output only. HCX appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx hcx = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $hcx = null; - /** - * Output only. NSX appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx nsx = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $nsx = null; - /** - * Output only. Vcenter appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter vcenter = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $vcenter = null; - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of this private cloud. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of this resource. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last update time of this resource. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. Time when the resource was scheduled for deletion. - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. Time when the resource will be irreversibly deleted. - * @type int $state - * Output only. State of the resource. New values may be added to this enum - * when appropriate. - * @type \Google\Cloud\VmwareEngine\V1\NetworkConfig $network_config - * Required. Network configuration of the private cloud. - * @type \Google\Cloud\VmwareEngine\V1\PrivateCloud\ManagementCluster $management_cluster - * Required. Input only. The management cluster for this private cloud. - * This field is required during creation of the private cloud to provide - * details for the default cluster. - * The following fields can't be changed after private cloud creation: - * `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`. - * @type string $description - * User-provided description for this private cloud. - * @type \Google\Cloud\VmwareEngine\V1\Hcx $hcx - * Output only. HCX appliance. - * @type \Google\Cloud\VmwareEngine\V1\Nsx $nsx - * Output only. NSX appliance. - * @type \Google\Cloud\VmwareEngine\V1\Vcenter $vcenter - * Output only. Vcenter appliance. - * @type string $uid - * Output only. System-generated unique identifier for the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of this private cloud. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of this private cloud. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. Time when the resource was scheduled for deletion. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. Time when the resource was scheduled for deletion. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Output only. Time when the resource will be irreversibly deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * Output only. Time when the resource will be irreversibly deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - - /** - * Output only. State of the resource. New values may be added to this enum - * when appropriate. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the resource. New values may be added to this enum - * when appropriate. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\PrivateCloud\State::class); - $this->state = $var; - - return $this; - } - - /** - * Required. Network configuration of the private cloud. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkConfig network_config = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\NetworkConfig|null - */ - public function getNetworkConfig() - { - return $this->network_config; - } - - public function hasNetworkConfig() - { - return isset($this->network_config); - } - - public function clearNetworkConfig() - { - unset($this->network_config); - } - - /** - * Required. Network configuration of the private cloud. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkConfig network_config = 9 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\NetworkConfig $var - * @return $this - */ - public function setNetworkConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkConfig::class); - $this->network_config = $var; - - return $this; - } - - /** - * Required. Input only. The management cluster for this private cloud. - * This field is required during creation of the private cloud to provide - * details for the default cluster. - * The following fields can't be changed after private cloud creation: - * `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster management_cluster = 10 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\PrivateCloud\ManagementCluster|null - */ - public function getManagementCluster() - { - return $this->management_cluster; - } - - public function hasManagementCluster() - { - return isset($this->management_cluster); - } - - public function clearManagementCluster() - { - unset($this->management_cluster); - } - - /** - * Required. Input only. The management cluster for this private cloud. - * This field is required during creation of the private cloud to provide - * details for the default cluster. - * The following fields can't be changed after private cloud creation: - * `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster management_cluster = 10 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\PrivateCloud\ManagementCluster $var - * @return $this - */ - public function setManagementCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\PrivateCloud\ManagementCluster::class); - $this->management_cluster = $var; - - return $this; - } - - /** - * User-provided description for this private cloud. - * - * Generated from protobuf field string description = 11; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User-provided description for this private cloud. - * - * Generated from protobuf field string description = 11; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. HCX appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx hcx = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VmwareEngine\V1\Hcx|null - */ - public function getHcx() - { - return $this->hcx; - } - - public function hasHcx() - { - return isset($this->hcx); - } - - public function clearHcx() - { - unset($this->hcx); - } - - /** - * Output only. HCX appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx hcx = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VmwareEngine\V1\Hcx $var - * @return $this - */ - public function setHcx($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Hcx::class); - $this->hcx = $var; - - return $this; - } - - /** - * Output only. NSX appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx nsx = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VmwareEngine\V1\Nsx|null - */ - public function getNsx() - { - return $this->nsx; - } - - public function hasNsx() - { - return isset($this->nsx); - } - - public function clearNsx() - { - unset($this->nsx); - } - - /** - * Output only. NSX appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx nsx = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VmwareEngine\V1\Nsx $var - * @return $this - */ - public function setNsx($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Nsx::class); - $this->nsx = $var; - - return $this; - } - - /** - * Output only. Vcenter appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter vcenter = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VmwareEngine\V1\Vcenter|null - */ - public function getVcenter() - { - return $this->vcenter; - } - - public function hasVcenter() - { - return isset($this->vcenter); - } - - public function clearVcenter() - { - unset($this->vcenter); - } - - /** - * Output only. Vcenter appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter vcenter = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VmwareEngine\V1\Vcenter $var - * @return $this - */ - public function setVcenter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Vcenter::class); - $this->vcenter = $var; - - return $this; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/ManagementCluster.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/ManagementCluster.php deleted file mode 100644 index 015764f0fc4b..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/ManagementCluster.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster - */ -class ManagementCluster extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The user-provided identifier of the new `Cluster`. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC - * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) - * - * Generated from protobuf field string cluster_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster_id = ''; - /** - * Required. The map of cluster node types in this cluster, where the key is - * canonical identifier of the node type (corresponds to the `NodeType`). - * - * Generated from protobuf field map node_type_configs = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - private $node_type_configs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cluster_id - * Required. The user-provided identifier of the new `Cluster`. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC - * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) - * @type array|\Google\Protobuf\Internal\MapField $node_type_configs - * Required. The map of cluster node types in this cluster, where the key is - * canonical identifier of the node type (corresponds to the `NodeType`). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The user-provided identifier of the new `Cluster`. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC - * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) - * - * Generated from protobuf field string cluster_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getClusterId() - { - return $this->cluster_id; - } - - /** - * Required. The user-provided identifier of the new `Cluster`. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC - * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) - * - * Generated from protobuf field string cluster_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setClusterId($var) - { - GPBUtil::checkString($var, True); - $this->cluster_id = $var; - - return $this; - } - - /** - * Required. The map of cluster node types in this cluster, where the key is - * canonical identifier of the node type (corresponds to the `NodeType`). - * - * Generated from protobuf field map node_type_configs = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getNodeTypeConfigs() - { - return $this->node_type_configs; - } - - /** - * Required. The map of cluster node types in this cluster, where the key is - * canonical identifier of the node type (corresponds to the `NodeType`). - * - * Generated from protobuf field map node_type_configs = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setNodeTypeConfigs($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\NodeTypeConfig::class); - $this->node_type_configs = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ManagementCluster::class, \Google\Cloud\VmwareEngine\V1\PrivateCloud_ManagementCluster::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/State.php deleted file mode 100644 index d7c021d20aec..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/State.php +++ /dev/null @@ -1,94 +0,0 @@ -google.cloud.vmwareengine.v1.PrivateCloud.State - */ -class State -{ - /** - * The default value. This value should never be used. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The private cloud is ready. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The private cloud is being created. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * The private cloud is being updated. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * The private cloud is in failed state. - * - * Generated from protobuf enum FAILED = 5; - */ - const FAILED = 5; - /** - * The private cloud is scheduled for deletion. The deletion process can be - * cancelled by using the corresponding undelete method. - * - * Generated from protobuf enum DELETED = 6; - */ - const DELETED = 6; - /** - * The private cloud is irreversibly deleted and is being removed from the - * system. - * - * Generated from protobuf enum PURGING = 7; - */ - const PURGING = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::CREATING => 'CREATING', - self::UPDATING => 'UPDATING', - self::FAILED => 'FAILED', - self::DELETED => 'DELETED', - self::PURGING => 'PURGING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\PrivateCloud_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetNsxCredentialsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetNsxCredentialsRequest.php deleted file mode 100644 index 9da980200072..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetNsxCredentialsRequest.php +++ /dev/null @@ -1,185 +0,0 @@ -google.cloud.vmwareengine.v1.ResetNsxCredentialsRequest - */ -class ResetNsxCredentialsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud - * to reset credentials for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $private_cloud = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $privateCloud Required. The resource name of the private cloud - * to reset credentials for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ResetNsxCredentialsRequest - * - * @experimental - */ - public static function build(string $privateCloud): self - { - return (new self()) - ->setPrivateCloud($privateCloud); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $private_cloud - * Required. The resource name of the private cloud - * to reset credentials for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud - * to reset credentials for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getPrivateCloud() - { - return $this->private_cloud; - } - - /** - * Required. The resource name of the private cloud - * to reset credentials for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPrivateCloud($var) - { - GPBUtil::checkString($var, True); - $this->private_cloud = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetVcenterCredentialsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetVcenterCredentialsRequest.php deleted file mode 100644 index 78492c06f46f..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetVcenterCredentialsRequest.php +++ /dev/null @@ -1,185 +0,0 @@ -google.cloud.vmwareengine.v1.ResetVcenterCredentialsRequest - */ -class ResetVcenterCredentialsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud - * to reset credentials for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $private_cloud = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $privateCloud Required. The resource name of the private cloud - * to reset credentials for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ResetVcenterCredentialsRequest - * - * @experimental - */ - public static function build(string $privateCloud): self - { - return (new self()) - ->setPrivateCloud($privateCloud); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $private_cloud - * Required. The resource name of the private cloud - * to reset credentials for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud - * to reset credentials for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getPrivateCloud() - { - return $this->private_cloud; - } - - /** - * Required. The resource name of the private cloud - * to reset credentials for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPrivateCloud($var) - { - GPBUtil::checkString($var, True); - $this->private_cloud = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowNsxCredentialsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowNsxCredentialsRequest.php deleted file mode 100644 index a84e71cca4cd..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowNsxCredentialsRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -google.cloud.vmwareengine.v1.ShowNsxCredentialsRequest - */ -class ShowNsxCredentialsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud - * to be queried for credentials. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $private_cloud = ''; - - /** - * @param string $privateCloud Required. The resource name of the private cloud - * to be queried for credentials. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ShowNsxCredentialsRequest - * - * @experimental - */ - public static function build(string $privateCloud): self - { - return (new self()) - ->setPrivateCloud($privateCloud); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $private_cloud - * Required. The resource name of the private cloud - * to be queried for credentials. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud - * to be queried for credentials. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getPrivateCloud() - { - return $this->private_cloud; - } - - /** - * Required. The resource name of the private cloud - * to be queried for credentials. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPrivateCloud($var) - { - GPBUtil::checkString($var, True); - $this->private_cloud = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowVcenterCredentialsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowVcenterCredentialsRequest.php deleted file mode 100644 index 3c4bf5917df0..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowVcenterCredentialsRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -google.cloud.vmwareengine.v1.ShowVcenterCredentialsRequest - */ -class ShowVcenterCredentialsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud - * to be queried for credentials. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $private_cloud = ''; - - /** - * @param string $privateCloud Required. The resource name of the private cloud - * to be queried for credentials. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ShowVcenterCredentialsRequest - * - * @experimental - */ - public static function build(string $privateCloud): self - { - return (new self()) - ->setPrivateCloud($privateCloud); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $private_cloud - * Required. The resource name of the private cloud - * to be queried for credentials. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud - * to be queried for credentials. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getPrivateCloud() - { - return $this->private_cloud; - } - - /** - * Required. The resource name of the private cloud - * to be queried for credentials. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPrivateCloud($var) - { - GPBUtil::checkString($var, True); - $this->private_cloud = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet.php deleted file mode 100644 index 7ba099337b9f..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet.php +++ /dev/null @@ -1,228 +0,0 @@ -google.cloud.vmwareengine.v1.Subnet - */ -class Subnet extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of this subnet. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The IP address range of the subnet in CIDR format '10.0.0.0/24'. - * - * Generated from protobuf field string ip_cidr_range = 7; - */ - protected $ip_cidr_range = ''; - /** - * The IP address of the gateway of this subnet. - * Must fall within the IP prefix defined above. - * - * Generated from protobuf field string gateway_ip = 8; - */ - protected $gateway_ip = ''; - /** - * Output only. The type of the subnet. For example "management" or - * "userDefined". - * - * Generated from protobuf field string type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $type = ''; - /** - * Output only. The state of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Subnet.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of this subnet. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` - * @type string $ip_cidr_range - * The IP address range of the subnet in CIDR format '10.0.0.0/24'. - * @type string $gateway_ip - * The IP address of the gateway of this subnet. - * Must fall within the IP prefix defined above. - * @type string $type - * Output only. The type of the subnet. For example "management" or - * "userDefined". - * @type int $state - * Output only. The state of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of this subnet. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of this subnet. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The IP address range of the subnet in CIDR format '10.0.0.0/24'. - * - * Generated from protobuf field string ip_cidr_range = 7; - * @return string - */ - public function getIpCidrRange() - { - return $this->ip_cidr_range; - } - - /** - * The IP address range of the subnet in CIDR format '10.0.0.0/24'. - * - * Generated from protobuf field string ip_cidr_range = 7; - * @param string $var - * @return $this - */ - public function setIpCidrRange($var) - { - GPBUtil::checkString($var, True); - $this->ip_cidr_range = $var; - - return $this; - } - - /** - * The IP address of the gateway of this subnet. - * Must fall within the IP prefix defined above. - * - * Generated from protobuf field string gateway_ip = 8; - * @return string - */ - public function getGatewayIp() - { - return $this->gateway_ip; - } - - /** - * The IP address of the gateway of this subnet. - * Must fall within the IP prefix defined above. - * - * Generated from protobuf field string gateway_ip = 8; - * @param string $var - * @return $this - */ - public function setGatewayIp($var) - { - GPBUtil::checkString($var, True); - $this->gateway_ip = $var; - - return $this; - } - - /** - * Output only. The type of the subnet. For example "management" or - * "userDefined". - * - * Generated from protobuf field string type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Output only. The type of the subnet. For example "management" or - * "userDefined". - * - * Generated from protobuf field string type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Output only. The state of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Subnet.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Subnet.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\Subnet\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet/State.php deleted file mode 100644 index d66488785c28..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.vmwareengine.v1.Subnet.State - */ -class State -{ - /** - * The default value. This value should never be used. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The subnet is ready. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The subnet is being created. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * The subnet is being updated. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * The subnet is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::CREATING => 'CREATING', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\Subnet_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UndeletePrivateCloudRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UndeletePrivateCloudRequest.php deleted file mode 100644 index 821fbcbc6865..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UndeletePrivateCloudRequest.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.vmwareengine.v1.UndeletePrivateCloudRequest - */ -class UndeletePrivateCloudRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud scheduled for deletion. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The resource name of the private cloud scheduled for deletion. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\UndeletePrivateCloudRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the private cloud scheduled for deletion. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type string $request_id - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud scheduled for deletion. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the private cloud scheduled for deletion. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateClusterRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateClusterRequest.php deleted file mode 100644 index badc304f0823..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateClusterRequest.php +++ /dev/null @@ -1,233 +0,0 @@ -google.cloud.vmwareengine.v1.UpdateClusterRequest - */ -class UpdateClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `Cluster` resource by the update. The fields specified in the `updateMask` - * are relative to the resource, not the full request. A field will be - * overwritten if it is in the mask. If the user does not provide a mask then - * all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The description of the cluster. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster = null; - /** - * Optional. The request ID must be a valid UUID with the exception that - * zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\VmwareEngine\V1\Cluster $cluster Required. The description of the cluster. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * `Cluster` resource by the update. The fields specified in the `updateMask` - * are relative to the resource, not the full request. A field will be - * overwritten if it is in the mask. If the user does not provide a mask then - * all fields will be overwritten. - * - * @return \Google\Cloud\VmwareEngine\V1\UpdateClusterRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VmwareEngine\V1\Cluster $cluster, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setCluster($cluster) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * `Cluster` resource by the update. The fields specified in the `updateMask` - * are relative to the resource, not the full request. A field will be - * overwritten if it is in the mask. If the user does not provide a mask then - * all fields will be overwritten. - * @type \Google\Cloud\VmwareEngine\V1\Cluster $cluster - * Required. The description of the cluster. - * @type string $request_id - * Optional. The request ID must be a valid UUID with the exception that - * zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `Cluster` resource by the update. The fields specified in the `updateMask` - * are relative to the resource, not the full request. A field will be - * overwritten if it is in the mask. If the user does not provide a mask then - * all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `Cluster` resource by the update. The fields specified in the `updateMask` - * are relative to the resource, not the full request. A field will be - * overwritten if it is in the mask. If the user does not provide a mask then - * all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The description of the cluster. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\Cluster|null - */ - public function getCluster() - { - return $this->cluster; - } - - public function hasCluster() - { - return isset($this->cluster); - } - - public function clearCluster() - { - unset($this->cluster); - } - - /** - * Required. The description of the cluster. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\Cluster $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Cluster::class); - $this->cluster = $var; - - return $this; - } - - /** - * Optional. The request ID must be a valid UUID with the exception that - * zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. The request ID must be a valid UUID with the exception that - * zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPolicyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPolicyRequest.php deleted file mode 100644 index 7fddaaad169e..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPolicyRequest.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.vmwareengine.v1.UpdateNetworkPolicyRequest - */ -class UpdateNetworkPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Network policy description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network_policy = null; - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `NetworkPolicy` resource by the update. - * The fields specified in the `update_mask` are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\VmwareEngine\V1\NetworkPolicy $networkPolicy Required. Network policy description. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * `NetworkPolicy` resource by the update. - * The fields specified in the `update_mask` are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\VmwareEngine\V1\UpdateNetworkPolicyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VmwareEngine\V1\NetworkPolicy $networkPolicy, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setNetworkPolicy($networkPolicy) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VmwareEngine\V1\NetworkPolicy $network_policy - * Required. Network policy description. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * `NetworkPolicy` resource by the update. - * The fields specified in the `update_mask` are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. Network policy description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\NetworkPolicy|null - */ - public function getNetworkPolicy() - { - return $this->network_policy; - } - - public function hasNetworkPolicy() - { - return isset($this->network_policy); - } - - public function clearNetworkPolicy() - { - unset($this->network_policy); - } - - /** - * Required. Network policy description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\NetworkPolicy $var - * @return $this - */ - public function setNetworkPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkPolicy::class); - $this->network_policy = $var; - - return $this; - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `NetworkPolicy` resource by the update. - * The fields specified in the `update_mask` are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `NetworkPolicy` resource by the update. - * The fields specified in the `update_mask` are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateCloudRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateCloudRequest.php deleted file mode 100644 index 16c19f6e1410..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateCloudRequest.php +++ /dev/null @@ -1,195 +0,0 @@ -google.cloud.vmwareengine.v1.UpdatePrivateCloudRequest - */ -class UpdatePrivateCloudRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Private cloud description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $private_cloud = null; - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `PrivateCloud` resource by the update. The fields specified in `updateMask` - * are relative to the resource, not the full request. A field will be - * overwritten if it is in the mask. If the user does not provide a mask then - * all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\VmwareEngine\V1\PrivateCloud $privateCloud Required. Private cloud description. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * `PrivateCloud` resource by the update. The fields specified in `updateMask` - * are relative to the resource, not the full request. A field will be - * overwritten if it is in the mask. If the user does not provide a mask then - * all fields will be overwritten. - * - * @return \Google\Cloud\VmwareEngine\V1\UpdatePrivateCloudRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VmwareEngine\V1\PrivateCloud $privateCloud, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setPrivateCloud($privateCloud) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VmwareEngine\V1\PrivateCloud $private_cloud - * Required. Private cloud description. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * `PrivateCloud` resource by the update. The fields specified in `updateMask` - * are relative to the resource, not the full request. A field will be - * overwritten if it is in the mask. If the user does not provide a mask then - * all fields will be overwritten. - * @type string $request_id - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. Private cloud description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\PrivateCloud|null - */ - public function getPrivateCloud() - { - return $this->private_cloud; - } - - public function hasPrivateCloud() - { - return isset($this->private_cloud); - } - - public function clearPrivateCloud() - { - unset($this->private_cloud); - } - - /** - * Required. Private cloud description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\PrivateCloud $var - * @return $this - */ - public function setPrivateCloud($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\PrivateCloud::class); - $this->private_cloud = $var; - - return $this; - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `PrivateCloud` resource by the update. The fields specified in `updateMask` - * are relative to the resource, not the full request. A field will be - * overwritten if it is in the mask. If the user does not provide a mask then - * all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `PrivateCloud` resource by the update. The fields specified in `updateMask` - * are relative to the resource, not the full request. A field will be - * overwritten if it is in the mask. If the user does not provide a mask then - * all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateVmwareEngineNetworkRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateVmwareEngineNetworkRequest.php deleted file mode 100644 index 38f1091baa29..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateVmwareEngineNetworkRequest.php +++ /dev/null @@ -1,240 +0,0 @@ -google.cloud.vmwareengine.v1.UpdateVmwareEngineNetworkRequest - */ -class UpdateVmwareEngineNetworkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. VMware Engine network description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $vmware_engine_network = null; - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * VMware Engine network resource by the update. - * The fields specified in the `update_mask` are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. Only the - * following fields can be updated: `description`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $vmwareEngineNetwork Required. VMware Engine network description. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * VMware Engine network resource by the update. - * The fields specified in the `update_mask` are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. Only the - * following fields can be updated: `description`. - * - * @return \Google\Cloud\VmwareEngine\V1\UpdateVmwareEngineNetworkRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $vmwareEngineNetwork, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setVmwareEngineNetwork($vmwareEngineNetwork) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $vmware_engine_network - * Required. VMware Engine network description. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * VMware Engine network resource by the update. - * The fields specified in the `update_mask` are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. Only the - * following fields can be updated: `description`. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. VMware Engine network description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork|null - */ - public function getVmwareEngineNetwork() - { - return $this->vmware_engine_network; - } - - public function hasVmwareEngineNetwork() - { - return isset($this->vmware_engine_network); - } - - public function clearVmwareEngineNetwork() - { - unset($this->vmware_engine_network); - } - - /** - * Required. VMware Engine network description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $var - * @return $this - */ - public function setVmwareEngineNetwork($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork::class); - $this->vmware_engine_network = $var; - - return $this; - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * VMware Engine network resource by the update. - * The fields specified in the `update_mask` are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. Only the - * following fields can be updated: `description`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * VMware Engine network resource by the update. - * The fields specified in the `update_mask` are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. Only the - * following fields can be updated: `description`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter.php deleted file mode 100644 index 1d7fb8297ae3..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.vmwareengine.v1.Vcenter - */ -class Vcenter extends \Google\Protobuf\Internal\Message -{ - /** - * Internal IP address of the appliance. - * - * Generated from protobuf field string internal_ip = 2; - */ - protected $internal_ip = ''; - /** - * Version of the appliance. - * - * Generated from protobuf field string version = 4; - */ - protected $version = ''; - /** - * Output only. The state of the appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Fully qualified domain name of the appliance. - * - * Generated from protobuf field string fqdn = 6; - */ - protected $fqdn = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $internal_ip - * Internal IP address of the appliance. - * @type string $version - * Version of the appliance. - * @type int $state - * Output only. The state of the appliance. - * @type string $fqdn - * Fully qualified domain name of the appliance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Internal IP address of the appliance. - * - * Generated from protobuf field string internal_ip = 2; - * @return string - */ - public function getInternalIp() - { - return $this->internal_ip; - } - - /** - * Internal IP address of the appliance. - * - * Generated from protobuf field string internal_ip = 2; - * @param string $var - * @return $this - */ - public function setInternalIp($var) - { - GPBUtil::checkString($var, True); - $this->internal_ip = $var; - - return $this; - } - - /** - * Version of the appliance. - * - * Generated from protobuf field string version = 4; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Version of the appliance. - * - * Generated from protobuf field string version = 4; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Output only. The state of the appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\Vcenter\State::class); - $this->state = $var; - - return $this; - } - - /** - * Fully qualified domain name of the appliance. - * - * Generated from protobuf field string fqdn = 6; - * @return string - */ - public function getFqdn() - { - return $this->fqdn; - } - - /** - * Fully qualified domain name of the appliance. - * - * Generated from protobuf field string fqdn = 6; - * @param string $var - * @return $this - */ - public function setFqdn($var) - { - GPBUtil::checkString($var, True); - $this->fqdn = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter/State.php deleted file mode 100644 index 37b87d5973f6..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter/State.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.vmwareengine.v1.Vcenter.State - */ -class State -{ - /** - * Unspecified appliance state. This is the default value. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The appliance is operational and can be used. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The appliance is being deployed. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::CREATING => 'CREATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\Vcenter_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineGrpcClient.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineGrpcClient.php deleted file mode 100644 index 1600c3f6b886..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineGrpcClient.php +++ /dev/null @@ -1,566 +0,0 @@ -_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/ListPrivateClouds', - $argument, - ['\Google\Cloud\VmwareEngine\V1\ListPrivateCloudsResponse', 'decode'], - $metadata, $options); - } - - /** - * Retrieves a `PrivateCloud` resource by its resource name. - * @param \Google\Cloud\VmwareEngine\V1\GetPrivateCloudRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetPrivateCloud(\Google\Cloud\VmwareEngine\V1\GetPrivateCloudRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/GetPrivateCloud', - $argument, - ['\Google\Cloud\VmwareEngine\V1\PrivateCloud', 'decode'], - $metadata, $options); - } - - /** - * Creates a new `PrivateCloud` resource in a given project and location. - * Private clouds can only be created in zones, regional private clouds are - * not supported. - * - * Creating a private cloud also creates a [management - * cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) - * for that private cloud. - * @param \Google\Cloud\VmwareEngine\V1\CreatePrivateCloudRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreatePrivateCloud(\Google\Cloud\VmwareEngine\V1\CreatePrivateCloudRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/CreatePrivateCloud', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Modifies a `PrivateCloud` resource. Only the following fields can be - * updated: `description`. - * Only fields specified in `updateMask` are applied. - * - * During operation processing, the resource is temporarily in the `ACTIVE` - * state before the operation fully completes. For that period of time, you - * can't update the resource. Use the operation status to determine when the - * processing fully completes. - * @param \Google\Cloud\VmwareEngine\V1\UpdatePrivateCloudRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdatePrivateCloud(\Google\Cloud\VmwareEngine\V1\UpdatePrivateCloudRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/UpdatePrivateCloud', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Schedules a `PrivateCloud` resource for deletion. - * - * A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` - * set to `DELETED` and `expireTime` set to the time when deletion is final - * and can no longer be reversed. The delete operation is marked as done - * as soon as the `PrivateCloud` is successfully scheduled for deletion - * (this also applies when `delayHours` is set to zero), and the operation is - * not kept in pending state until `PrivateCloud` is purged. - * `PrivateCloud` can be restored using `UndeletePrivateCloud` method before - * the `expireTime` elapses. When `expireTime` is reached, deletion is final - * and all private cloud resources are irreversibly removed and billing stops. - * During the final removal process, `PrivateCloud.state` is set to `PURGING`. - * `PrivateCloud` can be polled using standard `GET` method for the whole - * period of deletion and purging. It will not be returned only - * when it is completely purged. - * @param \Google\Cloud\VmwareEngine\V1\DeletePrivateCloudRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeletePrivateCloud(\Google\Cloud\VmwareEngine\V1\DeletePrivateCloudRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/DeletePrivateCloud', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Restores a private cloud that was previously scheduled for deletion by - * `DeletePrivateCloud`. A `PrivateCloud` resource scheduled for deletion has - * `PrivateCloud.state` set to `DELETED` and `PrivateCloud.expireTime` set to - * the time when deletion can no longer be reversed. - * @param \Google\Cloud\VmwareEngine\V1\UndeletePrivateCloudRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UndeletePrivateCloud(\Google\Cloud\VmwareEngine\V1\UndeletePrivateCloudRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/UndeletePrivateCloud', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists `Cluster` resources in a given private cloud. - * @param \Google\Cloud\VmwareEngine\V1\ListClustersRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListClusters(\Google\Cloud\VmwareEngine\V1\ListClustersRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/ListClusters', - $argument, - ['\Google\Cloud\VmwareEngine\V1\ListClustersResponse', 'decode'], - $metadata, $options); - } - - /** - * Retrieves a `Cluster` resource by its resource name. - * @param \Google\Cloud\VmwareEngine\V1\GetClusterRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetCluster(\Google\Cloud\VmwareEngine\V1\GetClusterRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/GetCluster', - $argument, - ['\Google\Cloud\VmwareEngine\V1\Cluster', 'decode'], - $metadata, $options); - } - - /** - * Creates a new cluster in a given private cloud. - * Creating a new cluster provides additional nodes for - * use in the parent private cloud and requires sufficient [node - * quota](https://cloud.google.com/vmware-engine/quotas). - * @param \Google\Cloud\VmwareEngine\V1\CreateClusterRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateCluster(\Google\Cloud\VmwareEngine\V1\CreateClusterRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/CreateCluster', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Modifies a `Cluster` resource. Only the following fields can be updated: - * `node_type_configs.*.node_count`. Only fields specified in `updateMask` are - * applied. - * - * During operation processing, the resource is temporarily in the `ACTIVE` - * state before the operation fully completes. For that period of time, you - * can't update the resource. Use the operation status to determine when the - * processing fully completes. - * @param \Google\Cloud\VmwareEngine\V1\UpdateClusterRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateCluster(\Google\Cloud\VmwareEngine\V1\UpdateClusterRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/UpdateCluster', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes a `Cluster` resource. To avoid unintended data loss, migrate or - * gracefully shut down any workloads running on the cluster before deletion. - * You cannot delete the management cluster of a private cloud using this - * method. - * @param \Google\Cloud\VmwareEngine\V1\DeleteClusterRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteCluster(\Google\Cloud\VmwareEngine\V1\DeleteClusterRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/DeleteCluster', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists subnets in a given private cloud. - * @param \Google\Cloud\VmwareEngine\V1\ListSubnetsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListSubnets(\Google\Cloud\VmwareEngine\V1\ListSubnetsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/ListSubnets', - $argument, - ['\Google\Cloud\VmwareEngine\V1\ListSubnetsResponse', 'decode'], - $metadata, $options); - } - - /** - * Lists node types - * @param \Google\Cloud\VmwareEngine\V1\ListNodeTypesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListNodeTypes(\Google\Cloud\VmwareEngine\V1\ListNodeTypesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/ListNodeTypes', - $argument, - ['\Google\Cloud\VmwareEngine\V1\ListNodeTypesResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets details of a single `NodeType`. - * @param \Google\Cloud\VmwareEngine\V1\GetNodeTypeRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetNodeType(\Google\Cloud\VmwareEngine\V1\GetNodeTypeRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/GetNodeType', - $argument, - ['\Google\Cloud\VmwareEngine\V1\NodeType', 'decode'], - $metadata, $options); - } - - /** - * Gets details of credentials for NSX appliance. - * @param \Google\Cloud\VmwareEngine\V1\ShowNsxCredentialsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ShowNsxCredentials(\Google\Cloud\VmwareEngine\V1\ShowNsxCredentialsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/ShowNsxCredentials', - $argument, - ['\Google\Cloud\VmwareEngine\V1\Credentials', 'decode'], - $metadata, $options); - } - - /** - * Gets details of credentials for Vcenter appliance. - * @param \Google\Cloud\VmwareEngine\V1\ShowVcenterCredentialsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ShowVcenterCredentials(\Google\Cloud\VmwareEngine\V1\ShowVcenterCredentialsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/ShowVcenterCredentials', - $argument, - ['\Google\Cloud\VmwareEngine\V1\Credentials', 'decode'], - $metadata, $options); - } - - /** - * Resets credentials of the NSX appliance. - * @param \Google\Cloud\VmwareEngine\V1\ResetNsxCredentialsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ResetNsxCredentials(\Google\Cloud\VmwareEngine\V1\ResetNsxCredentialsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/ResetNsxCredentials', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Resets credentials of the Vcenter appliance. - * @param \Google\Cloud\VmwareEngine\V1\ResetVcenterCredentialsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ResetVcenterCredentials(\Google\Cloud\VmwareEngine\V1\ResetVcenterCredentialsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/ResetVcenterCredentials', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Creates a new HCX activation key in a given private cloud. - * @param \Google\Cloud\VmwareEngine\V1\CreateHcxActivationKeyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateHcxActivationKey(\Google\Cloud\VmwareEngine\V1\CreateHcxActivationKeyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/CreateHcxActivationKey', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists `HcxActivationKey` resources in a given private cloud. - * @param \Google\Cloud\VmwareEngine\V1\ListHcxActivationKeysRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListHcxActivationKeys(\Google\Cloud\VmwareEngine\V1\ListHcxActivationKeysRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/ListHcxActivationKeys', - $argument, - ['\Google\Cloud\VmwareEngine\V1\ListHcxActivationKeysResponse', 'decode'], - $metadata, $options); - } - - /** - * Retrieves a `HcxActivationKey` resource by its resource name. - * @param \Google\Cloud\VmwareEngine\V1\GetHcxActivationKeyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetHcxActivationKey(\Google\Cloud\VmwareEngine\V1\GetHcxActivationKeyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/GetHcxActivationKey', - $argument, - ['\Google\Cloud\VmwareEngine\V1\HcxActivationKey', 'decode'], - $metadata, $options); - } - - /** - * Retrieves a `NetworkPolicy` resource by its resource name. - * @param \Google\Cloud\VmwareEngine\V1\GetNetworkPolicyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetNetworkPolicy(\Google\Cloud\VmwareEngine\V1\GetNetworkPolicyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/GetNetworkPolicy', - $argument, - ['\Google\Cloud\VmwareEngine\V1\NetworkPolicy', 'decode'], - $metadata, $options); - } - - /** - * Lists `NetworkPolicy` resources in a specified project and location. - * @param \Google\Cloud\VmwareEngine\V1\ListNetworkPoliciesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListNetworkPolicies(\Google\Cloud\VmwareEngine\V1\ListNetworkPoliciesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/ListNetworkPolicies', - $argument, - ['\Google\Cloud\VmwareEngine\V1\ListNetworkPoliciesResponse', 'decode'], - $metadata, $options); - } - - /** - * Creates a new network policy in a given VMware Engine network of a - * project and location (region). A new network policy cannot be created if - * another network policy already exists in the same scope. - * @param \Google\Cloud\VmwareEngine\V1\CreateNetworkPolicyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateNetworkPolicy(\Google\Cloud\VmwareEngine\V1\CreateNetworkPolicyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/CreateNetworkPolicy', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Modifies a `NetworkPolicy` resource. Only the following fields can be - * updated: `internet_access`, `external_ip`, `edge_services_cidr`. - * Only fields specified in `updateMask` are applied. When updating a network - * policy, the external IP network service can only be disabled if there are - * no external IP addresses present in the scope of the policy. Also, a - * `NetworkService` cannot be updated when `NetworkService.state` is set - * to `RECONCILING`. - * - * During operation processing, the resource is temporarily in the `ACTIVE` - * state before the operation fully completes. For that period of time, you - * can't update the resource. Use the operation status to determine when the - * processing fully completes. - * @param \Google\Cloud\VmwareEngine\V1\UpdateNetworkPolicyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateNetworkPolicy(\Google\Cloud\VmwareEngine\V1\UpdateNetworkPolicyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/UpdateNetworkPolicy', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes a `NetworkPolicy` resource. A network policy cannot be deleted - * when `NetworkService.state` is set to `RECONCILING` for either its external - * IP or internet access service. - * @param \Google\Cloud\VmwareEngine\V1\DeleteNetworkPolicyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteNetworkPolicy(\Google\Cloud\VmwareEngine\V1\DeleteNetworkPolicyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/DeleteNetworkPolicy', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Creates a new VMware Engine network that can be used by a private cloud. - * @param \Google\Cloud\VmwareEngine\V1\CreateVmwareEngineNetworkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateVmwareEngineNetwork(\Google\Cloud\VmwareEngine\V1\CreateVmwareEngineNetworkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/CreateVmwareEngineNetwork', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Modifies a VMware Engine network resource. Only the following fields can be - * updated: `description`. Only fields specified in `updateMask` are - * applied. - * @param \Google\Cloud\VmwareEngine\V1\UpdateVmwareEngineNetworkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateVmwareEngineNetwork(\Google\Cloud\VmwareEngine\V1\UpdateVmwareEngineNetworkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/UpdateVmwareEngineNetwork', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes a `VmwareEngineNetwork` resource. You can only delete a VMware - * Engine network after all resources that refer to it are deleted. For - * example, a private cloud, a network peering, and a network policy can all - * refer to the same VMware Engine network. - * @param \Google\Cloud\VmwareEngine\V1\DeleteVmwareEngineNetworkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteVmwareEngineNetwork(\Google\Cloud\VmwareEngine\V1\DeleteVmwareEngineNetworkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/DeleteVmwareEngineNetwork', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Retrieves a `VmwareEngineNetwork` resource by its resource name. The - * resource contains details of the VMware Engine network, such as its VMware - * Engine network type, peered networks in a service project, and state - * (for example, `CREATING`, `ACTIVE`, `DELETING`). - * @param \Google\Cloud\VmwareEngine\V1\GetVmwareEngineNetworkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetVmwareEngineNetwork(\Google\Cloud\VmwareEngine\V1\GetVmwareEngineNetworkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/GetVmwareEngineNetwork', - $argument, - ['\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork', 'decode'], - $metadata, $options); - } - - /** - * Lists `VmwareEngineNetwork` resources in a given project and location. - * @param \Google\Cloud\VmwareEngine\V1\ListVmwareEngineNetworksRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListVmwareEngineNetworks(\Google\Cloud\VmwareEngine\V1\ListVmwareEngineNetworksRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vmwareengine.v1.VmwareEngine/ListVmwareEngineNetworks', - $argument, - ['\Google\Cloud\VmwareEngine\V1\ListVmwareEngineNetworksResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork.php deleted file mode 100644 index 11b48b25b570..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork.php +++ /dev/null @@ -1,396 +0,0 @@ -google.cloud.vmwareengine.v1.VmwareEngineNetwork - */ -class VmwareEngineNetwork extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the VMware Engine network. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User-provided description for this VMware Engine network. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - /** - * Output only. VMware Engine service VPC networks that provide connectivity - * from a private cloud to customer projects, the internet, and other Google - * Cloud services. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork vpc_networks = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $vpc_networks; - /** - * Output only. State of the VMware Engine network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Required. VMware Engine network type. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.Type type = 8 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Checksum that may be sent on update and delete requests to ensure that the - * user-provided value is up to date before the server processes a request. - * The server computes checksums based on the value of other fields in the - * request. - * - * Generated from protobuf field string etag = 10; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the VMware Engine network. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of this resource. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last update time of this resource. - * @type string $description - * User-provided description for this VMware Engine network. - * @type array<\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\VpcNetwork>|\Google\Protobuf\Internal\RepeatedField $vpc_networks - * Output only. VMware Engine service VPC networks that provide connectivity - * from a private cloud to customer projects, the internet, and other Google - * Cloud services. - * @type int $state - * Output only. State of the VMware Engine network. - * @type int $type - * Required. VMware Engine network type. - * @type string $uid - * Output only. System-generated unique identifier for the resource. - * @type string $etag - * Checksum that may be sent on update and delete requests to ensure that the - * user-provided value is up to date before the server processes a request. - * The server computes checksums based on the value of other fields in the - * request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the VMware Engine network. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of the VMware Engine network. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * User-provided description for this VMware Engine network. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User-provided description for this VMware Engine network. - * - * Generated from protobuf field string description = 5; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. VMware Engine service VPC networks that provide connectivity - * from a private cloud to customer projects, the internet, and other Google - * Cloud services. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork vpc_networks = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVpcNetworks() - { - return $this->vpc_networks; - } - - /** - * Output only. VMware Engine service VPC networks that provide connectivity - * from a private cloud to customer projects, the internet, and other Google - * Cloud services. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork vpc_networks = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\VpcNetwork>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVpcNetworks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\VpcNetwork::class); - $this->vpc_networks = $arr; - - return $this; - } - - /** - * Output only. State of the VMware Engine network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the VMware Engine network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\State::class); - $this->state = $var; - - return $this; - } - - /** - * Required. VMware Engine network type. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.Type type = 8 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. VMware Engine network type. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.Type type = 8 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Checksum that may be sent on update and delete requests to ensure that the - * user-provided value is up to date before the server processes a request. - * The server computes checksums based on the value of other fields in the - * request. - * - * Generated from protobuf field string etag = 10; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Checksum that may be sent on update and delete requests to ensure that the - * user-provided value is up to date before the server processes a request. - * The server computes checksums based on the value of other fields in the - * request. - * - * Generated from protobuf field string etag = 10; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/State.php deleted file mode 100644 index 3f8a6067ccdb..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.vmwareengine.v1.VmwareEngineNetwork.State - */ -class State -{ - /** - * The default value. This value is used if the state is omitted. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The VMware Engine network is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The VMware Engine network is ready. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The VMware Engine network is being updated. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * The VMware Engine network is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::ACTIVE => 'ACTIVE', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/Type.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/Type.php deleted file mode 100644 index 6f14f3e4abee..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/Type.php +++ /dev/null @@ -1,59 +0,0 @@ -google.cloud.vmwareengine.v1.VmwareEngineNetwork.Type - */ -class Type -{ - /** - * The default value. This value should never be used. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Network type used by private clouds created in projects without a network - * of type `STANDARD`. This network type is no longer used for new VMware - * Engine private cloud deployments. - * - * Generated from protobuf enum LEGACY = 1; - */ - const LEGACY = 1; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::LEGACY => 'LEGACY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork_Type::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork.php deleted file mode 100644 index 9ef0665f0e7f..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork - */ -class VpcNetwork extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Type of VPC network (INTRANET, INTERNET, or - * GOOGLE_CLOUD) - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $type = 0; - /** - * Output only. The relative resource name of the service VPC network this - * VMware Engine network is attached to. For example: - * `projects/123123/global/networks/my-network` - * - * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $network = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Output only. Type of VPC network (INTRANET, INTERNET, or - * GOOGLE_CLOUD) - * @type string $network - * Output only. The relative resource name of the service VPC network this - * VMware Engine network is attached to. For example: - * `projects/123123/global/networks/my-network` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Type of VPC network (INTRANET, INTERNET, or - * GOOGLE_CLOUD) - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Output only. Type of VPC network (INTRANET, INTERNET, or - * GOOGLE_CLOUD) - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\VpcNetwork\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Output only. The relative resource name of the service VPC network this - * VMware Engine network is attached to. For example: - * `projects/123123/global/networks/my-network` - * - * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Output only. The relative resource name of the service VPC network this - * VMware Engine network is attached to. For example: - * `projects/123123/global/networks/my-network` - * - * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VpcNetwork::class, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork_VpcNetwork::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork/Type.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork/Type.php deleted file mode 100644 index 194c6e10931a..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork/Type.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork.Type - */ -class Type -{ - /** - * The default value. This value should never be used. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * VPC network that will be peered with a consumer VPC network or the - * intranet VPC of another VMware Engine network. Access a private cloud - * through Compute Engine VMs on a peered VPC network or an on-premises - * resource connected to a peered consumer VPC network. - * - * Generated from protobuf enum INTRANET = 1; - */ - const INTRANET = 1; - /** - * VPC network used for internet access to and from a private cloud. - * - * Generated from protobuf enum INTERNET = 2; - */ - const INTERNET = 2; - /** - * VPC network used for access to Google Cloud services like - * Cloud Storage. - * - * Generated from protobuf enum GOOGLE_CLOUD = 3; - */ - const GOOGLE_CLOUD = 3; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::INTRANET => 'INTRANET', - self::INTERNET => 'INTERNET', - self::GOOGLE_CLOUD => 'GOOGLE_CLOUD', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork_VpcNetwork_Type::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_cluster.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_cluster.php deleted file mode 100644 index 400fd2b82142..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_cluster.php +++ /dev/null @@ -1,111 +0,0 @@ -setNodeTypeConfigs($clusterNodeTypeConfigs); - $request = (new CreateClusterRequest()) - ->setParent($formattedParent) - ->setClusterId($clusterId) - ->setCluster($cluster); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->createCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Cluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - $clusterId = '[CLUSTER_ID]'; - - create_cluster_sample($formattedParent, $clusterId); -} -// [END vmwareengine_v1_generated_VmwareEngine_CreateCluster_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_hcx_activation_key.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_hcx_activation_key.php deleted file mode 100644 index b6a3e7c74f75..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_hcx_activation_key.php +++ /dev/null @@ -1,108 +0,0 @@ -setParent($formattedParent) - ->setHcxActivationKey($hcxActivationKey) - ->setHcxActivationKeyId($hcxActivationKeyId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->createHcxActivationKey($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var HcxActivationKey $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - $hcxActivationKeyId = '[HCX_ACTIVATION_KEY_ID]'; - - create_hcx_activation_key_sample($formattedParent, $hcxActivationKeyId); -} -// [END vmwareengine_v1_generated_VmwareEngine_CreateHcxActivationKey_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_policy.php deleted file mode 100644 index 484a50dbaf4f..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_policy.php +++ /dev/null @@ -1,115 +0,0 @@ -setEdgeServicesCidr($networkPolicyEdgeServicesCidr); - $request = (new CreateNetworkPolicyRequest()) - ->setParent($formattedParent) - ->setNetworkPolicyId($networkPolicyId) - ->setNetworkPolicy($networkPolicy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->createNetworkPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var NetworkPolicy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); - $networkPolicyId = '[NETWORK_POLICY_ID]'; - $networkPolicyEdgeServicesCidr = '[EDGE_SERVICES_CIDR]'; - - create_network_policy_sample($formattedParent, $networkPolicyId, $networkPolicyEdgeServicesCidr); -} -// [END vmwareengine_v1_generated_VmwareEngine_CreateNetworkPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_cloud.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_cloud.php deleted file mode 100644 index 427dae1c4b93..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_cloud.php +++ /dev/null @@ -1,139 +0,0 @@ -setManagementCidr($privateCloudNetworkConfigManagementCidr); - $privateCloudManagementClusterNodeTypeConfigs = []; - $privateCloudManagementCluster = (new ManagementCluster()) - ->setClusterId($privateCloudManagementClusterClusterId) - ->setNodeTypeConfigs($privateCloudManagementClusterNodeTypeConfigs); - $privateCloud = (new PrivateCloud()) - ->setNetworkConfig($privateCloudNetworkConfig) - ->setManagementCluster($privateCloudManagementCluster); - $request = (new CreatePrivateCloudRequest()) - ->setParent($formattedParent) - ->setPrivateCloudId($privateCloudId) - ->setPrivateCloud($privateCloud); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->createPrivateCloud($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PrivateCloud $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); - $privateCloudId = '[PRIVATE_CLOUD_ID]'; - $privateCloudNetworkConfigManagementCidr = '[MANAGEMENT_CIDR]'; - $privateCloudManagementClusterClusterId = '[CLUSTER_ID]'; - - create_private_cloud_sample( - $formattedParent, - $privateCloudId, - $privateCloudNetworkConfigManagementCidr, - $privateCloudManagementClusterClusterId - ); -} -// [END vmwareengine_v1_generated_VmwareEngine_CreatePrivateCloud_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_vmware_engine_network.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_vmware_engine_network.php deleted file mode 100644 index 6f75a8173983..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_vmware_engine_network.php +++ /dev/null @@ -1,118 +0,0 @@ -setType($vmwareEngineNetworkType); - $request = (new CreateVmwareEngineNetworkRequest()) - ->setParent($formattedParent) - ->setVmwareEngineNetworkId($vmwareEngineNetworkId) - ->setVmwareEngineNetwork($vmwareEngineNetwork); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->createVmwareEngineNetwork($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var VmwareEngineNetwork $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); - $vmwareEngineNetworkId = '[VMWARE_ENGINE_NETWORK_ID]'; - $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; - - create_vmware_engine_network_sample( - $formattedParent, - $vmwareEngineNetworkId, - $vmwareEngineNetworkType - ); -} -// [END vmwareengine_v1_generated_VmwareEngine_CreateVmwareEngineNetwork_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_cluster.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_cluster.php deleted file mode 100644 index c6ac9a48b0e9..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_cluster.php +++ /dev/null @@ -1,92 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->deleteCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmwareEngineClient::clusterName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]', - '[CLUSTER]' - ); - - delete_cluster_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_DeleteCluster_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_policy.php deleted file mode 100644 index a72032648ac2..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_policy.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->deleteNetworkPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmwareEngineClient::networkPolicyName( - '[PROJECT]', - '[LOCATION]', - '[NETWORK_POLICY]' - ); - - delete_network_policy_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_DeleteNetworkPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_cloud.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_cloud.php deleted file mode 100644 index df902eae06d6..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_cloud.php +++ /dev/null @@ -1,101 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->deletePrivateCloud($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PrivateCloud $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmwareEngineClient::privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - - delete_private_cloud_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_DeletePrivateCloud_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_vmware_engine_network.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_vmware_engine_network.php deleted file mode 100644 index f0efb858657b..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_vmware_engine_network.php +++ /dev/null @@ -1,91 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->deleteVmwareEngineNetwork($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmwareEngineClient::vmwareEngineNetworkName( - '[PROJECT]', - '[LOCATION]', - '[VMWARE_ENGINE_NETWORK]' - ); - - delete_vmware_engine_network_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_DeleteVmwareEngineNetwork_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_cluster.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_cluster.php deleted file mode 100644 index 04d93eab58e4..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_cluster.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Cluster $response */ - $response = $vmwareEngineClient->getCluster($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmwareEngineClient::clusterName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]', - '[CLUSTER]' - ); - - get_cluster_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetCluster_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_hcx_activation_key.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_hcx_activation_key.php deleted file mode 100644 index 062e39158490..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_hcx_activation_key.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var HcxActivationKey $response */ - $response = $vmwareEngineClient->getHcxActivationKey($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmwareEngineClient::hcxActivationKeyName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]', - '[HCX_ACTIVATION_KEY]' - ); - - get_hcx_activation_key_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetHcxActivationKey_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_iam_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_iam_policy.php deleted file mode 100644 index d7c3c7ff6c26..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $vmwareEngineClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetIamPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_location.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_location.php deleted file mode 100644 index be14be20fb6a..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vmwareengine_v1_generated_VmwareEngine_GetLocation_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_policy.php deleted file mode 100644 index 28fa5c73b42b..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_policy.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var NetworkPolicy $response */ - $response = $vmwareEngineClient->getNetworkPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmwareEngineClient::networkPolicyName( - '[PROJECT]', - '[LOCATION]', - '[NETWORK_POLICY]' - ); - - get_network_policy_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetNetworkPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node_type.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node_type.php deleted file mode 100644 index d3e9bf0e8d2e..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node_type.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var NodeType $response */ - $response = $vmwareEngineClient->getNodeType($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmwareEngineClient::nodeTypeName('[PROJECT]', '[LOCATION]', '[NODE_TYPE]'); - - get_node_type_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetNodeType_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_cloud.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_cloud.php deleted file mode 100644 index 48dc7564df1a..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_cloud.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PrivateCloud $response */ - $response = $vmwareEngineClient->getPrivateCloud($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmwareEngineClient::privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - - get_private_cloud_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetPrivateCloud_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_vmware_engine_network.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_vmware_engine_network.php deleted file mode 100644 index a41570d07ff7..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_vmware_engine_network.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var VmwareEngineNetwork $response */ - $response = $vmwareEngineClient->getVmwareEngineNetwork($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmwareEngineClient::vmwareEngineNetworkName( - '[PROJECT]', - '[LOCATION]', - '[VMWARE_ENGINE_NETWORK]' - ); - - get_vmware_engine_network_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetVmwareEngineNetwork_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_clusters.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_clusters.php deleted file mode 100644 index 3b83832311ce..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_clusters.php +++ /dev/null @@ -1,84 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->listClusters($request); - - /** @var Cluster $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - - list_clusters_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListClusters_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_hcx_activation_keys.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_hcx_activation_keys.php deleted file mode 100644 index 292a9a52195c..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_hcx_activation_keys.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->listHcxActivationKeys($request); - - /** @var HcxActivationKey $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - - list_hcx_activation_keys_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListHcxActivationKeys_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_locations.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_locations.php deleted file mode 100644 index d24341e9b4c6..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vmwareengine_v1_generated_VmwareEngine_ListLocations_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_policies.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_policies.php deleted file mode 100644 index 3655c8abbfad..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_policies.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->listNetworkPolicies($request); - - /** @var NetworkPolicy $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); - - list_network_policies_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListNetworkPolicies_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_node_types.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_node_types.php deleted file mode 100644 index 616008f6041d..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_node_types.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->listNodeTypes($request); - - /** @var NodeType $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); - - list_node_types_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListNodeTypes_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_clouds.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_clouds.php deleted file mode 100644 index 5d23ee78f3cd..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_clouds.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->listPrivateClouds($request); - - /** @var PrivateCloud $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); - - list_private_clouds_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListPrivateClouds_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_subnets.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_subnets.php deleted file mode 100644 index 01dcfa61ff5e..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_subnets.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->listSubnets($request); - - /** @var Subnet $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - - list_subnets_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListSubnets_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_vmware_engine_networks.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_vmware_engine_networks.php deleted file mode 100644 index 295d9952b969..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_vmware_engine_networks.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->listVmwareEngineNetworks($request); - - /** @var VmwareEngineNetwork $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); - - list_vmware_engine_networks_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListVmwareEngineNetworks_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_nsx_credentials.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_nsx_credentials.php deleted file mode 100644 index eeb9f21c8fa4..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_nsx_credentials.php +++ /dev/null @@ -1,92 +0,0 @@ -setPrivateCloud($formattedPrivateCloud); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->resetNsxCredentials($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PrivateCloud $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedPrivateCloud = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - - reset_nsx_credentials_sample($formattedPrivateCloud); -} -// [END vmwareengine_v1_generated_VmwareEngine_ResetNsxCredentials_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_vcenter_credentials.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_vcenter_credentials.php deleted file mode 100644 index 50d291a7a94d..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_vcenter_credentials.php +++ /dev/null @@ -1,92 +0,0 @@ -setPrivateCloud($formattedPrivateCloud); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->resetVcenterCredentials($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PrivateCloud $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedPrivateCloud = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - - reset_vcenter_credentials_sample($formattedPrivateCloud); -} -// [END vmwareengine_v1_generated_VmwareEngine_ResetVcenterCredentials_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/set_iam_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/set_iam_policy.php deleted file mode 100644 index c8464ef7fc2c..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $vmwareEngineClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END vmwareengine_v1_generated_VmwareEngine_SetIamPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_nsx_credentials.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_nsx_credentials.php deleted file mode 100644 index 450e5cdfd14c..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_nsx_credentials.php +++ /dev/null @@ -1,80 +0,0 @@ -setPrivateCloud($formattedPrivateCloud); - - // Call the API and handle any network failures. - try { - /** @var Credentials $response */ - $response = $vmwareEngineClient->showNsxCredentials($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedPrivateCloud = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - - show_nsx_credentials_sample($formattedPrivateCloud); -} -// [END vmwareengine_v1_generated_VmwareEngine_ShowNsxCredentials_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_vcenter_credentials.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_vcenter_credentials.php deleted file mode 100644 index f88b803b60b7..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_vcenter_credentials.php +++ /dev/null @@ -1,80 +0,0 @@ -setPrivateCloud($formattedPrivateCloud); - - // Call the API and handle any network failures. - try { - /** @var Credentials $response */ - $response = $vmwareEngineClient->showVcenterCredentials($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedPrivateCloud = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - - show_vcenter_credentials_sample($formattedPrivateCloud); -} -// [END vmwareengine_v1_generated_VmwareEngine_ShowVcenterCredentials_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/test_iam_permissions.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/test_iam_permissions.php deleted file mode 100644 index afd7da3c5cfe..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $vmwareEngineClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END vmwareengine_v1_generated_VmwareEngine_TestIamPermissions_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/undelete_private_cloud.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/undelete_private_cloud.php deleted file mode 100644 index dc624d92681e..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/undelete_private_cloud.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->undeletePrivateCloud($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PrivateCloud $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VmwareEngineClient::privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - - undelete_private_cloud_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_UndeletePrivateCloud_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_cluster.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_cluster.php deleted file mode 100644 index 22c7d81aa97b..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_cluster.php +++ /dev/null @@ -1,83 +0,0 @@ -setNodeTypeConfigs($clusterNodeTypeConfigs); - $request = (new UpdateClusterRequest()) - ->setUpdateMask($updateMask) - ->setCluster($cluster); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->updateCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Cluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vmwareengine_v1_generated_VmwareEngine_UpdateCluster_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_policy.php deleted file mode 100644 index e1df8f856a8c..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_policy.php +++ /dev/null @@ -1,101 +0,0 @@ -setEdgeServicesCidr($networkPolicyEdgeServicesCidr); - $updateMask = new FieldMask(); - $request = (new UpdateNetworkPolicyRequest()) - ->setNetworkPolicy($networkPolicy) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->updateNetworkPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var NetworkPolicy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $networkPolicyEdgeServicesCidr = '[EDGE_SERVICES_CIDR]'; - - update_network_policy_sample($networkPolicyEdgeServicesCidr); -} -// [END vmwareengine_v1_generated_VmwareEngine_UpdateNetworkPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_cloud.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_cloud.php deleted file mode 100644 index 990b0d5c9bfa..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_cloud.php +++ /dev/null @@ -1,118 +0,0 @@ -setManagementCidr($privateCloudNetworkConfigManagementCidr); - $privateCloudManagementClusterNodeTypeConfigs = []; - $privateCloudManagementCluster = (new ManagementCluster()) - ->setClusterId($privateCloudManagementClusterClusterId) - ->setNodeTypeConfigs($privateCloudManagementClusterNodeTypeConfigs); - $privateCloud = (new PrivateCloud()) - ->setNetworkConfig($privateCloudNetworkConfig) - ->setManagementCluster($privateCloudManagementCluster); - $updateMask = new FieldMask(); - $request = (new UpdatePrivateCloudRequest()) - ->setPrivateCloud($privateCloud) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->updatePrivateCloud($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PrivateCloud $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $privateCloudNetworkConfigManagementCidr = '[MANAGEMENT_CIDR]'; - $privateCloudManagementClusterClusterId = '[CLUSTER_ID]'; - - update_private_cloud_sample( - $privateCloudNetworkConfigManagementCidr, - $privateCloudManagementClusterClusterId - ); -} -// [END vmwareengine_v1_generated_VmwareEngine_UpdatePrivateCloud_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_vmware_engine_network.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_vmware_engine_network.php deleted file mode 100644 index 511d61bf7201..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_vmware_engine_network.php +++ /dev/null @@ -1,90 +0,0 @@ -setType($vmwareEngineNetworkType); - $updateMask = new FieldMask(); - $request = (new UpdateVmwareEngineNetworkRequest()) - ->setVmwareEngineNetwork($vmwareEngineNetwork) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->updateVmwareEngineNetwork($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var VmwareEngineNetwork $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; - - update_vmware_engine_network_sample($vmwareEngineNetworkType); -} -// [END vmwareengine_v1_generated_VmwareEngine_UpdateVmwareEngineNetwork_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/src/V1/Client/BaseClient/VmwareEngineBaseClient.php b/owl-bot-staging/VmwareEngine/v1/src/V1/Client/BaseClient/VmwareEngineBaseClient.php deleted file mode 100644 index 1dd6664b310d..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/src/V1/Client/BaseClient/VmwareEngineBaseClient.php +++ /dev/null @@ -1,1408 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/vmware_engine_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/vmware_engine_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/vmware_engine_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/vmware_engine_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a cluster - * resource. - * - * @param string $project - * @param string $location - * @param string $privateCloud - * @param string $cluster - * - * @return string The formatted cluster resource. - */ - public static function clusterName(string $project, string $location, string $privateCloud, string $cluster): string - { - return self::getPathTemplate('cluster')->render([ - 'project' => $project, - 'location' => $location, - 'private_cloud' => $privateCloud, - 'cluster' => $cluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * hcx_activation_key resource. - * - * @param string $project - * @param string $location - * @param string $privateCloud - * @param string $hcxActivationKey - * - * @return string The formatted hcx_activation_key resource. - */ - public static function hcxActivationKeyName(string $project, string $location, string $privateCloud, string $hcxActivationKey): string - { - return self::getPathTemplate('hcxActivationKey')->render([ - 'project' => $project, - 'location' => $location, - 'private_cloud' => $privateCloud, - 'hcx_activation_key' => $hcxActivationKey, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a network - * resource. - * - * @param string $project - * @param string $network - * - * @return string The formatted network resource. - */ - public static function networkName(string $project, string $network): string - { - return self::getPathTemplate('network')->render([ - 'project' => $project, - 'network' => $network, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * network_policy resource. - * - * @param string $project - * @param string $location - * @param string $networkPolicy - * - * @return string The formatted network_policy resource. - */ - public static function networkPolicyName(string $project, string $location, string $networkPolicy): string - { - return self::getPathTemplate('networkPolicy')->render([ - 'project' => $project, - 'location' => $location, - 'network_policy' => $networkPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a node_type - * resource. - * - * @param string $project - * @param string $location - * @param string $nodeType - * - * @return string The formatted node_type resource. - */ - public static function nodeTypeName(string $project, string $location, string $nodeType): string - { - return self::getPathTemplate('nodeType')->render([ - 'project' => $project, - 'location' => $location, - 'node_type' => $nodeType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * private_cloud resource. - * - * @param string $project - * @param string $location - * @param string $privateCloud - * - * @return string The formatted private_cloud resource. - */ - public static function privateCloudName(string $project, string $location, string $privateCloud): string - { - return self::getPathTemplate('privateCloud')->render([ - 'project' => $project, - 'location' => $location, - 'private_cloud' => $privateCloud, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * vmware_engine_network resource. - * - * @param string $project - * @param string $location - * @param string $vmwareEngineNetwork - * - * @return string The formatted vmware_engine_network resource. - */ - public static function vmwareEngineNetworkName(string $project, string $location, string $vmwareEngineNetwork): string - { - return self::getPathTemplate('vmwareEngineNetwork')->render([ - 'project' => $project, - 'location' => $location, - 'vmware_engine_network' => $vmwareEngineNetwork, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - cluster: projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster} - * - hcxActivationKey: projects/{project}/locations/{location}/privateClouds/{private_cloud}/hcxActivationKeys/{hcx_activation_key} - * - location: projects/{project}/locations/{location} - * - network: projects/{project}/global/networks/{network} - * - networkPolicy: projects/{project}/locations/{location}/networkPolicies/{network_policy} - * - nodeType: projects/{project}/locations/{location}/nodeTypes/{node_type} - * - privateCloud: projects/{project}/locations/{location}/privateClouds/{private_cloud} - * - vmwareEngineNetwork: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'vmwareengine.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new cluster in a given private cloud. - * Creating a new cluster provides additional nodes for - * use in the parent private cloud and requires sufficient [node - * quota](https://cloud.google.com/vmware-engine/quotas). - * - * The async variant is {@see self::createClusterAsync()} . - * - * @param CreateClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createCluster(CreateClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateCluster', $request, $callOptions)->wait(); - } - - /** - * Creates a new HCX activation key in a given private cloud. - * - * The async variant is {@see self::createHcxActivationKeyAsync()} . - * - * @param CreateHcxActivationKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createHcxActivationKey(CreateHcxActivationKeyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateHcxActivationKey', $request, $callOptions)->wait(); - } - - /** - * Creates a new network policy in a given VMware Engine network of a - * project and location (region). A new network policy cannot be created if - * another network policy already exists in the same scope. - * - * The async variant is {@see self::createNetworkPolicyAsync()} . - * - * @param CreateNetworkPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createNetworkPolicy(CreateNetworkPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateNetworkPolicy', $request, $callOptions)->wait(); - } - - /** - * Creates a new `PrivateCloud` resource in a given project and location. - * Private clouds can only be created in zones, regional private clouds are - * not supported. - * - * Creating a private cloud also creates a [management - * cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) - * for that private cloud. - * - * The async variant is {@see self::createPrivateCloudAsync()} . - * - * @param CreatePrivateCloudRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createPrivateCloud(CreatePrivateCloudRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreatePrivateCloud', $request, $callOptions)->wait(); - } - - /** - * Creates a new VMware Engine network that can be used by a private cloud. - * - * The async variant is {@see self::createVmwareEngineNetworkAsync()} . - * - * @param CreateVmwareEngineNetworkRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createVmwareEngineNetwork(CreateVmwareEngineNetworkRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateVmwareEngineNetwork', $request, $callOptions)->wait(); - } - - /** - * Deletes a `Cluster` resource. To avoid unintended data loss, migrate or - * gracefully shut down any workloads running on the cluster before deletion. - * You cannot delete the management cluster of a private cloud using this - * method. - * - * The async variant is {@see self::deleteClusterAsync()} . - * - * @param DeleteClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteCluster(DeleteClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteCluster', $request, $callOptions)->wait(); - } - - /** - * Deletes a `NetworkPolicy` resource. A network policy cannot be deleted - * when `NetworkService.state` is set to `RECONCILING` for either its external - * IP or internet access service. - * - * The async variant is {@see self::deleteNetworkPolicyAsync()} . - * - * @param DeleteNetworkPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteNetworkPolicy(DeleteNetworkPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteNetworkPolicy', $request, $callOptions)->wait(); - } - - /** - * Schedules a `PrivateCloud` resource for deletion. - * - * A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` - * set to `DELETED` and `expireTime` set to the time when deletion is final - * and can no longer be reversed. The delete operation is marked as done - * as soon as the `PrivateCloud` is successfully scheduled for deletion - * (this also applies when `delayHours` is set to zero), and the operation is - * not kept in pending state until `PrivateCloud` is purged. - * `PrivateCloud` can be restored using `UndeletePrivateCloud` method before - * the `expireTime` elapses. When `expireTime` is reached, deletion is final - * and all private cloud resources are irreversibly removed and billing stops. - * During the final removal process, `PrivateCloud.state` is set to `PURGING`. - * `PrivateCloud` can be polled using standard `GET` method for the whole - * period of deletion and purging. It will not be returned only - * when it is completely purged. - * - * The async variant is {@see self::deletePrivateCloudAsync()} . - * - * @param DeletePrivateCloudRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deletePrivateCloud(DeletePrivateCloudRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeletePrivateCloud', $request, $callOptions)->wait(); - } - - /** - * Deletes a `VmwareEngineNetwork` resource. You can only delete a VMware - * Engine network after all resources that refer to it are deleted. For - * example, a private cloud, a network peering, and a network policy can all - * refer to the same VMware Engine network. - * - * The async variant is {@see self::deleteVmwareEngineNetworkAsync()} . - * - * @param DeleteVmwareEngineNetworkRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteVmwareEngineNetwork(DeleteVmwareEngineNetworkRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteVmwareEngineNetwork', $request, $callOptions)->wait(); - } - - /** - * Retrieves a `Cluster` resource by its resource name. - * - * The async variant is {@see self::getClusterAsync()} . - * - * @param GetClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Cluster - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCluster(GetClusterRequest $request, array $callOptions = []): Cluster - { - return $this->startApiCall('GetCluster', $request, $callOptions)->wait(); - } - - /** - * Retrieves a `HcxActivationKey` resource by its resource name. - * - * The async variant is {@see self::getHcxActivationKeyAsync()} . - * - * @param GetHcxActivationKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return HcxActivationKey - * - * @throws ApiException Thrown if the API call fails. - */ - public function getHcxActivationKey(GetHcxActivationKeyRequest $request, array $callOptions = []): HcxActivationKey - { - return $this->startApiCall('GetHcxActivationKey', $request, $callOptions)->wait(); - } - - /** - * Retrieves a `NetworkPolicy` resource by its resource name. - * - * The async variant is {@see self::getNetworkPolicyAsync()} . - * - * @param GetNetworkPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return NetworkPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getNetworkPolicy(GetNetworkPolicyRequest $request, array $callOptions = []): NetworkPolicy - { - return $this->startApiCall('GetNetworkPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single `NodeType`. - * - * The async variant is {@see self::getNodeTypeAsync()} . - * - * @param GetNodeTypeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return NodeType - * - * @throws ApiException Thrown if the API call fails. - */ - public function getNodeType(GetNodeTypeRequest $request, array $callOptions = []): NodeType - { - return $this->startApiCall('GetNodeType', $request, $callOptions)->wait(); - } - - /** - * Retrieves a `PrivateCloud` resource by its resource name. - * - * The async variant is {@see self::getPrivateCloudAsync()} . - * - * @param GetPrivateCloudRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PrivateCloud - * - * @throws ApiException Thrown if the API call fails. - */ - public function getPrivateCloud(GetPrivateCloudRequest $request, array $callOptions = []): PrivateCloud - { - return $this->startApiCall('GetPrivateCloud', $request, $callOptions)->wait(); - } - - /** - * Retrieves a `VmwareEngineNetwork` resource by its resource name. The - * resource contains details of the VMware Engine network, such as its VMware - * Engine network type, peered networks in a service project, and state - * (for example, `CREATING`, `ACTIVE`, `DELETING`). - * - * The async variant is {@see self::getVmwareEngineNetworkAsync()} . - * - * @param GetVmwareEngineNetworkRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return VmwareEngineNetwork - * - * @throws ApiException Thrown if the API call fails. - */ - public function getVmwareEngineNetwork(GetVmwareEngineNetworkRequest $request, array $callOptions = []): VmwareEngineNetwork - { - return $this->startApiCall('GetVmwareEngineNetwork', $request, $callOptions)->wait(); - } - - /** - * Lists `Cluster` resources in a given private cloud. - * - * The async variant is {@see self::listClustersAsync()} . - * - * @param ListClustersRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listClusters(ListClustersRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListClusters', $request, $callOptions); - } - - /** - * Lists `HcxActivationKey` resources in a given private cloud. - * - * The async variant is {@see self::listHcxActivationKeysAsync()} . - * - * @param ListHcxActivationKeysRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listHcxActivationKeys(ListHcxActivationKeysRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListHcxActivationKeys', $request, $callOptions); - } - - /** - * Lists `NetworkPolicy` resources in a specified project and location. - * - * The async variant is {@see self::listNetworkPoliciesAsync()} . - * - * @param ListNetworkPoliciesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listNetworkPolicies(ListNetworkPoliciesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListNetworkPolicies', $request, $callOptions); - } - - /** - * Lists node types - * - * The async variant is {@see self::listNodeTypesAsync()} . - * - * @param ListNodeTypesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listNodeTypes(ListNodeTypesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListNodeTypes', $request, $callOptions); - } - - /** - * Lists `PrivateCloud` resources in a given project and location. - * - * The async variant is {@see self::listPrivateCloudsAsync()} . - * - * @param ListPrivateCloudsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listPrivateClouds(ListPrivateCloudsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPrivateClouds', $request, $callOptions); - } - - /** - * Lists subnets in a given private cloud. - * - * The async variant is {@see self::listSubnetsAsync()} . - * - * @param ListSubnetsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listSubnets(ListSubnetsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSubnets', $request, $callOptions); - } - - /** - * Lists `VmwareEngineNetwork` resources in a given project and location. - * - * The async variant is {@see self::listVmwareEngineNetworksAsync()} . - * - * @param ListVmwareEngineNetworksRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listVmwareEngineNetworks(ListVmwareEngineNetworksRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListVmwareEngineNetworks', $request, $callOptions); - } - - /** - * Resets credentials of the NSX appliance. - * - * The async variant is {@see self::resetNsxCredentialsAsync()} . - * - * @param ResetNsxCredentialsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function resetNsxCredentials(ResetNsxCredentialsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ResetNsxCredentials', $request, $callOptions)->wait(); - } - - /** - * Resets credentials of the Vcenter appliance. - * - * The async variant is {@see self::resetVcenterCredentialsAsync()} . - * - * @param ResetVcenterCredentialsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function resetVcenterCredentials(ResetVcenterCredentialsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ResetVcenterCredentials', $request, $callOptions)->wait(); - } - - /** - * Gets details of credentials for NSX appliance. - * - * The async variant is {@see self::showNsxCredentialsAsync()} . - * - * @param ShowNsxCredentialsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Credentials - * - * @throws ApiException Thrown if the API call fails. - */ - public function showNsxCredentials(ShowNsxCredentialsRequest $request, array $callOptions = []): Credentials - { - return $this->startApiCall('ShowNsxCredentials', $request, $callOptions)->wait(); - } - - /** - * Gets details of credentials for Vcenter appliance. - * - * The async variant is {@see self::showVcenterCredentialsAsync()} . - * - * @param ShowVcenterCredentialsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Credentials - * - * @throws ApiException Thrown if the API call fails. - */ - public function showVcenterCredentials(ShowVcenterCredentialsRequest $request, array $callOptions = []): Credentials - { - return $this->startApiCall('ShowVcenterCredentials', $request, $callOptions)->wait(); - } - - /** - * Restores a private cloud that was previously scheduled for deletion by - * `DeletePrivateCloud`. A `PrivateCloud` resource scheduled for deletion has - * `PrivateCloud.state` set to `DELETED` and `PrivateCloud.expireTime` set to - * the time when deletion can no longer be reversed. - * - * The async variant is {@see self::undeletePrivateCloudAsync()} . - * - * @param UndeletePrivateCloudRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function undeletePrivateCloud(UndeletePrivateCloudRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UndeletePrivateCloud', $request, $callOptions)->wait(); - } - - /** - * Modifies a `Cluster` resource. Only the following fields can be updated: - * `node_type_configs.*.node_count`. Only fields specified in `updateMask` are - * applied. - * - * During operation processing, the resource is temporarily in the `ACTIVE` - * state before the operation fully completes. For that period of time, you - * can't update the resource. Use the operation status to determine when the - * processing fully completes. - * - * The async variant is {@see self::updateClusterAsync()} . - * - * @param UpdateClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateCluster(UpdateClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateCluster', $request, $callOptions)->wait(); - } - - /** - * Modifies a `NetworkPolicy` resource. Only the following fields can be - * updated: `internet_access`, `external_ip`, `edge_services_cidr`. - * Only fields specified in `updateMask` are applied. When updating a network - * policy, the external IP network service can only be disabled if there are - * no external IP addresses present in the scope of the policy. Also, a - * `NetworkService` cannot be updated when `NetworkService.state` is set - * to `RECONCILING`. - * - * During operation processing, the resource is temporarily in the `ACTIVE` - * state before the operation fully completes. For that period of time, you - * can't update the resource. Use the operation status to determine when the - * processing fully completes. - * - * The async variant is {@see self::updateNetworkPolicyAsync()} . - * - * @param UpdateNetworkPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateNetworkPolicy(UpdateNetworkPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateNetworkPolicy', $request, $callOptions)->wait(); - } - - /** - * Modifies a `PrivateCloud` resource. Only the following fields can be - * updated: `description`. - * Only fields specified in `updateMask` are applied. - * - * During operation processing, the resource is temporarily in the `ACTIVE` - * state before the operation fully completes. For that period of time, you - * can't update the resource. Use the operation status to determine when the - * processing fully completes. - * - * The async variant is {@see self::updatePrivateCloudAsync()} . - * - * @param UpdatePrivateCloudRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updatePrivateCloud(UpdatePrivateCloudRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdatePrivateCloud', $request, $callOptions)->wait(); - } - - /** - * Modifies a VMware Engine network resource. Only the following fields can be - * updated: `description`. Only fields specified in `updateMask` are - * applied. - * - * The async variant is {@see self::updateVmwareEngineNetworkAsync()} . - * - * @param UpdateVmwareEngineNetworkRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateVmwareEngineNetwork(UpdateVmwareEngineNetworkRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateVmwareEngineNetwork', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see self::getLocationAsync()} . - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see self::listLocationsAsync()} . - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see self::getIamPolicyAsync()} . - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see self::setIamPolicyAsync()} . - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see self::testIamPermissionsAsync()} . - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/VmwareEngine/v1/src/V1/Client/VmwareEngineClient.php b/owl-bot-staging/VmwareEngine/v1/src/V1/Client/VmwareEngineClient.php deleted file mode 100644 index e10617998cd4..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/src/V1/Client/VmwareEngineClient.php +++ /dev/null @@ -1,40 +0,0 @@ -privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - * $clusterId = 'cluster_id'; - * $cluster = new Cluster(); - * $operationResponse = $vmwareEngineClient->createCluster($formattedParent, $clusterId, $cluster); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmwareEngineClient->createCluster($formattedParent, $clusterId, $cluster); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'createCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - */ -class VmwareEngineGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.vmwareengine.v1.VmwareEngine'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'vmwareengine.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $clusterNameTemplate; - - private static $hcxActivationKeyNameTemplate; - - private static $locationNameTemplate; - - private static $networkNameTemplate; - - private static $networkPolicyNameTemplate; - - private static $nodeTypeNameTemplate; - - private static $privateCloudNameTemplate; - - private static $vmwareEngineNetworkNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/vmware_engine_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/vmware_engine_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/vmware_engine_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/vmware_engine_rest_client_config.php', - ], - ], - ]; - } - - private static function getClusterNameTemplate() - { - if (self::$clusterNameTemplate == null) { - self::$clusterNameTemplate = new PathTemplate('projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}'); - } - - return self::$clusterNameTemplate; - } - - private static function getHcxActivationKeyNameTemplate() - { - if (self::$hcxActivationKeyNameTemplate == null) { - self::$hcxActivationKeyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/privateClouds/{private_cloud}/hcxActivationKeys/{hcx_activation_key}'); - } - - return self::$hcxActivationKeyNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getNetworkNameTemplate() - { - if (self::$networkNameTemplate == null) { - self::$networkNameTemplate = new PathTemplate('projects/{project}/global/networks/{network}'); - } - - return self::$networkNameTemplate; - } - - private static function getNetworkPolicyNameTemplate() - { - if (self::$networkPolicyNameTemplate == null) { - self::$networkPolicyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/networkPolicies/{network_policy}'); - } - - return self::$networkPolicyNameTemplate; - } - - private static function getNodeTypeNameTemplate() - { - if (self::$nodeTypeNameTemplate == null) { - self::$nodeTypeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/nodeTypes/{node_type}'); - } - - return self::$nodeTypeNameTemplate; - } - - private static function getPrivateCloudNameTemplate() - { - if (self::$privateCloudNameTemplate == null) { - self::$privateCloudNameTemplate = new PathTemplate('projects/{project}/locations/{location}/privateClouds/{private_cloud}'); - } - - return self::$privateCloudNameTemplate; - } - - private static function getVmwareEngineNetworkNameTemplate() - { - if (self::$vmwareEngineNetworkNameTemplate == null) { - self::$vmwareEngineNetworkNameTemplate = new PathTemplate('projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network}'); - } - - return self::$vmwareEngineNetworkNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'cluster' => self::getClusterNameTemplate(), - 'hcxActivationKey' => self::getHcxActivationKeyNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'network' => self::getNetworkNameTemplate(), - 'networkPolicy' => self::getNetworkPolicyNameTemplate(), - 'nodeType' => self::getNodeTypeNameTemplate(), - 'privateCloud' => self::getPrivateCloudNameTemplate(), - 'vmwareEngineNetwork' => self::getVmwareEngineNetworkNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a cluster - * resource. - * - * @param string $project - * @param string $location - * @param string $privateCloud - * @param string $cluster - * - * @return string The formatted cluster resource. - */ - public static function clusterName($project, $location, $privateCloud, $cluster) - { - return self::getClusterNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'private_cloud' => $privateCloud, - 'cluster' => $cluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * hcx_activation_key resource. - * - * @param string $project - * @param string $location - * @param string $privateCloud - * @param string $hcxActivationKey - * - * @return string The formatted hcx_activation_key resource. - */ - public static function hcxActivationKeyName($project, $location, $privateCloud, $hcxActivationKey) - { - return self::getHcxActivationKeyNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'private_cloud' => $privateCloud, - 'hcx_activation_key' => $hcxActivationKey, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a network - * resource. - * - * @param string $project - * @param string $network - * - * @return string The formatted network resource. - */ - public static function networkName($project, $network) - { - return self::getNetworkNameTemplate()->render([ - 'project' => $project, - 'network' => $network, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * network_policy resource. - * - * @param string $project - * @param string $location - * @param string $networkPolicy - * - * @return string The formatted network_policy resource. - */ - public static function networkPolicyName($project, $location, $networkPolicy) - { - return self::getNetworkPolicyNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'network_policy' => $networkPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a node_type - * resource. - * - * @param string $project - * @param string $location - * @param string $nodeType - * - * @return string The formatted node_type resource. - */ - public static function nodeTypeName($project, $location, $nodeType) - { - return self::getNodeTypeNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'node_type' => $nodeType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * private_cloud resource. - * - * @param string $project - * @param string $location - * @param string $privateCloud - * - * @return string The formatted private_cloud resource. - */ - public static function privateCloudName($project, $location, $privateCloud) - { - return self::getPrivateCloudNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'private_cloud' => $privateCloud, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * vmware_engine_network resource. - * - * @param string $project - * @param string $location - * @param string $vmwareEngineNetwork - * - * @return string The formatted vmware_engine_network resource. - */ - public static function vmwareEngineNetworkName($project, $location, $vmwareEngineNetwork) - { - return self::getVmwareEngineNetworkNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'vmware_engine_network' => $vmwareEngineNetwork, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - cluster: projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster} - * - hcxActivationKey: projects/{project}/locations/{location}/privateClouds/{private_cloud}/hcxActivationKeys/{hcx_activation_key} - * - location: projects/{project}/locations/{location} - * - network: projects/{project}/global/networks/{network} - * - networkPolicy: projects/{project}/locations/{location}/networkPolicies/{network_policy} - * - nodeType: projects/{project}/locations/{location}/nodeTypes/{node_type} - * - privateCloud: projects/{project}/locations/{location}/privateClouds/{private_cloud} - * - vmwareEngineNetwork: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'vmwareengine.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a new cluster in a given private cloud. - * Creating a new cluster provides additional nodes for - * use in the parent private cloud and requires sufficient [node - * quota](https://cloud.google.com/vmware-engine/quotas). - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedParent = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - * $clusterId = 'cluster_id'; - * $cluster = new Cluster(); - * $operationResponse = $vmwareEngineClient->createCluster($formattedParent, $clusterId, $cluster); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmwareEngineClient->createCluster($formattedParent, $clusterId, $cluster); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'createCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the private cloud to create a new cluster - * in. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @param string $clusterId Required. The user-provided identifier of the new `Cluster`. - * This identifier must be unique among clusters within the parent and becomes - * the final token in the name URI. - * The identifier must meet the following requirements: - * - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * @param Cluster $cluster Required. The initial description of the new cluster. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validateOnly - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createCluster($parent, $clusterId, $cluster, array $optionalArgs = []) - { - $request = new CreateClusterRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setClusterId($clusterId); - $request->setCluster($cluster); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a new HCX activation key in a given private cloud. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedParent = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - * $hcxActivationKey = new HcxActivationKey(); - * $hcxActivationKeyId = 'hcx_activation_key_id'; - * $operationResponse = $vmwareEngineClient->createHcxActivationKey($formattedParent, $hcxActivationKey, $hcxActivationKeyId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmwareEngineClient->createHcxActivationKey($formattedParent, $hcxActivationKey, $hcxActivationKeyId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'createHcxActivationKey'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the private cloud to create the key for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud` - * @param HcxActivationKey $hcxActivationKey Required. The initial description of a new HCX activation key. When - * creating a new key, this field must be an empty object. - * @param string $hcxActivationKeyId Required. The user-provided identifier of the `HcxActivationKey` to be - * created. This identifier must be unique among `HcxActivationKey` resources - * within the parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createHcxActivationKey($parent, $hcxActivationKey, $hcxActivationKeyId, array $optionalArgs = []) - { - $request = new CreateHcxActivationKeyRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setHcxActivationKey($hcxActivationKey); - $request->setHcxActivationKeyId($hcxActivationKeyId); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateHcxActivationKey', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a new network policy in a given VMware Engine network of a - * project and location (region). A new network policy cannot be created if - * another network policy already exists in the same scope. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedParent = $vmwareEngineClient->locationName('[PROJECT]', '[LOCATION]'); - * $networkPolicyId = 'network_policy_id'; - * $networkPolicy = new NetworkPolicy(); - * $operationResponse = $vmwareEngineClient->createNetworkPolicy($formattedParent, $networkPolicyId, $networkPolicy); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmwareEngineClient->createNetworkPolicy($formattedParent, $networkPolicyId, $networkPolicy); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'createNetworkPolicy'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the location (region) - * to create the new network policy in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1` - * @param string $networkPolicyId Required. The user-provided identifier of the network policy to be created. - * This identifier must be unique within parent - * `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes - * the final token in the name URI. - * The identifier must meet the following requirements: - * - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * @param NetworkPolicy $networkPolicy Required. The network policy configuration to use in the request. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createNetworkPolicy($parent, $networkPolicyId, $networkPolicy, array $optionalArgs = []) - { - $request = new CreateNetworkPolicyRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setNetworkPolicyId($networkPolicyId); - $request->setNetworkPolicy($networkPolicy); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateNetworkPolicy', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a new `PrivateCloud` resource in a given project and location. - * Private clouds can only be created in zones, regional private clouds are - * not supported. - * - * Creating a private cloud also creates a [management - * cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) - * for that private cloud. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedParent = $vmwareEngineClient->locationName('[PROJECT]', '[LOCATION]'); - * $privateCloudId = 'private_cloud_id'; - * $privateCloud = new PrivateCloud(); - * $operationResponse = $vmwareEngineClient->createPrivateCloud($formattedParent, $privateCloudId, $privateCloud); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmwareEngineClient->createPrivateCloud($formattedParent, $privateCloudId, $privateCloud); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'createPrivateCloud'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the location to create the new - * private cloud in. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * @param string $privateCloudId Required. The user-provided identifier of the private cloud to be created. - * This identifier must be unique among each `PrivateCloud` within the parent - * and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * @param PrivateCloud $privateCloud Required. The initial description of the new private cloud. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validateOnly - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createPrivateCloud($parent, $privateCloudId, $privateCloud, array $optionalArgs = []) - { - $request = new CreatePrivateCloudRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setPrivateCloudId($privateCloudId); - $request->setPrivateCloud($privateCloud); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreatePrivateCloud', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a new VMware Engine network that can be used by a private cloud. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedParent = $vmwareEngineClient->locationName('[PROJECT]', '[LOCATION]'); - * $vmwareEngineNetworkId = 'vmware_engine_network_id'; - * $vmwareEngineNetwork = new VmwareEngineNetwork(); - * $operationResponse = $vmwareEngineClient->createVmwareEngineNetwork($formattedParent, $vmwareEngineNetworkId, $vmwareEngineNetwork); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmwareEngineClient->createVmwareEngineNetwork($formattedParent, $vmwareEngineNetworkId, $vmwareEngineNetwork); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'createVmwareEngineNetwork'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the location to create the new VMware Engine - * network in. A VMware Engine network of type - * `LEGACY` is a regional resource, and a VMware - * Engine network of type `STANDARD` is a global resource. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global` - * @param string $vmwareEngineNetworkId Required. The user-provided identifier of the new VMware Engine network. - * This identifier must be unique among VMware Engine network resources - * within the parent and becomes the final token in the name URI. The - * identifier must meet the following requirements: - * - * * For networks of type LEGACY, adheres to the format: - * `{region-id}-default`. Replace `{region-id}` with the region where you want - * to create the VMware Engine network. For example, "us-central1-default". - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * @param VmwareEngineNetwork $vmwareEngineNetwork Required. The initial description of the new VMware Engine network. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createVmwareEngineNetwork($parent, $vmwareEngineNetworkId, $vmwareEngineNetwork, array $optionalArgs = []) - { - $request = new CreateVmwareEngineNetworkRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setVmwareEngineNetworkId($vmwareEngineNetworkId); - $request->setVmwareEngineNetwork($vmwareEngineNetwork); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateVmwareEngineNetwork', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a `Cluster` resource. To avoid unintended data loss, migrate or - * gracefully shut down any workloads running on the cluster before deletion. - * You cannot delete the management cluster of a private cloud using this - * method. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedName = $vmwareEngineClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]'); - * $operationResponse = $vmwareEngineClient->deleteCluster($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmwareEngineClient->deleteCluster($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'deleteCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the cluster to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteCluster($name, array $optionalArgs = []) - { - $request = new DeleteClusterRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a `NetworkPolicy` resource. A network policy cannot be deleted - * when `NetworkService.state` is set to `RECONCILING` for either its external - * IP or internet access service. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedName = $vmwareEngineClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); - * $operationResponse = $vmwareEngineClient->deleteNetworkPolicy($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmwareEngineClient->deleteNetworkPolicy($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'deleteNetworkPolicy'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the network policy to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteNetworkPolicy($name, array $optionalArgs = []) - { - $request = new DeleteNetworkPolicyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteNetworkPolicy', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Schedules a `PrivateCloud` resource for deletion. - * - * A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` - * set to `DELETED` and `expireTime` set to the time when deletion is final - * and can no longer be reversed. The delete operation is marked as done - * as soon as the `PrivateCloud` is successfully scheduled for deletion - * (this also applies when `delayHours` is set to zero), and the operation is - * not kept in pending state until `PrivateCloud` is purged. - * `PrivateCloud` can be restored using `UndeletePrivateCloud` method before - * the `expireTime` elapses. When `expireTime` is reached, deletion is final - * and all private cloud resources are irreversibly removed and billing stops. - * During the final removal process, `PrivateCloud.state` is set to `PURGING`. - * `PrivateCloud` can be polled using standard `GET` method for the whole - * period of deletion and purging. It will not be returned only - * when it is completely purged. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedName = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - * $operationResponse = $vmwareEngineClient->deletePrivateCloud($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmwareEngineClient->deletePrivateCloud($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'deletePrivateCloud'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the private cloud to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * @type bool $force - * Optional. If set to true, cascade delete is enabled and all children of - * this private cloud resource are also deleted. When this flag is set to - * false, the private cloud will not be deleted if there are any children - * other than the management cluster. The management cluster is always - * deleted. - * @type int $delayHours - * Optional. Time delay of the deletion specified in hours. The default value - * is `3`. Specifying a non-zero value for this field changes the value of - * `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned - * deletion time. Deletion can be cancelled before `expire_time` elapses using - * [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]. - * Specifying a value of `0` for this field instead begins the deletion - * process and ceases billing immediately. During the final deletion process, - * the value of `PrivateCloud.state` becomes `PURGING`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deletePrivateCloud($name, array $optionalArgs = []) - { - $request = new DeletePrivateCloudRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - if (isset($optionalArgs['force'])) { - $request->setForce($optionalArgs['force']); - } - - if (isset($optionalArgs['delayHours'])) { - $request->setDelayHours($optionalArgs['delayHours']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeletePrivateCloud', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a `VmwareEngineNetwork` resource. You can only delete a VMware - * Engine network after all resources that refer to it are deleted. For - * example, a private cloud, a network peering, and a network policy can all - * refer to the same VMware Engine network. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedName = $vmwareEngineClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); - * $operationResponse = $vmwareEngineClient->deleteVmwareEngineNetwork($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmwareEngineClient->deleteVmwareEngineNetwork($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'deleteVmwareEngineNetwork'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the VMware Engine network to be deleted. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type string $etag - * Optional. Checksum used to ensure that the user-provided value is up to - * date before the server processes the request. The server compares provided - * checksum with the current checksum of the resource. If the user-provided - * value is out of date, this request returns an `ABORTED` error. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteVmwareEngineNetwork($name, array $optionalArgs = []) - { - $request = new DeleteVmwareEngineNetworkRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteVmwareEngineNetwork', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Retrieves a `Cluster` resource by its resource name. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedName = $vmwareEngineClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]'); - * $response = $vmwareEngineClient->getCluster($formattedName); - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $name Required. The cluster resource name to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\VmwareEngine\V1\Cluster - * - * @throws ApiException if the remote call fails - */ - public function getCluster($name, array $optionalArgs = []) - { - $request = new GetClusterRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetCluster', Cluster::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves a `HcxActivationKey` resource by its resource name. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedName = $vmwareEngineClient->hcxActivationKeyName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[HCX_ACTIVATION_KEY]'); - * $response = $vmwareEngineClient->getHcxActivationKey($formattedName); - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the HCX activation key to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\VmwareEngine\V1\HcxActivationKey - * - * @throws ApiException if the remote call fails - */ - public function getHcxActivationKey($name, array $optionalArgs = []) - { - $request = new GetHcxActivationKeyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetHcxActivationKey', HcxActivationKey::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves a `NetworkPolicy` resource by its resource name. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedName = $vmwareEngineClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); - * $response = $vmwareEngineClient->getNetworkPolicy($formattedName); - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the network policy to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\VmwareEngine\V1\NetworkPolicy - * - * @throws ApiException if the remote call fails - */ - public function getNetworkPolicy($name, array $optionalArgs = []) - { - $request = new GetNetworkPolicyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetNetworkPolicy', NetworkPolicy::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets details of a single `NodeType`. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedName = $vmwareEngineClient->nodeTypeName('[PROJECT]', '[LOCATION]', '[NODE_TYPE]'); - * $response = $vmwareEngineClient->getNodeType($formattedName); - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the node type to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\VmwareEngine\V1\NodeType - * - * @throws ApiException if the remote call fails - */ - public function getNodeType($name, array $optionalArgs = []) - { - $request = new GetNodeTypeRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetNodeType', NodeType::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves a `PrivateCloud` resource by its resource name. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedName = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - * $response = $vmwareEngineClient->getPrivateCloud($formattedName); - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the private cloud to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\VmwareEngine\V1\PrivateCloud - * - * @throws ApiException if the remote call fails - */ - public function getPrivateCloud($name, array $optionalArgs = []) - { - $request = new GetPrivateCloudRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetPrivateCloud', PrivateCloud::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves a `VmwareEngineNetwork` resource by its resource name. The - * resource contains details of the VMware Engine network, such as its VMware - * Engine network type, peered networks in a service project, and state - * (for example, `CREATING`, `ACTIVE`, `DELETING`). - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedName = $vmwareEngineClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); - * $response = $vmwareEngineClient->getVmwareEngineNetwork($formattedName); - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the VMware Engine network to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork - * - * @throws ApiException if the remote call fails - */ - public function getVmwareEngineNetwork($name, array $optionalArgs = []) - { - $request = new GetVmwareEngineNetworkRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetVmwareEngineNetwork', VmwareEngineNetwork::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists `Cluster` resources in a given private cloud. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedParent = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - * // Iterate over pages of elements - * $pagedResponse = $vmwareEngineClient->listClusters($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $vmwareEngineClient->listClusters($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the private cloud to query for clusters. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-cluster") - * (nodeCount = "3") - * ``` - * - * By default, each expression is an `AND` expression. However, you can - * include `AND` and `OR` expressions explicitly. For example: - * ``` - * (name = "example-cluster-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-cluster-2") - * ``` - * @type string $orderBy - * Sorts list results by a certain order. By default, returned results are - * ordered by `name` in ascending order. You can also sort results in - * descending order based on the `name` value using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listClusters($parent, array $optionalArgs = []) - { - $request = new ListClustersRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListClusters', $optionalArgs, ListClustersResponse::class, $request); - } - - /** - * Lists `HcxActivationKey` resources in a given private cloud. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedParent = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - * // Iterate over pages of elements - * $pagedResponse = $vmwareEngineClient->listHcxActivationKeys($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $vmwareEngineClient->listHcxActivationKeys($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the private cloud - * to be queried for HCX activation keys. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listHcxActivationKeys($parent, array $optionalArgs = []) - { - $request = new ListHcxActivationKeysRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListHcxActivationKeys', $optionalArgs, ListHcxActivationKeysResponse::class, $request); - } - - /** - * Lists `NetworkPolicy` resources in a specified project and location. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedParent = $vmwareEngineClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $vmwareEngineClient->listNetworkPolicies($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $vmwareEngineClient->listNetworkPolicies($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the location (region) to query for - * network policies. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/us-central1` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * - * For example, if you are filtering a list of network policies, you can - * exclude the ones named `example-policy` by specifying - * `name != "example-policy"`. - * - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-policy") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-policy-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-policy-2") - * ``` - * @type string $orderBy - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listNetworkPolicies($parent, array $optionalArgs = []) - { - $request = new ListNetworkPoliciesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListNetworkPolicies', $optionalArgs, ListNetworkPoliciesResponse::class, $request); - } - - /** - * Lists node types - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedParent = $vmwareEngineClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $vmwareEngineClient->listNodeTypes($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $vmwareEngineClient->listNodeTypes($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the location to be queried for node types. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * - * For example, if you are filtering a list of node types, you can - * exclude the ones named `standard-72` by specifying - * `name != "standard-72"`. - * - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "standard-72") - * (virtual_cpu_count > 2) - * ``` - * - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "standard-96") AND - * (virtual_cpu_count > 2) OR - * (name = "standard-72") - * ``` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listNodeTypes($parent, array $optionalArgs = []) - { - $request = new ListNodeTypesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListNodeTypes', $optionalArgs, ListNodeTypesResponse::class, $request); - } - - /** - * Lists `PrivateCloud` resources in a given project and location. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedParent = $vmwareEngineClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $vmwareEngineClient->listPrivateClouds($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $vmwareEngineClient->listPrivateClouds($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the private cloud to be queried for - * clusters. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, a - * number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or - * `<`. - * - * For example, if you are filtering a list of private clouds, you can exclude - * the ones named `example-pc` by specifying `name != "example-pc"`. - * - * You can also filter nested fields. For example, you could specify - * `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds - * only if they have a matching address in their network configuration. - * - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-pc") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * - * By default, each expression is an `AND` expression. However, you can - * include `AND` and `OR` expressions explicitly. For example: - * ``` - * (name = "private-cloud-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "private-cloud-2") - * ``` - * @type string $orderBy - * Sorts list results by a certain order. By default, returned results are - * ordered by `name` in ascending order. You can also sort results in - * descending order based on the `name` value using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listPrivateClouds($parent, array $optionalArgs = []) - { - $request = new ListPrivateCloudsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListPrivateClouds', $optionalArgs, ListPrivateCloudsResponse::class, $request); - } - - /** - * Lists subnets in a given private cloud. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedParent = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - * // Iterate over pages of elements - * $pagedResponse = $vmwareEngineClient->listSubnets($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $vmwareEngineClient->listSubnets($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the private cloud to be queried for - * subnets. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listSubnets($parent, array $optionalArgs = []) - { - $request = new ListSubnetsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListSubnets', $optionalArgs, ListSubnetsResponse::class, $request); - } - - /** - * Lists `VmwareEngineNetwork` resources in a given project and location. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedParent = $vmwareEngineClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $vmwareEngineClient->listVmwareEngineNetworks($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $vmwareEngineClient->listVmwareEngineNetworks($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the location to query for - * VMware Engine networks. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/global` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * - * For example, if you are filtering a list of network peerings, you can - * exclude the ones named `example-network` by specifying - * `name != "example-network"`. - * - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-network") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-network-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-network-2") - * ``` - * @type string $orderBy - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listVmwareEngineNetworks($parent, array $optionalArgs = []) - { - $request = new ListVmwareEngineNetworksRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListVmwareEngineNetworks', $optionalArgs, ListVmwareEngineNetworksResponse::class, $request); - } - - /** - * Resets credentials of the NSX appliance. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedPrivateCloud = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - * $operationResponse = $vmwareEngineClient->resetNsxCredentials($formattedPrivateCloud); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmwareEngineClient->resetNsxCredentials($formattedPrivateCloud); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'resetNsxCredentials'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $privateCloud Required. The resource name of the private cloud - * to reset credentials for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function resetNsxCredentials($privateCloud, array $optionalArgs = []) - { - $request = new ResetNsxCredentialsRequest(); - $requestParamHeaders = []; - $request->setPrivateCloud($privateCloud); - $requestParamHeaders['private_cloud'] = $privateCloud; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ResetNsxCredentials', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Resets credentials of the Vcenter appliance. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedPrivateCloud = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - * $operationResponse = $vmwareEngineClient->resetVcenterCredentials($formattedPrivateCloud); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmwareEngineClient->resetVcenterCredentials($formattedPrivateCloud); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'resetVcenterCredentials'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $privateCloud Required. The resource name of the private cloud - * to reset credentials for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function resetVcenterCredentials($privateCloud, array $optionalArgs = []) - { - $request = new ResetVcenterCredentialsRequest(); - $requestParamHeaders = []; - $request->setPrivateCloud($privateCloud); - $requestParamHeaders['private_cloud'] = $privateCloud; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ResetVcenterCredentials', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets details of credentials for NSX appliance. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedPrivateCloud = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - * $response = $vmwareEngineClient->showNsxCredentials($formattedPrivateCloud); - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $privateCloud Required. The resource name of the private cloud - * to be queried for credentials. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\VmwareEngine\V1\Credentials - * - * @throws ApiException if the remote call fails - */ - public function showNsxCredentials($privateCloud, array $optionalArgs = []) - { - $request = new ShowNsxCredentialsRequest(); - $requestParamHeaders = []; - $request->setPrivateCloud($privateCloud); - $requestParamHeaders['private_cloud'] = $privateCloud; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ShowNsxCredentials', Credentials::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets details of credentials for Vcenter appliance. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedPrivateCloud = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - * $response = $vmwareEngineClient->showVcenterCredentials($formattedPrivateCloud); - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $privateCloud Required. The resource name of the private cloud - * to be queried for credentials. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\VmwareEngine\V1\Credentials - * - * @throws ApiException if the remote call fails - */ - public function showVcenterCredentials($privateCloud, array $optionalArgs = []) - { - $request = new ShowVcenterCredentialsRequest(); - $requestParamHeaders = []; - $request->setPrivateCloud($privateCloud); - $requestParamHeaders['private_cloud'] = $privateCloud; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ShowVcenterCredentials', Credentials::class, $optionalArgs, $request)->wait(); - } - - /** - * Restores a private cloud that was previously scheduled for deletion by - * `DeletePrivateCloud`. A `PrivateCloud` resource scheduled for deletion has - * `PrivateCloud.state` set to `DELETED` and `PrivateCloud.expireTime` set to - * the time when deletion can no longer be reversed. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $formattedName = $vmwareEngineClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - * $operationResponse = $vmwareEngineClient->undeletePrivateCloud($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmwareEngineClient->undeletePrivateCloud($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'undeletePrivateCloud'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the private cloud scheduled for deletion. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function undeletePrivateCloud($name, array $optionalArgs = []) - { - $request = new UndeletePrivateCloudRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UndeletePrivateCloud', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Modifies a `Cluster` resource. Only the following fields can be updated: - * `node_type_configs.*.node_count`. Only fields specified in `updateMask` are - * applied. - * - * During operation processing, the resource is temporarily in the `ACTIVE` - * state before the operation fully completes. For that period of time, you - * can't update the resource. Use the operation status to determine when the - * processing fully completes. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $updateMask = new FieldMask(); - * $cluster = new Cluster(); - * $operationResponse = $vmwareEngineClient->updateCluster($updateMask, $cluster); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmwareEngineClient->updateCluster($updateMask, $cluster); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'updateCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * `Cluster` resource by the update. The fields specified in the `updateMask` - * are relative to the resource, not the full request. A field will be - * overwritten if it is in the mask. If the user does not provide a mask then - * all fields will be overwritten. - * @param Cluster $cluster Required. The description of the cluster. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. The request ID must be a valid UUID with the exception that - * zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validateOnly - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateCluster($updateMask, $cluster, array $optionalArgs = []) - { - $request = new UpdateClusterRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - $request->setCluster($cluster); - $requestParamHeaders['cluster.name'] = $cluster->getName(); - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Modifies a `NetworkPolicy` resource. Only the following fields can be - * updated: `internet_access`, `external_ip`, `edge_services_cidr`. - * Only fields specified in `updateMask` are applied. When updating a network - * policy, the external IP network service can only be disabled if there are - * no external IP addresses present in the scope of the policy. Also, a - * `NetworkService` cannot be updated when `NetworkService.state` is set - * to `RECONCILING`. - * - * During operation processing, the resource is temporarily in the `ACTIVE` - * state before the operation fully completes. For that period of time, you - * can't update the resource. Use the operation status to determine when the - * processing fully completes. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $networkPolicy = new NetworkPolicy(); - * $updateMask = new FieldMask(); - * $operationResponse = $vmwareEngineClient->updateNetworkPolicy($networkPolicy, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmwareEngineClient->updateNetworkPolicy($networkPolicy, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'updateNetworkPolicy'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param NetworkPolicy $networkPolicy Required. Network policy description. - * @param FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * `NetworkPolicy` resource by the update. - * The fields specified in the `update_mask` are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateNetworkPolicy($networkPolicy, $updateMask, array $optionalArgs = []) - { - $request = new UpdateNetworkPolicyRequest(); - $requestParamHeaders = []; - $request->setNetworkPolicy($networkPolicy); - $request->setUpdateMask($updateMask); - $requestParamHeaders['network_policy.name'] = $networkPolicy->getName(); - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateNetworkPolicy', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Modifies a `PrivateCloud` resource. Only the following fields can be - * updated: `description`. - * Only fields specified in `updateMask` are applied. - * - * During operation processing, the resource is temporarily in the `ACTIVE` - * state before the operation fully completes. For that period of time, you - * can't update the resource. Use the operation status to determine when the - * processing fully completes. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $privateCloud = new PrivateCloud(); - * $updateMask = new FieldMask(); - * $operationResponse = $vmwareEngineClient->updatePrivateCloud($privateCloud, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmwareEngineClient->updatePrivateCloud($privateCloud, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'updatePrivateCloud'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param PrivateCloud $privateCloud Required. Private cloud description. - * @param FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * `PrivateCloud` resource by the update. The fields specified in `updateMask` - * are relative to the resource, not the full request. A field will be - * overwritten if it is in the mask. If the user does not provide a mask then - * all fields will be overwritten. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updatePrivateCloud($privateCloud, $updateMask, array $optionalArgs = []) - { - $request = new UpdatePrivateCloudRequest(); - $requestParamHeaders = []; - $request->setPrivateCloud($privateCloud); - $request->setUpdateMask($updateMask); - $requestParamHeaders['private_cloud.name'] = $privateCloud->getName(); - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdatePrivateCloud', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Modifies a VMware Engine network resource. Only the following fields can be - * updated: `description`. Only fields specified in `updateMask` are - * applied. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $vmwareEngineNetwork = new VmwareEngineNetwork(); - * $updateMask = new FieldMask(); - * $operationResponse = $vmwareEngineClient->updateVmwareEngineNetwork($vmwareEngineNetwork, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vmwareEngineClient->updateVmwareEngineNetwork($vmwareEngineNetwork, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vmwareEngineClient->resumeOperation($operationName, 'updateVmwareEngineNetwork'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param VmwareEngineNetwork $vmwareEngineNetwork Required. VMware Engine network description. - * @param FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * VMware Engine network resource by the update. - * The fields specified in the `update_mask` are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. Only the - * following fields can be updated: `description`. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateVmwareEngineNetwork($vmwareEngineNetwork, $updateMask, array $optionalArgs = []) - { - $request = new UpdateVmwareEngineNetworkRequest(); - $requestParamHeaders = []; - $request->setVmwareEngineNetwork($vmwareEngineNetwork); - $request->setUpdateMask($updateMask); - $requestParamHeaders['vmware_engine_network.name'] = $vmwareEngineNetwork->getName(); - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateVmwareEngineNetwork', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $response = $vmwareEngineClient->getLocation(); - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $vmwareEngineClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $vmwareEngineClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $resource = 'resource'; - * $response = $vmwareEngineClient->getIamPolicy($resource); - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $vmwareEngineClient->setIamPolicy($resource, $policy); - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * Sample code: - * ``` - * $vmwareEngineClient = new VmwareEngineClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $vmwareEngineClient->testIamPermissions($resource, $permissions); - * } finally { - * $vmwareEngineClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } -} diff --git a/owl-bot-staging/VmwareEngine/v1/src/V1/VmwareEngineClient.php b/owl-bot-staging/VmwareEngine/v1/src/V1/VmwareEngineClient.php deleted file mode 100644 index 93559473651a..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/src/V1/VmwareEngineClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.vmwareengine.v1.VmwareEngine' => [ - 'CreateCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\Cluster', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateHcxActivationKey' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\HcxActivationKey', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateNetworkPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\NetworkPolicy', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreatePrivateCloud' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateVmwareEngineNetwork' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteNetworkPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeletePrivateCloud' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteVmwareEngineNetwork' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ResetNsxCredentials' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'private_cloud', - 'fieldAccessors' => [ - 'getPrivateCloud', - ], - ], - ], - ], - 'ResetVcenterCredentials' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'private_cloud', - 'fieldAccessors' => [ - 'getPrivateCloud', - ], - ], - ], - ], - 'UndeletePrivateCloud' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\Cluster', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'cluster.name', - 'fieldAccessors' => [ - 'getCluster', - 'getName', - ], - ], - ], - ], - 'UpdateNetworkPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\NetworkPolicy', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'network_policy.name', - 'fieldAccessors' => [ - 'getNetworkPolicy', - 'getName', - ], - ], - ], - ], - 'UpdatePrivateCloud' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'private_cloud.name', - 'fieldAccessors' => [ - 'getPrivateCloud', - 'getName', - ], - ], - ], - ], - 'UpdateVmwareEngineNetwork' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'vmware_engine_network.name', - 'fieldAccessors' => [ - 'getVmwareEngineNetwork', - 'getName', - ], - ], - ], - ], - 'GetCluster' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\Cluster', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetHcxActivationKey' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\HcxActivationKey', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetNetworkPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\NetworkPolicy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetNodeType' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\NodeType', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetPrivateCloud' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\PrivateCloud', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetVmwareEngineNetwork' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListClusters' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getClusters', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListClustersResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListHcxActivationKeys' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getHcxActivationKeys', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListHcxActivationKeysResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListNetworkPolicies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getNetworkPolicies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListNetworkPoliciesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListNodeTypes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getNodeTypes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListNodeTypesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListPrivateClouds' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPrivateClouds', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListPrivateCloudsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSubnets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSubnets', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListSubnetsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListVmwareEngineNetworks' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getVmwareEngineNetworks', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListVmwareEngineNetworksResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ShowNsxCredentials' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\Credentials', - 'headerParams' => [ - [ - 'keyName' => 'private_cloud', - 'fieldAccessors' => [ - 'getPrivateCloud', - ], - ], - ], - ], - 'ShowVcenterCredentials' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\Credentials', - 'headerParams' => [ - [ - 'keyName' => 'private_cloud', - 'fieldAccessors' => [ - 'getPrivateCloud', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'cluster' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}', - 'hcxActivationKey' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}/hcxActivationKeys/{hcx_activation_key}', - 'location' => 'projects/{project}/locations/{location}', - 'network' => 'projects/{project}/global/networks/{network}', - 'networkPolicy' => 'projects/{project}/locations/{location}/networkPolicies/{network_policy}', - 'nodeType' => 'projects/{project}/locations/{location}/nodeTypes/{node_type}', - 'privateCloud' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}', - 'vmwareEngineNetwork' => 'projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network}', - ], - ], - ], -]; diff --git a/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_rest_client_config.php b/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_rest_client_config.php deleted file mode 100644 index 7946f284ffdd..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_rest_client_config.php +++ /dev/null @@ -1,523 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.vmwareengine.v1.VmwareEngine' => [ - 'CreateCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/clusters', - 'body' => 'cluster', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'cluster_id', - ], - ], - 'CreateHcxActivationKey' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/hcxActivationKeys', - 'body' => 'hcx_activation_key', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'hcx_activation_key_id', - ], - ], - 'CreateNetworkPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/networkPolicies', - 'body' => 'network_policy', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'network_policy_id', - ], - ], - 'CreatePrivateCloud' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/privateClouds', - 'body' => 'private_cloud', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'private_cloud_id', - ], - ], - 'CreateVmwareEngineNetwork' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/vmwareEngineNetworks', - 'body' => 'vmware_engine_network', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'vmware_engine_network_id', - ], - ], - 'DeleteCluster' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/clusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteNetworkPolicy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/networkPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeletePrivateCloud' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteVmwareEngineNetwork' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/vmwareEngineNetworks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCluster' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/clusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetHcxActivationKey' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/hcxActivationKeys/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetNetworkPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/networkPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetNodeType' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/nodeTypes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetPrivateCloud' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetVmwareEngineNetwork' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/vmwareEngineNetworks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListClusters' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/clusters', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListHcxActivationKeys' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/hcxActivationKeys', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListNetworkPolicies' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/networkPolicies', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListNodeTypes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/nodeTypes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListPrivateClouds' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/privateClouds', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSubnets' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/subnets', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListVmwareEngineNetworks' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/vmwareEngineNetworks', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ResetNsxCredentials' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{private_cloud=projects/*/locations/*/privateClouds/*}:resetNsxCredentials', - 'body' => '*', - 'placeholders' => [ - 'private_cloud' => [ - 'getters' => [ - 'getPrivateCloud', - ], - ], - ], - ], - 'ResetVcenterCredentials' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{private_cloud=projects/*/locations/*/privateClouds/*}:resetVcenterCredentials', - 'body' => '*', - 'placeholders' => [ - 'private_cloud' => [ - 'getters' => [ - 'getPrivateCloud', - ], - ], - ], - ], - 'ShowNsxCredentials' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{private_cloud=projects/*/locations/*/privateClouds/*}:showNsxCredentials', - 'placeholders' => [ - 'private_cloud' => [ - 'getters' => [ - 'getPrivateCloud', - ], - ], - ], - ], - 'ShowVcenterCredentials' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{private_cloud=projects/*/locations/*/privateClouds/*}:showVcenterCredentials', - 'placeholders' => [ - 'private_cloud' => [ - 'getters' => [ - 'getPrivateCloud', - ], - ], - ], - ], - 'UndeletePrivateCloud' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*}:undelete', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateCluster' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{cluster.name=projects/*/locations/*/privateClouds/*/clusters/*}', - 'body' => 'cluster', - 'placeholders' => [ - 'cluster.name' => [ - 'getters' => [ - 'getCluster', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateNetworkPolicy' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{network_policy.name=projects/*/locations/*/networkPolicies/*}', - 'body' => 'network_policy', - 'placeholders' => [ - 'network_policy.name' => [ - 'getters' => [ - 'getNetworkPolicy', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdatePrivateCloud' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{private_cloud.name=projects/*/locations/*/privateClouds/*}', - 'body' => 'private_cloud', - 'placeholders' => [ - 'private_cloud.name' => [ - 'getters' => [ - 'getPrivateCloud', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateVmwareEngineNetwork' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{vmware_engine_network.name=projects/*/locations/*/vmwareEngineNetworks/*}', - 'body' => 'vmware_engine_network', - 'placeholders' => [ - 'vmware_engine_network.name' => [ - 'getters' => [ - 'getVmwareEngineNetwork', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/clusters/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/hcxActivationKeys/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/clusters/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/hcxActivationKeys/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/clusters/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/hcxActivationKeys/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/VmwareEngine/v1/tests/Unit/V1/Client/VmwareEngineClientTest.php b/owl-bot-staging/VmwareEngine/v1/tests/Unit/V1/Client/VmwareEngineClientTest.php deleted file mode 100644 index a222ff4fe21b..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/tests/Unit/V1/Client/VmwareEngineClientTest.php +++ /dev/null @@ -1,3818 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return VmwareEngineClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new VmwareEngineClient($options); - } - - /** @test */ - public function createClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $management = false; - $uid = 'uid115792'; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name); - $expectedResponse->setManagement($management); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $clusterId = 'clusterId240280960'; - $cluster = new Cluster(); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $clusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); - $request = (new CreateClusterRequest()) - ->setParent($formattedParent) - ->setClusterId($clusterId) - ->setCluster($cluster); - $response = $gapicClient->createCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/CreateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getClusterId(); - $this->assertProtobufEquals($clusterId, $actualValue); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($cluster, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $clusterId = 'clusterId240280960'; - $cluster = new Cluster(); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $clusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); - $request = (new CreateClusterRequest()) - ->setParent($formattedParent) - ->setClusterId($clusterId) - ->setCluster($cluster); - $response = $gapicClient->createCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createHcxActivationKeyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createHcxActivationKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $activationKey = 'activationKey-1343958090'; - $uid = 'uid115792'; - $expectedResponse = new HcxActivationKey(); - $expectedResponse->setName($name); - $expectedResponse->setActivationKey($activationKey); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createHcxActivationKeyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $hcxActivationKey = new HcxActivationKey(); - $hcxActivationKeyId = 'hcxActivationKeyId26532194'; - $request = (new CreateHcxActivationKeyRequest()) - ->setParent($formattedParent) - ->setHcxActivationKey($hcxActivationKey) - ->setHcxActivationKeyId($hcxActivationKeyId); - $response = $gapicClient->createHcxActivationKey($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/CreateHcxActivationKey', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getHcxActivationKey(); - $this->assertProtobufEquals($hcxActivationKey, $actualValue); - $actualValue = $actualApiRequestObject->getHcxActivationKeyId(); - $this->assertProtobufEquals($hcxActivationKeyId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createHcxActivationKeyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createHcxActivationKeyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createHcxActivationKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $hcxActivationKey = new HcxActivationKey(); - $hcxActivationKeyId = 'hcxActivationKeyId26532194'; - $request = (new CreateHcxActivationKeyRequest()) - ->setParent($formattedParent) - ->setHcxActivationKey($hcxActivationKey) - ->setHcxActivationKeyId($hcxActivationKeyId); - $response = $gapicClient->createHcxActivationKey($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createHcxActivationKeyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createNetworkPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createNetworkPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $edgeServicesCidr = 'edgeServicesCidr-792872013'; - $uid = 'uid115792'; - $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; - $description = 'description-1724546052'; - $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; - $expectedResponse = new NetworkPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setEdgeServicesCidr($edgeServicesCidr); - $expectedResponse->setUid($uid); - $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); - $expectedResponse->setDescription($description); - $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createNetworkPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $networkPolicyId = 'networkPolicyId173955703'; - $networkPolicy = new NetworkPolicy(); - $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; - $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); - $request = (new CreateNetworkPolicyRequest()) - ->setParent($formattedParent) - ->setNetworkPolicyId($networkPolicyId) - ->setNetworkPolicy($networkPolicy); - $response = $gapicClient->createNetworkPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/CreateNetworkPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getNetworkPolicyId(); - $this->assertProtobufEquals($networkPolicyId, $actualValue); - $actualValue = $actualApiRequestObject->getNetworkPolicy(); - $this->assertProtobufEquals($networkPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createNetworkPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createNetworkPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createNetworkPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $networkPolicyId = 'networkPolicyId173955703'; - $networkPolicy = new NetworkPolicy(); - $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; - $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); - $request = (new CreateNetworkPolicyRequest()) - ->setParent($formattedParent) - ->setNetworkPolicyId($networkPolicyId) - ->setNetworkPolicy($networkPolicy); - $response = $gapicClient->createNetworkPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createNetworkPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createPrivateCloudTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createPrivateCloudTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $expectedResponse = new PrivateCloud(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createPrivateCloudTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $privateCloudId = 'privateCloudId1366391457'; - $privateCloud = new PrivateCloud(); - $privateCloudNetworkConfig = new NetworkConfig(); - $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; - $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); - $privateCloud->setNetworkConfig($privateCloudNetworkConfig); - $privateCloudManagementCluster = new ManagementCluster(); - $managementClusterClusterId = 'managementClusterClusterId311493182'; - $privateCloudManagementCluster->setClusterId($managementClusterClusterId); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $managementClusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); - $privateCloud->setManagementCluster($privateCloudManagementCluster); - $request = (new CreatePrivateCloudRequest()) - ->setParent($formattedParent) - ->setPrivateCloudId($privateCloudId) - ->setPrivateCloud($privateCloud); - $response = $gapicClient->createPrivateCloud($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/CreatePrivateCloud', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getPrivateCloudId(); - $this->assertProtobufEquals($privateCloudId, $actualValue); - $actualValue = $actualApiRequestObject->getPrivateCloud(); - $this->assertProtobufEquals($privateCloud, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPrivateCloudTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createPrivateCloudExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createPrivateCloudTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $privateCloudId = 'privateCloudId1366391457'; - $privateCloud = new PrivateCloud(); - $privateCloudNetworkConfig = new NetworkConfig(); - $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; - $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); - $privateCloud->setNetworkConfig($privateCloudNetworkConfig); - $privateCloudManagementCluster = new ManagementCluster(); - $managementClusterClusterId = 'managementClusterClusterId311493182'; - $privateCloudManagementCluster->setClusterId($managementClusterClusterId); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $managementClusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); - $privateCloud->setManagementCluster($privateCloudManagementCluster); - $request = (new CreatePrivateCloudRequest()) - ->setParent($formattedParent) - ->setPrivateCloudId($privateCloudId) - ->setPrivateCloud($privateCloud); - $response = $gapicClient->createPrivateCloud($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPrivateCloudTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createVmwareEngineNetworkTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createVmwareEngineNetworkTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $etag = 'etag3123477'; - $expectedResponse = new VmwareEngineNetwork(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createVmwareEngineNetworkTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $vmwareEngineNetworkId = 'vmwareEngineNetworkId2131972382'; - $vmwareEngineNetwork = new VmwareEngineNetwork(); - $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; - $vmwareEngineNetwork->setType($vmwareEngineNetworkType); - $request = (new CreateVmwareEngineNetworkRequest()) - ->setParent($formattedParent) - ->setVmwareEngineNetworkId($vmwareEngineNetworkId) - ->setVmwareEngineNetwork($vmwareEngineNetwork); - $response = $gapicClient->createVmwareEngineNetwork($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/CreateVmwareEngineNetwork', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getVmwareEngineNetworkId(); - $this->assertProtobufEquals($vmwareEngineNetworkId, $actualValue); - $actualValue = $actualApiRequestObject->getVmwareEngineNetwork(); - $this->assertProtobufEquals($vmwareEngineNetwork, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createVmwareEngineNetworkTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createVmwareEngineNetworkExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createVmwareEngineNetworkTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $vmwareEngineNetworkId = 'vmwareEngineNetworkId2131972382'; - $vmwareEngineNetwork = new VmwareEngineNetwork(); - $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; - $vmwareEngineNetwork->setType($vmwareEngineNetworkType); - $request = (new CreateVmwareEngineNetworkRequest()) - ->setParent($formattedParent) - ->setVmwareEngineNetworkId($vmwareEngineNetworkId) - ->setVmwareEngineNetwork($vmwareEngineNetwork); - $response = $gapicClient->createVmwareEngineNetwork($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createVmwareEngineNetworkTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]'); - $request = (new DeleteClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/DeleteCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]'); - $request = (new DeleteClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteNetworkPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteNetworkPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteNetworkPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); - $request = (new DeleteNetworkPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteNetworkPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/DeleteNetworkPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteNetworkPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteNetworkPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteNetworkPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); - $request = (new DeleteNetworkPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteNetworkPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteNetworkPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deletePrivateCloudTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deletePrivateCloudTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $expectedResponse = new PrivateCloud(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deletePrivateCloudTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new DeletePrivateCloudRequest()) - ->setName($formattedName); - $response = $gapicClient->deletePrivateCloud($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/DeletePrivateCloud', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deletePrivateCloudTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deletePrivateCloudExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deletePrivateCloudTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new DeletePrivateCloudRequest()) - ->setName($formattedName); - $response = $gapicClient->deletePrivateCloud($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deletePrivateCloudTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteVmwareEngineNetworkTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteVmwareEngineNetworkTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteVmwareEngineNetworkTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); - $request = (new DeleteVmwareEngineNetworkRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteVmwareEngineNetwork($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/DeleteVmwareEngineNetwork', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteVmwareEngineNetworkTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteVmwareEngineNetworkExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteVmwareEngineNetworkTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); - $request = (new DeleteVmwareEngineNetworkRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteVmwareEngineNetwork($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteVmwareEngineNetworkTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $management = false; - $uid = 'uid115792'; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name2); - $expectedResponse->setManagement($management); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]'); - $request = (new GetClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->getCluster($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getClusterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]'); - $request = (new GetClusterRequest()) - ->setName($formattedName); - try { - $gapicClient->getCluster($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getHcxActivationKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $activationKey = 'activationKey-1343958090'; - $uid = 'uid115792'; - $expectedResponse = new HcxActivationKey(); - $expectedResponse->setName($name2); - $expectedResponse->setActivationKey($activationKey); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->hcxActivationKeyName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[HCX_ACTIVATION_KEY]'); - $request = (new GetHcxActivationKeyRequest()) - ->setName($formattedName); - $response = $gapicClient->getHcxActivationKey($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetHcxActivationKey', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getHcxActivationKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->hcxActivationKeyName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[HCX_ACTIVATION_KEY]'); - $request = (new GetHcxActivationKeyRequest()) - ->setName($formattedName); - try { - $gapicClient->getHcxActivationKey($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNetworkPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $edgeServicesCidr = 'edgeServicesCidr-792872013'; - $uid = 'uid115792'; - $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; - $description = 'description-1724546052'; - $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; - $expectedResponse = new NetworkPolicy(); - $expectedResponse->setName($name2); - $expectedResponse->setEdgeServicesCidr($edgeServicesCidr); - $expectedResponse->setUid($uid); - $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); - $expectedResponse->setDescription($description); - $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); - $request = (new GetNetworkPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->getNetworkPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetNetworkPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNetworkPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); - $request = (new GetNetworkPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->getNetworkPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNodeTypeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $nodeTypeId = 'nodeTypeId585437955'; - $displayName = 'displayName1615086568'; - $virtualCpuCount = 289038212; - $totalCoreCount = 282953654; - $memoryGb = 1726613721; - $diskSizeGb = 757478089; - $expectedResponse = new NodeType(); - $expectedResponse->setName($name2); - $expectedResponse->setNodeTypeId($nodeTypeId); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setVirtualCpuCount($virtualCpuCount); - $expectedResponse->setTotalCoreCount($totalCoreCount); - $expectedResponse->setMemoryGb($memoryGb); - $expectedResponse->setDiskSizeGb($diskSizeGb); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->nodeTypeName('[PROJECT]', '[LOCATION]', '[NODE_TYPE]'); - $request = (new GetNodeTypeRequest()) - ->setName($formattedName); - $response = $gapicClient->getNodeType($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetNodeType', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNodeTypeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->nodeTypeName('[PROJECT]', '[LOCATION]', '[NODE_TYPE]'); - $request = (new GetNodeTypeRequest()) - ->setName($formattedName); - try { - $gapicClient->getNodeType($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPrivateCloudTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $expectedResponse = new PrivateCloud(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new GetPrivateCloudRequest()) - ->setName($formattedName); - $response = $gapicClient->getPrivateCloud($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetPrivateCloud', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPrivateCloudExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new GetPrivateCloudRequest()) - ->setName($formattedName); - try { - $gapicClient->getPrivateCloud($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVmwareEngineNetworkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $etag = 'etag3123477'; - $expectedResponse = new VmwareEngineNetwork(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); - $request = (new GetVmwareEngineNetworkRequest()) - ->setName($formattedName); - $response = $gapicClient->getVmwareEngineNetwork($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetVmwareEngineNetwork', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVmwareEngineNetworkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); - $request = (new GetVmwareEngineNetworkRequest()) - ->setName($formattedName); - try { - $gapicClient->getVmwareEngineNetwork($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClustersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $clustersElement = new Cluster(); - $clusters = [ - $clustersElement, - ]; - $expectedResponse = new ListClustersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setClusters($clusters); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ListClustersRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listClusters($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getClusters()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListClusters', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClustersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ListClustersRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listClusters($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listHcxActivationKeysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $hcxActivationKeysElement = new HcxActivationKey(); - $hcxActivationKeys = [ - $hcxActivationKeysElement, - ]; - $expectedResponse = new ListHcxActivationKeysResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setHcxActivationKeys($hcxActivationKeys); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ListHcxActivationKeysRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listHcxActivationKeys($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getHcxActivationKeys()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListHcxActivationKeys', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listHcxActivationKeysExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ListHcxActivationKeysRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listHcxActivationKeys($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNetworkPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $networkPoliciesElement = new NetworkPolicy(); - $networkPolicies = [ - $networkPoliciesElement, - ]; - $expectedResponse = new ListNetworkPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setNetworkPolicies($networkPolicies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListNetworkPoliciesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listNetworkPolicies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getNetworkPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListNetworkPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNetworkPoliciesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListNetworkPoliciesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listNetworkPolicies($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNodeTypesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $nodeTypesElement = new NodeType(); - $nodeTypes = [ - $nodeTypesElement, - ]; - $expectedResponse = new ListNodeTypesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setNodeTypes($nodeTypes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListNodeTypesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listNodeTypes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getNodeTypes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListNodeTypes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNodeTypesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListNodeTypesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listNodeTypes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPrivateCloudsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $privateCloudsElement = new PrivateCloud(); - $privateClouds = [ - $privateCloudsElement, - ]; - $expectedResponse = new ListPrivateCloudsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPrivateClouds($privateClouds); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListPrivateCloudsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPrivateClouds($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPrivateClouds()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListPrivateClouds', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPrivateCloudsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListPrivateCloudsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPrivateClouds($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSubnetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $subnetsElement = new Subnet(); - $subnets = [ - $subnetsElement, - ]; - $expectedResponse = new ListSubnetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSubnets($subnets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ListSubnetsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSubnets($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSubnets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListSubnets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSubnetsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ListSubnetsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSubnets($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVmwareEngineNetworksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $vmwareEngineNetworksElement = new VmwareEngineNetwork(); - $vmwareEngineNetworks = [ - $vmwareEngineNetworksElement, - ]; - $expectedResponse = new ListVmwareEngineNetworksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setVmwareEngineNetworks($vmwareEngineNetworks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListVmwareEngineNetworksRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listVmwareEngineNetworks($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getVmwareEngineNetworks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListVmwareEngineNetworks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVmwareEngineNetworksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListVmwareEngineNetworksRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listVmwareEngineNetworks($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resetNsxCredentialsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resetNsxCredentialsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $expectedResponse = new PrivateCloud(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/resetNsxCredentialsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ResetNsxCredentialsRequest()) - ->setPrivateCloud($formattedPrivateCloud); - $response = $gapicClient->resetNsxCredentials($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ResetNsxCredentials', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getPrivateCloud(); - $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resetNsxCredentialsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resetNsxCredentialsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resetNsxCredentialsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ResetNsxCredentialsRequest()) - ->setPrivateCloud($formattedPrivateCloud); - $response = $gapicClient->resetNsxCredentials($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resetNsxCredentialsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resetVcenterCredentialsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resetVcenterCredentialsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $expectedResponse = new PrivateCloud(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/resetVcenterCredentialsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ResetVcenterCredentialsRequest()) - ->setPrivateCloud($formattedPrivateCloud); - $response = $gapicClient->resetVcenterCredentials($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ResetVcenterCredentials', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getPrivateCloud(); - $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resetVcenterCredentialsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resetVcenterCredentialsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resetVcenterCredentialsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ResetVcenterCredentialsRequest()) - ->setPrivateCloud($formattedPrivateCloud); - $response = $gapicClient->resetVcenterCredentials($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resetVcenterCredentialsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function showNsxCredentialsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $username = 'username-265713450'; - $password = 'password1216985755'; - $expectedResponse = new Credentials(); - $expectedResponse->setUsername($username); - $expectedResponse->setPassword($password); - $transport->addResponse($expectedResponse); - // Mock request - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ShowNsxCredentialsRequest()) - ->setPrivateCloud($formattedPrivateCloud); - $response = $gapicClient->showNsxCredentials($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ShowNsxCredentials', $actualFuncCall); - $actualValue = $actualRequestObject->getPrivateCloud(); - $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function showNsxCredentialsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ShowNsxCredentialsRequest()) - ->setPrivateCloud($formattedPrivateCloud); - try { - $gapicClient->showNsxCredentials($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function showVcenterCredentialsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $username = 'username-265713450'; - $password = 'password1216985755'; - $expectedResponse = new Credentials(); - $expectedResponse->setUsername($username); - $expectedResponse->setPassword($password); - $transport->addResponse($expectedResponse); - // Mock request - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ShowVcenterCredentialsRequest()) - ->setPrivateCloud($formattedPrivateCloud); - $response = $gapicClient->showVcenterCredentials($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ShowVcenterCredentials', $actualFuncCall); - $actualValue = $actualRequestObject->getPrivateCloud(); - $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function showVcenterCredentialsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ShowVcenterCredentialsRequest()) - ->setPrivateCloud($formattedPrivateCloud); - try { - $gapicClient->showVcenterCredentials($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function undeletePrivateCloudTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/undeletePrivateCloudTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $expectedResponse = new PrivateCloud(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/undeletePrivateCloudTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new UndeletePrivateCloudRequest()) - ->setName($formattedName); - $response = $gapicClient->undeletePrivateCloud($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/UndeletePrivateCloud', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeletePrivateCloudTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function undeletePrivateCloudExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/undeletePrivateCloudTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new UndeletePrivateCloudRequest()) - ->setName($formattedName); - $response = $gapicClient->undeletePrivateCloud($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeletePrivateCloudTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $management = false; - $uid = 'uid115792'; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name); - $expectedResponse->setManagement($management); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $cluster = new Cluster(); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $clusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); - $request = (new UpdateClusterRequest()) - ->setUpdateMask($updateMask) - ->setCluster($cluster); - $response = $gapicClient->updateCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/UpdateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($cluster, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $cluster = new Cluster(); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $clusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); - $request = (new UpdateClusterRequest()) - ->setUpdateMask($updateMask) - ->setCluster($cluster); - $response = $gapicClient->updateCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateNetworkPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateNetworkPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $edgeServicesCidr = 'edgeServicesCidr-792872013'; - $uid = 'uid115792'; - $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; - $description = 'description-1724546052'; - $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; - $expectedResponse = new NetworkPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setEdgeServicesCidr($edgeServicesCidr); - $expectedResponse->setUid($uid); - $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); - $expectedResponse->setDescription($description); - $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateNetworkPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $networkPolicy = new NetworkPolicy(); - $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; - $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); - $updateMask = new FieldMask(); - $request = (new UpdateNetworkPolicyRequest()) - ->setNetworkPolicy($networkPolicy) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateNetworkPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/UpdateNetworkPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getNetworkPolicy(); - $this->assertProtobufEquals($networkPolicy, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateNetworkPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateNetworkPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateNetworkPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $networkPolicy = new NetworkPolicy(); - $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; - $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); - $updateMask = new FieldMask(); - $request = (new UpdateNetworkPolicyRequest()) - ->setNetworkPolicy($networkPolicy) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateNetworkPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateNetworkPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updatePrivateCloudTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updatePrivateCloudTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $expectedResponse = new PrivateCloud(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updatePrivateCloudTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $privateCloud = new PrivateCloud(); - $privateCloudNetworkConfig = new NetworkConfig(); - $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; - $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); - $privateCloud->setNetworkConfig($privateCloudNetworkConfig); - $privateCloudManagementCluster = new ManagementCluster(); - $managementClusterClusterId = 'managementClusterClusterId311493182'; - $privateCloudManagementCluster->setClusterId($managementClusterClusterId); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $managementClusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); - $privateCloud->setManagementCluster($privateCloudManagementCluster); - $updateMask = new FieldMask(); - $request = (new UpdatePrivateCloudRequest()) - ->setPrivateCloud($privateCloud) - ->setUpdateMask($updateMask); - $response = $gapicClient->updatePrivateCloud($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/UpdatePrivateCloud', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getPrivateCloud(); - $this->assertProtobufEquals($privateCloud, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updatePrivateCloudTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updatePrivateCloudExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updatePrivateCloudTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $privateCloud = new PrivateCloud(); - $privateCloudNetworkConfig = new NetworkConfig(); - $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; - $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); - $privateCloud->setNetworkConfig($privateCloudNetworkConfig); - $privateCloudManagementCluster = new ManagementCluster(); - $managementClusterClusterId = 'managementClusterClusterId311493182'; - $privateCloudManagementCluster->setClusterId($managementClusterClusterId); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $managementClusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); - $privateCloud->setManagementCluster($privateCloudManagementCluster); - $updateMask = new FieldMask(); - $request = (new UpdatePrivateCloudRequest()) - ->setPrivateCloud($privateCloud) - ->setUpdateMask($updateMask); - $response = $gapicClient->updatePrivateCloud($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updatePrivateCloudTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateVmwareEngineNetworkTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateVmwareEngineNetworkTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $etag = 'etag3123477'; - $expectedResponse = new VmwareEngineNetwork(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateVmwareEngineNetworkTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $vmwareEngineNetwork = new VmwareEngineNetwork(); - $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; - $vmwareEngineNetwork->setType($vmwareEngineNetworkType); - $updateMask = new FieldMask(); - $request = (new UpdateVmwareEngineNetworkRequest()) - ->setVmwareEngineNetwork($vmwareEngineNetwork) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateVmwareEngineNetwork($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/UpdateVmwareEngineNetwork', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getVmwareEngineNetwork(); - $this->assertProtobufEquals($vmwareEngineNetwork, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateVmwareEngineNetworkTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateVmwareEngineNetworkExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateVmwareEngineNetworkTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $vmwareEngineNetwork = new VmwareEngineNetwork(); - $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; - $vmwareEngineNetwork->setType($vmwareEngineNetworkType); - $updateMask = new FieldMask(); - $request = (new UpdateVmwareEngineNetworkRequest()) - ->setVmwareEngineNetwork($vmwareEngineNetwork) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateVmwareEngineNetwork($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateVmwareEngineNetworkTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createClusterAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $management = false; - $uid = 'uid115792'; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name); - $expectedResponse->setManagement($management); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $clusterId = 'clusterId240280960'; - $cluster = new Cluster(); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $clusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); - $request = (new CreateClusterRequest()) - ->setParent($formattedParent) - ->setClusterId($clusterId) - ->setCluster($cluster); - $response = $gapicClient->createClusterAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/CreateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getClusterId(); - $this->assertProtobufEquals($clusterId, $actualValue); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($cluster, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/VmwareEngine/v1/tests/Unit/V1/VmwareEngineClientTest.php b/owl-bot-staging/VmwareEngine/v1/tests/Unit/V1/VmwareEngineClientTest.php deleted file mode 100644 index 8096ec9a5330..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/tests/Unit/V1/VmwareEngineClientTest.php +++ /dev/null @@ -1,3525 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return VmwareEngineClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new VmwareEngineClient($options); - } - - /** @test */ - public function createClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $management = false; - $uid = 'uid115792'; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name); - $expectedResponse->setManagement($management); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $clusterId = 'clusterId240280960'; - $cluster = new Cluster(); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $clusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); - $response = $gapicClient->createCluster($formattedParent, $clusterId, $cluster); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/CreateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getClusterId(); - $this->assertProtobufEquals($clusterId, $actualValue); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($cluster, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $clusterId = 'clusterId240280960'; - $cluster = new Cluster(); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $clusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); - $response = $gapicClient->createCluster($formattedParent, $clusterId, $cluster); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createHcxActivationKeyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createHcxActivationKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $activationKey = 'activationKey-1343958090'; - $uid = 'uid115792'; - $expectedResponse = new HcxActivationKey(); - $expectedResponse->setName($name); - $expectedResponse->setActivationKey($activationKey); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createHcxActivationKeyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $hcxActivationKey = new HcxActivationKey(); - $hcxActivationKeyId = 'hcxActivationKeyId26532194'; - $response = $gapicClient->createHcxActivationKey($formattedParent, $hcxActivationKey, $hcxActivationKeyId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/CreateHcxActivationKey', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getHcxActivationKey(); - $this->assertProtobufEquals($hcxActivationKey, $actualValue); - $actualValue = $actualApiRequestObject->getHcxActivationKeyId(); - $this->assertProtobufEquals($hcxActivationKeyId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createHcxActivationKeyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createHcxActivationKeyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createHcxActivationKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $hcxActivationKey = new HcxActivationKey(); - $hcxActivationKeyId = 'hcxActivationKeyId26532194'; - $response = $gapicClient->createHcxActivationKey($formattedParent, $hcxActivationKey, $hcxActivationKeyId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createHcxActivationKeyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createNetworkPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createNetworkPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $edgeServicesCidr = 'edgeServicesCidr-792872013'; - $uid = 'uid115792'; - $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; - $description = 'description-1724546052'; - $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; - $expectedResponse = new NetworkPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setEdgeServicesCidr($edgeServicesCidr); - $expectedResponse->setUid($uid); - $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); - $expectedResponse->setDescription($description); - $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createNetworkPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $networkPolicyId = 'networkPolicyId173955703'; - $networkPolicy = new NetworkPolicy(); - $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; - $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); - $response = $gapicClient->createNetworkPolicy($formattedParent, $networkPolicyId, $networkPolicy); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/CreateNetworkPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getNetworkPolicyId(); - $this->assertProtobufEquals($networkPolicyId, $actualValue); - $actualValue = $actualApiRequestObject->getNetworkPolicy(); - $this->assertProtobufEquals($networkPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createNetworkPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createNetworkPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createNetworkPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $networkPolicyId = 'networkPolicyId173955703'; - $networkPolicy = new NetworkPolicy(); - $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; - $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); - $response = $gapicClient->createNetworkPolicy($formattedParent, $networkPolicyId, $networkPolicy); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createNetworkPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createPrivateCloudTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createPrivateCloudTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $expectedResponse = new PrivateCloud(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createPrivateCloudTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $privateCloudId = 'privateCloudId1366391457'; - $privateCloud = new PrivateCloud(); - $privateCloudNetworkConfig = new NetworkConfig(); - $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; - $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); - $privateCloud->setNetworkConfig($privateCloudNetworkConfig); - $privateCloudManagementCluster = new ManagementCluster(); - $managementClusterClusterId = 'managementClusterClusterId311493182'; - $privateCloudManagementCluster->setClusterId($managementClusterClusterId); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $managementClusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); - $privateCloud->setManagementCluster($privateCloudManagementCluster); - $response = $gapicClient->createPrivateCloud($formattedParent, $privateCloudId, $privateCloud); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/CreatePrivateCloud', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getPrivateCloudId(); - $this->assertProtobufEquals($privateCloudId, $actualValue); - $actualValue = $actualApiRequestObject->getPrivateCloud(); - $this->assertProtobufEquals($privateCloud, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPrivateCloudTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createPrivateCloudExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createPrivateCloudTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $privateCloudId = 'privateCloudId1366391457'; - $privateCloud = new PrivateCloud(); - $privateCloudNetworkConfig = new NetworkConfig(); - $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; - $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); - $privateCloud->setNetworkConfig($privateCloudNetworkConfig); - $privateCloudManagementCluster = new ManagementCluster(); - $managementClusterClusterId = 'managementClusterClusterId311493182'; - $privateCloudManagementCluster->setClusterId($managementClusterClusterId); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $managementClusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); - $privateCloud->setManagementCluster($privateCloudManagementCluster); - $response = $gapicClient->createPrivateCloud($formattedParent, $privateCloudId, $privateCloud); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPrivateCloudTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createVmwareEngineNetworkTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createVmwareEngineNetworkTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $etag = 'etag3123477'; - $expectedResponse = new VmwareEngineNetwork(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createVmwareEngineNetworkTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $vmwareEngineNetworkId = 'vmwareEngineNetworkId2131972382'; - $vmwareEngineNetwork = new VmwareEngineNetwork(); - $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; - $vmwareEngineNetwork->setType($vmwareEngineNetworkType); - $response = $gapicClient->createVmwareEngineNetwork($formattedParent, $vmwareEngineNetworkId, $vmwareEngineNetwork); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/CreateVmwareEngineNetwork', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getVmwareEngineNetworkId(); - $this->assertProtobufEquals($vmwareEngineNetworkId, $actualValue); - $actualValue = $actualApiRequestObject->getVmwareEngineNetwork(); - $this->assertProtobufEquals($vmwareEngineNetwork, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createVmwareEngineNetworkTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createVmwareEngineNetworkExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createVmwareEngineNetworkTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $vmwareEngineNetworkId = 'vmwareEngineNetworkId2131972382'; - $vmwareEngineNetwork = new VmwareEngineNetwork(); - $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; - $vmwareEngineNetwork->setType($vmwareEngineNetworkType); - $response = $gapicClient->createVmwareEngineNetwork($formattedParent, $vmwareEngineNetworkId, $vmwareEngineNetwork); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createVmwareEngineNetworkTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]'); - $response = $gapicClient->deleteCluster($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/DeleteCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]'); - $response = $gapicClient->deleteCluster($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteNetworkPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteNetworkPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteNetworkPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); - $response = $gapicClient->deleteNetworkPolicy($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/DeleteNetworkPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteNetworkPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteNetworkPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteNetworkPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); - $response = $gapicClient->deleteNetworkPolicy($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteNetworkPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deletePrivateCloudTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deletePrivateCloudTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $expectedResponse = new PrivateCloud(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deletePrivateCloudTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $response = $gapicClient->deletePrivateCloud($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/DeletePrivateCloud', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deletePrivateCloudTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deletePrivateCloudExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deletePrivateCloudTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $response = $gapicClient->deletePrivateCloud($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deletePrivateCloudTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteVmwareEngineNetworkTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteVmwareEngineNetworkTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteVmwareEngineNetworkTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); - $response = $gapicClient->deleteVmwareEngineNetwork($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/DeleteVmwareEngineNetwork', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteVmwareEngineNetworkTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteVmwareEngineNetworkExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteVmwareEngineNetworkTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); - $response = $gapicClient->deleteVmwareEngineNetwork($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteVmwareEngineNetworkTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $management = false; - $uid = 'uid115792'; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name2); - $expectedResponse->setManagement($management); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]'); - $response = $gapicClient->getCluster($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getClusterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]'); - try { - $gapicClient->getCluster($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getHcxActivationKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $activationKey = 'activationKey-1343958090'; - $uid = 'uid115792'; - $expectedResponse = new HcxActivationKey(); - $expectedResponse->setName($name2); - $expectedResponse->setActivationKey($activationKey); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->hcxActivationKeyName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[HCX_ACTIVATION_KEY]'); - $response = $gapicClient->getHcxActivationKey($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetHcxActivationKey', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getHcxActivationKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->hcxActivationKeyName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[HCX_ACTIVATION_KEY]'); - try { - $gapicClient->getHcxActivationKey($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNetworkPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $edgeServicesCidr = 'edgeServicesCidr-792872013'; - $uid = 'uid115792'; - $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; - $description = 'description-1724546052'; - $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; - $expectedResponse = new NetworkPolicy(); - $expectedResponse->setName($name2); - $expectedResponse->setEdgeServicesCidr($edgeServicesCidr); - $expectedResponse->setUid($uid); - $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); - $expectedResponse->setDescription($description); - $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); - $response = $gapicClient->getNetworkPolicy($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetNetworkPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNetworkPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); - try { - $gapicClient->getNetworkPolicy($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNodeTypeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $nodeTypeId = 'nodeTypeId585437955'; - $displayName = 'displayName1615086568'; - $virtualCpuCount = 289038212; - $totalCoreCount = 282953654; - $memoryGb = 1726613721; - $diskSizeGb = 757478089; - $expectedResponse = new NodeType(); - $expectedResponse->setName($name2); - $expectedResponse->setNodeTypeId($nodeTypeId); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setVirtualCpuCount($virtualCpuCount); - $expectedResponse->setTotalCoreCount($totalCoreCount); - $expectedResponse->setMemoryGb($memoryGb); - $expectedResponse->setDiskSizeGb($diskSizeGb); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->nodeTypeName('[PROJECT]', '[LOCATION]', '[NODE_TYPE]'); - $response = $gapicClient->getNodeType($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetNodeType', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNodeTypeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->nodeTypeName('[PROJECT]', '[LOCATION]', '[NODE_TYPE]'); - try { - $gapicClient->getNodeType($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPrivateCloudTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $expectedResponse = new PrivateCloud(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $response = $gapicClient->getPrivateCloud($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetPrivateCloud', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPrivateCloudExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - try { - $gapicClient->getPrivateCloud($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVmwareEngineNetworkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $etag = 'etag3123477'; - $expectedResponse = new VmwareEngineNetwork(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); - $response = $gapicClient->getVmwareEngineNetwork($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/GetVmwareEngineNetwork', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVmwareEngineNetworkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); - try { - $gapicClient->getVmwareEngineNetwork($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClustersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $clustersElement = new Cluster(); - $clusters = [ - $clustersElement, - ]; - $expectedResponse = new ListClustersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setClusters($clusters); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $response = $gapicClient->listClusters($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getClusters()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListClusters', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClustersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - try { - $gapicClient->listClusters($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listHcxActivationKeysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $hcxActivationKeysElement = new HcxActivationKey(); - $hcxActivationKeys = [ - $hcxActivationKeysElement, - ]; - $expectedResponse = new ListHcxActivationKeysResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setHcxActivationKeys($hcxActivationKeys); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $response = $gapicClient->listHcxActivationKeys($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getHcxActivationKeys()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListHcxActivationKeys', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listHcxActivationKeysExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - try { - $gapicClient->listHcxActivationKeys($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNetworkPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $networkPoliciesElement = new NetworkPolicy(); - $networkPolicies = [ - $networkPoliciesElement, - ]; - $expectedResponse = new ListNetworkPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setNetworkPolicies($networkPolicies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listNetworkPolicies($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getNetworkPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListNetworkPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNetworkPoliciesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listNetworkPolicies($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNodeTypesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $nodeTypesElement = new NodeType(); - $nodeTypes = [ - $nodeTypesElement, - ]; - $expectedResponse = new ListNodeTypesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setNodeTypes($nodeTypes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listNodeTypes($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getNodeTypes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListNodeTypes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNodeTypesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listNodeTypes($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPrivateCloudsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $privateCloudsElement = new PrivateCloud(); - $privateClouds = [ - $privateCloudsElement, - ]; - $expectedResponse = new ListPrivateCloudsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPrivateClouds($privateClouds); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listPrivateClouds($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPrivateClouds()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListPrivateClouds', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPrivateCloudsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listPrivateClouds($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSubnetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $subnetsElement = new Subnet(); - $subnets = [ - $subnetsElement, - ]; - $expectedResponse = new ListSubnetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSubnets($subnets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $response = $gapicClient->listSubnets($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSubnets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListSubnets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSubnetsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - try { - $gapicClient->listSubnets($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVmwareEngineNetworksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $vmwareEngineNetworksElement = new VmwareEngineNetwork(); - $vmwareEngineNetworks = [ - $vmwareEngineNetworksElement, - ]; - $expectedResponse = new ListVmwareEngineNetworksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setVmwareEngineNetworks($vmwareEngineNetworks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listVmwareEngineNetworks($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getVmwareEngineNetworks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListVmwareEngineNetworks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVmwareEngineNetworksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listVmwareEngineNetworks($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resetNsxCredentialsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resetNsxCredentialsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $expectedResponse = new PrivateCloud(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/resetNsxCredentialsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $response = $gapicClient->resetNsxCredentials($formattedPrivateCloud); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ResetNsxCredentials', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getPrivateCloud(); - $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resetNsxCredentialsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resetNsxCredentialsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resetNsxCredentialsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $response = $gapicClient->resetNsxCredentials($formattedPrivateCloud); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resetNsxCredentialsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resetVcenterCredentialsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resetVcenterCredentialsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $expectedResponse = new PrivateCloud(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/resetVcenterCredentialsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $response = $gapicClient->resetVcenterCredentials($formattedPrivateCloud); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ResetVcenterCredentials', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getPrivateCloud(); - $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resetVcenterCredentialsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resetVcenterCredentialsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resetVcenterCredentialsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $response = $gapicClient->resetVcenterCredentials($formattedPrivateCloud); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resetVcenterCredentialsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function showNsxCredentialsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $username = 'username-265713450'; - $password = 'password1216985755'; - $expectedResponse = new Credentials(); - $expectedResponse->setUsername($username); - $expectedResponse->setPassword($password); - $transport->addResponse($expectedResponse); - // Mock request - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $response = $gapicClient->showNsxCredentials($formattedPrivateCloud); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ShowNsxCredentials', $actualFuncCall); - $actualValue = $actualRequestObject->getPrivateCloud(); - $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function showNsxCredentialsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - try { - $gapicClient->showNsxCredentials($formattedPrivateCloud); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function showVcenterCredentialsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $username = 'username-265713450'; - $password = 'password1216985755'; - $expectedResponse = new Credentials(); - $expectedResponse->setUsername($username); - $expectedResponse->setPassword($password); - $transport->addResponse($expectedResponse); - // Mock request - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $response = $gapicClient->showVcenterCredentials($formattedPrivateCloud); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ShowVcenterCredentials', $actualFuncCall); - $actualValue = $actualRequestObject->getPrivateCloud(); - $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function showVcenterCredentialsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - try { - $gapicClient->showVcenterCredentials($formattedPrivateCloud); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function undeletePrivateCloudTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/undeletePrivateCloudTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $expectedResponse = new PrivateCloud(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/undeletePrivateCloudTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $response = $gapicClient->undeletePrivateCloud($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/UndeletePrivateCloud', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeletePrivateCloudTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function undeletePrivateCloudExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/undeletePrivateCloudTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $response = $gapicClient->undeletePrivateCloud($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeletePrivateCloudTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $management = false; - $uid = 'uid115792'; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name); - $expectedResponse->setManagement($management); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $cluster = new Cluster(); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $clusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); - $response = $gapicClient->updateCluster($updateMask, $cluster); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/UpdateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($cluster, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $cluster = new Cluster(); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $clusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); - $response = $gapicClient->updateCluster($updateMask, $cluster); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateNetworkPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateNetworkPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $edgeServicesCidr = 'edgeServicesCidr-792872013'; - $uid = 'uid115792'; - $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; - $description = 'description-1724546052'; - $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; - $expectedResponse = new NetworkPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setEdgeServicesCidr($edgeServicesCidr); - $expectedResponse->setUid($uid); - $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); - $expectedResponse->setDescription($description); - $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateNetworkPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $networkPolicy = new NetworkPolicy(); - $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; - $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); - $updateMask = new FieldMask(); - $response = $gapicClient->updateNetworkPolicy($networkPolicy, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/UpdateNetworkPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getNetworkPolicy(); - $this->assertProtobufEquals($networkPolicy, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateNetworkPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateNetworkPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateNetworkPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $networkPolicy = new NetworkPolicy(); - $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; - $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); - $updateMask = new FieldMask(); - $response = $gapicClient->updateNetworkPolicy($networkPolicy, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateNetworkPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updatePrivateCloudTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updatePrivateCloudTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $expectedResponse = new PrivateCloud(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updatePrivateCloudTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $privateCloud = new PrivateCloud(); - $privateCloudNetworkConfig = new NetworkConfig(); - $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; - $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); - $privateCloud->setNetworkConfig($privateCloudNetworkConfig); - $privateCloudManagementCluster = new ManagementCluster(); - $managementClusterClusterId = 'managementClusterClusterId311493182'; - $privateCloudManagementCluster->setClusterId($managementClusterClusterId); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $managementClusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); - $privateCloud->setManagementCluster($privateCloudManagementCluster); - $updateMask = new FieldMask(); - $response = $gapicClient->updatePrivateCloud($privateCloud, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/UpdatePrivateCloud', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getPrivateCloud(); - $this->assertProtobufEquals($privateCloud, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updatePrivateCloudTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updatePrivateCloudExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updatePrivateCloudTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $privateCloud = new PrivateCloud(); - $privateCloudNetworkConfig = new NetworkConfig(); - $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; - $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); - $privateCloud->setNetworkConfig($privateCloudNetworkConfig); - $privateCloudManagementCluster = new ManagementCluster(); - $managementClusterClusterId = 'managementClusterClusterId311493182'; - $privateCloudManagementCluster->setClusterId($managementClusterClusterId); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $managementClusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); - $privateCloud->setManagementCluster($privateCloudManagementCluster); - $updateMask = new FieldMask(); - $response = $gapicClient->updatePrivateCloud($privateCloud, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updatePrivateCloudTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateVmwareEngineNetworkTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateVmwareEngineNetworkTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $etag = 'etag3123477'; - $expectedResponse = new VmwareEngineNetwork(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateVmwareEngineNetworkTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $vmwareEngineNetwork = new VmwareEngineNetwork(); - $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; - $vmwareEngineNetwork->setType($vmwareEngineNetworkType); - $updateMask = new FieldMask(); - $response = $gapicClient->updateVmwareEngineNetwork($vmwareEngineNetwork, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/UpdateVmwareEngineNetwork', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getVmwareEngineNetwork(); - $this->assertProtobufEquals($vmwareEngineNetwork, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateVmwareEngineNetworkTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateVmwareEngineNetworkExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateVmwareEngineNetworkTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $vmwareEngineNetwork = new VmwareEngineNetwork(); - $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; - $vmwareEngineNetwork->setType($vmwareEngineNetworkType); - $updateMask = new FieldMask(); - $response = $gapicClient->updateVmwareEngineNetwork($vmwareEngineNetwork, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateVmwareEngineNetworkTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/GPBMetadata/Google/Cloud/Vpcaccess/V1/VpcAccess.php b/owl-bot-staging/VpcAccess/v1/proto/src/GPBMetadata/Google/Cloud/Vpcaccess/V1/VpcAccess.php deleted file mode 100644 index 53424ce5774245c3b12a7c4461ffd27e98c7a453..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3596 zcmb_fPj3@P6tC^r;7J<7(gYKgvY1E&7j|*l1KkkN`VUd0lvqwcYGu`0ugCVldUm@z zPDmqPIQ8C-&|B4Wzd@xcQdOzFapKTJ#YaFKI)8S@8z-R#)fey1&U^FT@BQ9;^X}gF zdLFo@u0srci@>(p+E+;rs-Eu>*LEGXHRyDpui9?kLk{#cRjq8P54U#IYGq^RDisaf zfp0@Y?YeH)fx7LugSNiw*_Lg?AkcSE*G_Do^Z1rK_SvFMHYo#wCvDy}~8tYs` zqs%lk9!DA)kBh4S*p3whDqS?WT5teV`tt@Y2ia;sEJFX5P|!pe5o9^&JL<}s+OeDf zQt9J+I|FPJAN{8 zW4D7S>4??$PPUlG{MJ1bM%Zk(Wk4TL<}b?-uz*|#-_L`>k8qRpe0R|8c>|J5Q$=aMZas^yXZZRR zpxDA>*ltqKo>1e1+!-~soD~XJK_(cqsO`D4RA74L)5$F2BFaZ#rf=Cjgkh8HdoTy6 zimXCiXEq{CJ*BlI$W3!o*fKS7v^>L>7YiV>Ewmj)Q~@Bgw~5*U)ciLf&9R_IoZsFt zcdE@t54UU8^2URWYGv*NB@5E^s#*DJE@CKDYmUzuW!}o zrr3u^wTjr5HoC9OHpq|oD1t)?6=<~N>oOwBy$DMEAbc9?j%$l-)DNP^p&o+o`hk8R zpNILM6JVk2LmF18vkt!<(2P{R02$BnDencdN;h7b$=BvJa5YjIgb|WvZH5Ocm%xlX zLxRS_oK)_Dto+2OIK8qoNu;@SehXY!hvb;4cj75fDsV%WCc!Vi59T*fFwz+O58j^# zS`3lUbeCJ-?|hFCsr`@9@w85dHo&55|M@+Jf3Neh1gBW9h!QhmqYWDc-J@~az7@(Ogy_3Ei(E9KjRxCCnw@)evP|&TM@3Z z)^&=b@tRc_zA$;4Q+`Q+*`s-*+PzBR(RhYdbr#%a*W=T-7!A!-<0)-dE} k`dDmbICh_1mzUF=OnLzEcbcLofv3U$q;q8vpgoogle.cloud.vpcaccess.v1.Connector - */ -class Connector extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name in the format `projects/*/locations/*/connectors/*`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Name of a VPC network. - * - * Generated from protobuf field string network = 2; - */ - protected $network = ''; - /** - * The range of internal addresses that follows RFC 4632 notation. - * Example: `10.132.0.0/28`. - * - * Generated from protobuf field string ip_cidr_range = 3; - */ - protected $ip_cidr_range = ''; - /** - * Output only. State of the VPC access connector. - * - * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Minimum throughput of the connector in Mbps. Default and min is 200. - * - * Generated from protobuf field int32 min_throughput = 5; - */ - protected $min_throughput = 0; - /** - * Maximum throughput of the connector in Mbps. Default is 300, max is 1000. - * - * Generated from protobuf field int32 max_throughput = 6; - */ - protected $max_throughput = 0; - /** - * Output only. List of projects using the connector. - * - * Generated from protobuf field repeated string connected_projects = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $connected_projects; - /** - * The subnet in which to house the VPC Access Connector. - * - * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.Subnet subnet = 8; - */ - protected $subnet = null; - /** - * Machine type of VM Instance underlying connector. Default is e2-micro - * - * Generated from protobuf field string machine_type = 10; - */ - protected $machine_type = ''; - /** - * Minimum value of instances in autoscaling group underlying the connector. - * - * Generated from protobuf field int32 min_instances = 11; - */ - protected $min_instances = 0; - /** - * Maximum value of instances in autoscaling group underlying the connector. - * - * Generated from protobuf field int32 max_instances = 12; - */ - protected $max_instances = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name in the format `projects/*/locations/*/connectors/*`. - * @type string $network - * Name of a VPC network. - * @type string $ip_cidr_range - * The range of internal addresses that follows RFC 4632 notation. - * Example: `10.132.0.0/28`. - * @type int $state - * Output only. State of the VPC access connector. - * @type int $min_throughput - * Minimum throughput of the connector in Mbps. Default and min is 200. - * @type int $max_throughput - * Maximum throughput of the connector in Mbps. Default is 300, max is 1000. - * @type array|\Google\Protobuf\Internal\RepeatedField $connected_projects - * Output only. List of projects using the connector. - * @type \Google\Cloud\VpcAccess\V1\Connector\Subnet $subnet - * The subnet in which to house the VPC Access Connector. - * @type string $machine_type - * Machine type of VM Instance underlying connector. Default is e2-micro - * @type int $min_instances - * Minimum value of instances in autoscaling group underlying the connector. - * @type int $max_instances - * Maximum value of instances in autoscaling group underlying the connector. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); - parent::__construct($data); - } - - /** - * The resource name in the format `projects/*/locations/*/connectors/*`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name in the format `projects/*/locations/*/connectors/*`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Name of a VPC network. - * - * Generated from protobuf field string network = 2; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Name of a VPC network. - * - * Generated from protobuf field string network = 2; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * The range of internal addresses that follows RFC 4632 notation. - * Example: `10.132.0.0/28`. - * - * Generated from protobuf field string ip_cidr_range = 3; - * @return string - */ - public function getIpCidrRange() - { - return $this->ip_cidr_range; - } - - /** - * The range of internal addresses that follows RFC 4632 notation. - * Example: `10.132.0.0/28`. - * - * Generated from protobuf field string ip_cidr_range = 3; - * @param string $var - * @return $this - */ - public function setIpCidrRange($var) - { - GPBUtil::checkString($var, True); - $this->ip_cidr_range = $var; - - return $this; - } - - /** - * Output only. State of the VPC access connector. - * - * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the VPC access connector. - * - * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VpcAccess\V1\Connector\State::class); - $this->state = $var; - - return $this; - } - - /** - * Minimum throughput of the connector in Mbps. Default and min is 200. - * - * Generated from protobuf field int32 min_throughput = 5; - * @return int - */ - public function getMinThroughput() - { - return $this->min_throughput; - } - - /** - * Minimum throughput of the connector in Mbps. Default and min is 200. - * - * Generated from protobuf field int32 min_throughput = 5; - * @param int $var - * @return $this - */ - public function setMinThroughput($var) - { - GPBUtil::checkInt32($var); - $this->min_throughput = $var; - - return $this; - } - - /** - * Maximum throughput of the connector in Mbps. Default is 300, max is 1000. - * - * Generated from protobuf field int32 max_throughput = 6; - * @return int - */ - public function getMaxThroughput() - { - return $this->max_throughput; - } - - /** - * Maximum throughput of the connector in Mbps. Default is 300, max is 1000. - * - * Generated from protobuf field int32 max_throughput = 6; - * @param int $var - * @return $this - */ - public function setMaxThroughput($var) - { - GPBUtil::checkInt32($var); - $this->max_throughput = $var; - - return $this; - } - - /** - * Output only. List of projects using the connector. - * - * Generated from protobuf field repeated string connected_projects = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConnectedProjects() - { - return $this->connected_projects; - } - - /** - * Output only. List of projects using the connector. - * - * Generated from protobuf field repeated string connected_projects = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConnectedProjects($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->connected_projects = $arr; - - return $this; - } - - /** - * The subnet in which to house the VPC Access Connector. - * - * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.Subnet subnet = 8; - * @return \Google\Cloud\VpcAccess\V1\Connector\Subnet|null - */ - public function getSubnet() - { - return $this->subnet; - } - - public function hasSubnet() - { - return isset($this->subnet); - } - - public function clearSubnet() - { - unset($this->subnet); - } - - /** - * The subnet in which to house the VPC Access Connector. - * - * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.Subnet subnet = 8; - * @param \Google\Cloud\VpcAccess\V1\Connector\Subnet $var - * @return $this - */ - public function setSubnet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VpcAccess\V1\Connector\Subnet::class); - $this->subnet = $var; - - return $this; - } - - /** - * Machine type of VM Instance underlying connector. Default is e2-micro - * - * Generated from protobuf field string machine_type = 10; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * Machine type of VM Instance underlying connector. Default is e2-micro - * - * Generated from protobuf field string machine_type = 10; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * Minimum value of instances in autoscaling group underlying the connector. - * - * Generated from protobuf field int32 min_instances = 11; - * @return int - */ - public function getMinInstances() - { - return $this->min_instances; - } - - /** - * Minimum value of instances in autoscaling group underlying the connector. - * - * Generated from protobuf field int32 min_instances = 11; - * @param int $var - * @return $this - */ - public function setMinInstances($var) - { - GPBUtil::checkInt32($var); - $this->min_instances = $var; - - return $this; - } - - /** - * Maximum value of instances in autoscaling group underlying the connector. - * - * Generated from protobuf field int32 max_instances = 12; - * @return int - */ - public function getMaxInstances() - { - return $this->max_instances; - } - - /** - * Maximum value of instances in autoscaling group underlying the connector. - * - * Generated from protobuf field int32 max_instances = 12; - * @param int $var - * @return $this - */ - public function setMaxInstances($var) - { - GPBUtil::checkInt32($var); - $this->max_instances = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/State.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/State.php deleted file mode 100644 index a8ea7061ed87..000000000000 --- a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/State.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.vpcaccess.v1.Connector.State - */ -class State -{ - /** - * Invalid state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Connector is deployed and ready to receive traffic. - * - * Generated from protobuf enum READY = 1; - */ - const READY = 1; - /** - * An Insert operation is in progress. Transient condition. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * A Delete operation is in progress. Transient condition. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * Connector is in a bad state, manual deletion recommended. - * - * Generated from protobuf enum ERROR = 4; - */ - const ERROR = 4; - /** - * The connector is being updated. - * - * Generated from protobuf enum UPDATING = 5; - */ - const UPDATING = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::READY => 'READY', - self::CREATING => 'CREATING', - self::DELETING => 'DELETING', - self::ERROR => 'ERROR', - self::UPDATING => 'UPDATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VpcAccess\V1\Connector_State::class); - diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/Subnet.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/Subnet.php deleted file mode 100644 index 4ea82c2b3192..000000000000 --- a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/Subnet.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.vpcaccess.v1.Connector.Subnet - */ -class Subnet extends \Google\Protobuf\Internal\Message -{ - /** - * Subnet name (relative, not fully qualified). - * E.g. if the full subnet selfLink is - * https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} - * the correct input for this field would be {subnetName} - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Project in which the subnet exists. - * If not set, this project is assumed to be the project for which - * the connector create request was issued. - * - * Generated from protobuf field string project_id = 2; - */ - protected $project_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Subnet name (relative, not fully qualified). - * E.g. if the full subnet selfLink is - * https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} - * the correct input for this field would be {subnetName} - * @type string $project_id - * Project in which the subnet exists. - * If not set, this project is assumed to be the project for which - * the connector create request was issued. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); - parent::__construct($data); - } - - /** - * Subnet name (relative, not fully qualified). - * E.g. if the full subnet selfLink is - * https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} - * the correct input for this field would be {subnetName} - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Subnet name (relative, not fully qualified). - * E.g. if the full subnet selfLink is - * https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} - * the correct input for this field would be {subnetName} - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Project in which the subnet exists. - * If not set, this project is assumed to be the project for which - * the connector create request was issued. - * - * Generated from protobuf field string project_id = 2; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Project in which the subnet exists. - * If not set, this project is assumed to be the project for which - * the connector create request was issued. - * - * Generated from protobuf field string project_id = 2; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Subnet::class, \Google\Cloud\VpcAccess\V1\Connector_Subnet::class); - diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/CreateConnectorRequest.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/CreateConnectorRequest.php deleted file mode 100644 index 8b40233b6b2d..000000000000 --- a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/CreateConnectorRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.vpcaccess.v1.CreateConnectorRequest - */ -class CreateConnectorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location in which the configuration should be created, - * specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID to use for this connector. - * - * Generated from protobuf field string connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $connector_id = ''; - /** - * Required. Resource to create. - * - * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector connector = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $connector = null; - - /** - * @param string $parent Required. The project and location in which the configuration should be created, - * specified in the format `projects/*/locations/*`. Please see - * {@see VpcAccessServiceClient::locationName()} for help formatting this field. - * @param string $connectorId Required. The ID to use for this connector. - * @param \Google\Cloud\VpcAccess\V1\Connector $connector Required. Resource to create. - * - * @return \Google\Cloud\VpcAccess\V1\CreateConnectorRequest - * - * @experimental - */ - public static function build(string $parent, string $connectorId, \Google\Cloud\VpcAccess\V1\Connector $connector): self - { - return (new self()) - ->setParent($parent) - ->setConnectorId($connectorId) - ->setConnector($connector); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location in which the configuration should be created, - * specified in the format `projects/*/locations/*`. - * @type string $connector_id - * Required. The ID to use for this connector. - * @type \Google\Cloud\VpcAccess\V1\Connector $connector - * Required. Resource to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location in which the configuration should be created, - * specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project and location in which the configuration should be created, - * specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ID to use for this connector. - * - * Generated from protobuf field string connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getConnectorId() - { - return $this->connector_id; - } - - /** - * Required. The ID to use for this connector. - * - * Generated from protobuf field string connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setConnectorId($var) - { - GPBUtil::checkString($var, True); - $this->connector_id = $var; - - return $this; - } - - /** - * Required. Resource to create. - * - * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector connector = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VpcAccess\V1\Connector|null - */ - public function getConnector() - { - return $this->connector; - } - - public function hasConnector() - { - return isset($this->connector); - } - - public function clearConnector() - { - unset($this->connector); - } - - /** - * Required. Resource to create. - * - * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector connector = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VpcAccess\V1\Connector $var - * @return $this - */ - public function setConnector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VpcAccess\V1\Connector::class); - $this->connector = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/DeleteConnectorRequest.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/DeleteConnectorRequest.php deleted file mode 100644 index dff74532e1f0..000000000000 --- a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/DeleteConnectorRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vpcaccess.v1.DeleteConnectorRequest - */ -class DeleteConnectorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of a Serverless VPC Access connector to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of a Serverless VPC Access connector to delete. Please see - * {@see VpcAccessServiceClient::connectorName()} for help formatting this field. - * - * @return \Google\Cloud\VpcAccess\V1\DeleteConnectorRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of a Serverless VPC Access connector to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of a Serverless VPC Access connector to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of a Serverless VPC Access connector to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/GetConnectorRequest.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/GetConnectorRequest.php deleted file mode 100644 index e0e5f30df34b..000000000000 --- a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/GetConnectorRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vpcaccess.v1.GetConnectorRequest - */ -class GetConnectorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of a Serverless VPC Access connector to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of a Serverless VPC Access connector to get. Please see - * {@see VpcAccessServiceClient::connectorName()} for help formatting this field. - * - * @return \Google\Cloud\VpcAccess\V1\GetConnectorRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of a Serverless VPC Access connector to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of a Serverless VPC Access connector to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of a Serverless VPC Access connector to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsRequest.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsRequest.php deleted file mode 100644 index c5aa13828211..000000000000 --- a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsRequest.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.vpcaccess.v1.ListConnectorsRequest - */ -class ListConnectorsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the routes should be listed. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of functions to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Continuation token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The project and location from which the routes should be listed. Please see - * {@see VpcAccessServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VpcAccess\V1\ListConnectorsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location from which the routes should be listed. - * @type int $page_size - * Maximum number of functions to return per call. - * @type string $page_token - * Continuation token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the routes should be listed. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project and location from which the routes should be listed. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of functions to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of functions to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Continuation token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Continuation token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsResponse.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsResponse.php deleted file mode 100644 index 58ddaece4918..000000000000 --- a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.vpcaccess.v1.ListConnectorsResponse - */ -class ListConnectorsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of Serverless VPC Access connectors. - * - * Generated from protobuf field repeated .google.cloud.vpcaccess.v1.Connector connectors = 1; - */ - private $connectors; - /** - * Continuation token. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VpcAccess\V1\Connector>|\Google\Protobuf\Internal\RepeatedField $connectors - * List of Serverless VPC Access connectors. - * @type string $next_page_token - * Continuation token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); - parent::__construct($data); - } - - /** - * List of Serverless VPC Access connectors. - * - * Generated from protobuf field repeated .google.cloud.vpcaccess.v1.Connector connectors = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConnectors() - { - return $this->connectors; - } - - /** - * List of Serverless VPC Access connectors. - * - * Generated from protobuf field repeated .google.cloud.vpcaccess.v1.Connector connectors = 1; - * @param array<\Google\Cloud\VpcAccess\V1\Connector>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConnectors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VpcAccess\V1\Connector::class); - $this->connectors = $arr; - - return $this; - } - - /** - * Continuation token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Continuation token. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/OperationMetadata.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/OperationMetadata.php deleted file mode 100644 index 45680ee1e154..000000000000 --- a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/OperationMetadata.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.vpcaccess.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Method that initiated the operation e.g. - * google.cloud.vpcaccess.v1.Connectors.CreateConnector. - * - * Generated from protobuf field string method = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $method = ''; - /** - * Output only. Time when the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Time when the operation completed. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Name of the resource that this operation is acting on e.g. - * projects/my-project/locations/us-central1/connectors/v1. - * - * Generated from protobuf field string target = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $target = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $method - * Output only. Method that initiated the operation e.g. - * google.cloud.vpcaccess.v1.Connectors.CreateConnector. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Time when the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. Time when the operation completed. - * @type string $target - * Output only. Name of the resource that this operation is acting on e.g. - * projects/my-project/locations/us-central1/connectors/v1. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Method that initiated the operation e.g. - * google.cloud.vpcaccess.v1.Connectors.CreateConnector. - * - * Generated from protobuf field string method = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMethod() - { - return $this->method; - } - - /** - * Output only. Method that initiated the operation e.g. - * google.cloud.vpcaccess.v1.Connectors.CreateConnector. - * - * Generated from protobuf field string method = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMethod($var) - { - GPBUtil::checkString($var, True); - $this->method = $var; - - return $this; - } - - /** - * Output only. Time when the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Time when the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Time when the operation completed. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. Time when the operation completed. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Name of the resource that this operation is acting on e.g. - * projects/my-project/locations/us-central1/connectors/v1. - * - * Generated from protobuf field string target = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Name of the resource that this operation is acting on e.g. - * projects/my-project/locations/us-central1/connectors/v1. - * - * Generated from protobuf field string target = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/VpcAccessServiceGrpcClient.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/VpcAccessServiceGrpcClient.php deleted file mode 100644 index 47280648734e..000000000000 --- a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/VpcAccessServiceGrpcClient.php +++ /dev/null @@ -1,99 +0,0 @@ -_simpleRequest('/google.cloud.vpcaccess.v1.VpcAccessService/CreateConnector', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource - * does not exist. - * @param \Google\Cloud\VpcAccess\V1\GetConnectorRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetConnector(\Google\Cloud\VpcAccess\V1\GetConnectorRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vpcaccess.v1.VpcAccessService/GetConnector', - $argument, - ['\Google\Cloud\VpcAccess\V1\Connector', 'decode'], - $metadata, $options); - } - - /** - * Lists Serverless VPC Access connectors. - * @param \Google\Cloud\VpcAccess\V1\ListConnectorsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListConnectors(\Google\Cloud\VpcAccess\V1\ListConnectorsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vpcaccess.v1.VpcAccessService/ListConnectors', - $argument, - ['\Google\Cloud\VpcAccess\V1\ListConnectorsResponse', 'decode'], - $metadata, $options); - } - - /** - * Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the - * resource does not exist. - * @param \Google\Cloud\VpcAccess\V1\DeleteConnectorRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteConnector(\Google\Cloud\VpcAccess\V1\DeleteConnectorRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.vpcaccess.v1.VpcAccessService/DeleteConnector', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/create_connector.php b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/create_connector.php deleted file mode 100644 index 8feb96c4aeb2..000000000000 --- a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/create_connector.php +++ /dev/null @@ -1,84 +0,0 @@ -createConnector($formattedParent, $connectorId, $connector); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Connector $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VpcAccessServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $connectorId = '[CONNECTOR_ID]'; - - create_connector_sample($formattedParent, $connectorId); -} -// [END vpcaccess_v1_generated_VpcAccessService_CreateConnector_sync] diff --git a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/delete_connector.php b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/delete_connector.php deleted file mode 100644 index 54a52e1af55d..000000000000 --- a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/delete_connector.php +++ /dev/null @@ -1,76 +0,0 @@ -deleteConnector($formattedName); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VpcAccessServiceClient::connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); - - delete_connector_sample($formattedName); -} -// [END vpcaccess_v1_generated_VpcAccessService_DeleteConnector_sync] diff --git a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/get_connector.php b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/get_connector.php deleted file mode 100644 index 59d5356bed21..000000000000 --- a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/get_connector.php +++ /dev/null @@ -1,67 +0,0 @@ -getConnector($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = VpcAccessServiceClient::connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); - - get_connector_sample($formattedName); -} -// [END vpcaccess_v1_generated_VpcAccessService_GetConnector_sync] diff --git a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_connectors.php b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_connectors.php deleted file mode 100644 index c352bf7b7af6..000000000000 --- a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_connectors.php +++ /dev/null @@ -1,71 +0,0 @@ -listConnectors($formattedParent); - - /** @var Connector $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = VpcAccessServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_connectors_sample($formattedParent); -} -// [END vpcaccess_v1_generated_VpcAccessService_ListConnectors_sync] diff --git a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_locations.php b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_locations.php deleted file mode 100644 index 0806a5c27ccb..000000000000 --- a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vpcaccess_v1_generated_VpcAccessService_ListLocations_sync] diff --git a/owl-bot-staging/VpcAccess/v1/src/V1/Gapic/VpcAccessServiceGapicClient.php b/owl-bot-staging/VpcAccess/v1/src/V1/Gapic/VpcAccessServiceGapicClient.php deleted file mode 100644 index ac0e4a6c82e7..000000000000 --- a/owl-bot-staging/VpcAccess/v1/src/V1/Gapic/VpcAccessServiceGapicClient.php +++ /dev/null @@ -1,662 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $connectorId = 'connector_id'; - * $connector = new Connector(); - * $operationResponse = $vpcAccessServiceClient->createConnector($formattedParent, $connectorId, $connector); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vpcAccessServiceClient->createConnector($formattedParent, $connectorId, $connector); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vpcAccessServiceClient->resumeOperation($operationName, 'createConnector'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vpcAccessServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - */ -class VpcAccessServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.vpcaccess.v1.VpcAccessService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'vpcaccess.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $connectorNameTemplate; - - private static $locationNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/vpc_access_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/vpc_access_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/vpc_access_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/vpc_access_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getConnectorNameTemplate() - { - if (self::$connectorNameTemplate == null) { - self::$connectorNameTemplate = new PathTemplate('projects/{project}/locations/{location}/connectors/{connector}'); - } - - return self::$connectorNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'connector' => self::getConnectorNameTemplate(), - 'location' => self::getLocationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a connector - * resource. - * - * @param string $project - * @param string $location - * @param string $connector - * - * @return string The formatted connector resource. - */ - public static function connectorName($project, $location, $connector) - { - return self::getConnectorNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'connector' => $connector, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - connector: projects/{project}/locations/{location}/connectors/{connector} - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'vpcaccess.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a Serverless VPC Access connector, returns an operation. - * - * Sample code: - * ``` - * $vpcAccessServiceClient = new VpcAccessServiceClient(); - * try { - * $formattedParent = $vpcAccessServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $connectorId = 'connector_id'; - * $connector = new Connector(); - * $operationResponse = $vpcAccessServiceClient->createConnector($formattedParent, $connectorId, $connector); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vpcAccessServiceClient->createConnector($formattedParent, $connectorId, $connector); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vpcAccessServiceClient->resumeOperation($operationName, 'createConnector'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vpcAccessServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The project and location in which the configuration should be created, - * specified in the format `projects/*/locations/*`. - * @param string $connectorId Required. The ID to use for this connector. - * @param Connector $connector Required. Resource to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createConnector($parent, $connectorId, $connector, array $optionalArgs = []) - { - $request = new CreateConnectorRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setConnectorId($connectorId); - $request->setConnector($connector); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateConnector', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the - * resource does not exist. - * - * Sample code: - * ``` - * $vpcAccessServiceClient = new VpcAccessServiceClient(); - * try { - * $formattedName = $vpcAccessServiceClient->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); - * $operationResponse = $vpcAccessServiceClient->deleteConnector($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $vpcAccessServiceClient->deleteConnector($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $vpcAccessServiceClient->resumeOperation($operationName, 'deleteConnector'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $vpcAccessServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Name of a Serverless VPC Access connector to delete. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteConnector($name, array $optionalArgs = []) - { - $request = new DeleteConnectorRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteConnector', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource - * does not exist. - * - * Sample code: - * ``` - * $vpcAccessServiceClient = new VpcAccessServiceClient(); - * try { - * $formattedName = $vpcAccessServiceClient->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); - * $response = $vpcAccessServiceClient->getConnector($formattedName); - * } finally { - * $vpcAccessServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Name of a Serverless VPC Access connector to get. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\VpcAccess\V1\Connector - * - * @throws ApiException if the remote call fails - */ - public function getConnector($name, array $optionalArgs = []) - { - $request = new GetConnectorRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetConnector', Connector::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists Serverless VPC Access connectors. - * - * Sample code: - * ``` - * $vpcAccessServiceClient = new VpcAccessServiceClient(); - * try { - * $formattedParent = $vpcAccessServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $vpcAccessServiceClient->listConnectors($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $vpcAccessServiceClient->listConnectors($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $vpcAccessServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The project and location from which the routes should be listed. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listConnectors($parent, array $optionalArgs = []) - { - $request = new ListConnectorsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListConnectors', $optionalArgs, ListConnectorsResponse::class, $request); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $vpcAccessServiceClient = new VpcAccessServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $vpcAccessServiceClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $vpcAccessServiceClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $vpcAccessServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/VpcAccess/v1/src/V1/VpcAccessServiceClient.php b/owl-bot-staging/VpcAccess/v1/src/V1/VpcAccessServiceClient.php deleted file mode 100644 index 19dc8ae100a5..000000000000 --- a/owl-bot-staging/VpcAccess/v1/src/V1/VpcAccessServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.vpcaccess.v1.VpcAccessService' => [ - 'CreateConnector' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VpcAccess\V1\Connector', - 'metadataReturnType' => '\Google\Cloud\VpcAccess\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteConnector' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VpcAccess\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetConnector' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VpcAccess\V1\Connector', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListConnectors' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getConnectors', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VpcAccess\V1\ListConnectorsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'connector' => 'projects/{project}/locations/{location}/connectors/{connector}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_rest_client_config.php b/owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_rest_client_config.php deleted file mode 100644 index 941ea8196186..000000000000 --- a/owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_rest_client_config.php +++ /dev/null @@ -1,94 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.vpcaccess.v1.VpcAccessService' => [ - 'CreateConnector' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/connectors', - 'body' => 'connector', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'connector_id', - ], - ], - 'DeleteConnector' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/connectors/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetConnector' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/connectors/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListConnectors' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/connectors', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/VpcAccess/v1/tests/Unit/V1/VpcAccessServiceClientTest.php b/owl-bot-staging/VpcAccess/v1/tests/Unit/V1/VpcAccessServiceClientTest.php deleted file mode 100644 index 57ca058785a2..000000000000 --- a/owl-bot-staging/VpcAccess/v1/tests/Unit/V1/VpcAccessServiceClientTest.php +++ /dev/null @@ -1,531 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return VpcAccessServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new VpcAccessServiceClient($options); - } - - /** @test */ - public function createConnectorTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createConnectorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $network = 'network1843485230'; - $ipCidrRange = 'ipCidrRange-2049366326'; - $minThroughput = 2064735799; - $maxThroughput = 1407819749; - $machineType = 'machineType1838323762'; - $minInstances = 1491624145; - $maxInstances = 330682013; - $expectedResponse = new Connector(); - $expectedResponse->setName($name); - $expectedResponse->setNetwork($network); - $expectedResponse->setIpCidrRange($ipCidrRange); - $expectedResponse->setMinThroughput($minThroughput); - $expectedResponse->setMaxThroughput($maxThroughput); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setMinInstances($minInstances); - $expectedResponse->setMaxInstances($maxInstances); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createConnectorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $connectorId = 'connectorId1928724045'; - $connector = new Connector(); - $response = $gapicClient->createConnector($formattedParent, $connectorId, $connector); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vpcaccess.v1.VpcAccessService/CreateConnector', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getConnectorId(); - $this->assertProtobufEquals($connectorId, $actualValue); - $actualValue = $actualApiRequestObject->getConnector(); - $this->assertProtobufEquals($connector, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createConnectorTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createConnectorExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createConnectorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $connectorId = 'connectorId1928724045'; - $connector = new Connector(); - $response = $gapicClient->createConnector($formattedParent, $connectorId, $connector); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createConnectorTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteConnectorTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteConnectorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteConnectorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); - $response = $gapicClient->deleteConnector($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vpcaccess.v1.VpcAccessService/DeleteConnector', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteConnectorTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteConnectorExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteConnectorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); - $response = $gapicClient->deleteConnector($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteConnectorTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getConnectorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $network = 'network1843485230'; - $ipCidrRange = 'ipCidrRange-2049366326'; - $minThroughput = 2064735799; - $maxThroughput = 1407819749; - $machineType = 'machineType1838323762'; - $minInstances = 1491624145; - $maxInstances = 330682013; - $expectedResponse = new Connector(); - $expectedResponse->setName($name2); - $expectedResponse->setNetwork($network); - $expectedResponse->setIpCidrRange($ipCidrRange); - $expectedResponse->setMinThroughput($minThroughput); - $expectedResponse->setMaxThroughput($maxThroughput); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setMinInstances($minInstances); - $expectedResponse->setMaxInstances($maxInstances); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); - $response = $gapicClient->getConnector($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vpcaccess.v1.VpcAccessService/GetConnector', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getConnectorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); - try { - $gapicClient->getConnector($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConnectorsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $connectorsElement = new Connector(); - $connectors = [ - $connectorsElement, - ]; - $expectedResponse = new ListConnectorsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setConnectors($connectors); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listConnectors($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getConnectors()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vpcaccess.v1.VpcAccessService/ListConnectors', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConnectorsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listConnectors($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/WebRisk/v1/proto/src/GPBMetadata/Google/Cloud/Webrisk/V1/Webrisk.php b/owl-bot-staging/WebRisk/v1/proto/src/GPBMetadata/Google/Cloud/Webrisk/V1/Webrisk.php deleted file mode 100644 index 5c4a86d2f058d6643bd5fb48cb7e3dcc7093bbc8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6405 zcmd5=&2t-B5sxIxA1%k0U!26zZYskhTkAN^2zxgnD4T?lG`1CFNl0=Giwo6w^kh#W z&xo0k9kZ1Shdpqis6A1|1qy1b_7C99ITRO`Q%+RDi9dk@MZfoEMv`s$qu2w!cr?@9 zuRnj?uRnR#+3mn>X_Z>k(LLIfwhtw5mr5PS_H4s$OWWO6i#n2F?{&;Jbrea;m!(p< zE@}Bf{aeWD+Fi$>8EMD1ciJ>1~%H?{V5z*D^fQwj{<-whTIdR}wNA?VXN|7C(^!bt=pW=zy()xnamFLLf5f3^LPDYnK-j0%?lkfnPW;mkvykM`%jl7hk9Mddd&4^0^WpA zTPHY6?U-AtW!cONw&i9rJ)3$WhB4;aCbhha@vNA%-OSQmec!a5i?LRzpC;#4vS?d7 zPS>(bYiFz6Vaa(hBg5F$O-wjX-|L*LF^~EEr=}lawb={a7tB7in6De#zO#LT8+`bcXil*!3%~q>Qf7(Sak|&Vx_=kpf z*r9U~DKbB`d|Me}sv?Bcku)3oyBZ}|;qpFpT#RJHvtLnbE{Xys$&VpnUT&Ms`$Of50BY!_L#zzJM4rO9L-*``MA^Af zE@1II0;)a_xdAg4J!lMO!WasgBtL+0W0xAQ-0t4oI2ZkFsOVE&sN{Sxiq_aD)hb%9uu{J_dcd*axBlKLv6RFQ50DXe~ zhagPC2y>o~%SS>YaQT#ikr8WWg(62F;~{{fA2gV34!6ux@=#Az^#kE1@(dD=Y0!X? zA#q}PVK^hw=4sp0HOsJ@I6BC`iolgVjY151go05a(`q7%XaI>*N(wb92vWq)Nv=}B zdU2g@0`$q7hOs~t%b>XYF--IvfY~e(x#8k)%daO69k!vu;4e00&&f+-O@@U5yG3$qi*xb67$GdQx%)%sPzC`3?gZdn6M3eGQ0BYUs zJ(D*;@=YUFO#Z`YkkAFIWfK)Z-|k{Z?i)JJ>RF6YQ5hHSdIgyA#NdLHM$2rXQ31v% zL(@ql4wr-zgwI7bVAdD)vg>+g%QX0G>W?koIgd0U_<28j>d#ojeWy%A+%;@R1TDID ziIgGUru($bqcyes^gQSE+uHI=1GVS}&AKjiQ=8X6SXevaXgk)MDd> zRt-tf@M%bF)U;}&s#VHW?BZA=Np+)MURUc{K6o3G4VdU!rtGDyJKx?0>+ zs~QTwhMl^cE8wYGX|+(&@aWPio^cgsHcFdni5*cZuhcntO#V{@riF9zCT0sxREH!7 zxeBI18ZUq^so{}N0NfC(c=4PD^gSi` z>?MB@g(QFH;dt}^qZbYf!9~nOp!2cktdWp|X%><`d^Lld;i#TCoTDx7l!WDMO7_9cI2JbOUVAuf)>f~wWA zVvpx;b)!^bMHeBLVWPH?%V}C3NBAiFnNtxLi$(kyV*t3K7TEI$d(IWhHGGaQ;0)vs zW4!Ua2iNOsRZXpb!?jQ5;m&cWXlOsIYbDgTkt-u^sjFIYWMPE?eRyBxT5+IXui!Q@B>r0LQ`RNFjliT3;g80{ z@7(=lfnLMMr9o<6vyZuESI7+0Oib;eZgcFnf4v&i@sANm9>sDp90rb(2D%Q1u^u}6 z0bi1DGYvlzZQ=>u;Th(;>4i6GHw1k*)7JsssWXCju}46@j9{q;ct-9Hk6}O)sCqLX z?c2L4;kr_;a5v5mS5gF>OU*A+<;Bw5;LDc3`Dd$t1}|H<`~O!oCD<|< t&X>vfA2XR3OWUJ-UGve0;d*va?9=google.cloud.webrisk.v1.CompressionType - */ -class CompressionType -{ - /** - * Unknown. - * - * Generated from protobuf enum COMPRESSION_TYPE_UNSPECIFIED = 0; - */ - const COMPRESSION_TYPE_UNSPECIFIED = 0; - /** - * Raw, uncompressed data. - * - * Generated from protobuf enum RAW = 1; - */ - const RAW = 1; - /** - * Rice-Golomb encoded data. - * - * Generated from protobuf enum RICE = 2; - */ - const RICE = 2; - - private static $valueToName = [ - self::COMPRESSION_TYPE_UNSPECIFIED => 'COMPRESSION_TYPE_UNSPECIFIED', - self::RAW => 'RAW', - self::RICE => 'RICE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffRequest.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffRequest.php deleted file mode 100644 index d894cf327832..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffRequest.php +++ /dev/null @@ -1,193 +0,0 @@ -google.cloud.webrisk.v1.ComputeThreatListDiffRequest - */ -class ComputeThreatListDiffRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The threat list to update. Only a single ThreatType should be - * specified per request. If you want to handle multiple ThreatTypes, you must - * make one request per ThreatType. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatType threat_type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $threat_type = 0; - /** - * The current version token of the client for the requested list (the - * client version that was received from the last successful diff). - * If the client does not have a version token (this is the first time calling - * ComputeThreatListDiff), this may be left empty and a full database - * snapshot will be returned. - * - * Generated from protobuf field bytes version_token = 2; - */ - protected $version_token = ''; - /** - * Required. The constraints associated with this request. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $constraints = null; - - /** - * @param int $threatType Required. The threat list to update. Only a single ThreatType should be - * specified per request. If you want to handle multiple ThreatTypes, you must - * make one request per ThreatType. - * For allowed values, use constants defined on {@see \Google\Cloud\WebRisk\V1\ThreatType} - * @param string $versionToken The current version token of the client for the requested list (the - * client version that was received from the last successful diff). - * If the client does not have a version token (this is the first time calling - * ComputeThreatListDiff), this may be left empty and a full database - * snapshot will be returned. - * @param \Google\Cloud\WebRisk\V1\ComputeThreatListDiffRequest\Constraints $constraints Required. The constraints associated with this request. - * - * @return \Google\Cloud\WebRisk\V1\ComputeThreatListDiffRequest - * - * @experimental - */ - public static function build(int $threatType, string $versionToken, \Google\Cloud\WebRisk\V1\ComputeThreatListDiffRequest\Constraints $constraints): self - { - return (new self()) - ->setThreatType($threatType) - ->setVersionToken($versionToken) - ->setConstraints($constraints); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $threat_type - * Required. The threat list to update. Only a single ThreatType should be - * specified per request. If you want to handle multiple ThreatTypes, you must - * make one request per ThreatType. - * @type string $version_token - * The current version token of the client for the requested list (the - * client version that was received from the last successful diff). - * If the client does not have a version token (this is the first time calling - * ComputeThreatListDiff), this may be left empty and a full database - * snapshot will be returned. - * @type \Google\Cloud\WebRisk\V1\ComputeThreatListDiffRequest\Constraints $constraints - * Required. The constraints associated with this request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * Required. The threat list to update. Only a single ThreatType should be - * specified per request. If you want to handle multiple ThreatTypes, you must - * make one request per ThreatType. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatType threat_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getThreatType() - { - return $this->threat_type; - } - - /** - * Required. The threat list to update. Only a single ThreatType should be - * specified per request. If you want to handle multiple ThreatTypes, you must - * make one request per ThreatType. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatType threat_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setThreatType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\WebRisk\V1\ThreatType::class); - $this->threat_type = $var; - - return $this; - } - - /** - * The current version token of the client for the requested list (the - * client version that was received from the last successful diff). - * If the client does not have a version token (this is the first time calling - * ComputeThreatListDiff), this may be left empty and a full database - * snapshot will be returned. - * - * Generated from protobuf field bytes version_token = 2; - * @return string - */ - public function getVersionToken() - { - return $this->version_token; - } - - /** - * The current version token of the client for the requested list (the - * client version that was received from the last successful diff). - * If the client does not have a version token (this is the first time calling - * ComputeThreatListDiff), this may be left empty and a full database - * snapshot will be returned. - * - * Generated from protobuf field bytes version_token = 2; - * @param string $var - * @return $this - */ - public function setVersionToken($var) - { - GPBUtil::checkString($var, False); - $this->version_token = $var; - - return $this; - } - - /** - * Required. The constraints associated with this request. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\WebRisk\V1\ComputeThreatListDiffRequest\Constraints|null - */ - public function getConstraints() - { - return $this->constraints; - } - - public function hasConstraints() - { - return isset($this->constraints); - } - - public function clearConstraints() - { - unset($this->constraints); - } - - /** - * Required. The constraints associated with this request. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\WebRisk\V1\ComputeThreatListDiffRequest\Constraints $var - * @return $this - */ - public function setConstraints($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\ComputeThreatListDiffRequest\Constraints::class); - $this->constraints = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffRequest/Constraints.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffRequest/Constraints.php deleted file mode 100644 index c232ef01ef1d..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffRequest/Constraints.php +++ /dev/null @@ -1,154 +0,0 @@ -google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints - */ -class Constraints extends \Google\Protobuf\Internal\Message -{ - /** - * The maximum size in number of entries. The diff will not contain more - * entries than this value. This should be a power of 2 between 2**10 and - * 2**20. If zero, no diff size limit is set. - * - * Generated from protobuf field int32 max_diff_entries = 1; - */ - protected $max_diff_entries = 0; - /** - * Sets the maximum number of entries that the client is willing to have - * in the local database. This should be a power of 2 between 2**10 and - * 2**20. If zero, no database size limit is set. - * - * Generated from protobuf field int32 max_database_entries = 2; - */ - protected $max_database_entries = 0; - /** - * The compression types supported by the client. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3; - */ - private $supported_compressions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $max_diff_entries - * The maximum size in number of entries. The diff will not contain more - * entries than this value. This should be a power of 2 between 2**10 and - * 2**20. If zero, no diff size limit is set. - * @type int $max_database_entries - * Sets the maximum number of entries that the client is willing to have - * in the local database. This should be a power of 2 between 2**10 and - * 2**20. If zero, no database size limit is set. - * @type array|\Google\Protobuf\Internal\RepeatedField $supported_compressions - * The compression types supported by the client. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The maximum size in number of entries. The diff will not contain more - * entries than this value. This should be a power of 2 between 2**10 and - * 2**20. If zero, no diff size limit is set. - * - * Generated from protobuf field int32 max_diff_entries = 1; - * @return int - */ - public function getMaxDiffEntries() - { - return $this->max_diff_entries; - } - - /** - * The maximum size in number of entries. The diff will not contain more - * entries than this value. This should be a power of 2 between 2**10 and - * 2**20. If zero, no diff size limit is set. - * - * Generated from protobuf field int32 max_diff_entries = 1; - * @param int $var - * @return $this - */ - public function setMaxDiffEntries($var) - { - GPBUtil::checkInt32($var); - $this->max_diff_entries = $var; - - return $this; - } - - /** - * Sets the maximum number of entries that the client is willing to have - * in the local database. This should be a power of 2 between 2**10 and - * 2**20. If zero, no database size limit is set. - * - * Generated from protobuf field int32 max_database_entries = 2; - * @return int - */ - public function getMaxDatabaseEntries() - { - return $this->max_database_entries; - } - - /** - * Sets the maximum number of entries that the client is willing to have - * in the local database. This should be a power of 2 between 2**10 and - * 2**20. If zero, no database size limit is set. - * - * Generated from protobuf field int32 max_database_entries = 2; - * @param int $var - * @return $this - */ - public function setMaxDatabaseEntries($var) - { - GPBUtil::checkInt32($var); - $this->max_database_entries = $var; - - return $this; - } - - /** - * The compression types supported by the client. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSupportedCompressions() - { - return $this->supported_compressions; - } - - /** - * The compression types supported by the client. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSupportedCompressions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1\CompressionType::class); - $this->supported_compressions = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Constraints::class, \Google\Cloud\WebRisk\V1\ComputeThreatListDiffRequest_Constraints::class); - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse.php deleted file mode 100644 index 501d0b91126b..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse.php +++ /dev/null @@ -1,315 +0,0 @@ -google.cloud.webrisk.v1.ComputeThreatListDiffResponse - */ -class ComputeThreatListDiffResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The type of response. This may indicate that an action must be taken by the - * client when the response is received. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ComputeThreatListDiffResponse.ResponseType response_type = 4; - */ - protected $response_type = 0; - /** - * A set of entries to add to a local threat type's list. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatEntryAdditions additions = 5; - */ - protected $additions = null; - /** - * A set of entries to remove from a local threat type's list. - * This field may be empty. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatEntryRemovals removals = 6; - */ - protected $removals = null; - /** - * The new opaque client version token. This should be retained by the client - * and passed into the next call of ComputeThreatListDiff as 'version_token'. - * A separate version token should be stored and used for each threatList. - * - * Generated from protobuf field bytes new_version_token = 7; - */ - protected $new_version_token = ''; - /** - * The expected SHA256 hash of the client state; that is, of the sorted list - * of all hashes present in the database after applying the provided diff. - * If the client state doesn't match the expected state, the client must - * discard this diff and retry later. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ComputeThreatListDiffResponse.Checksum checksum = 8; - */ - protected $checksum = null; - /** - * The soonest the client should wait before issuing any diff - * request. Querying sooner is unlikely to produce a meaningful diff. - * Waiting longer is acceptable considering the use case. - * If this field is not set clients may update as soon as they want. - * - * Generated from protobuf field .google.protobuf.Timestamp recommended_next_diff = 2; - */ - protected $recommended_next_diff = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $response_type - * The type of response. This may indicate that an action must be taken by the - * client when the response is received. - * @type \Google\Cloud\WebRisk\V1\ThreatEntryAdditions $additions - * A set of entries to add to a local threat type's list. - * @type \Google\Cloud\WebRisk\V1\ThreatEntryRemovals $removals - * A set of entries to remove from a local threat type's list. - * This field may be empty. - * @type string $new_version_token - * The new opaque client version token. This should be retained by the client - * and passed into the next call of ComputeThreatListDiff as 'version_token'. - * A separate version token should be stored and used for each threatList. - * @type \Google\Cloud\WebRisk\V1\ComputeThreatListDiffResponse\Checksum $checksum - * The expected SHA256 hash of the client state; that is, of the sorted list - * of all hashes present in the database after applying the provided diff. - * If the client state doesn't match the expected state, the client must - * discard this diff and retry later. - * @type \Google\Protobuf\Timestamp $recommended_next_diff - * The soonest the client should wait before issuing any diff - * request. Querying sooner is unlikely to produce a meaningful diff. - * Waiting longer is acceptable considering the use case. - * If this field is not set clients may update as soon as they want. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The type of response. This may indicate that an action must be taken by the - * client when the response is received. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ComputeThreatListDiffResponse.ResponseType response_type = 4; - * @return int - */ - public function getResponseType() - { - return $this->response_type; - } - - /** - * The type of response. This may indicate that an action must be taken by the - * client when the response is received. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ComputeThreatListDiffResponse.ResponseType response_type = 4; - * @param int $var - * @return $this - */ - public function setResponseType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\WebRisk\V1\ComputeThreatListDiffResponse\ResponseType::class); - $this->response_type = $var; - - return $this; - } - - /** - * A set of entries to add to a local threat type's list. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatEntryAdditions additions = 5; - * @return \Google\Cloud\WebRisk\V1\ThreatEntryAdditions|null - */ - public function getAdditions() - { - return $this->additions; - } - - public function hasAdditions() - { - return isset($this->additions); - } - - public function clearAdditions() - { - unset($this->additions); - } - - /** - * A set of entries to add to a local threat type's list. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatEntryAdditions additions = 5; - * @param \Google\Cloud\WebRisk\V1\ThreatEntryAdditions $var - * @return $this - */ - public function setAdditions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\ThreatEntryAdditions::class); - $this->additions = $var; - - return $this; - } - - /** - * A set of entries to remove from a local threat type's list. - * This field may be empty. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatEntryRemovals removals = 6; - * @return \Google\Cloud\WebRisk\V1\ThreatEntryRemovals|null - */ - public function getRemovals() - { - return $this->removals; - } - - public function hasRemovals() - { - return isset($this->removals); - } - - public function clearRemovals() - { - unset($this->removals); - } - - /** - * A set of entries to remove from a local threat type's list. - * This field may be empty. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatEntryRemovals removals = 6; - * @param \Google\Cloud\WebRisk\V1\ThreatEntryRemovals $var - * @return $this - */ - public function setRemovals($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\ThreatEntryRemovals::class); - $this->removals = $var; - - return $this; - } - - /** - * The new opaque client version token. This should be retained by the client - * and passed into the next call of ComputeThreatListDiff as 'version_token'. - * A separate version token should be stored and used for each threatList. - * - * Generated from protobuf field bytes new_version_token = 7; - * @return string - */ - public function getNewVersionToken() - { - return $this->new_version_token; - } - - /** - * The new opaque client version token. This should be retained by the client - * and passed into the next call of ComputeThreatListDiff as 'version_token'. - * A separate version token should be stored and used for each threatList. - * - * Generated from protobuf field bytes new_version_token = 7; - * @param string $var - * @return $this - */ - public function setNewVersionToken($var) - { - GPBUtil::checkString($var, False); - $this->new_version_token = $var; - - return $this; - } - - /** - * The expected SHA256 hash of the client state; that is, of the sorted list - * of all hashes present in the database after applying the provided diff. - * If the client state doesn't match the expected state, the client must - * discard this diff and retry later. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ComputeThreatListDiffResponse.Checksum checksum = 8; - * @return \Google\Cloud\WebRisk\V1\ComputeThreatListDiffResponse\Checksum|null - */ - public function getChecksum() - { - return $this->checksum; - } - - public function hasChecksum() - { - return isset($this->checksum); - } - - public function clearChecksum() - { - unset($this->checksum); - } - - /** - * The expected SHA256 hash of the client state; that is, of the sorted list - * of all hashes present in the database after applying the provided diff. - * If the client state doesn't match the expected state, the client must - * discard this diff and retry later. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ComputeThreatListDiffResponse.Checksum checksum = 8; - * @param \Google\Cloud\WebRisk\V1\ComputeThreatListDiffResponse\Checksum $var - * @return $this - */ - public function setChecksum($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\ComputeThreatListDiffResponse\Checksum::class); - $this->checksum = $var; - - return $this; - } - - /** - * The soonest the client should wait before issuing any diff - * request. Querying sooner is unlikely to produce a meaningful diff. - * Waiting longer is acceptable considering the use case. - * If this field is not set clients may update as soon as they want. - * - * Generated from protobuf field .google.protobuf.Timestamp recommended_next_diff = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRecommendedNextDiff() - { - return $this->recommended_next_diff; - } - - public function hasRecommendedNextDiff() - { - return isset($this->recommended_next_diff); - } - - public function clearRecommendedNextDiff() - { - unset($this->recommended_next_diff); - } - - /** - * The soonest the client should wait before issuing any diff - * request. Querying sooner is unlikely to produce a meaningful diff. - * Waiting longer is acceptable considering the use case. - * If this field is not set clients may update as soon as they want. - * - * Generated from protobuf field .google.protobuf.Timestamp recommended_next_diff = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRecommendedNextDiff($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->recommended_next_diff = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse/Checksum.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse/Checksum.php deleted file mode 100644 index 750cdf43d71f..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse/Checksum.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.webrisk.v1.ComputeThreatListDiffResponse.Checksum - */ -class Checksum extends \Google\Protobuf\Internal\Message -{ - /** - * The SHA256 hash of the client state; that is, of the sorted list of all - * hashes present in the database. - * - * Generated from protobuf field bytes sha256 = 1; - */ - protected $sha256 = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sha256 - * The SHA256 hash of the client state; that is, of the sorted list of all - * hashes present in the database. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The SHA256 hash of the client state; that is, of the sorted list of all - * hashes present in the database. - * - * Generated from protobuf field bytes sha256 = 1; - * @return string - */ - public function getSha256() - { - return $this->sha256; - } - - /** - * The SHA256 hash of the client state; that is, of the sorted list of all - * hashes present in the database. - * - * Generated from protobuf field bytes sha256 = 1; - * @param string $var - * @return $this - */ - public function setSha256($var) - { - GPBUtil::checkString($var, False); - $this->sha256 = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Checksum::class, \Google\Cloud\WebRisk\V1\ComputeThreatListDiffResponse_Checksum::class); - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse/ResponseType.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse/ResponseType.php deleted file mode 100644 index 99910931557d..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ComputeThreatListDiffResponse/ResponseType.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.webrisk.v1.ComputeThreatListDiffResponse.ResponseType - */ -class ResponseType -{ - /** - * Unknown. - * - * Generated from protobuf enum RESPONSE_TYPE_UNSPECIFIED = 0; - */ - const RESPONSE_TYPE_UNSPECIFIED = 0; - /** - * Partial updates are applied to the client's existing local database. - * - * Generated from protobuf enum DIFF = 1; - */ - const DIFF = 1; - /** - * Full updates resets the client's entire local database. This means - * that either the client had no state, was seriously out-of-date, - * or the client is believed to be corrupt. - * - * Generated from protobuf enum RESET = 2; - */ - const RESET = 2; - - private static $valueToName = [ - self::RESPONSE_TYPE_UNSPECIFIED => 'RESPONSE_TYPE_UNSPECIFIED', - self::DIFF => 'DIFF', - self::RESET => 'RESET', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ResponseType::class, \Google\Cloud\WebRisk\V1\ComputeThreatListDiffResponse_ResponseType::class); - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/CreateSubmissionRequest.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/CreateSubmissionRequest.php deleted file mode 100644 index ef012d860b58..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/CreateSubmissionRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.webrisk.v1.CreateSubmissionRequest - */ -class CreateSubmissionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the project that is making the submission. This - * string is in the format "projects/{project_number}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The submission that contains the content of the phishing report. - * - * Generated from protobuf field .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $submission = null; - - /** - * @param string $parent Required. The name of the project that is making the submission. This - * string is in the format "projects/{project_number}". Please see - * {@see WebRiskServiceClient::projectName()} for help formatting this field. - * @param \Google\Cloud\WebRisk\V1\Submission $submission Required. The submission that contains the content of the phishing report. - * - * @return \Google\Cloud\WebRisk\V1\CreateSubmissionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\WebRisk\V1\Submission $submission): self - { - return (new self()) - ->setParent($parent) - ->setSubmission($submission); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the project that is making the submission. This - * string is in the format "projects/{project_number}". - * @type \Google\Cloud\WebRisk\V1\Submission $submission - * Required. The submission that contains the content of the phishing report. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the project that is making the submission. This - * string is in the format "projects/{project_number}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the project that is making the submission. This - * string is in the format "projects/{project_number}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The submission that contains the content of the phishing report. - * - * Generated from protobuf field .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\WebRisk\V1\Submission|null - */ - public function getSubmission() - { - return $this->submission; - } - - public function hasSubmission() - { - return isset($this->submission); - } - - public function clearSubmission() - { - unset($this->submission); - } - - /** - * Required. The submission that contains the content of the phishing report. - * - * Generated from protobuf field .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\WebRisk\V1\Submission $var - * @return $this - */ - public function setSubmission($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\Submission::class); - $this->submission = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RawHashes.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RawHashes.php deleted file mode 100644 index f78700b5e095..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RawHashes.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.webrisk.v1.RawHashes - */ -class RawHashes extends \Google\Protobuf\Internal\Message -{ - /** - * The number of bytes for each prefix encoded below. This field can be - * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). - * In practice this is almost always 4, except in exceptional circumstances. - * - * Generated from protobuf field int32 prefix_size = 1; - */ - protected $prefix_size = 0; - /** - * The hashes, in binary format, concatenated into one long string. Hashes are - * sorted in lexicographic order. For JSON API users, hashes are - * base64-encoded. - * - * Generated from protobuf field bytes raw_hashes = 2; - */ - protected $raw_hashes = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $prefix_size - * The number of bytes for each prefix encoded below. This field can be - * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). - * In practice this is almost always 4, except in exceptional circumstances. - * @type string $raw_hashes - * The hashes, in binary format, concatenated into one long string. Hashes are - * sorted in lexicographic order. For JSON API users, hashes are - * base64-encoded. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The number of bytes for each prefix encoded below. This field can be - * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). - * In practice this is almost always 4, except in exceptional circumstances. - * - * Generated from protobuf field int32 prefix_size = 1; - * @return int - */ - public function getPrefixSize() - { - return $this->prefix_size; - } - - /** - * The number of bytes for each prefix encoded below. This field can be - * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). - * In practice this is almost always 4, except in exceptional circumstances. - * - * Generated from protobuf field int32 prefix_size = 1; - * @param int $var - * @return $this - */ - public function setPrefixSize($var) - { - GPBUtil::checkInt32($var); - $this->prefix_size = $var; - - return $this; - } - - /** - * The hashes, in binary format, concatenated into one long string. Hashes are - * sorted in lexicographic order. For JSON API users, hashes are - * base64-encoded. - * - * Generated from protobuf field bytes raw_hashes = 2; - * @return string - */ - public function getRawHashes() - { - return $this->raw_hashes; - } - - /** - * The hashes, in binary format, concatenated into one long string. Hashes are - * sorted in lexicographic order. For JSON API users, hashes are - * base64-encoded. - * - * Generated from protobuf field bytes raw_hashes = 2; - * @param string $var - * @return $this - */ - public function setRawHashes($var) - { - GPBUtil::checkString($var, False); - $this->raw_hashes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RawIndices.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RawIndices.php deleted file mode 100644 index 49698f202720..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RawIndices.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.webrisk.v1.RawIndices - */ -class RawIndices extends \Google\Protobuf\Internal\Message -{ - /** - * The indices to remove from a lexicographically-sorted local list. - * - * Generated from protobuf field repeated int32 indices = 1; - */ - private $indices; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $indices - * The indices to remove from a lexicographically-sorted local list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The indices to remove from a lexicographically-sorted local list. - * - * Generated from protobuf field repeated int32 indices = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIndices() - { - return $this->indices; - } - - /** - * The indices to remove from a lexicographically-sorted local list. - * - * Generated from protobuf field repeated int32 indices = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIndices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->indices = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RiceDeltaEncoding.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RiceDeltaEncoding.php deleted file mode 100644 index 32b56a763a7e..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/RiceDeltaEncoding.php +++ /dev/null @@ -1,190 +0,0 @@ -google.cloud.webrisk.v1.RiceDeltaEncoding - */ -class RiceDeltaEncoding extends \Google\Protobuf\Internal\Message -{ - /** - * The offset of the first entry in the encoded data, or, if only a single - * integer was encoded, that single integer's value. If the field is empty or - * missing, assume zero. - * - * Generated from protobuf field int64 first_value = 1; - */ - protected $first_value = 0; - /** - * The Golomb-Rice parameter, which is a number between 2 and 28. This field - * is missing (that is, zero) if `num_entries` is zero. - * - * Generated from protobuf field int32 rice_parameter = 2; - */ - protected $rice_parameter = 0; - /** - * The number of entries that are delta encoded in the encoded data. If only a - * single integer was encoded, this will be zero and the single value will be - * stored in `first_value`. - * - * Generated from protobuf field int32 entry_count = 3; - */ - protected $entry_count = 0; - /** - * The encoded deltas that are encoded using the Golomb-Rice coder. - * - * Generated from protobuf field bytes encoded_data = 4; - */ - protected $encoded_data = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $first_value - * The offset of the first entry in the encoded data, or, if only a single - * integer was encoded, that single integer's value. If the field is empty or - * missing, assume zero. - * @type int $rice_parameter - * The Golomb-Rice parameter, which is a number between 2 and 28. This field - * is missing (that is, zero) if `num_entries` is zero. - * @type int $entry_count - * The number of entries that are delta encoded in the encoded data. If only a - * single integer was encoded, this will be zero and the single value will be - * stored in `first_value`. - * @type string $encoded_data - * The encoded deltas that are encoded using the Golomb-Rice coder. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The offset of the first entry in the encoded data, or, if only a single - * integer was encoded, that single integer's value. If the field is empty or - * missing, assume zero. - * - * Generated from protobuf field int64 first_value = 1; - * @return int|string - */ - public function getFirstValue() - { - return $this->first_value; - } - - /** - * The offset of the first entry in the encoded data, or, if only a single - * integer was encoded, that single integer's value. If the field is empty or - * missing, assume zero. - * - * Generated from protobuf field int64 first_value = 1; - * @param int|string $var - * @return $this - */ - public function setFirstValue($var) - { - GPBUtil::checkInt64($var); - $this->first_value = $var; - - return $this; - } - - /** - * The Golomb-Rice parameter, which is a number between 2 and 28. This field - * is missing (that is, zero) if `num_entries` is zero. - * - * Generated from protobuf field int32 rice_parameter = 2; - * @return int - */ - public function getRiceParameter() - { - return $this->rice_parameter; - } - - /** - * The Golomb-Rice parameter, which is a number between 2 and 28. This field - * is missing (that is, zero) if `num_entries` is zero. - * - * Generated from protobuf field int32 rice_parameter = 2; - * @param int $var - * @return $this - */ - public function setRiceParameter($var) - { - GPBUtil::checkInt32($var); - $this->rice_parameter = $var; - - return $this; - } - - /** - * The number of entries that are delta encoded in the encoded data. If only a - * single integer was encoded, this will be zero and the single value will be - * stored in `first_value`. - * - * Generated from protobuf field int32 entry_count = 3; - * @return int - */ - public function getEntryCount() - { - return $this->entry_count; - } - - /** - * The number of entries that are delta encoded in the encoded data. If only a - * single integer was encoded, this will be zero and the single value will be - * stored in `first_value`. - * - * Generated from protobuf field int32 entry_count = 3; - * @param int $var - * @return $this - */ - public function setEntryCount($var) - { - GPBUtil::checkInt32($var); - $this->entry_count = $var; - - return $this; - } - - /** - * The encoded deltas that are encoded using the Golomb-Rice coder. - * - * Generated from protobuf field bytes encoded_data = 4; - * @return string - */ - public function getEncodedData() - { - return $this->encoded_data; - } - - /** - * The encoded deltas that are encoded using the Golomb-Rice coder. - * - * Generated from protobuf field bytes encoded_data = 4; - * @param string $var - * @return $this - */ - public function setEncodedData($var) - { - GPBUtil::checkString($var, False); - $this->encoded_data = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesRequest.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesRequest.php deleted file mode 100644 index c9435e1e82a0..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.webrisk.v1.SearchHashesRequest - */ -class SearchHashesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 - * hash. For JSON requests, this field is base64-encoded. - * Note that if this parameter is provided by a URI, it must be encoded using - * the web safe base64 variant (RFC 4648). - * - * Generated from protobuf field bytes hash_prefix = 1; - */ - protected $hash_prefix = ''; - /** - * Required. The ThreatLists to search in. Multiple ThreatLists may be - * specified. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $threat_types; - - /** - * @param string $hashPrefix A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 - * hash. For JSON requests, this field is base64-encoded. - * Note that if this parameter is provided by a URI, it must be encoded using - * the web safe base64 variant (RFC 4648). - * @param int[] $threatTypes Required. The ThreatLists to search in. Multiple ThreatLists may be - * specified. - * For allowed values, use constants defined on {@see \Google\Cloud\WebRisk\V1\ThreatType} - * - * @return \Google\Cloud\WebRisk\V1\SearchHashesRequest - * - * @experimental - */ - public static function build(string $hashPrefix, array $threatTypes): self - { - return (new self()) - ->setHashPrefix($hashPrefix) - ->setThreatTypes($threatTypes); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $hash_prefix - * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 - * hash. For JSON requests, this field is base64-encoded. - * Note that if this parameter is provided by a URI, it must be encoded using - * the web safe base64 variant (RFC 4648). - * @type array|\Google\Protobuf\Internal\RepeatedField $threat_types - * Required. The ThreatLists to search in. Multiple ThreatLists may be - * specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 - * hash. For JSON requests, this field is base64-encoded. - * Note that if this parameter is provided by a URI, it must be encoded using - * the web safe base64 variant (RFC 4648). - * - * Generated from protobuf field bytes hash_prefix = 1; - * @return string - */ - public function getHashPrefix() - { - return $this->hash_prefix; - } - - /** - * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 - * hash. For JSON requests, this field is base64-encoded. - * Note that if this parameter is provided by a URI, it must be encoded using - * the web safe base64 variant (RFC 4648). - * - * Generated from protobuf field bytes hash_prefix = 1; - * @param string $var - * @return $this - */ - public function setHashPrefix($var) - { - GPBUtil::checkString($var, False); - $this->hash_prefix = $var; - - return $this; - } - - /** - * Required. The ThreatLists to search in. Multiple ThreatLists may be - * specified. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getThreatTypes() - { - return $this->threat_types; - } - - /** - * Required. The ThreatLists to search in. Multiple ThreatLists may be - * specified. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setThreatTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1\ThreatType::class); - $this->threat_types = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesResponse.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesResponse.php deleted file mode 100644 index c390a94c67bc..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesResponse.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.webrisk.v1.SearchHashesResponse - */ -class SearchHashesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The full hashes that matched the requested prefixes. - * The hash will be populated in the key. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.SearchHashesResponse.ThreatHash threats = 1; - */ - private $threats; - /** - * For requested entities that did not match the threat list, how long to - * cache the response until. - * - * Generated from protobuf field .google.protobuf.Timestamp negative_expire_time = 2; - */ - protected $negative_expire_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\WebRisk\V1\SearchHashesResponse\ThreatHash>|\Google\Protobuf\Internal\RepeatedField $threats - * The full hashes that matched the requested prefixes. - * The hash will be populated in the key. - * @type \Google\Protobuf\Timestamp $negative_expire_time - * For requested entities that did not match the threat list, how long to - * cache the response until. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The full hashes that matched the requested prefixes. - * The hash will be populated in the key. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.SearchHashesResponse.ThreatHash threats = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getThreats() - { - return $this->threats; - } - - /** - * The full hashes that matched the requested prefixes. - * The hash will be populated in the key. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.SearchHashesResponse.ThreatHash threats = 1; - * @param array<\Google\Cloud\WebRisk\V1\SearchHashesResponse\ThreatHash>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setThreats($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebRisk\V1\SearchHashesResponse\ThreatHash::class); - $this->threats = $arr; - - return $this; - } - - /** - * For requested entities that did not match the threat list, how long to - * cache the response until. - * - * Generated from protobuf field .google.protobuf.Timestamp negative_expire_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getNegativeExpireTime() - { - return $this->negative_expire_time; - } - - public function hasNegativeExpireTime() - { - return isset($this->negative_expire_time); - } - - public function clearNegativeExpireTime() - { - unset($this->negative_expire_time); - } - - /** - * For requested entities that did not match the threat list, how long to - * cache the response until. - * - * Generated from protobuf field .google.protobuf.Timestamp negative_expire_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setNegativeExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->negative_expire_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesResponse/ThreatHash.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesResponse/ThreatHash.php deleted file mode 100644 index 7e9556854399..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchHashesResponse/ThreatHash.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.webrisk.v1.SearchHashesResponse.ThreatHash - */ -class ThreatHash extends \Google\Protobuf\Internal\Message -{ - /** - * The ThreatList this threat belongs to. - * This must contain at least one entry. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1; - */ - private $threat_types; - /** - * A 32 byte SHA256 hash. This field is in binary format. For JSON - * requests, hashes are base64-encoded. - * - * Generated from protobuf field bytes hash = 2; - */ - protected $hash = ''; - /** - * The cache lifetime for the returned match. Clients must not cache this - * response past this timestamp to avoid false positives. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3; - */ - protected $expire_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $threat_types - * The ThreatList this threat belongs to. - * This must contain at least one entry. - * @type string $hash - * A 32 byte SHA256 hash. This field is in binary format. For JSON - * requests, hashes are base64-encoded. - * @type \Google\Protobuf\Timestamp $expire_time - * The cache lifetime for the returned match. Clients must not cache this - * response past this timestamp to avoid false positives. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The ThreatList this threat belongs to. - * This must contain at least one entry. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getThreatTypes() - { - return $this->threat_types; - } - - /** - * The ThreatList this threat belongs to. - * This must contain at least one entry. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setThreatTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1\ThreatType::class); - $this->threat_types = $arr; - - return $this; - } - - /** - * A 32 byte SHA256 hash. This field is in binary format. For JSON - * requests, hashes are base64-encoded. - * - * Generated from protobuf field bytes hash = 2; - * @return string - */ - public function getHash() - { - return $this->hash; - } - - /** - * A 32 byte SHA256 hash. This field is in binary format. For JSON - * requests, hashes are base64-encoded. - * - * Generated from protobuf field bytes hash = 2; - * @param string $var - * @return $this - */ - public function setHash($var) - { - GPBUtil::checkString($var, False); - $this->hash = $var; - - return $this; - } - - /** - * The cache lifetime for the returned match. Clients must not cache this - * response past this timestamp to avoid false positives. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * The cache lifetime for the returned match. Clients must not cache this - * response past this timestamp to avoid false positives. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ThreatHash::class, \Google\Cloud\WebRisk\V1\SearchHashesResponse_ThreatHash::class); - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisRequest.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisRequest.php deleted file mode 100644 index f9697b4e8665..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisRequest.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.webrisk.v1.SearchUrisRequest - */ -class SearchUrisRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The URI to be checked for matches. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - /** - * Required. The ThreatLists to search in. Multiple ThreatLists may be - * specified. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $threat_types; - - /** - * @param string $uri Required. The URI to be checked for matches. - * @param int[] $threatTypes Required. The ThreatLists to search in. Multiple ThreatLists may be - * specified. - * For allowed values, use constants defined on {@see \Google\Cloud\WebRisk\V1\ThreatType} - * - * @return \Google\Cloud\WebRisk\V1\SearchUrisRequest - * - * @experimental - */ - public static function build(string $uri, array $threatTypes): self - { - return (new self()) - ->setUri($uri) - ->setThreatTypes($threatTypes); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Required. The URI to be checked for matches. - * @type array|\Google\Protobuf\Internal\RepeatedField $threat_types - * Required. The ThreatLists to search in. Multiple ThreatLists may be - * specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * Required. The URI to be checked for matches. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. The URI to be checked for matches. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Required. The ThreatLists to search in. Multiple ThreatLists may be - * specified. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getThreatTypes() - { - return $this->threat_types; - } - - /** - * Required. The ThreatLists to search in. Multiple ThreatLists may be - * specified. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setThreatTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1\ThreatType::class); - $this->threat_types = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisResponse.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisResponse.php deleted file mode 100644 index 0505e3049461..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisResponse.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.webrisk.v1.SearchUrisResponse - */ -class SearchUrisResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The threat list matches. This might be empty if the URI is on no list. - * - * Generated from protobuf field .google.cloud.webrisk.v1.SearchUrisResponse.ThreatUri threat = 1; - */ - protected $threat = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\WebRisk\V1\SearchUrisResponse\ThreatUri $threat - * The threat list matches. This might be empty if the URI is on no list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The threat list matches. This might be empty if the URI is on no list. - * - * Generated from protobuf field .google.cloud.webrisk.v1.SearchUrisResponse.ThreatUri threat = 1; - * @return \Google\Cloud\WebRisk\V1\SearchUrisResponse\ThreatUri|null - */ - public function getThreat() - { - return $this->threat; - } - - public function hasThreat() - { - return isset($this->threat); - } - - public function clearThreat() - { - unset($this->threat); - } - - /** - * The threat list matches. This might be empty if the URI is on no list. - * - * Generated from protobuf field .google.cloud.webrisk.v1.SearchUrisResponse.ThreatUri threat = 1; - * @param \Google\Cloud\WebRisk\V1\SearchUrisResponse\ThreatUri $var - * @return $this - */ - public function setThreat($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\SearchUrisResponse\ThreatUri::class); - $this->threat = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisResponse/ThreatUri.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisResponse/ThreatUri.php deleted file mode 100644 index 30d655f4b0ed..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SearchUrisResponse/ThreatUri.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.webrisk.v1.SearchUrisResponse.ThreatUri - */ -class ThreatUri extends \Google\Protobuf\Internal\Message -{ - /** - * The ThreatList this threat belongs to. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1; - */ - private $threat_types; - /** - * The cache lifetime for the returned match. Clients must not cache this - * response past this timestamp to avoid false positives. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; - */ - protected $expire_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $threat_types - * The ThreatList this threat belongs to. - * @type \Google\Protobuf\Timestamp $expire_time - * The cache lifetime for the returned match. Clients must not cache this - * response past this timestamp to avoid false positives. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The ThreatList this threat belongs to. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getThreatTypes() - { - return $this->threat_types; - } - - /** - * The ThreatList this threat belongs to. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setThreatTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1\ThreatType::class); - $this->threat_types = $arr; - - return $this; - } - - /** - * The cache lifetime for the returned match. Clients must not cache this - * response past this timestamp to avoid false positives. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * The cache lifetime for the returned match. Clients must not cache this - * response past this timestamp to avoid false positives. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ThreatUri::class, \Google\Cloud\WebRisk\V1\SearchUrisResponse_ThreatUri::class); - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/Submission.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/Submission.php deleted file mode 100644 index bd04f68cb941..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/Submission.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.webrisk.v1.Submission - */ -class Submission extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The URI that is being reported for malicious content to be - * analyzed. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - /** - * Output only. ThreatTypes found to be associated with the submitted URI - * after reviewing it. This might be empty if the URI was not added to any - * list. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $threat_types; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Required. The URI that is being reported for malicious content to be - * analyzed. - * @type array|\Google\Protobuf\Internal\RepeatedField $threat_types - * Output only. ThreatTypes found to be associated with the submitted URI - * after reviewing it. This might be empty if the URI was not added to any - * list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * Required. The URI that is being reported for malicious content to be - * analyzed. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. The URI that is being reported for malicious content to be - * analyzed. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Output only. ThreatTypes found to be associated with the submitted URI - * after reviewing it. This might be empty if the URI was not added to any - * list. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getThreatTypes() - { - return $this->threat_types; - } - - /** - * Output only. ThreatTypes found to be associated with the submitted URI - * after reviewing it. This might be empty if the URI was not added to any - * list. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setThreatTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1\ThreatType::class); - $this->threat_types = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriMetadata.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriMetadata.php deleted file mode 100644 index d2148bdd3847..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriMetadata.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.webrisk.v1.SubmitUriMetadata - */ -class SubmitUriMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The state of the operation. - * - * Generated from protobuf field .google.cloud.webrisk.v1.SubmitUriMetadata.State state = 1; - */ - protected $state = 0; - /** - * Creation time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; - */ - protected $create_time = null; - /** - * Latest update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The state of the operation. - * @type \Google\Protobuf\Timestamp $create_time - * Creation time of the operation. - * @type \Google\Protobuf\Timestamp $update_time - * Latest update time of the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.cloud.webrisk.v1.SubmitUriMetadata.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.cloud.webrisk.v1.SubmitUriMetadata.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\WebRisk\V1\SubmitUriMetadata\State::class); - $this->state = $var; - - return $this; - } - - /** - * Creation time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Creation time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Latest update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Latest update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriMetadata/State.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriMetadata/State.php deleted file mode 100644 index 9e9a51092de3..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriMetadata/State.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.webrisk.v1.SubmitUriMetadata.State - */ -class State -{ - /** - * Default unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The operation is currently running. - * - * Generated from protobuf enum RUNNING = 1; - */ - const RUNNING = 1; - /** - * The operation finished with a success status. - * - * Generated from protobuf enum SUCCEEDED = 2; - */ - const SUCCEEDED = 2; - /** - * The operation was cancelled. - * - * Generated from protobuf enum CANCELLED = 3; - */ - const CANCELLED = 3; - /** - * The operation finished with a failure status. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - /** - * The operation was closed with no action taken. - * - * Generated from protobuf enum CLOSED = 5; - */ - const CLOSED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::RUNNING => 'RUNNING', - self::SUCCEEDED => 'SUCCEEDED', - self::CANCELLED => 'CANCELLED', - self::FAILED => 'FAILED', - self::CLOSED => 'CLOSED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\WebRisk\V1\SubmitUriMetadata_State::class); - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriRequest.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriRequest.php deleted file mode 100644 index 2941f5f391b3..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/SubmitUriRequest.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.webrisk.v1.SubmitUriRequest - */ -class SubmitUriRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the project that is making the submission. This - * string is in the format "projects/{project_number}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The submission that contains the URI to be scanned. - * - * Generated from protobuf field .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $submission = null; - /** - * Provides additional information about the submission. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo threat_info = 3; - */ - protected $threat_info = null; - /** - * Provides additional information about how the submission was discovered. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatDiscovery threat_discovery = 4; - */ - protected $threat_discovery = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the project that is making the submission. This - * string is in the format "projects/{project_number}". - * @type \Google\Cloud\WebRisk\V1\Submission $submission - * Required. The submission that contains the URI to be scanned. - * @type \Google\Cloud\WebRisk\V1\ThreatInfo $threat_info - * Provides additional information about the submission. - * @type \Google\Cloud\WebRisk\V1\ThreatDiscovery $threat_discovery - * Provides additional information about how the submission was discovered. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the project that is making the submission. This - * string is in the format "projects/{project_number}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the project that is making the submission. This - * string is in the format "projects/{project_number}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The submission that contains the URI to be scanned. - * - * Generated from protobuf field .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\WebRisk\V1\Submission|null - */ - public function getSubmission() - { - return $this->submission; - } - - public function hasSubmission() - { - return isset($this->submission); - } - - public function clearSubmission() - { - unset($this->submission); - } - - /** - * Required. The submission that contains the URI to be scanned. - * - * Generated from protobuf field .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\WebRisk\V1\Submission $var - * @return $this - */ - public function setSubmission($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\Submission::class); - $this->submission = $var; - - return $this; - } - - /** - * Provides additional information about the submission. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo threat_info = 3; - * @return \Google\Cloud\WebRisk\V1\ThreatInfo|null - */ - public function getThreatInfo() - { - return $this->threat_info; - } - - public function hasThreatInfo() - { - return isset($this->threat_info); - } - - public function clearThreatInfo() - { - unset($this->threat_info); - } - - /** - * Provides additional information about the submission. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo threat_info = 3; - * @param \Google\Cloud\WebRisk\V1\ThreatInfo $var - * @return $this - */ - public function setThreatInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\ThreatInfo::class); - $this->threat_info = $var; - - return $this; - } - - /** - * Provides additional information about how the submission was discovered. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatDiscovery threat_discovery = 4; - * @return \Google\Cloud\WebRisk\V1\ThreatDiscovery|null - */ - public function getThreatDiscovery() - { - return $this->threat_discovery; - } - - public function hasThreatDiscovery() - { - return isset($this->threat_discovery); - } - - public function clearThreatDiscovery() - { - unset($this->threat_discovery); - } - - /** - * Provides additional information about how the submission was discovered. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatDiscovery threat_discovery = 4; - * @param \Google\Cloud\WebRisk\V1\ThreatDiscovery $var - * @return $this - */ - public function setThreatDiscovery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\ThreatDiscovery::class); - $this->threat_discovery = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatDiscovery.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatDiscovery.php deleted file mode 100644 index 78c9f33a4c39..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatDiscovery.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.webrisk.v1.ThreatDiscovery - */ -class ThreatDiscovery extends \Google\Protobuf\Internal\Message -{ - /** - * Platform on which the threat was discovered. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatDiscovery.Platform platform = 1; - */ - protected $platform = 0; - /** - * CLDR region code of the countries/regions the URI poses a threat ordered - * from most impact to least impact. Example: "US" for United States. - * - * Generated from protobuf field repeated string region_codes = 2; - */ - private $region_codes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $platform - * Platform on which the threat was discovered. - * @type array|\Google\Protobuf\Internal\RepeatedField $region_codes - * CLDR region code of the countries/regions the URI poses a threat ordered - * from most impact to least impact. Example: "US" for United States. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * Platform on which the threat was discovered. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatDiscovery.Platform platform = 1; - * @return int - */ - public function getPlatform() - { - return $this->platform; - } - - /** - * Platform on which the threat was discovered. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatDiscovery.Platform platform = 1; - * @param int $var - * @return $this - */ - public function setPlatform($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\WebRisk\V1\ThreatDiscovery\Platform::class); - $this->platform = $var; - - return $this; - } - - /** - * CLDR region code of the countries/regions the URI poses a threat ordered - * from most impact to least impact. Example: "US" for United States. - * - * Generated from protobuf field repeated string region_codes = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRegionCodes() - { - return $this->region_codes; - } - - /** - * CLDR region code of the countries/regions the URI poses a threat ordered - * from most impact to least impact. Example: "US" for United States. - * - * Generated from protobuf field repeated string region_codes = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRegionCodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->region_codes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatDiscovery/Platform.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatDiscovery/Platform.php deleted file mode 100644 index 21970d595dcc..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatDiscovery/Platform.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.webrisk.v1.ThreatDiscovery.Platform - */ -class Platform -{ - /** - * Default. - * - * Generated from protobuf enum PLATFORM_UNSPECIFIED = 0; - */ - const PLATFORM_UNSPECIFIED = 0; - /** - * General Android platform. - * - * Generated from protobuf enum ANDROID = 1; - */ - const ANDROID = 1; - /** - * General iOS platform. - * - * Generated from protobuf enum IOS = 2; - */ - const IOS = 2; - /** - * General macOS platform. - * - * Generated from protobuf enum MACOS = 3; - */ - const MACOS = 3; - /** - * General Windows platform. - * - * Generated from protobuf enum WINDOWS = 4; - */ - const WINDOWS = 4; - - private static $valueToName = [ - self::PLATFORM_UNSPECIFIED => 'PLATFORM_UNSPECIFIED', - self::ANDROID => 'ANDROID', - self::IOS => 'IOS', - self::MACOS => 'MACOS', - self::WINDOWS => 'WINDOWS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Platform::class, \Google\Cloud\WebRisk\V1\ThreatDiscovery_Platform::class); - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatEntryAdditions.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatEntryAdditions.php deleted file mode 100644 index ad3939be64a1..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatEntryAdditions.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.webrisk.v1.ThreatEntryAdditions - */ -class ThreatEntryAdditions extends \Google\Protobuf\Internal\Message -{ - /** - * The raw SHA256-formatted entries. - * Repeated to allow returning sets of hashes with different prefix sizes. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.RawHashes raw_hashes = 1; - */ - private $raw_hashes; - /** - * The encoded 4-byte prefixes of SHA256-formatted entries, using a - * Golomb-Rice encoding. The hashes are converted to uint32, sorted in - * ascending order, then delta encoded and stored as encoded_data. - * - * Generated from protobuf field .google.cloud.webrisk.v1.RiceDeltaEncoding rice_hashes = 2; - */ - protected $rice_hashes = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\WebRisk\V1\RawHashes>|\Google\Protobuf\Internal\RepeatedField $raw_hashes - * The raw SHA256-formatted entries. - * Repeated to allow returning sets of hashes with different prefix sizes. - * @type \Google\Cloud\WebRisk\V1\RiceDeltaEncoding $rice_hashes - * The encoded 4-byte prefixes of SHA256-formatted entries, using a - * Golomb-Rice encoding. The hashes are converted to uint32, sorted in - * ascending order, then delta encoded and stored as encoded_data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The raw SHA256-formatted entries. - * Repeated to allow returning sets of hashes with different prefix sizes. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.RawHashes raw_hashes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRawHashes() - { - return $this->raw_hashes; - } - - /** - * The raw SHA256-formatted entries. - * Repeated to allow returning sets of hashes with different prefix sizes. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.RawHashes raw_hashes = 1; - * @param array<\Google\Cloud\WebRisk\V1\RawHashes>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRawHashes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebRisk\V1\RawHashes::class); - $this->raw_hashes = $arr; - - return $this; - } - - /** - * The encoded 4-byte prefixes of SHA256-formatted entries, using a - * Golomb-Rice encoding. The hashes are converted to uint32, sorted in - * ascending order, then delta encoded and stored as encoded_data. - * - * Generated from protobuf field .google.cloud.webrisk.v1.RiceDeltaEncoding rice_hashes = 2; - * @return \Google\Cloud\WebRisk\V1\RiceDeltaEncoding|null - */ - public function getRiceHashes() - { - return $this->rice_hashes; - } - - public function hasRiceHashes() - { - return isset($this->rice_hashes); - } - - public function clearRiceHashes() - { - unset($this->rice_hashes); - } - - /** - * The encoded 4-byte prefixes of SHA256-formatted entries, using a - * Golomb-Rice encoding. The hashes are converted to uint32, sorted in - * ascending order, then delta encoded and stored as encoded_data. - * - * Generated from protobuf field .google.cloud.webrisk.v1.RiceDeltaEncoding rice_hashes = 2; - * @param \Google\Cloud\WebRisk\V1\RiceDeltaEncoding $var - * @return $this - */ - public function setRiceHashes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\RiceDeltaEncoding::class); - $this->rice_hashes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatEntryRemovals.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatEntryRemovals.php deleted file mode 100644 index d51634f66877..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatEntryRemovals.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.webrisk.v1.ThreatEntryRemovals - */ -class ThreatEntryRemovals extends \Google\Protobuf\Internal\Message -{ - /** - * The raw removal indices for a local list. - * - * Generated from protobuf field .google.cloud.webrisk.v1.RawIndices raw_indices = 1; - */ - protected $raw_indices = null; - /** - * The encoded local, lexicographically-sorted list indices, using a - * Golomb-Rice encoding. Used for sending compressed removal indices. The - * removal indices (uint32) are sorted in ascending order, then delta encoded - * and stored as encoded_data. - * - * Generated from protobuf field .google.cloud.webrisk.v1.RiceDeltaEncoding rice_indices = 2; - */ - protected $rice_indices = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\WebRisk\V1\RawIndices $raw_indices - * The raw removal indices for a local list. - * @type \Google\Cloud\WebRisk\V1\RiceDeltaEncoding $rice_indices - * The encoded local, lexicographically-sorted list indices, using a - * Golomb-Rice encoding. Used for sending compressed removal indices. The - * removal indices (uint32) are sorted in ascending order, then delta encoded - * and stored as encoded_data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The raw removal indices for a local list. - * - * Generated from protobuf field .google.cloud.webrisk.v1.RawIndices raw_indices = 1; - * @return \Google\Cloud\WebRisk\V1\RawIndices|null - */ - public function getRawIndices() - { - return $this->raw_indices; - } - - public function hasRawIndices() - { - return isset($this->raw_indices); - } - - public function clearRawIndices() - { - unset($this->raw_indices); - } - - /** - * The raw removal indices for a local list. - * - * Generated from protobuf field .google.cloud.webrisk.v1.RawIndices raw_indices = 1; - * @param \Google\Cloud\WebRisk\V1\RawIndices $var - * @return $this - */ - public function setRawIndices($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\RawIndices::class); - $this->raw_indices = $var; - - return $this; - } - - /** - * The encoded local, lexicographically-sorted list indices, using a - * Golomb-Rice encoding. Used for sending compressed removal indices. The - * removal indices (uint32) are sorted in ascending order, then delta encoded - * and stored as encoded_data. - * - * Generated from protobuf field .google.cloud.webrisk.v1.RiceDeltaEncoding rice_indices = 2; - * @return \Google\Cloud\WebRisk\V1\RiceDeltaEncoding|null - */ - public function getRiceIndices() - { - return $this->rice_indices; - } - - public function hasRiceIndices() - { - return isset($this->rice_indices); - } - - public function clearRiceIndices() - { - unset($this->rice_indices); - } - - /** - * The encoded local, lexicographically-sorted list indices, using a - * Golomb-Rice encoding. Used for sending compressed removal indices. The - * removal indices (uint32) are sorted in ascending order, then delta encoded - * and stored as encoded_data. - * - * Generated from protobuf field .google.cloud.webrisk.v1.RiceDeltaEncoding rice_indices = 2; - * @param \Google\Cloud\WebRisk\V1\RiceDeltaEncoding $var - * @return $this - */ - public function setRiceIndices($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\RiceDeltaEncoding::class); - $this->rice_indices = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo.php deleted file mode 100644 index 4536e1bea45f..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.webrisk.v1.ThreatInfo - */ -class ThreatInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The type of abuse. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo.AbuseType abuse_type = 1; - */ - protected $abuse_type = 0; - /** - * Confidence that the URI is unsafe. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo.Confidence threat_confidence = 2; - */ - protected $threat_confidence = null; - /** - * Context about why the URI is unsafe. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification threat_justification = 3; - */ - protected $threat_justification = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $abuse_type - * The type of abuse. - * @type \Google\Cloud\WebRisk\V1\ThreatInfo\Confidence $threat_confidence - * Confidence that the URI is unsafe. - * @type \Google\Cloud\WebRisk\V1\ThreatInfo\ThreatJustification $threat_justification - * Context about why the URI is unsafe. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The type of abuse. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo.AbuseType abuse_type = 1; - * @return int - */ - public function getAbuseType() - { - return $this->abuse_type; - } - - /** - * The type of abuse. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo.AbuseType abuse_type = 1; - * @param int $var - * @return $this - */ - public function setAbuseType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\WebRisk\V1\ThreatInfo\AbuseType::class); - $this->abuse_type = $var; - - return $this; - } - - /** - * Confidence that the URI is unsafe. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo.Confidence threat_confidence = 2; - * @return \Google\Cloud\WebRisk\V1\ThreatInfo\Confidence|null - */ - public function getThreatConfidence() - { - return $this->threat_confidence; - } - - public function hasThreatConfidence() - { - return isset($this->threat_confidence); - } - - public function clearThreatConfidence() - { - unset($this->threat_confidence); - } - - /** - * Confidence that the URI is unsafe. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo.Confidence threat_confidence = 2; - * @param \Google\Cloud\WebRisk\V1\ThreatInfo\Confidence $var - * @return $this - */ - public function setThreatConfidence($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\ThreatInfo\Confidence::class); - $this->threat_confidence = $var; - - return $this; - } - - /** - * Context about why the URI is unsafe. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification threat_justification = 3; - * @return \Google\Cloud\WebRisk\V1\ThreatInfo\ThreatJustification|null - */ - public function getThreatJustification() - { - return $this->threat_justification; - } - - public function hasThreatJustification() - { - return isset($this->threat_justification); - } - - public function clearThreatJustification() - { - unset($this->threat_justification); - } - - /** - * Context about why the URI is unsafe. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification threat_justification = 3; - * @param \Google\Cloud\WebRisk\V1\ThreatInfo\ThreatJustification $var - * @return $this - */ - public function setThreatJustification($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1\ThreatInfo\ThreatJustification::class); - $this->threat_justification = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/AbuseType.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/AbuseType.php deleted file mode 100644 index 70f7ef17ada9..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/AbuseType.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.webrisk.v1.ThreatInfo.AbuseType - */ -class AbuseType -{ - /** - * Default. - * - * Generated from protobuf enum ABUSE_TYPE_UNSPECIFIED = 0; - */ - const ABUSE_TYPE_UNSPECIFIED = 0; - /** - * The URI contains malware. - * - * Generated from protobuf enum MALWARE = 1; - */ - const MALWARE = 1; - /** - * The URI contains social engineering. - * - * Generated from protobuf enum SOCIAL_ENGINEERING = 2; - */ - const SOCIAL_ENGINEERING = 2; - /** - * The URI contains unwanted software. - * - * Generated from protobuf enum UNWANTED_SOFTWARE = 3; - */ - const UNWANTED_SOFTWARE = 3; - - private static $valueToName = [ - self::ABUSE_TYPE_UNSPECIFIED => 'ABUSE_TYPE_UNSPECIFIED', - self::MALWARE => 'MALWARE', - self::SOCIAL_ENGINEERING => 'SOCIAL_ENGINEERING', - self::UNWANTED_SOFTWARE => 'UNWANTED_SOFTWARE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AbuseType::class, \Google\Cloud\WebRisk\V1\ThreatInfo_AbuseType::class); - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/Confidence.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/Confidence.php deleted file mode 100644 index 88079fdc9e2c..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/Confidence.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.webrisk.v1.ThreatInfo.Confidence - */ -class Confidence extends \Google\Protobuf\Internal\Message -{ - protected $value; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $score - * A decimal representation of confidence in the range of 0 - * to 1 where 0 indicates no confidence and 1 indicates - * complete confidence. - * @type int $level - * Enum representation of confidence. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * A decimal representation of confidence in the range of 0 - * to 1 where 0 indicates no confidence and 1 indicates - * complete confidence. - * - * Generated from protobuf field float score = 1; - * @return float - */ - public function getScore() - { - return $this->readOneof(1); - } - - public function hasScore() - { - return $this->hasOneof(1); - } - - /** - * A decimal representation of confidence in the range of 0 - * to 1 where 0 indicates no confidence and 1 indicates - * complete confidence. - * - * Generated from protobuf field float score = 1; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Enum representation of confidence. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel level = 2; - * @return int - */ - public function getLevel() - { - return $this->readOneof(2); - } - - public function hasLevel() - { - return $this->hasOneof(2); - } - - /** - * Enum representation of confidence. - * - * Generated from protobuf field .google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel level = 2; - * @param int $var - * @return $this - */ - public function setLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\WebRisk\V1\ThreatInfo\Confidence\ConfidenceLevel::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getValue() - { - return $this->whichOneof("value"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Confidence::class, \Google\Cloud\WebRisk\V1\ThreatInfo_Confidence::class); - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/Confidence/ConfidenceLevel.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/Confidence/ConfidenceLevel.php deleted file mode 100644 index 04f25a28d07f..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/Confidence/ConfidenceLevel.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel - */ -class ConfidenceLevel -{ - /** - * Default. - * - * Generated from protobuf enum CONFIDENCE_LEVEL_UNSPECIFIED = 0; - */ - const CONFIDENCE_LEVEL_UNSPECIFIED = 0; - /** - * Less than 60% confidence that the URI is unsafe. - * - * Generated from protobuf enum LOW = 1; - */ - const LOW = 1; - /** - * Between 60% and 80% confidence that the URI is unsafe. - * - * Generated from protobuf enum MEDIUM = 2; - */ - const MEDIUM = 2; - /** - * Greater than 80% confidence that the URI is unsafe. - * - * Generated from protobuf enum HIGH = 3; - */ - const HIGH = 3; - - private static $valueToName = [ - self::CONFIDENCE_LEVEL_UNSPECIFIED => 'CONFIDENCE_LEVEL_UNSPECIFIED', - self::LOW => 'LOW', - self::MEDIUM => 'MEDIUM', - self::HIGH => 'HIGH', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConfidenceLevel::class, \Google\Cloud\WebRisk\V1\ThreatInfo_Confidence_ConfidenceLevel::class); - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/ThreatJustification.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/ThreatJustification.php deleted file mode 100644 index fd68434daffd..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/ThreatJustification.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.webrisk.v1.ThreatInfo.ThreatJustification - */ -class ThreatJustification extends \Google\Protobuf\Internal\Message -{ - /** - * Labels associated with this URI that explain how it was classified. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1; - */ - private $labels; - /** - * Free-form context on why this URI is unsafe. - * - * Generated from protobuf field repeated string comments = 2; - */ - private $comments; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $labels - * Labels associated with this URI that explain how it was classified. - * @type array|\Google\Protobuf\Internal\RepeatedField $comments - * Free-form context on why this URI is unsafe. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * Labels associated with this URI that explain how it was classified. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels associated with this URI that explain how it was classified. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1\ThreatInfo\ThreatJustification\JustificationLabel::class); - $this->labels = $arr; - - return $this; - } - - /** - * Free-form context on why this URI is unsafe. - * - * Generated from protobuf field repeated string comments = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getComments() - { - return $this->comments; - } - - /** - * Free-form context on why this URI is unsafe. - * - * Generated from protobuf field repeated string comments = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setComments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->comments = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ThreatJustification::class, \Google\Cloud\WebRisk\V1\ThreatInfo_ThreatJustification::class); - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/ThreatJustification/JustificationLabel.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/ThreatJustification/JustificationLabel.php deleted file mode 100644 index 49435a9f74fc..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatInfo/ThreatJustification/JustificationLabel.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel - */ -class JustificationLabel -{ - /** - * Default. - * - * Generated from protobuf enum JUSTIFICATION_LABEL_UNSPECIFIED = 0; - */ - const JUSTIFICATION_LABEL_UNSPECIFIED = 0; - /** - * The submitter manually verified that the submission is unsafe. - * - * Generated from protobuf enum MANUAL_VERIFICATION = 1; - */ - const MANUAL_VERIFICATION = 1; - /** - * The submitter received the submission from an end user. - * - * Generated from protobuf enum USER_REPORT = 2; - */ - const USER_REPORT = 2; - /** - * The submitter received the submission from an automated system. - * - * Generated from protobuf enum AUTOMATED_REPORT = 3; - */ - const AUTOMATED_REPORT = 3; - - private static $valueToName = [ - self::JUSTIFICATION_LABEL_UNSPECIFIED => 'JUSTIFICATION_LABEL_UNSPECIFIED', - self::MANUAL_VERIFICATION => 'MANUAL_VERIFICATION', - self::USER_REPORT => 'USER_REPORT', - self::AUTOMATED_REPORT => 'AUTOMATED_REPORT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(JustificationLabel::class, \Google\Cloud\WebRisk\V1\ThreatInfo_ThreatJustification_JustificationLabel::class); - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatType.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatType.php deleted file mode 100644 index c9f1876eddb1..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/ThreatType.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.webrisk.v1.ThreatType - */ -class ThreatType -{ - /** - * No entries should match this threat type. This threat type is unused. - * - * Generated from protobuf enum THREAT_TYPE_UNSPECIFIED = 0; - */ - const THREAT_TYPE_UNSPECIFIED = 0; - /** - * Malware targeting any platform. - * - * Generated from protobuf enum MALWARE = 1; - */ - const MALWARE = 1; - /** - * Social engineering targeting any platform. - * - * Generated from protobuf enum SOCIAL_ENGINEERING = 2; - */ - const SOCIAL_ENGINEERING = 2; - /** - * Unwanted software targeting any platform. - * - * Generated from protobuf enum UNWANTED_SOFTWARE = 3; - */ - const UNWANTED_SOFTWARE = 3; - /** - * A list of extended coverage social engineering URIs targeting any - * platform. - * - * Generated from protobuf enum SOCIAL_ENGINEERING_EXTENDED_COVERAGE = 4; - */ - const SOCIAL_ENGINEERING_EXTENDED_COVERAGE = 4; - - private static $valueToName = [ - self::THREAT_TYPE_UNSPECIFIED => 'THREAT_TYPE_UNSPECIFIED', - self::MALWARE => 'MALWARE', - self::SOCIAL_ENGINEERING => 'SOCIAL_ENGINEERING', - self::UNWANTED_SOFTWARE => 'UNWANTED_SOFTWARE', - self::SOCIAL_ENGINEERING_EXTENDED_COVERAGE => 'SOCIAL_ENGINEERING_EXTENDED_COVERAGE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/WebRiskServiceGrpcClient.php b/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/WebRiskServiceGrpcClient.php deleted file mode 100644 index d6feb9ceb031..000000000000 --- a/owl-bot-staging/WebRisk/v1/proto/src/Google/Cloud/WebRisk/V1/WebRiskServiceGrpcClient.php +++ /dev/null @@ -1,139 +0,0 @@ -_simpleRequest('/google.cloud.webrisk.v1.WebRiskService/ComputeThreatListDiff', - $argument, - ['\Google\Cloud\WebRisk\V1\ComputeThreatListDiffResponse', 'decode'], - $metadata, $options); - } - - /** - * This method is used to check whether a URI is on a given threatList. - * Multiple threatLists may be searched in a single query. - * The response will list all requested threatLists the URI was found to - * match. If the URI is not found on any of the requested ThreatList an - * empty response will be returned. - * @param \Google\Cloud\WebRisk\V1\SearchUrisRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SearchUris(\Google\Cloud\WebRisk\V1\SearchUrisRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.webrisk.v1.WebRiskService/SearchUris', - $argument, - ['\Google\Cloud\WebRisk\V1\SearchUrisResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets the full hashes that match the requested hash prefix. - * This is used after a hash prefix is looked up in a threatList - * and there is a match. The client side threatList only holds partial hashes - * so the client must query this method to determine if there is a full - * hash match of a threat. - * @param \Google\Cloud\WebRisk\V1\SearchHashesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SearchHashes(\Google\Cloud\WebRisk\V1\SearchHashesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.webrisk.v1.WebRiskService/SearchHashes', - $argument, - ['\Google\Cloud\WebRisk\V1\SearchHashesResponse', 'decode'], - $metadata, $options); - } - - /** - * Creates a Submission of a URI suspected of containing phishing content to - * be reviewed. If the result verifies the existence of malicious phishing - * content, the site will be added to the [Google's Social Engineering - * lists](https://support.google.com/webmasters/answer/6350487/) in order to - * protect users that could get exposed to this threat in the future. Only - * allowlisted projects can use this method during Early Access. Please reach - * out to Sales or your customer engineer to obtain access. - * @param \Google\Cloud\WebRisk\V1\CreateSubmissionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateSubmission(\Google\Cloud\WebRisk\V1\CreateSubmissionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.webrisk.v1.WebRiskService/CreateSubmission', - $argument, - ['\Google\Cloud\WebRisk\V1\Submission', 'decode'], - $metadata, $options); - } - - /** - * Submits a URI suspected of containing malicious content to be reviewed. - * Returns a google.longrunning.Operation which, once the review is complete, - * is updated with its result. You can use the [Pub/Sub API] - * (https://cloud.google.com/pubsub) to receive notifications for the returned - * Operation. If the result verifies the existence of malicious content, the - * site will be added to the [Google's Social Engineering lists] - * (https://support.google.com/webmasters/answer/6350487/) in order to - * protect users that could get exposed to this threat in the future. Only - * allowlisted projects can use this method during Early Access. Please reach - * out to Sales or your customer engineer to obtain access. - * @param \Google\Cloud\WebRisk\V1\SubmitUriRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SubmitUri(\Google\Cloud\WebRisk\V1\SubmitUriRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.webrisk.v1.WebRiskService/SubmitUri', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/compute_threat_list_diff.php b/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/compute_threat_list_diff.php deleted file mode 100644 index 5914770a57dc..000000000000 --- a/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/compute_threat_list_diff.php +++ /dev/null @@ -1,77 +0,0 @@ -computeThreatListDiff($threatType, $constraints); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $threatType = ThreatType::THREAT_TYPE_UNSPECIFIED; - - compute_threat_list_diff_sample($threatType); -} -// [END webrisk_v1_generated_WebRiskService_ComputeThreatListDiff_sync] diff --git a/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/create_submission.php b/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/create_submission.php deleted file mode 100644 index 9f887d0776f6..000000000000 --- a/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/create_submission.php +++ /dev/null @@ -1,80 +0,0 @@ -setUri($submissionUri); - - // Call the API and handle any network failures. - try { - /** @var Submission $response */ - $response = $webRiskServiceClient->createSubmission($formattedParent, $submission); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = WebRiskServiceClient::projectName('[PROJECT]'); - $submissionUri = '[URI]'; - - create_submission_sample($formattedParent, $submissionUri); -} -// [END webrisk_v1_generated_WebRiskService_CreateSubmission_sync] diff --git a/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/search_hashes.php b/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/search_hashes.php deleted file mode 100644 index b49596c1d2d7..000000000000 --- a/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/search_hashes.php +++ /dev/null @@ -1,74 +0,0 @@ -searchHashes($threatTypes); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $threatTypesElement = ThreatType::THREAT_TYPE_UNSPECIFIED; - - search_hashes_sample($threatTypesElement); -} -// [END webrisk_v1_generated_WebRiskService_SearchHashes_sync] diff --git a/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/search_uris.php b/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/search_uris.php deleted file mode 100644 index 38adcd35213a..000000000000 --- a/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/search_uris.php +++ /dev/null @@ -1,76 +0,0 @@ -searchUris($uri, $threatTypes); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $uri = '[URI]'; - $threatTypesElement = ThreatType::THREAT_TYPE_UNSPECIFIED; - - search_uris_sample($uri, $threatTypesElement); -} -// [END webrisk_v1_generated_WebRiskService_SearchUris_sync] diff --git a/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/submit_uri.php b/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/submit_uri.php deleted file mode 100644 index 9ee648a246d8..000000000000 --- a/owl-bot-staging/WebRisk/v1/samples/V1/WebRiskServiceClient/submit_uri.php +++ /dev/null @@ -1,95 +0,0 @@ -setUri($submissionUri); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $webRiskServiceClient->submitUri($formattedParent, $submission); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Submission $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = WebRiskServiceClient::projectName('[PROJECT]'); - $submissionUri = '[URI]'; - - submit_uri_sample($formattedParent, $submissionUri); -} -// [END webrisk_v1_generated_WebRiskService_SubmitUri_sync] diff --git a/owl-bot-staging/WebRisk/v1/src/V1/Gapic/WebRiskServiceGapicClient.php b/owl-bot-staging/WebRisk/v1/src/V1/Gapic/WebRiskServiceGapicClient.php deleted file mode 100644 index 64d74e6c7ced..000000000000 --- a/owl-bot-staging/WebRisk/v1/src/V1/Gapic/WebRiskServiceGapicClient.php +++ /dev/null @@ -1,575 +0,0 @@ -computeThreatListDiff($threatType, $constraints); - * } finally { - * $webRiskServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - */ -class WebRiskServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.webrisk.v1.WebRiskService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'webrisk.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $projectNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/web_risk_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/web_risk_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/web_risk_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/web_risk_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'project' => self::getProjectNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName($project) - { - return self::getProjectNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - project: projects/{project} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'webrisk.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Gets the most recent threat list diffs. These diffs should be applied to - * a local database of hashes to keep it up-to-date. If the local database is - * empty or excessively out-of-date, a complete snapshot of the database will - * be returned. This Method only updates a single ThreatList at a time. To - * update multiple ThreatList databases, this method needs to be called once - * for each list. - * - * Sample code: - * ``` - * $webRiskServiceClient = new WebRiskServiceClient(); - * try { - * $threatType = ThreatType::THREAT_TYPE_UNSPECIFIED; - * $constraints = new Constraints(); - * $response = $webRiskServiceClient->computeThreatListDiff($threatType, $constraints); - * } finally { - * $webRiskServiceClient->close(); - * } - * ``` - * - * @param int $threatType Required. The threat list to update. Only a single ThreatType should be - * specified per request. If you want to handle multiple ThreatTypes, you must - * make one request per ThreatType. - * For allowed values, use constants defined on {@see \Google\Cloud\WebRisk\V1\ThreatType} - * @param Constraints $constraints Required. The constraints associated with this request. - * @param array $optionalArgs { - * Optional. - * - * @type string $versionToken - * The current version token of the client for the requested list (the - * client version that was received from the last successful diff). - * If the client does not have a version token (this is the first time calling - * ComputeThreatListDiff), this may be left empty and a full database - * snapshot will be returned. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\WebRisk\V1\ComputeThreatListDiffResponse - * - * @throws ApiException if the remote call fails - */ - public function computeThreatListDiff($threatType, $constraints, array $optionalArgs = []) - { - $request = new ComputeThreatListDiffRequest(); - $request->setThreatType($threatType); - $request->setConstraints($constraints); - if (isset($optionalArgs['versionToken'])) { - $request->setVersionToken($optionalArgs['versionToken']); - } - - return $this->startCall('ComputeThreatListDiff', ComputeThreatListDiffResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a Submission of a URI suspected of containing phishing content to - * be reviewed. If the result verifies the existence of malicious phishing - * content, the site will be added to the [Google's Social Engineering - * lists](https://support.google.com/webmasters/answer/6350487/) in order to - * protect users that could get exposed to this threat in the future. Only - * allowlisted projects can use this method during Early Access. Please reach - * out to Sales or your customer engineer to obtain access. - * - * Sample code: - * ``` - * $webRiskServiceClient = new WebRiskServiceClient(); - * try { - * $formattedParent = $webRiskServiceClient->projectName('[PROJECT]'); - * $submission = new Submission(); - * $response = $webRiskServiceClient->createSubmission($formattedParent, $submission); - * } finally { - * $webRiskServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the project that is making the submission. This - * string is in the format "projects/{project_number}". - * @param Submission $submission Required. The submission that contains the content of the phishing report. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\WebRisk\V1\Submission - * - * @throws ApiException if the remote call fails - */ - public function createSubmission($parent, $submission, array $optionalArgs = []) - { - $request = new CreateSubmissionRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setSubmission($submission); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateSubmission', Submission::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the full hashes that match the requested hash prefix. - * This is used after a hash prefix is looked up in a threatList - * and there is a match. The client side threatList only holds partial hashes - * so the client must query this method to determine if there is a full - * hash match of a threat. - * - * Sample code: - * ``` - * $webRiskServiceClient = new WebRiskServiceClient(); - * try { - * $threatTypes = []; - * $response = $webRiskServiceClient->searchHashes($threatTypes); - * } finally { - * $webRiskServiceClient->close(); - * } - * ``` - * - * @param int[] $threatTypes Required. The ThreatLists to search in. Multiple ThreatLists may be - * specified. - * For allowed values, use constants defined on {@see \Google\Cloud\WebRisk\V1\ThreatType} - * @param array $optionalArgs { - * Optional. - * - * @type string $hashPrefix - * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 - * hash. For JSON requests, this field is base64-encoded. - * Note that if this parameter is provided by a URI, it must be encoded using - * the web safe base64 variant (RFC 4648). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\WebRisk\V1\SearchHashesResponse - * - * @throws ApiException if the remote call fails - */ - public function searchHashes($threatTypes, array $optionalArgs = []) - { - $request = new SearchHashesRequest(); - $request->setThreatTypes($threatTypes); - if (isset($optionalArgs['hashPrefix'])) { - $request->setHashPrefix($optionalArgs['hashPrefix']); - } - - return $this->startCall('SearchHashes', SearchHashesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * This method is used to check whether a URI is on a given threatList. - * Multiple threatLists may be searched in a single query. - * The response will list all requested threatLists the URI was found to - * match. If the URI is not found on any of the requested ThreatList an - * empty response will be returned. - * - * Sample code: - * ``` - * $webRiskServiceClient = new WebRiskServiceClient(); - * try { - * $uri = 'uri'; - * $threatTypes = []; - * $response = $webRiskServiceClient->searchUris($uri, $threatTypes); - * } finally { - * $webRiskServiceClient->close(); - * } - * ``` - * - * @param string $uri Required. The URI to be checked for matches. - * @param int[] $threatTypes Required. The ThreatLists to search in. Multiple ThreatLists may be - * specified. - * For allowed values, use constants defined on {@see \Google\Cloud\WebRisk\V1\ThreatType} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\WebRisk\V1\SearchUrisResponse - * - * @throws ApiException if the remote call fails - */ - public function searchUris($uri, $threatTypes, array $optionalArgs = []) - { - $request = new SearchUrisRequest(); - $request->setUri($uri); - $request->setThreatTypes($threatTypes); - return $this->startCall('SearchUris', SearchUrisResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Submits a URI suspected of containing malicious content to be reviewed. - * Returns a google.longrunning.Operation which, once the review is complete, - * is updated with its result. You can use the [Pub/Sub API] - * (https://cloud.google.com/pubsub) to receive notifications for the returned - * Operation. If the result verifies the existence of malicious content, the - * site will be added to the [Google's Social Engineering lists] - * (https://support.google.com/webmasters/answer/6350487/) in order to - * protect users that could get exposed to this threat in the future. Only - * allowlisted projects can use this method during Early Access. Please reach - * out to Sales or your customer engineer to obtain access. - * - * Sample code: - * ``` - * $webRiskServiceClient = new WebRiskServiceClient(); - * try { - * $formattedParent = $webRiskServiceClient->projectName('[PROJECT]'); - * $submission = new Submission(); - * $operationResponse = $webRiskServiceClient->submitUri($formattedParent, $submission); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $webRiskServiceClient->submitUri($formattedParent, $submission); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $webRiskServiceClient->resumeOperation($operationName, 'submitUri'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $webRiskServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the project that is making the submission. This - * string is in the format "projects/{project_number}". - * @param Submission $submission Required. The submission that contains the URI to be scanned. - * @param array $optionalArgs { - * Optional. - * - * @type ThreatInfo $threatInfo - * Provides additional information about the submission. - * @type ThreatDiscovery $threatDiscovery - * Provides additional information about how the submission was discovered. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function submitUri($parent, $submission, array $optionalArgs = []) - { - $request = new SubmitUriRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setSubmission($submission); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['threatInfo'])) { - $request->setThreatInfo($optionalArgs['threatInfo']); - } - - if (isset($optionalArgs['threatDiscovery'])) { - $request->setThreatDiscovery($optionalArgs['threatDiscovery']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('SubmitUri', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } -} diff --git a/owl-bot-staging/WebRisk/v1/src/V1/WebRiskServiceClient.php b/owl-bot-staging/WebRisk/v1/src/V1/WebRiskServiceClient.php deleted file mode 100644 index f88354a1f2cc..000000000000 --- a/owl-bot-staging/WebRisk/v1/src/V1/WebRiskServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.webrisk.v1.WebRiskService' => [ - 'SubmitUri' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\WebRisk\V1\Submission', - 'metadataReturnType' => '\Google\Cloud\WebRisk\V1\SubmitUriMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ComputeThreatListDiff' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\WebRisk\V1\ComputeThreatListDiffResponse', - ], - 'CreateSubmission' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\WebRisk\V1\Submission', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'SearchHashes' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\WebRisk\V1\SearchHashesResponse', - ], - 'SearchUris' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\WebRisk\V1\SearchUrisResponse', - ], - 'templateMap' => [ - 'project' => 'projects/{project}', - ], - ], - ], -]; diff --git a/owl-bot-staging/WebRisk/v1/src/V1/resources/web_risk_service_rest_client_config.php b/owl-bot-staging/WebRisk/v1/src/V1/resources/web_risk_service_rest_client_config.php deleted file mode 100644 index ab0a604ffee1..000000000000 --- a/owl-bot-staging/WebRisk/v1/src/V1/resources/web_risk_service_rest_client_config.php +++ /dev/null @@ -1,92 +0,0 @@ - [ - 'google.cloud.webrisk.v1.WebRiskService' => [ - 'ComputeThreatListDiff' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/threatLists:computeDiff', - ], - 'CreateSubmission' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/submissions', - 'body' => 'submission', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SearchHashes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/hashes:search', - ], - 'SearchUris' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/uris:search', - ], - 'SubmitUri' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/uris:submit', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/WebRisk/v1/tests/Unit/V1/WebRiskServiceClientTest.php b/owl-bot-staging/WebRisk/v1/tests/Unit/V1/WebRiskServiceClientTest.php deleted file mode 100644 index a03e7e8655d3..000000000000 --- a/owl-bot-staging/WebRisk/v1/tests/Unit/V1/WebRiskServiceClientTest.php +++ /dev/null @@ -1,449 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return WebRiskServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new WebRiskServiceClient($options); - } - - /** @test */ - public function computeThreatListDiffTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $newVersionToken = '115'; - $expectedResponse = new ComputeThreatListDiffResponse(); - $expectedResponse->setNewVersionToken($newVersionToken); - $transport->addResponse($expectedResponse); - // Mock request - $threatType = ThreatType::THREAT_TYPE_UNSPECIFIED; - $constraints = new Constraints(); - $response = $gapicClient->computeThreatListDiff($threatType, $constraints); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.webrisk.v1.WebRiskService/ComputeThreatListDiff', $actualFuncCall); - $actualValue = $actualRequestObject->getThreatType(); - $this->assertProtobufEquals($threatType, $actualValue); - $actualValue = $actualRequestObject->getConstraints(); - $this->assertProtobufEquals($constraints, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function computeThreatListDiffExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $threatType = ThreatType::THREAT_TYPE_UNSPECIFIED; - $constraints = new Constraints(); - try { - $gapicClient->computeThreatListDiff($threatType, $constraints); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSubmissionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $uri = 'uri116076'; - $expectedResponse = new Submission(); - $expectedResponse->setUri($uri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $submission = new Submission(); - $submissionUri = 'submissionUri-1560297856'; - $submission->setUri($submissionUri); - $response = $gapicClient->createSubmission($formattedParent, $submission); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.webrisk.v1.WebRiskService/CreateSubmission', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSubmission(); - $this->assertProtobufEquals($submission, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSubmissionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $submission = new Submission(); - $submissionUri = 'submissionUri-1560297856'; - $submission->setUri($submissionUri); - try { - $gapicClient->createSubmission($formattedParent, $submission); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchHashesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new SearchHashesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $threatTypes = []; - $response = $gapicClient->searchHashes($threatTypes); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.webrisk.v1.WebRiskService/SearchHashes', $actualFuncCall); - $actualValue = $actualRequestObject->getThreatTypes(); - $this->assertProtobufEquals($threatTypes, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchHashesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $threatTypes = []; - try { - $gapicClient->searchHashes($threatTypes); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchUrisTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new SearchUrisResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $uri = 'uri116076'; - $threatTypes = []; - $response = $gapicClient->searchUris($uri, $threatTypes); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.webrisk.v1.WebRiskService/SearchUris', $actualFuncCall); - $actualValue = $actualRequestObject->getUri(); - $this->assertProtobufEquals($uri, $actualValue); - $actualValue = $actualRequestObject->getThreatTypes(); - $this->assertProtobufEquals($threatTypes, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchUrisExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $uri = 'uri116076'; - $threatTypes = []; - try { - $gapicClient->searchUris($uri, $threatTypes); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function submitUriTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/submitUriTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $uri = 'uri116076'; - $expectedResponse = new Submission(); - $expectedResponse->setUri($uri); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/submitUriTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $submission = new Submission(); - $submissionUri = 'submissionUri-1560297856'; - $submission->setUri($submissionUri); - $response = $gapicClient->submitUri($formattedParent, $submission); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.webrisk.v1.WebRiskService/SubmitUri', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSubmission(); - $this->assertProtobufEquals($submission, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/submitUriTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function submitUriExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/submitUriTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $submission = new Submission(); - $submissionUri = 'submissionUri-1560297856'; - $submission->setUri($submissionUri); - $response = $gapicClient->submitUri($formattedParent, $submission); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/submitUriTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/GPBMetadata/Google/Cloud/Webrisk/V1Beta1/Webrisk.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/GPBMetadata/Google/Cloud/Webrisk/V1Beta1/Webrisk.php deleted file mode 100644 index c9943a041180704684c2d2dad6e181ff4e99bfd2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4188 zcmb_f&u<$=6vj^6B+qV}Ow-ggt-6?^rd7M9;fLsk6gl=Lb=5eQ<2C|WTGs1vywu)Z zcE?Er^um=RTmT6njvNqwM}>q0w;m8eoH+6q@MdP$ani(2fn4I*W4a&@$(X%RG0UWbS1JAUmvRYYQ!xc@Fne|nH zP%m(V`ldvvKe)Nf5f%Zgju`|>_#Qq61^>KWqhni2z)Xh!F57`&J2tb;j{OnFvZS=k zPC(K2*|n{nV=>!x6mGEYSaklXA~E^e%bts|FDa2v6;20IQ7<`+`i|MD7inPmw#Qt* zf=e}Ri?Tk6{LTE;a9a*%x0HG5qozIM z-f>*cg6jmDwinYL#8HNYj!hl*d^RgK?KGEZ+uXKY|M;eT7Hc-1KQp`D;kJVP8@KI{ z>wL4>r*;LCaK29lr{)U$l!0r<&pvWNu2n^*s$r(8VWwuzg-E7nV=i-QWYT6X4SZD$Lz<~uK$1zuOEQ(St$o?IN3kAGKJw|J7pPKBR9k8O^YE|inJ>-KdLz0OP2HW*$ zI;O(qs5C zxv(-EdYG?jVGm7gocSUK$$^(74bxrokkP9#?zTlm2m;vp7<(?+U z8q5Vf&vSiLBZJG1PXitfcX|x@xG~!4(1Mea{c0R89uY|3Au1&XoJ0fhTk<|Gc)v4x zpF<8(;;7XSkh?&1m@=D9lqDWSLNLED99$l%j;!rs@=HrnfJvWr-EEY#^a+7-^VlfW z(2$&m8Her|`%`2B(Ng3AOj>PfJq&u?^rXNq4#yu#t6B)L$SpYQQ#{Bnb((mj4t>N# zR*1|@E@YxjqI;wE)ghCC$v(^}I1#kXg*V<5S(M5yLuwz(7vX$W->9sYH*}-+Zbdil zmp3YUp|n!ci_jX7;xjkipHu?7IsmB(~Tvxu8XK94b%hvk0LAU<8>@U`l2VK9Ji7 zoQ^%8(m_eKN={y6;Hoh?M9=GgA^6)U1{|82Yh{Npu z9YapbFd;eRiZg~nw{#p*Be%mVEScml$y+e%&@C*k+bCAg!%60|7{CC~e?5~FjB_qS zO+Ro#QqzZAr|g$8n3difkQQuJd~?U(*g~Z_XZ0(?NvoPWk}*<*q;Fd^GUqa$T*!^E zMuQ^lFjIFdw`n_D*{@@8X27|=Vl5#$`er*#G?67FIqL4AZzZ`N#Wy9Ki|qfUcNYN$ zKu^O&gvS#sk$oMe_V~bzm&tAf*oKOXPY|+?Vo{W{4`HTykOzX+E!z*6fkNMt)?;K2 zPKhWy)5q2sTTqb#3BH)u)?F-=J%@?1o*=W3qMTI}Ti#cvc|A*AqfsV`n)D)^tKF&U z`PyMxnS_b8{JqV5RY$p;L)ls{l=Alsy}Vi~>w2|RUY+KR#?1ZlX1-k0i^j(KN=+;u zyS4(Sd0iMN!9>BfXML@LqPtOAFCVty1dLVlo46UObhT8_r{fFXB;YLe`c<4FHmJXi zG=-A@`6C8r4=p`pgmxZk6smq^ad^HSVJo#FTlw_YKR=IWiP9fr9GU7Jvt&GBXb$B>~24M_25yKpr?Z<#sFwg=~AD`x@ z@#*@2?*aKS1}TXX>cEJ0WN>Zd=7>IMze(umE#YXI%=I0Wy480z&7Z@1v(M$s-6#3E zsNt7gHMaSIiU;&dUTrhx1zIk*v$GSD7k$i`J=T_!?G3MEvX<+2mw%2y1`Q*gBiL|` zSWbn>D`uWb>^)7^^Qf11ySXhl8jEwd(Sb?XYb=I{UgNv?_-bLZ`hEPus+f>fF(Iqr z25NXOoW37}~LLDRw&nij5ToDfaeYghUc)^$0Y4$QJg P&aq;poHrlCV}O4E;tpp} diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/CompressionType.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/CompressionType.php deleted file mode 100644 index 82669697ca7e..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/CompressionType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.webrisk.v1beta1.CompressionType - */ -class CompressionType -{ - /** - * Unknown. - * - * Generated from protobuf enum COMPRESSION_TYPE_UNSPECIFIED = 0; - */ - const COMPRESSION_TYPE_UNSPECIFIED = 0; - /** - * Raw, uncompressed data. - * - * Generated from protobuf enum RAW = 1; - */ - const RAW = 1; - /** - * Rice-Golomb encoded data. - * - * Generated from protobuf enum RICE = 2; - */ - const RICE = 2; - - private static $valueToName = [ - self::COMPRESSION_TYPE_UNSPECIFIED => 'COMPRESSION_TYPE_UNSPECIFIED', - self::RAW => 'RAW', - self::RICE => 'RICE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffRequest.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffRequest.php deleted file mode 100644 index def2b840744c..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffRequest.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest - */ -class ComputeThreatListDiffRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The ThreatList to update. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.ThreatType threat_type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $threat_type = 0; - /** - * The current version token of the client for the requested list (the - * client version that was received from the last successful diff). - * - * Generated from protobuf field bytes version_token = 2; - */ - protected $version_token = ''; - /** - * Required. The constraints associated with this request. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $constraints = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $threat_type - * The ThreatList to update. - * @type string $version_token - * The current version token of the client for the requested list (the - * client version that was received from the last successful diff). - * @type \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffRequest\Constraints $constraints - * Required. The constraints associated with this request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The ThreatList to update. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.ThreatType threat_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getThreatType() - { - return $this->threat_type; - } - - /** - * The ThreatList to update. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.ThreatType threat_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setThreatType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\WebRisk\V1beta1\ThreatType::class); - $this->threat_type = $var; - - return $this; - } - - /** - * The current version token of the client for the requested list (the - * client version that was received from the last successful diff). - * - * Generated from protobuf field bytes version_token = 2; - * @return string - */ - public function getVersionToken() - { - return $this->version_token; - } - - /** - * The current version token of the client for the requested list (the - * client version that was received from the last successful diff). - * - * Generated from protobuf field bytes version_token = 2; - * @param string $var - * @return $this - */ - public function setVersionToken($var) - { - GPBUtil::checkString($var, False); - $this->version_token = $var; - - return $this; - } - - /** - * Required. The constraints associated with this request. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffRequest\Constraints|null - */ - public function getConstraints() - { - return $this->constraints; - } - - public function hasConstraints() - { - return isset($this->constraints); - } - - public function clearConstraints() - { - unset($this->constraints); - } - - /** - * Required. The constraints associated with this request. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffRequest\Constraints $var - * @return $this - */ - public function setConstraints($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffRequest\Constraints::class); - $this->constraints = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffRequest/Constraints.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffRequest/Constraints.php deleted file mode 100644 index 87f9116eea35..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffRequest/Constraints.php +++ /dev/null @@ -1,154 +0,0 @@ -google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints - */ -class Constraints extends \Google\Protobuf\Internal\Message -{ - /** - * The maximum size in number of entries. The diff will not contain more - * entries than this value. This should be a power of 2 between 2**10 and - * 2**20. If zero, no diff size limit is set. - * - * Generated from protobuf field int32 max_diff_entries = 1; - */ - protected $max_diff_entries = 0; - /** - * Sets the maximum number of entries that the client is willing to have - * in the local database. This should be a power of 2 between 2**10 and - * 2**20. If zero, no database size limit is set. - * - * Generated from protobuf field int32 max_database_entries = 2; - */ - protected $max_database_entries = 0; - /** - * The compression types supported by the client. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3; - */ - private $supported_compressions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $max_diff_entries - * The maximum size in number of entries. The diff will not contain more - * entries than this value. This should be a power of 2 between 2**10 and - * 2**20. If zero, no diff size limit is set. - * @type int $max_database_entries - * Sets the maximum number of entries that the client is willing to have - * in the local database. This should be a power of 2 between 2**10 and - * 2**20. If zero, no database size limit is set. - * @type array|\Google\Protobuf\Internal\RepeatedField $supported_compressions - * The compression types supported by the client. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The maximum size in number of entries. The diff will not contain more - * entries than this value. This should be a power of 2 between 2**10 and - * 2**20. If zero, no diff size limit is set. - * - * Generated from protobuf field int32 max_diff_entries = 1; - * @return int - */ - public function getMaxDiffEntries() - { - return $this->max_diff_entries; - } - - /** - * The maximum size in number of entries. The diff will not contain more - * entries than this value. This should be a power of 2 between 2**10 and - * 2**20. If zero, no diff size limit is set. - * - * Generated from protobuf field int32 max_diff_entries = 1; - * @param int $var - * @return $this - */ - public function setMaxDiffEntries($var) - { - GPBUtil::checkInt32($var); - $this->max_diff_entries = $var; - - return $this; - } - - /** - * Sets the maximum number of entries that the client is willing to have - * in the local database. This should be a power of 2 between 2**10 and - * 2**20. If zero, no database size limit is set. - * - * Generated from protobuf field int32 max_database_entries = 2; - * @return int - */ - public function getMaxDatabaseEntries() - { - return $this->max_database_entries; - } - - /** - * Sets the maximum number of entries that the client is willing to have - * in the local database. This should be a power of 2 between 2**10 and - * 2**20. If zero, no database size limit is set. - * - * Generated from protobuf field int32 max_database_entries = 2; - * @param int $var - * @return $this - */ - public function setMaxDatabaseEntries($var) - { - GPBUtil::checkInt32($var); - $this->max_database_entries = $var; - - return $this; - } - - /** - * The compression types supported by the client. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSupportedCompressions() - { - return $this->supported_compressions; - } - - /** - * The compression types supported by the client. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSupportedCompressions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1beta1\CompressionType::class); - $this->supported_compressions = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Constraints::class, \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffRequest_Constraints::class); - diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse.php deleted file mode 100644 index b713743b9439..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse - */ -class ComputeThreatListDiffResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The type of response. This may indicate that an action must be taken by the - * client when the response is received. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType response_type = 4; - */ - protected $response_type = 0; - /** - * A set of entries to add to a local threat type's list. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.ThreatEntryAdditions additions = 5; - */ - protected $additions = null; - /** - * A set of entries to remove from a local threat type's list. - * This field may be empty. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.ThreatEntryRemovals removals = 6; - */ - protected $removals = null; - /** - * The new opaque client version token. - * - * Generated from protobuf field bytes new_version_token = 7; - */ - protected $new_version_token = ''; - /** - * The expected SHA256 hash of the client state; that is, of the sorted list - * of all hashes present in the database after applying the provided diff. - * If the client state doesn't match the expected state, the client must - * disregard this diff and retry later. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum = 8; - */ - protected $checksum = null; - /** - * The soonest the client should wait before issuing any diff - * request. Querying sooner is unlikely to produce a meaningful diff. - * Waiting longer is acceptable considering the use case. - * If this field is not set clients may update as soon as they want. - * - * Generated from protobuf field .google.protobuf.Timestamp recommended_next_diff = 2; - */ - protected $recommended_next_diff = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $response_type - * The type of response. This may indicate that an action must be taken by the - * client when the response is received. - * @type \Google\Cloud\WebRisk\V1beta1\ThreatEntryAdditions $additions - * A set of entries to add to a local threat type's list. - * @type \Google\Cloud\WebRisk\V1beta1\ThreatEntryRemovals $removals - * A set of entries to remove from a local threat type's list. - * This field may be empty. - * @type string $new_version_token - * The new opaque client version token. - * @type \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffResponse\Checksum $checksum - * The expected SHA256 hash of the client state; that is, of the sorted list - * of all hashes present in the database after applying the provided diff. - * If the client state doesn't match the expected state, the client must - * disregard this diff and retry later. - * @type \Google\Protobuf\Timestamp $recommended_next_diff - * The soonest the client should wait before issuing any diff - * request. Querying sooner is unlikely to produce a meaningful diff. - * Waiting longer is acceptable considering the use case. - * If this field is not set clients may update as soon as they want. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The type of response. This may indicate that an action must be taken by the - * client when the response is received. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType response_type = 4; - * @return int - */ - public function getResponseType() - { - return $this->response_type; - } - - /** - * The type of response. This may indicate that an action must be taken by the - * client when the response is received. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType response_type = 4; - * @param int $var - * @return $this - */ - public function setResponseType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffResponse\ResponseType::class); - $this->response_type = $var; - - return $this; - } - - /** - * A set of entries to add to a local threat type's list. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.ThreatEntryAdditions additions = 5; - * @return \Google\Cloud\WebRisk\V1beta1\ThreatEntryAdditions|null - */ - public function getAdditions() - { - return $this->additions; - } - - public function hasAdditions() - { - return isset($this->additions); - } - - public function clearAdditions() - { - unset($this->additions); - } - - /** - * A set of entries to add to a local threat type's list. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.ThreatEntryAdditions additions = 5; - * @param \Google\Cloud\WebRisk\V1beta1\ThreatEntryAdditions $var - * @return $this - */ - public function setAdditions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\ThreatEntryAdditions::class); - $this->additions = $var; - - return $this; - } - - /** - * A set of entries to remove from a local threat type's list. - * This field may be empty. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.ThreatEntryRemovals removals = 6; - * @return \Google\Cloud\WebRisk\V1beta1\ThreatEntryRemovals|null - */ - public function getRemovals() - { - return $this->removals; - } - - public function hasRemovals() - { - return isset($this->removals); - } - - public function clearRemovals() - { - unset($this->removals); - } - - /** - * A set of entries to remove from a local threat type's list. - * This field may be empty. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.ThreatEntryRemovals removals = 6; - * @param \Google\Cloud\WebRisk\V1beta1\ThreatEntryRemovals $var - * @return $this - */ - public function setRemovals($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\ThreatEntryRemovals::class); - $this->removals = $var; - - return $this; - } - - /** - * The new opaque client version token. - * - * Generated from protobuf field bytes new_version_token = 7; - * @return string - */ - public function getNewVersionToken() - { - return $this->new_version_token; - } - - /** - * The new opaque client version token. - * - * Generated from protobuf field bytes new_version_token = 7; - * @param string $var - * @return $this - */ - public function setNewVersionToken($var) - { - GPBUtil::checkString($var, False); - $this->new_version_token = $var; - - return $this; - } - - /** - * The expected SHA256 hash of the client state; that is, of the sorted list - * of all hashes present in the database after applying the provided diff. - * If the client state doesn't match the expected state, the client must - * disregard this diff and retry later. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum = 8; - * @return \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffResponse\Checksum|null - */ - public function getChecksum() - { - return $this->checksum; - } - - public function hasChecksum() - { - return isset($this->checksum); - } - - public function clearChecksum() - { - unset($this->checksum); - } - - /** - * The expected SHA256 hash of the client state; that is, of the sorted list - * of all hashes present in the database after applying the provided diff. - * If the client state doesn't match the expected state, the client must - * disregard this diff and retry later. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum = 8; - * @param \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffResponse\Checksum $var - * @return $this - */ - public function setChecksum($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffResponse\Checksum::class); - $this->checksum = $var; - - return $this; - } - - /** - * The soonest the client should wait before issuing any diff - * request. Querying sooner is unlikely to produce a meaningful diff. - * Waiting longer is acceptable considering the use case. - * If this field is not set clients may update as soon as they want. - * - * Generated from protobuf field .google.protobuf.Timestamp recommended_next_diff = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRecommendedNextDiff() - { - return $this->recommended_next_diff; - } - - public function hasRecommendedNextDiff() - { - return isset($this->recommended_next_diff); - } - - public function clearRecommendedNextDiff() - { - unset($this->recommended_next_diff); - } - - /** - * The soonest the client should wait before issuing any diff - * request. Querying sooner is unlikely to produce a meaningful diff. - * Waiting longer is acceptable considering the use case. - * If this field is not set clients may update as soon as they want. - * - * Generated from protobuf field .google.protobuf.Timestamp recommended_next_diff = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRecommendedNextDiff($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->recommended_next_diff = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse/Checksum.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse/Checksum.php deleted file mode 100644 index f9c2d57899a7..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse/Checksum.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum - */ -class Checksum extends \Google\Protobuf\Internal\Message -{ - /** - * The SHA256 hash of the client state; that is, of the sorted list of all - * hashes present in the database. - * - * Generated from protobuf field bytes sha256 = 1; - */ - protected $sha256 = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sha256 - * The SHA256 hash of the client state; that is, of the sorted list of all - * hashes present in the database. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The SHA256 hash of the client state; that is, of the sorted list of all - * hashes present in the database. - * - * Generated from protobuf field bytes sha256 = 1; - * @return string - */ - public function getSha256() - { - return $this->sha256; - } - - /** - * The SHA256 hash of the client state; that is, of the sorted list of all - * hashes present in the database. - * - * Generated from protobuf field bytes sha256 = 1; - * @param string $var - * @return $this - */ - public function setSha256($var) - { - GPBUtil::checkString($var, False); - $this->sha256 = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Checksum::class, \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffResponse_Checksum::class); - diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse/ResponseType.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse/ResponseType.php deleted file mode 100644 index a6a5478ca08e..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ComputeThreatListDiffResponse/ResponseType.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType - */ -class ResponseType -{ - /** - * Unknown. - * - * Generated from protobuf enum RESPONSE_TYPE_UNSPECIFIED = 0; - */ - const RESPONSE_TYPE_UNSPECIFIED = 0; - /** - * Partial updates are applied to the client's existing local database. - * - * Generated from protobuf enum DIFF = 1; - */ - const DIFF = 1; - /** - * Full updates resets the client's entire local database. This means - * that either the client had no state, was seriously out-of-date, - * or the client is believed to be corrupt. - * - * Generated from protobuf enum RESET = 2; - */ - const RESET = 2; - - private static $valueToName = [ - self::RESPONSE_TYPE_UNSPECIFIED => 'RESPONSE_TYPE_UNSPECIFIED', - self::DIFF => 'DIFF', - self::RESET => 'RESET', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ResponseType::class, \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffResponse_ResponseType::class); - diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RawHashes.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RawHashes.php deleted file mode 100644 index da27e509ba21..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RawHashes.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.webrisk.v1beta1.RawHashes - */ -class RawHashes extends \Google\Protobuf\Internal\Message -{ - /** - * The number of bytes for each prefix encoded below. This field can be - * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). - * - * Generated from protobuf field int32 prefix_size = 1; - */ - protected $prefix_size = 0; - /** - * The hashes, in binary format, concatenated into one long string. Hashes are - * sorted in lexicographic order. For JSON API users, hashes are - * base64-encoded. - * - * Generated from protobuf field bytes raw_hashes = 2; - */ - protected $raw_hashes = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $prefix_size - * The number of bytes for each prefix encoded below. This field can be - * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). - * @type string $raw_hashes - * The hashes, in binary format, concatenated into one long string. Hashes are - * sorted in lexicographic order. For JSON API users, hashes are - * base64-encoded. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The number of bytes for each prefix encoded below. This field can be - * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). - * - * Generated from protobuf field int32 prefix_size = 1; - * @return int - */ - public function getPrefixSize() - { - return $this->prefix_size; - } - - /** - * The number of bytes for each prefix encoded below. This field can be - * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). - * - * Generated from protobuf field int32 prefix_size = 1; - * @param int $var - * @return $this - */ - public function setPrefixSize($var) - { - GPBUtil::checkInt32($var); - $this->prefix_size = $var; - - return $this; - } - - /** - * The hashes, in binary format, concatenated into one long string. Hashes are - * sorted in lexicographic order. For JSON API users, hashes are - * base64-encoded. - * - * Generated from protobuf field bytes raw_hashes = 2; - * @return string - */ - public function getRawHashes() - { - return $this->raw_hashes; - } - - /** - * The hashes, in binary format, concatenated into one long string. Hashes are - * sorted in lexicographic order. For JSON API users, hashes are - * base64-encoded. - * - * Generated from protobuf field bytes raw_hashes = 2; - * @param string $var - * @return $this - */ - public function setRawHashes($var) - { - GPBUtil::checkString($var, False); - $this->raw_hashes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RawIndices.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RawIndices.php deleted file mode 100644 index c88490960635..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RawIndices.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.webrisk.v1beta1.RawIndices - */ -class RawIndices extends \Google\Protobuf\Internal\Message -{ - /** - * The indices to remove from a lexicographically-sorted local list. - * - * Generated from protobuf field repeated int32 indices = 1; - */ - private $indices; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $indices - * The indices to remove from a lexicographically-sorted local list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The indices to remove from a lexicographically-sorted local list. - * - * Generated from protobuf field repeated int32 indices = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIndices() - { - return $this->indices; - } - - /** - * The indices to remove from a lexicographically-sorted local list. - * - * Generated from protobuf field repeated int32 indices = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIndices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->indices = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RiceDeltaEncoding.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RiceDeltaEncoding.php deleted file mode 100644 index 427116c0bc30..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/RiceDeltaEncoding.php +++ /dev/null @@ -1,190 +0,0 @@ -google.cloud.webrisk.v1beta1.RiceDeltaEncoding - */ -class RiceDeltaEncoding extends \Google\Protobuf\Internal\Message -{ - /** - * The offset of the first entry in the encoded data, or, if only a single - * integer was encoded, that single integer's value. If the field is empty or - * missing, assume zero. - * - * Generated from protobuf field int64 first_value = 1; - */ - protected $first_value = 0; - /** - * The Golomb-Rice parameter, which is a number between 2 and 28. This field - * is missing (that is, zero) if `num_entries` is zero. - * - * Generated from protobuf field int32 rice_parameter = 2; - */ - protected $rice_parameter = 0; - /** - * The number of entries that are delta encoded in the encoded data. If only a - * single integer was encoded, this will be zero and the single value will be - * stored in `first_value`. - * - * Generated from protobuf field int32 entry_count = 3; - */ - protected $entry_count = 0; - /** - * The encoded deltas that are encoded using the Golomb-Rice coder. - * - * Generated from protobuf field bytes encoded_data = 4; - */ - protected $encoded_data = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $first_value - * The offset of the first entry in the encoded data, or, if only a single - * integer was encoded, that single integer's value. If the field is empty or - * missing, assume zero. - * @type int $rice_parameter - * The Golomb-Rice parameter, which is a number between 2 and 28. This field - * is missing (that is, zero) if `num_entries` is zero. - * @type int $entry_count - * The number of entries that are delta encoded in the encoded data. If only a - * single integer was encoded, this will be zero and the single value will be - * stored in `first_value`. - * @type string $encoded_data - * The encoded deltas that are encoded using the Golomb-Rice coder. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The offset of the first entry in the encoded data, or, if only a single - * integer was encoded, that single integer's value. If the field is empty or - * missing, assume zero. - * - * Generated from protobuf field int64 first_value = 1; - * @return int|string - */ - public function getFirstValue() - { - return $this->first_value; - } - - /** - * The offset of the first entry in the encoded data, or, if only a single - * integer was encoded, that single integer's value. If the field is empty or - * missing, assume zero. - * - * Generated from protobuf field int64 first_value = 1; - * @param int|string $var - * @return $this - */ - public function setFirstValue($var) - { - GPBUtil::checkInt64($var); - $this->first_value = $var; - - return $this; - } - - /** - * The Golomb-Rice parameter, which is a number between 2 and 28. This field - * is missing (that is, zero) if `num_entries` is zero. - * - * Generated from protobuf field int32 rice_parameter = 2; - * @return int - */ - public function getRiceParameter() - { - return $this->rice_parameter; - } - - /** - * The Golomb-Rice parameter, which is a number between 2 and 28. This field - * is missing (that is, zero) if `num_entries` is zero. - * - * Generated from protobuf field int32 rice_parameter = 2; - * @param int $var - * @return $this - */ - public function setRiceParameter($var) - { - GPBUtil::checkInt32($var); - $this->rice_parameter = $var; - - return $this; - } - - /** - * The number of entries that are delta encoded in the encoded data. If only a - * single integer was encoded, this will be zero and the single value will be - * stored in `first_value`. - * - * Generated from protobuf field int32 entry_count = 3; - * @return int - */ - public function getEntryCount() - { - return $this->entry_count; - } - - /** - * The number of entries that are delta encoded in the encoded data. If only a - * single integer was encoded, this will be zero and the single value will be - * stored in `first_value`. - * - * Generated from protobuf field int32 entry_count = 3; - * @param int $var - * @return $this - */ - public function setEntryCount($var) - { - GPBUtil::checkInt32($var); - $this->entry_count = $var; - - return $this; - } - - /** - * The encoded deltas that are encoded using the Golomb-Rice coder. - * - * Generated from protobuf field bytes encoded_data = 4; - * @return string - */ - public function getEncodedData() - { - return $this->encoded_data; - } - - /** - * The encoded deltas that are encoded using the Golomb-Rice coder. - * - * Generated from protobuf field bytes encoded_data = 4; - * @param string $var - * @return $this - */ - public function setEncodedData($var) - { - GPBUtil::checkString($var, False); - $this->encoded_data = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesRequest.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesRequest.php deleted file mode 100644 index 2b6b5be4b9e7..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesRequest.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.webrisk.v1beta1.SearchHashesRequest - */ -class SearchHashesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 - * hash. For JSON requests, this field is base64-encoded. - * - * Generated from protobuf field bytes hash_prefix = 1; - */ - protected $hash_prefix = ''; - /** - * Required. The ThreatLists to search in. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $threat_types; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $hash_prefix - * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 - * hash. For JSON requests, this field is base64-encoded. - * @type array|\Google\Protobuf\Internal\RepeatedField $threat_types - * Required. The ThreatLists to search in. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 - * hash. For JSON requests, this field is base64-encoded. - * - * Generated from protobuf field bytes hash_prefix = 1; - * @return string - */ - public function getHashPrefix() - { - return $this->hash_prefix; - } - - /** - * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 - * hash. For JSON requests, this field is base64-encoded. - * - * Generated from protobuf field bytes hash_prefix = 1; - * @param string $var - * @return $this - */ - public function setHashPrefix($var) - { - GPBUtil::checkString($var, False); - $this->hash_prefix = $var; - - return $this; - } - - /** - * Required. The ThreatLists to search in. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getThreatTypes() - { - return $this->threat_types; - } - - /** - * Required. The ThreatLists to search in. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setThreatTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1beta1\ThreatType::class); - $this->threat_types = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesResponse.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesResponse.php deleted file mode 100644 index ed4e0619c77e..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesResponse.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.webrisk.v1beta1.SearchHashesResponse - */ -class SearchHashesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The full hashes that matched the requested prefixes. - * The hash will be populated in the key. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1; - */ - private $threats; - /** - * For requested entities that did not match the threat list, how long to - * cache the response until. - * - * Generated from protobuf field .google.protobuf.Timestamp negative_expire_time = 2; - */ - protected $negative_expire_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\WebRisk\V1beta1\SearchHashesResponse\ThreatHash>|\Google\Protobuf\Internal\RepeatedField $threats - * The full hashes that matched the requested prefixes. - * The hash will be populated in the key. - * @type \Google\Protobuf\Timestamp $negative_expire_time - * For requested entities that did not match the threat list, how long to - * cache the response until. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The full hashes that matched the requested prefixes. - * The hash will be populated in the key. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getThreats() - { - return $this->threats; - } - - /** - * The full hashes that matched the requested prefixes. - * The hash will be populated in the key. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1; - * @param array<\Google\Cloud\WebRisk\V1beta1\SearchHashesResponse\ThreatHash>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setThreats($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebRisk\V1beta1\SearchHashesResponse\ThreatHash::class); - $this->threats = $arr; - - return $this; - } - - /** - * For requested entities that did not match the threat list, how long to - * cache the response until. - * - * Generated from protobuf field .google.protobuf.Timestamp negative_expire_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getNegativeExpireTime() - { - return $this->negative_expire_time; - } - - public function hasNegativeExpireTime() - { - return isset($this->negative_expire_time); - } - - public function clearNegativeExpireTime() - { - unset($this->negative_expire_time); - } - - /** - * For requested entities that did not match the threat list, how long to - * cache the response until. - * - * Generated from protobuf field .google.protobuf.Timestamp negative_expire_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setNegativeExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->negative_expire_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesResponse/ThreatHash.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesResponse/ThreatHash.php deleted file mode 100644 index e1b8fb56ba96..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchHashesResponse/ThreatHash.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash - */ -class ThreatHash extends \Google\Protobuf\Internal\Message -{ - /** - * The ThreatList this threat belongs to. - * This must contain at least one entry. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1; - */ - private $threat_types; - /** - * A 32 byte SHA256 hash. This field is in binary format. For JSON - * requests, hashes are base64-encoded. - * - * Generated from protobuf field bytes hash = 2; - */ - protected $hash = ''; - /** - * The cache lifetime for the returned match. Clients must not cache this - * response past this timestamp to avoid false positives. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3; - */ - protected $expire_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $threat_types - * The ThreatList this threat belongs to. - * This must contain at least one entry. - * @type string $hash - * A 32 byte SHA256 hash. This field is in binary format. For JSON - * requests, hashes are base64-encoded. - * @type \Google\Protobuf\Timestamp $expire_time - * The cache lifetime for the returned match. Clients must not cache this - * response past this timestamp to avoid false positives. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The ThreatList this threat belongs to. - * This must contain at least one entry. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getThreatTypes() - { - return $this->threat_types; - } - - /** - * The ThreatList this threat belongs to. - * This must contain at least one entry. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setThreatTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1beta1\ThreatType::class); - $this->threat_types = $arr; - - return $this; - } - - /** - * A 32 byte SHA256 hash. This field is in binary format. For JSON - * requests, hashes are base64-encoded. - * - * Generated from protobuf field bytes hash = 2; - * @return string - */ - public function getHash() - { - return $this->hash; - } - - /** - * A 32 byte SHA256 hash. This field is in binary format. For JSON - * requests, hashes are base64-encoded. - * - * Generated from protobuf field bytes hash = 2; - * @param string $var - * @return $this - */ - public function setHash($var) - { - GPBUtil::checkString($var, False); - $this->hash = $var; - - return $this; - } - - /** - * The cache lifetime for the returned match. Clients must not cache this - * response past this timestamp to avoid false positives. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * The cache lifetime for the returned match. Clients must not cache this - * response past this timestamp to avoid false positives. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ThreatHash::class, \Google\Cloud\WebRisk\V1beta1\SearchHashesResponse_ThreatHash::class); - diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisRequest.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisRequest.php deleted file mode 100644 index 9b41a391e3f1..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.webrisk.v1beta1.SearchUrisRequest - */ -class SearchUrisRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The URI to be checked for matches. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - /** - * Required. The ThreatLists to search in. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $threat_types; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Required. The URI to be checked for matches. - * @type array|\Google\Protobuf\Internal\RepeatedField $threat_types - * Required. The ThreatLists to search in. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * Required. The URI to be checked for matches. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. The URI to be checked for matches. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Required. The ThreatLists to search in. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getThreatTypes() - { - return $this->threat_types; - } - - /** - * Required. The ThreatLists to search in. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setThreatTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1beta1\ThreatType::class); - $this->threat_types = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisResponse.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisResponse.php deleted file mode 100644 index 6b0061d4d425..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisResponse.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.webrisk.v1beta1.SearchUrisResponse - */ -class SearchUrisResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The threat list matches. This may be empty if the URI is on no list. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri threat = 1; - */ - protected $threat = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\WebRisk\V1beta1\SearchUrisResponse\ThreatUri $threat - * The threat list matches. This may be empty if the URI is on no list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The threat list matches. This may be empty if the URI is on no list. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri threat = 1; - * @return \Google\Cloud\WebRisk\V1beta1\SearchUrisResponse\ThreatUri|null - */ - public function getThreat() - { - return $this->threat; - } - - public function hasThreat() - { - return isset($this->threat); - } - - public function clearThreat() - { - unset($this->threat); - } - - /** - * The threat list matches. This may be empty if the URI is on no list. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri threat = 1; - * @param \Google\Cloud\WebRisk\V1beta1\SearchUrisResponse\ThreatUri $var - * @return $this - */ - public function setThreat($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\SearchUrisResponse\ThreatUri::class); - $this->threat = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisResponse/ThreatUri.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisResponse/ThreatUri.php deleted file mode 100644 index 18342b1f533f..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/SearchUrisResponse/ThreatUri.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri - */ -class ThreatUri extends \Google\Protobuf\Internal\Message -{ - /** - * The ThreatList this threat belongs to. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1; - */ - private $threat_types; - /** - * The cache lifetime for the returned match. Clients must not cache this - * response past this timestamp to avoid false positives. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; - */ - protected $expire_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $threat_types - * The ThreatList this threat belongs to. - * @type \Google\Protobuf\Timestamp $expire_time - * The cache lifetime for the returned match. Clients must not cache this - * response past this timestamp to avoid false positives. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The ThreatList this threat belongs to. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getThreatTypes() - { - return $this->threat_types; - } - - /** - * The ThreatList this threat belongs to. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setThreatTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebRisk\V1beta1\ThreatType::class); - $this->threat_types = $arr; - - return $this; - } - - /** - * The cache lifetime for the returned match. Clients must not cache this - * response past this timestamp to avoid false positives. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * The cache lifetime for the returned match. Clients must not cache this - * response past this timestamp to avoid false positives. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ThreatUri::class, \Google\Cloud\WebRisk\V1beta1\SearchUrisResponse_ThreatUri::class); - diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatEntryAdditions.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatEntryAdditions.php deleted file mode 100644 index 24b83d090bf5..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatEntryAdditions.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.webrisk.v1beta1.ThreatEntryAdditions - */ -class ThreatEntryAdditions extends \Google\Protobuf\Internal\Message -{ - /** - * The raw SHA256-formatted entries. - * Repeated to allow returning sets of hashes with different prefix sizes. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1; - */ - private $raw_hashes; - /** - * The encoded 4-byte prefixes of SHA256-formatted entries, using a - * Golomb-Rice encoding. The hashes are converted to uint32, sorted in - * ascending order, then delta encoded and stored as encoded_data. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_hashes = 2; - */ - protected $rice_hashes = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\WebRisk\V1beta1\RawHashes>|\Google\Protobuf\Internal\RepeatedField $raw_hashes - * The raw SHA256-formatted entries. - * Repeated to allow returning sets of hashes with different prefix sizes. - * @type \Google\Cloud\WebRisk\V1beta1\RiceDeltaEncoding $rice_hashes - * The encoded 4-byte prefixes of SHA256-formatted entries, using a - * Golomb-Rice encoding. The hashes are converted to uint32, sorted in - * ascending order, then delta encoded and stored as encoded_data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The raw SHA256-formatted entries. - * Repeated to allow returning sets of hashes with different prefix sizes. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRawHashes() - { - return $this->raw_hashes; - } - - /** - * The raw SHA256-formatted entries. - * Repeated to allow returning sets of hashes with different prefix sizes. - * - * Generated from protobuf field repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1; - * @param array<\Google\Cloud\WebRisk\V1beta1\RawHashes>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRawHashes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebRisk\V1beta1\RawHashes::class); - $this->raw_hashes = $arr; - - return $this; - } - - /** - * The encoded 4-byte prefixes of SHA256-formatted entries, using a - * Golomb-Rice encoding. The hashes are converted to uint32, sorted in - * ascending order, then delta encoded and stored as encoded_data. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_hashes = 2; - * @return \Google\Cloud\WebRisk\V1beta1\RiceDeltaEncoding|null - */ - public function getRiceHashes() - { - return $this->rice_hashes; - } - - public function hasRiceHashes() - { - return isset($this->rice_hashes); - } - - public function clearRiceHashes() - { - unset($this->rice_hashes); - } - - /** - * The encoded 4-byte prefixes of SHA256-formatted entries, using a - * Golomb-Rice encoding. The hashes are converted to uint32, sorted in - * ascending order, then delta encoded and stored as encoded_data. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_hashes = 2; - * @param \Google\Cloud\WebRisk\V1beta1\RiceDeltaEncoding $var - * @return $this - */ - public function setRiceHashes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\RiceDeltaEncoding::class); - $this->rice_hashes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatEntryRemovals.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatEntryRemovals.php deleted file mode 100644 index f26c06dd2738..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatEntryRemovals.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.webrisk.v1beta1.ThreatEntryRemovals - */ -class ThreatEntryRemovals extends \Google\Protobuf\Internal\Message -{ - /** - * The raw removal indices for a local list. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.RawIndices raw_indices = 1; - */ - protected $raw_indices = null; - /** - * The encoded local, lexicographically-sorted list indices, using a - * Golomb-Rice encoding. Used for sending compressed removal indices. The - * removal indices (uint32) are sorted in ascending order, then delta encoded - * and stored as encoded_data. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_indices = 2; - */ - protected $rice_indices = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\WebRisk\V1beta1\RawIndices $raw_indices - * The raw removal indices for a local list. - * @type \Google\Cloud\WebRisk\V1beta1\RiceDeltaEncoding $rice_indices - * The encoded local, lexicographically-sorted list indices, using a - * Golomb-Rice encoding. Used for sending compressed removal indices. The - * removal indices (uint32) are sorted in ascending order, then delta encoded - * and stored as encoded_data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Webrisk\V1Beta1\Webrisk::initOnce(); - parent::__construct($data); - } - - /** - * The raw removal indices for a local list. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.RawIndices raw_indices = 1; - * @return \Google\Cloud\WebRisk\V1beta1\RawIndices|null - */ - public function getRawIndices() - { - return $this->raw_indices; - } - - public function hasRawIndices() - { - return isset($this->raw_indices); - } - - public function clearRawIndices() - { - unset($this->raw_indices); - } - - /** - * The raw removal indices for a local list. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.RawIndices raw_indices = 1; - * @param \Google\Cloud\WebRisk\V1beta1\RawIndices $var - * @return $this - */ - public function setRawIndices($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\RawIndices::class); - $this->raw_indices = $var; - - return $this; - } - - /** - * The encoded local, lexicographically-sorted list indices, using a - * Golomb-Rice encoding. Used for sending compressed removal indices. The - * removal indices (uint32) are sorted in ascending order, then delta encoded - * and stored as encoded_data. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_indices = 2; - * @return \Google\Cloud\WebRisk\V1beta1\RiceDeltaEncoding|null - */ - public function getRiceIndices() - { - return $this->rice_indices; - } - - public function hasRiceIndices() - { - return isset($this->rice_indices); - } - - public function clearRiceIndices() - { - unset($this->rice_indices); - } - - /** - * The encoded local, lexicographically-sorted list indices, using a - * Golomb-Rice encoding. Used for sending compressed removal indices. The - * removal indices (uint32) are sorted in ascending order, then delta encoded - * and stored as encoded_data. - * - * Generated from protobuf field .google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_indices = 2; - * @param \Google\Cloud\WebRisk\V1beta1\RiceDeltaEncoding $var - * @return $this - */ - public function setRiceIndices($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebRisk\V1beta1\RiceDeltaEncoding::class); - $this->rice_indices = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatType.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatType.php deleted file mode 100644 index 1b7a29aaf9b3..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/ThreatType.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.webrisk.v1beta1.ThreatType - */ -class ThreatType -{ - /** - * Unknown. - * - * Generated from protobuf enum THREAT_TYPE_UNSPECIFIED = 0; - */ - const THREAT_TYPE_UNSPECIFIED = 0; - /** - * Malware targeting any platform. - * - * Generated from protobuf enum MALWARE = 1; - */ - const MALWARE = 1; - /** - * Social engineering targeting any platform. - * - * Generated from protobuf enum SOCIAL_ENGINEERING = 2; - */ - const SOCIAL_ENGINEERING = 2; - /** - * Unwanted software targeting any platform. - * - * Generated from protobuf enum UNWANTED_SOFTWARE = 3; - */ - const UNWANTED_SOFTWARE = 3; - - private static $valueToName = [ - self::THREAT_TYPE_UNSPECIFIED => 'THREAT_TYPE_UNSPECIFIED', - self::MALWARE => 'MALWARE', - self::SOCIAL_ENGINEERING => 'SOCIAL_ENGINEERING', - self::UNWANTED_SOFTWARE => 'UNWANTED_SOFTWARE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/WebRiskServiceV1Beta1GrpcClient.php b/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/WebRiskServiceV1Beta1GrpcClient.php deleted file mode 100644 index ba172974b8b0..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/proto/src/Google/Cloud/WebRisk/V1beta1/WebRiskServiceV1Beta1GrpcClient.php +++ /dev/null @@ -1,86 +0,0 @@ -_simpleRequest('/google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1/ComputeThreatListDiff', - $argument, - ['\Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffResponse', 'decode'], - $metadata, $options); - } - - /** - * This method is used to check whether a URI is on a given threatList. - * @param \Google\Cloud\WebRisk\V1beta1\SearchUrisRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SearchUris(\Google\Cloud\WebRisk\V1beta1\SearchUrisRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1/SearchUris', - $argument, - ['\Google\Cloud\WebRisk\V1beta1\SearchUrisResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets the full hashes that match the requested hash prefix. - * This is used after a hash prefix is looked up in a threatList - * and there is a match. The client side threatList only holds partial hashes - * so the client must query this method to determine if there is a full - * hash match of a threat. - * @param \Google\Cloud\WebRisk\V1beta1\SearchHashesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SearchHashes(\Google\Cloud\WebRisk\V1beta1\SearchHashesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1/SearchHashes', - $argument, - ['\Google\Cloud\WebRisk\V1beta1\SearchHashesResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/compute_threat_list_diff.php b/owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/compute_threat_list_diff.php deleted file mode 100644 index 37a7d78c84e3..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/compute_threat_list_diff.php +++ /dev/null @@ -1,70 +0,0 @@ -computeThreatListDiff($threatType, $constraints); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $threatType = ThreatType::THREAT_TYPE_UNSPECIFIED; - - compute_threat_list_diff_sample($threatType); -} -// [END webrisk_v1beta1_generated_WebRiskServiceV1Beta1_ComputeThreatListDiff_sync] diff --git a/owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/search_hashes.php b/owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/search_hashes.php deleted file mode 100644 index 829a2fa0cba5..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/search_hashes.php +++ /dev/null @@ -1,73 +0,0 @@ -searchHashes($threatTypes); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $threatTypesElement = ThreatType::THREAT_TYPE_UNSPECIFIED; - - search_hashes_sample($threatTypesElement); -} -// [END webrisk_v1beta1_generated_WebRiskServiceV1Beta1_SearchHashes_sync] diff --git a/owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/search_uris.php b/owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/search_uris.php deleted file mode 100644 index 018544a71e7a..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/samples/V1beta1/WebRiskServiceV1Beta1Client/search_uris.php +++ /dev/null @@ -1,71 +0,0 @@ -searchUris($uri, $threatTypes); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $uri = '[URI]'; - $threatTypesElement = ThreatType::THREAT_TYPE_UNSPECIFIED; - - search_uris_sample($uri, $threatTypesElement); -} -// [END webrisk_v1beta1_generated_WebRiskServiceV1Beta1_SearchUris_sync] diff --git a/owl-bot-staging/WebRisk/v1beta1/src/V1beta1/Gapic/WebRiskServiceV1Beta1GapicClient.php b/owl-bot-staging/WebRisk/v1beta1/src/V1beta1/Gapic/WebRiskServiceV1Beta1GapicClient.php deleted file mode 100644 index bb955e735802..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/src/V1beta1/Gapic/WebRiskServiceV1Beta1GapicClient.php +++ /dev/null @@ -1,304 +0,0 @@ -computeThreatListDiff($threatType, $constraints); - * } finally { - * $webRiskServiceV1Beta1Client->close(); - * } - * ``` - * - * @experimental - */ -class WebRiskServiceV1Beta1GapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'webrisk.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/web_risk_service_v1_beta1_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/web_risk_service_v1_beta1_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/web_risk_service_v1_beta1_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/web_risk_service_v1_beta1_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'webrisk.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Gets the most recent threat list diffs. - * - * Sample code: - * ``` - * $webRiskServiceV1Beta1Client = new WebRiskServiceV1Beta1Client(); - * try { - * $threatType = ThreatType::THREAT_TYPE_UNSPECIFIED; - * $constraints = new Constraints(); - * $response = $webRiskServiceV1Beta1Client->computeThreatListDiff($threatType, $constraints); - * } finally { - * $webRiskServiceV1Beta1Client->close(); - * } - * ``` - * - * @param int $threatType The ThreatList to update. - * For allowed values, use constants defined on {@see \Google\Cloud\WebRisk\V1beta1\ThreatType} - * @param Constraints $constraints Required. The constraints associated with this request. - * @param array $optionalArgs { - * Optional. - * - * @type string $versionToken - * The current version token of the client for the requested list (the - * client version that was received from the last successful diff). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\WebRisk\V1beta1\ComputeThreatListDiffResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function computeThreatListDiff($threatType, $constraints, array $optionalArgs = []) - { - $request = new ComputeThreatListDiffRequest(); - $request->setThreatType($threatType); - $request->setConstraints($constraints); - if (isset($optionalArgs['versionToken'])) { - $request->setVersionToken($optionalArgs['versionToken']); - } - - return $this->startCall('ComputeThreatListDiff', ComputeThreatListDiffResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the full hashes that match the requested hash prefix. - * This is used after a hash prefix is looked up in a threatList - * and there is a match. The client side threatList only holds partial hashes - * so the client must query this method to determine if there is a full - * hash match of a threat. - * - * Sample code: - * ``` - * $webRiskServiceV1Beta1Client = new WebRiskServiceV1Beta1Client(); - * try { - * $threatTypes = []; - * $response = $webRiskServiceV1Beta1Client->searchHashes($threatTypes); - * } finally { - * $webRiskServiceV1Beta1Client->close(); - * } - * ``` - * - * @param int[] $threatTypes Required. The ThreatLists to search in. - * For allowed values, use constants defined on {@see \Google\Cloud\WebRisk\V1beta1\ThreatType} - * @param array $optionalArgs { - * Optional. - * - * @type string $hashPrefix - * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 - * hash. For JSON requests, this field is base64-encoded. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\WebRisk\V1beta1\SearchHashesResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function searchHashes($threatTypes, array $optionalArgs = []) - { - $request = new SearchHashesRequest(); - $request->setThreatTypes($threatTypes); - if (isset($optionalArgs['hashPrefix'])) { - $request->setHashPrefix($optionalArgs['hashPrefix']); - } - - return $this->startCall('SearchHashes', SearchHashesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * This method is used to check whether a URI is on a given threatList. - * - * Sample code: - * ``` - * $webRiskServiceV1Beta1Client = new WebRiskServiceV1Beta1Client(); - * try { - * $uri = 'uri'; - * $threatTypes = []; - * $response = $webRiskServiceV1Beta1Client->searchUris($uri, $threatTypes); - * } finally { - * $webRiskServiceV1Beta1Client->close(); - * } - * ``` - * - * @param string $uri Required. The URI to be checked for matches. - * @param int[] $threatTypes Required. The ThreatLists to search in. - * For allowed values, use constants defined on {@see \Google\Cloud\WebRisk\V1beta1\ThreatType} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\WebRisk\V1beta1\SearchUrisResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function searchUris($uri, $threatTypes, array $optionalArgs = []) - { - $request = new SearchUrisRequest(); - $request->setUri($uri); - $request->setThreatTypes($threatTypes); - return $this->startCall('SearchUris', SearchUrisResponse::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/WebRisk/v1beta1/src/V1beta1/WebRiskServiceV1Beta1Client.php b/owl-bot-staging/WebRisk/v1beta1/src/V1beta1/WebRiskServiceV1Beta1Client.php deleted file mode 100644 index 2f6f5d574e56..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/src/V1beta1/WebRiskServiceV1Beta1Client.php +++ /dev/null @@ -1,36 +0,0 @@ - [ - 'google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1' => [], - ], -]; diff --git a/owl-bot-staging/WebRisk/v1beta1/src/V1beta1/resources/web_risk_service_v1_beta1_rest_client_config.php b/owl-bot-staging/WebRisk/v1beta1/src/V1beta1/resources/web_risk_service_v1_beta1_rest_client_config.php deleted file mode 100644 index d7ca5b4f9931..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/src/V1beta1/resources/web_risk_service_v1_beta1_rest_client_config.php +++ /dev/null @@ -1,21 +0,0 @@ - [ - 'google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1' => [ - 'ComputeThreatListDiff' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/threatLists:computeDiff', - ], - 'SearchHashes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/hashes:search', - ], - 'SearchUris' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/uris:search', - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/WebRisk/v1beta1/tests/Unit/V1beta1/WebRiskServiceV1Beta1ClientTest.php b/owl-bot-staging/WebRisk/v1beta1/tests/Unit/V1beta1/WebRiskServiceV1Beta1ClientTest.php deleted file mode 100644 index 4addbf982c47..000000000000 --- a/owl-bot-staging/WebRisk/v1beta1/tests/Unit/V1beta1/WebRiskServiceV1Beta1ClientTest.php +++ /dev/null @@ -1,249 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return WebRiskServiceV1Beta1Client */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new WebRiskServiceV1Beta1Client($options); - } - - /** @test */ - public function computeThreatListDiffTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $newVersionToken = '115'; - $expectedResponse = new ComputeThreatListDiffResponse(); - $expectedResponse->setNewVersionToken($newVersionToken); - $transport->addResponse($expectedResponse); - // Mock request - $threatType = ThreatType::THREAT_TYPE_UNSPECIFIED; - $constraints = new Constraints(); - $response = $gapicClient->computeThreatListDiff($threatType, $constraints); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1/ComputeThreatListDiff', $actualFuncCall); - $actualValue = $actualRequestObject->getThreatType(); - $this->assertProtobufEquals($threatType, $actualValue); - $actualValue = $actualRequestObject->getConstraints(); - $this->assertProtobufEquals($constraints, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function computeThreatListDiffExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $threatType = ThreatType::THREAT_TYPE_UNSPECIFIED; - $constraints = new Constraints(); - try { - $gapicClient->computeThreatListDiff($threatType, $constraints); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchHashesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new SearchHashesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $threatTypes = []; - $response = $gapicClient->searchHashes($threatTypes); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1/SearchHashes', $actualFuncCall); - $actualValue = $actualRequestObject->getThreatTypes(); - $this->assertProtobufEquals($threatTypes, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchHashesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $threatTypes = []; - try { - $gapicClient->searchHashes($threatTypes); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchUrisTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new SearchUrisResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $uri = 'uri116076'; - $threatTypes = []; - $response = $gapicClient->searchUris($uri, $threatTypes); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1/SearchUris', $actualFuncCall); - $actualValue = $actualRequestObject->getUri(); - $this->assertProtobufEquals($uri, $actualValue); - $actualValue = $actualRequestObject->getThreatTypes(); - $this->assertProtobufEquals($threatTypes, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchUrisExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $uri = 'uri116076'; - $threatTypes = []; - try { - $gapicClient->searchUris($uri, $threatTypes); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/CrawledUrl.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/CrawledUrl.php deleted file mode 100644 index f650ca23bfb8..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/CrawledUrl.php +++ /dev/null @@ -1,32 +0,0 @@ -internalAddGeneratedFile( - ' -� -8google/cloud/websecurityscanner/v1beta/crawled_url.proto&google.cloud.websecurityscanner.v1beta"< - -CrawledUrl - http_method (  -url (  -body ( B� -*com.google.cloud.websecurityscanner.v1betaBCrawledUrlProtoPZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb�&Google.Cloud.WebSecurityScanner.V1Beta�&Google\\Cloud\\WebSecurityScanner\\V1beta�)Google::Cloud::WebSecurityScanner::V1betabproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/Finding.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/Finding.php deleted file mode 100644 index 02abec885ac1..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/Finding.php +++ /dev/null @@ -1,49 +0,0 @@ -internalAddGeneratedFile( - ' -� -4google/cloud/websecurityscanner/v1beta/finding.proto&google.cloud.websecurityscanner.v1beta:google/cloud/websecurityscanner/v1beta/finding_addon.proto"� -Finding -name (  - finding_type (  - http_method (  - -fuzzed_url (  -body (  - description (  -reproduction_url (  - frame_url (  - final_url (  - tracking_id - ( : -form ( 2,.google.cloud.websecurityscanner.v1beta.FormQ -outdated_library ( 27.google.cloud.websecurityscanner.v1beta.OutdatedLibraryU -violating_resource ( 29.google.cloud.websecurityscanner.v1beta.ViolatingResourceU -vulnerable_headers ( 29.google.cloud.websecurityscanner.v1beta.VulnerableHeaders[ -vulnerable_parameters ( 2<.google.cloud.websecurityscanner.v1beta.VulnerableParameters8 -xss ( 2+.google.cloud.websecurityscanner.v1beta.Xss:��A� -)websecurityscanner.googleapis.com/FindingSprojects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding}B� -*com.google.cloud.websecurityscanner.v1betaB FindingProtoPZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb�&Google.Cloud.WebSecurityScanner.V1Beta�&Google\\Cloud\\WebSecurityScanner\\V1beta�)Google::Cloud::WebSecurityScanner::V1betabproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/FindingAddon.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/FindingAddon.php deleted file mode 100644 index 9ea7f4fed763..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/FindingAddon.php +++ /dev/null @@ -1,49 +0,0 @@ -internalAddGeneratedFile( - ' -� -:google/cloud/websecurityscanner/v1beta/finding_addon.proto&google.cloud.websecurityscanner.v1beta"* -Form - -action_uri (  -fields ( "Q -OutdatedLibrary - library_name (  -version (  -learn_more_urls ( "? -ViolatingResource - content_type (  - resource_url ( "/ -VulnerableParameters -parameter_names ( "� -VulnerableHeadersQ -headers ( 2@.google.cloud.websecurityscanner.v1beta.VulnerableHeaders.HeaderY -missing_headers ( 2@.google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header% -Header -name (  -value ( "2 -Xss - stack_traces (  - error_message ( B� -*com.google.cloud.websecurityscanner.v1betaBFindingAddonProtoPZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb�&Google.Cloud.WebSecurityScanner.V1Beta�&Google\\Cloud\\WebSecurityScanner\\V1beta�)Google::Cloud::WebSecurityScanner::V1betabproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/FindingTypeStats.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/FindingTypeStats.php deleted file mode 100644 index 48755bc15453..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/FindingTypeStats.php +++ /dev/null @@ -1,30 +0,0 @@ -internalAddGeneratedFile( - ' -� -?google/cloud/websecurityscanner/v1beta/finding_type_stats.proto&google.cloud.websecurityscanner.v1beta"? -FindingTypeStats - finding_type (  - finding_count (B� -*com.google.cloud.websecurityscanner.v1betaBFindingTypeStatsProtoPZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb�&Google.Cloud.WebSecurityScanner.V1Beta�&Google\\Cloud\\WebSecurityScanner\\V1beta�)Google::Cloud::WebSecurityScanner::V1betabproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/ScanConfig.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/ScanConfig.php deleted file mode 100644 index af447db1fe59ee2841c3eabcd2a133fb47b9658e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3047 zcmb_e+iu%N5RK);m$9uV1ZprUiZD))*hNCYDGC&H(w35FS*R=#5*<4!fh|R?WHuDZ z^5Vn|{1<)cYaja1Pw7|WIbYG)B_-LibFopqNLtLCnK?UWcAowa90qVts!@-IR!nSo zmK#xYKX2PlJUe!LPht)&&!+1eQi{oJ?*~58@=O{fs57RJCA03uH1sUjtkTF1ognr@ z9ZeNwK;tpL>|}i-3(Me~zOd?v+VLQhARq>#o*=xy=58NkW-mw5qwYT%gL z4t0BFdT1RveyAvuswN;Ga&6P>dOzFi6Zd7Zduk`%=ch5|*Kn{+Vrv*&?91=v@%K)4 z3u>=7CVd+_cYRC~Bkdvlbql_`YRd`_QcsyTyL`Uc<+Rz0x3dUV;FQ9Q%Czf?-(Dto zn0T4noy?6(2fMBmk61|!*8W}rm}o&*hU-jT;*2!2z9`&=<(?A-u60cKX^x$iXWywg z;U>%vtvBSiAQETs^oCG`6=XY%9dAIA(2d0F((K6i1>~&+$ApK{LV5X~cmsWwo~ZKY z5hG7Bl+`mpf)0>GG$hsl(ZxB0%|Cg11=u|VQ5gmnB6MBLe&sq*Oad!rDviW>R*kR= z3z2s z_Q`0v;wT*sEw4vxER}{LaKiK}6rpi!!|!BsyOIJ|IId6uz&ucY1bb0j;#8F`69qNT z?lyFySHz`9)D@Sne79``X)ui9AG463Y9I&lX%iC5w*3T~i1q%`lh$RjO<$6!-jr+n zNm5hToofPyvXdzGhvQI8Q2$G)3dbFXD*gy7XQB&Vzyj0BMBJ&2MOX;%IehJhJuy}H z9IE@BdcAl6D`!A2jUcSTqU#SFkBtL9B+}7QE=*5@Viy+1n%KlSlIer6VU=A+adaJ{ zNhXiyyKoOy`4~U4T+&N$FTn{zde(8oOS-`;UHb(VPiuU2ucNhzTGN^a*=u%mty15v zYt_Ovp#aO3opx(iBaM1<@1QUv2$0WC)MmBas#gm+;TEiP)NQq0Cv|c zN$?JQX{ha*W)Quh8r!Y*?o_NifU4_6Yu4%rF(WL&e5JLk?-^PlxAqhk$DNB)X|-MN z{6resbFDFj0x;J^Y_)+1^Dx_J?W6Y)zWTUCH{r2%ptsrvFu%dN6kfcbTiLB8*eprY8Xz7i~6+p zj%IHoI!==;36ml1O$UQ0rD1Y1j)zfNqtp zIE#Z}{0r>(865<}Ndz3r*uiuZW^pp2DnN|FsCqyPPKDhaC!o+XI?vKpqJdytbCgBt zC>VB)XcDIJI7?C+ppC|Hlr5xIBh`c1vWhMq&}xxmqp_6aGn%E-sJuF*X_QUV(UUxH zMeu&{E6?oV^LUnr*6%NtZGnx|1yF_Uqu;Ke=l{>N%)p6T!s2BlWif|7L&T@ zC??@^4__cR&}IoDUUB9uX1^de(KUeEzIR@hUy@sBt2})s$BX29^jP;@4;HipY*qS> zB@Mw`sgO-(3Eq~Tkh5xSy+j_P`Vw(R$zdoyF1U1r z?`fcv)C|J`)$mv35qkKMAfE$_IY&S-5BZvWiykb69BL~6(h8=%h`3B@=-#;zCHfNn z3fVwc4d1p*T?36>utIXJ!!TA8CO^_F(~wY5mLcJ{&oCjoh_*D-Dz>Wm-XTa=gu~W7 z&1o|aUsb-gOm09ONbj|Mx;EF8ub^eqGz`X-V)?=|EAcn^5{qfyHdJna>S$bR!@3HM z?-MBdg(r}s1vQS>$#t~xVH6}4zN52ZQyVH|X0kN7rhDcQ!<*`aIP6E?bbveGE54>G z;8ZZ+b-`WJ^_r_e5^(>)clt-&Juw&kqlnu3WH=*!*yU4=sWBRJL&4`L-<_ z4`gjxaDiFijI;)hbD$ AIcRUkS(-co>jiN`XPg}ac`@F zSDL?9&^>4$KJiv>uARBo^GDTQdGn@tS>|s;a#BA|&g(ORaXf1^mLH*U@5y>o zK}pOb8TnB_yks<@ocPgY%mT`FLQXoQ-RTqaq}BftLq(KupBiKwMdN_h{2)q(wJYig z>L;AZ*TQ#01h2h%>{02~)Y9QesHZ0YgzhC3vFlUP>>mG&9z$2Ub~6RD8w$)mp98ah zd3=nnhX8)y3PCIc?Ij_+0fN6c@dD-(Azg`o_nB~5$Ru+E_6J_@h>YAoP>h}T9VMYJ zSrif#&vg<02kRQ7hO3FhwuurJ)Ig4e)yXa~dV=AZ2s-5b7 zeyoCHBT~(BG>o|=I>z;duHzR)-N3k= zGi`Dn@jl108UHu*xywTqj+X?V)}qg_pQL*kFHS72;Wy7%Ua|UcI4#gA_IGtksUr9x z{0s2iM>V$gAPdvedC=$QLC@x4x4tC2LlyOoRNQAXwA)w~;wq!~9gurDNII6-)HPWU znVqut&pO=BtFLXrEj7256|z#@)Xw2k`a4d$njA-UG_91-uzm1M|1c8t99K6B7)zmO z&tZ#GkpwbFT}@FBmqo=XK#UAh2fz%ubky}Kw-B&=uv-8Ych{#)q&wHv*6 zK}&cb9G|;a0UbJil!UUfj&ZBn9r!G@No>!l>2_+m3!h)O!g-Yh>J|1_fUgx5l?^m* zXcgGOyv9g`aAJy2Eh28BWld{Cd8QdEfScumC&guMXuN{+>q*uu*nX!oM5Rnt5pr3= zXD4{?H`so!s`uco`K#F&^jn>_WA*EO(;2j_uGwgvw#<{APc(q_=L2(q-z(T@8&;#< zZnxUaoswFew%RT0N3^Z(b)Y<3+ApBeGp)f{e<5fYyLZrNn3jd8o3Li~dYv9Z;$c6v z&dwB|5x=cp!v2C;&Dz+Fnb1)PYsDD+fQ5NUeJN^h@~=s%Z;dD%u`%unC3b$g$}A{S z#Wrf->uDZ|vp(IV}|%yapjzg+AcF53L7^q`rF zu%1eSeoj3rS9FyGHmaV9@ZW`_oy)b->-Su36l|sbZ%g|bs9~h2hB5DJ7@4oPj-1Nq d+lSL9`BA2cGZLyE8|E*N&(t$hx(Q4G{sUc#0(JlZ diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/ScanRunErrorTrace.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/ScanRunErrorTrace.php deleted file mode 100644 index 451259ff5342ba68e4c1d0cde0f85892ed355c4c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1501 zcmbu9UrXCi7{=H7=i&?`hD{0%cBZ0rY$>{nL7a{>jWwW2Nz=(B5R&w?2GX2xau>8TL{3DR$0DtzsM~>rI=(li&NkPv7&rd!L$Z*ibz1w5QZ0!o+FqM zOmT!07#5=uA~3>}EKU$nAne%CvR!C&O!ozQHOB>skP62bj}z325?l;hpHY~js30-D z$fF=-@YbiD5YeE;AAM4!J|YAYpOPR#il_!a8ca~0u>;ucwNIFO7|_7$3b3bhuycRdqz1>koDRMM$Ua#SCUFFF8c_DN5$ArK#xxF+_zN3*AC7_~ zM~qU{j*2v*F-{?W!A>L8+=eBSYd12?Y}$ucefGF>%r(zUDI#f*cpa2SB+e)%JtkGv zF`_fS`AKtoT9)JD5p0${s%oXleMm`xZdQkoAX<=gPxQ?Jm$P5q!(H^adpb@>@mLtB zs@F4Lmk=YrK8U9SYQy1do4 zARmMI2oF)C25Zfw-2>%*Fr@-gbViXKu$=Qfj)YU?DmUs3{do87L(n&zme;}R1m~17 zClj3d=agpCJ0cpNWAuf!Uo|iCv!0Pu5-8?jnj`T>D!IEjYhGS{RzTr5w zBh}=m%nn_%eBHJV&8~0u`vXI&%g@28HgJy&%Qbb)HSJr1Ir$lAxaNt`@$G@@pB|aV zhR->cX?3M}c?HO>ZTlyh_0e}&6gYH}WU6w4|yX){reX}dlMiFVFu(atUlKlSYrs;Yvjs#UG3mfCPpMB$sQ*%f+KUiljd@y~P+%JP<8 If=dAY0wQ_zKmY&$ diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/ScanRunWarningTrace.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/ScanRunWarningTrace.php deleted file mode 100644 index 775ada9cd20ffefa61fc1057d0f47776edacacbb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1252 zcmb`HL2uJA6vt^99DJCn48gPmGGp301gSP|DFfOxt)gvBwWLg|B1Mktc9t?bavY|C zcI3jx;K)beqag7eu#>Ku)*|gdE^+L?|L^(v{qpWZdY*!putyjXNRly(ub@09Fcn;K z%o7;rlL-+J^NW-wM3@kEJlOXF=ycrRh1#0&Twr3sDd*FKG;qT6apRK28Ns=r@+!lK zDf7nXy_iVU(4UdWS#*g6qih;UfiN+PcmObTL9$d$z}}#Jtn_0fQP?Z2Lt9&irwi8M zr@gk4HUYp1$};Gy5GOf1EdvDFAAAK+J!u{%6vIp+sa{(&izuU#qJ(}?M?ZiQlw?Ht zENUk?!;*3a^#+e&Qs0H8r`B$zT$Sno-efw^)l-!VT_%ZOC-BC|K|=`4@dcsvi=Rrgt+ z3-z`g@cj|6|HDNZ+og$Fbc4Cr4QAO5n|~@`ZOL^ReXxT0n5wFky?u;KRoVYlnruG0@9`=oVx6rDK!@F?(W z6=MTD4LmP8ZuQUZtW}L?U~RtE9gap((DD!c+C#$ttL-DtK6E-!`z&%>gW5{_M-{wM zDBbfs?e!%GDtc>B8I8)?-c*KPG^TtRcPOPZ^cJrnjho9Re^$491#)JAoT-rWXEf`C z6wPLd+^-v9ID=Euc}E&5JT>{htGlJCWfiWLwWzhMQX4-m{s(V&=I!~q?D|`f{1cEu LS+Z~qt^xQ9hq9yU diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/WebSecurityScanner.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/WebSecurityScanner.php deleted file mode 100644 index b15772b1430f..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/GPBMetadata/Google/Cloud/Websecurityscanner/V1Beta/WebSecurityScanner.php +++ /dev/null @@ -1,121 +0,0 @@ -internalAddGeneratedFile( - ' -�- -Agoogle/cloud/websecurityscanner/v1beta/web_security_scanner.proto&google.cloud.websecurityscanner.v1betagoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto8google/cloud/websecurityscanner/v1beta/crawled_url.proto4google/cloud/websecurityscanner/v1beta/finding.proto?google/cloud/websecurityscanner/v1beta/finding_type_stats.proto8google/cloud/websecurityscanner/v1beta/scan_config.proto5google/cloud/websecurityscanner/v1beta/scan_run.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"� -CreateScanConfigRequestC -parent ( B3�A�A- -+cloudresourcemanager.googleapis.com/ProjectL - scan_config ( 22.google.cloud.websecurityscanner.v1beta.ScanConfigB�A"] -DeleteScanConfigRequestB -name ( B4�A�A. -,websecurityscanner.googleapis.com/ScanConfig"Z -GetScanConfigRequestB -name ( B4�A�A. -,websecurityscanner.googleapis.com/ScanConfig"� -ListScanConfigsRequestC -parent ( B3�A�A- -+cloudresourcemanager.googleapis.com/Project - -page_token (  - page_size ("� -UpdateScanConfigRequestL - scan_config ( 22.google.cloud.websecurityscanner.v1beta.ScanConfigB�A4 - update_mask ( 2.google.protobuf.FieldMaskB�A"| -ListScanConfigsResponseH - scan_configs ( 22.google.cloud.websecurityscanner.v1beta.ScanConfig -next_page_token ( "Y -StartScanRunRequestB -name ( B4�A�A. -,websecurityscanner.googleapis.com/ScanConfig"T -GetScanRunRequest? -name ( B1�A�A+ -)websecurityscanner.googleapis.com/ScanRun"� -ListScanRunsRequestD -parent ( B4�A�A. -,websecurityscanner.googleapis.com/ScanConfig - -page_token (  - page_size ("s -ListScanRunsResponseB - scan_runs ( 2/.google.cloud.websecurityscanner.v1beta.ScanRun -next_page_token ( "U -StopScanRunRequest? -name ( B1�A�A+ -)websecurityscanner.googleapis.com/ScanRun"� -ListCrawledUrlsRequestA -parent ( B1�A�A+ -)websecurityscanner.googleapis.com/ScanRun - -page_token (  - page_size ("| -ListCrawledUrlsResponseH - crawled_urls ( 22.google.cloud.websecurityscanner.v1beta.CrawledUrl -next_page_token ( "T -GetFindingRequest? -name ( B1�A�A+ -)websecurityscanner.googleapis.com/Finding"� -ListFindingsRequestA -parent ( B1�A�A+ -)websecurityscanner.googleapis.com/ScanRun -filter ( B�A - -page_token (  - page_size ("r -ListFindingsResponseA -findings ( 2/.google.cloud.websecurityscanner.v1beta.Finding -next_page_token ( "` -ListFindingTypeStatsRequestA -parent ( B1�A�A+ -)websecurityscanner.googleapis.com/ScanRun"t -ListFindingTypeStatsResponseT -finding_type_stats ( 28.google.cloud.websecurityscanner.v1beta.FindingTypeStats2� -WebSecurityScanner� -CreateScanConfig?.google.cloud.websecurityscanner.v1beta.CreateScanConfigRequest2.google.cloud.websecurityscanner.v1beta.ScanConfig"Q���6"\'/v1beta/{parent=projects/*}/scanConfigs: scan_config�Aparent,scan_config� -DeleteScanConfig?.google.cloud.websecurityscanner.v1beta.DeleteScanConfigRequest.google.protobuf.Empty"6���)*\'/v1beta/{name=projects/*/scanConfigs/*}�Aname� - GetScanConfig<.google.cloud.websecurityscanner.v1beta.GetScanConfigRequest2.google.cloud.websecurityscanner.v1beta.ScanConfig"6���)\'/v1beta/{name=projects/*/scanConfigs/*}�Aname� -ListScanConfigs>.google.cloud.websecurityscanner.v1beta.ListScanConfigsRequest?.google.cloud.websecurityscanner.v1beta.ListScanConfigsResponse"8���)\'/v1beta/{parent=projects/*}/scanConfigs�Aparent� -UpdateScanConfig?.google.cloud.websecurityscanner.v1beta.UpdateScanConfigRequest2.google.cloud.websecurityscanner.v1beta.ScanConfig"b���B23/v1beta/{scan_config.name=projects/*/scanConfigs/*}: scan_config�Ascan_config,update_mask� - StartScanRun;.google.cloud.websecurityscanner.v1beta.StartScanRunRequest/.google.cloud.websecurityscanner.v1beta.ScanRun"?���2"-/v1beta/{name=projects/*/scanConfigs/*}:start:*�Aname� - -GetScanRun9.google.cloud.websecurityscanner.v1beta.GetScanRunRequest/.google.cloud.websecurityscanner.v1beta.ScanRun"A���42/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*}�Aname� - ListScanRuns;.google.cloud.websecurityscanner.v1beta.ListScanRunsRequest<.google.cloud.websecurityscanner.v1beta.ListScanRunsResponse"C���42/v1beta/{parent=projects/*/scanConfigs/*}/scanRuns�Aparent� - StopScanRun:.google.cloud.websecurityscanner.v1beta.StopScanRunRequest/.google.cloud.websecurityscanner.v1beta.ScanRun"I���<"7/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*}:stop:*�Aname� -ListCrawledUrls>.google.cloud.websecurityscanner.v1beta.ListCrawledUrlsRequest?.google.cloud.websecurityscanner.v1beta.ListCrawledUrlsResponse"Q���B@/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/crawledUrls�Aparent� - -GetFinding9.google.cloud.websecurityscanner.v1beta.GetFindingRequest/.google.cloud.websecurityscanner.v1beta.Finding"L���?=/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*/findings/*}�Aname� - ListFindings;.google.cloud.websecurityscanner.v1beta.ListFindingsRequest<.google.cloud.websecurityscanner.v1beta.ListFindingsResponse"U���?=/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/findings�A parent,filter� -ListFindingTypeStatsC.google.cloud.websecurityscanner.v1beta.ListFindingTypeStatsRequestD.google.cloud.websecurityscanner.v1beta.ListFindingTypeStatsResponse"V���GE/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/findingTypeStats�AparentU�A!websecurityscanner.googleapis.com�A.https://www.googleapis.com/auth/cloud-platformB� -*com.google.cloud.websecurityscanner.v1betaBWebSecurityScannerProtoPZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb�&Google.Cloud.WebSecurityScanner.V1Beta�&Google\\Cloud\\WebSecurityScanner\\V1beta�)Google::Cloud::WebSecurityScanner::V1betabproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/CrawledUrl.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/CrawledUrl.php deleted file mode 100644 index 2e349723d4e8..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/CrawledUrl.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.websecurityscanner.v1beta.CrawledUrl - */ -class CrawledUrl extends \Google\Protobuf\Internal\Message -{ - /** - * The http method of the request that was used to visit the URL, in - * uppercase. - * - * Generated from protobuf field string http_method = 1; - */ - protected $http_method = ''; - /** - * The URL that was crawled. - * - * Generated from protobuf field string url = 2; - */ - protected $url = ''; - /** - * The body of the request that was used to visit the URL. - * - * Generated from protobuf field string body = 3; - */ - protected $body = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $http_method - * The http method of the request that was used to visit the URL, in - * uppercase. - * @type string $url - * The URL that was crawled. - * @type string $body - * The body of the request that was used to visit the URL. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\CrawledUrl::initOnce(); - parent::__construct($data); - } - - /** - * The http method of the request that was used to visit the URL, in - * uppercase. - * - * Generated from protobuf field string http_method = 1; - * @return string - */ - public function getHttpMethod() - { - return $this->http_method; - } - - /** - * The http method of the request that was used to visit the URL, in - * uppercase. - * - * Generated from protobuf field string http_method = 1; - * @param string $var - * @return $this - */ - public function setHttpMethod($var) - { - GPBUtil::checkString($var, True); - $this->http_method = $var; - - return $this; - } - - /** - * The URL that was crawled. - * - * Generated from protobuf field string url = 2; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * The URL that was crawled. - * - * Generated from protobuf field string url = 2; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - - /** - * The body of the request that was used to visit the URL. - * - * Generated from protobuf field string body = 3; - * @return string - */ - public function getBody() - { - return $this->body; - } - - /** - * The body of the request that was used to visit the URL. - * - * Generated from protobuf field string body = 3; - * @param string $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkString($var, True); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/CreateScanConfigRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/CreateScanConfigRequest.php deleted file mode 100644 index ead5d80e4378..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/CreateScanConfigRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.websecurityscanner.v1beta.CreateScanConfigRequest - */ -class CreateScanConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name where the scan is created, which should be a - * project resource name in the format 'projects/{projectId}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ScanConfig to be created. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig scan_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scan_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name where the scan is created, which should be a - * project resource name in the format 'projects/{projectId}'. - * @type \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig $scan_config - * Required. The ScanConfig to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name where the scan is created, which should be a - * project resource name in the format 'projects/{projectId}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name where the scan is created, which should be a - * project resource name in the format 'projects/{projectId}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ScanConfig to be created. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig scan_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig|null - */ - public function getScanConfig() - { - return $this->scan_config; - } - - public function hasScanConfig() - { - return isset($this->scan_config); - } - - public function clearScanConfig() - { - unset($this->scan_config); - } - - /** - * Required. The ScanConfig to be created. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig scan_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig $var - * @return $this - */ - public function setScanConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig::class); - $this->scan_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/DeleteScanConfigRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/DeleteScanConfigRequest.php deleted file mode 100644 index 141b3ec43c8b..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/DeleteScanConfigRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.websecurityscanner.v1beta.DeleteScanConfigRequest - */ -class DeleteScanConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the ScanConfig to be deleted. The name follows the - * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the ScanConfig to be deleted. The name follows the - * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the ScanConfig to be deleted. The name follows the - * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the ScanConfig to be deleted. The name follows the - * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Finding.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Finding.php deleted file mode 100644 index a2d13bd51546..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Finding.php +++ /dev/null @@ -1,686 +0,0 @@ -google.cloud.websecurityscanner.v1beta.Finding - */ -class Finding extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the Finding. The name follows the format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'. - * The finding IDs are generated by the system. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The type of the Finding. - * Detailed and up-to-date information on findings can be found here: - * https://cloud.google.com/security-scanner/docs/scan-result-details - * - * Generated from protobuf field string finding_type = 2; - */ - protected $finding_type = ''; - /** - * The http method of the request that triggered the vulnerability, in - * uppercase. - * - * Generated from protobuf field string http_method = 3; - */ - protected $http_method = ''; - /** - * The URL produced by the server-side fuzzer and used in the request that - * triggered the vulnerability. - * - * Generated from protobuf field string fuzzed_url = 4; - */ - protected $fuzzed_url = ''; - /** - * The body of the request that triggered the vulnerability. - * - * Generated from protobuf field string body = 5; - */ - protected $body = ''; - /** - * The description of the vulnerability. - * - * Generated from protobuf field string description = 6; - */ - protected $description = ''; - /** - * The URL containing human-readable payload that user can leverage to - * reproduce the vulnerability. - * - * Generated from protobuf field string reproduction_url = 7; - */ - protected $reproduction_url = ''; - /** - * If the vulnerability was originated from nested IFrame, the immediate - * parent IFrame is reported. - * - * Generated from protobuf field string frame_url = 8; - */ - protected $frame_url = ''; - /** - * The URL where the browser lands when the vulnerability is detected. - * - * Generated from protobuf field string final_url = 9; - */ - protected $final_url = ''; - /** - * The tracking ID uniquely identifies a vulnerability instance across - * multiple ScanRuns. - * - * Generated from protobuf field string tracking_id = 10; - */ - protected $tracking_id = ''; - /** - * An addon containing information reported for a vulnerability with an HTML - * form, if any. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.Form form = 16; - */ - protected $form = null; - /** - * An addon containing information about outdated libraries. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.OutdatedLibrary outdated_library = 11; - */ - protected $outdated_library = null; - /** - * An addon containing detailed information regarding any resource causing the - * vulnerability such as JavaScript sources, image, audio files, etc. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ViolatingResource violating_resource = 12; - */ - protected $violating_resource = null; - /** - * An addon containing information about vulnerable or missing HTTP headers. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.VulnerableHeaders vulnerable_headers = 15; - */ - protected $vulnerable_headers = null; - /** - * An addon containing information about request parameters which were found - * to be vulnerable. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.VulnerableParameters vulnerable_parameters = 13; - */ - protected $vulnerable_parameters = null; - /** - * An addon containing information reported for an XSS, if any. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.Xss xss = 14; - */ - protected $xss = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the Finding. The name follows the format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'. - * The finding IDs are generated by the system. - * @type string $finding_type - * The type of the Finding. - * Detailed and up-to-date information on findings can be found here: - * https://cloud.google.com/security-scanner/docs/scan-result-details - * @type string $http_method - * The http method of the request that triggered the vulnerability, in - * uppercase. - * @type string $fuzzed_url - * The URL produced by the server-side fuzzer and used in the request that - * triggered the vulnerability. - * @type string $body - * The body of the request that triggered the vulnerability. - * @type string $description - * The description of the vulnerability. - * @type string $reproduction_url - * The URL containing human-readable payload that user can leverage to - * reproduce the vulnerability. - * @type string $frame_url - * If the vulnerability was originated from nested IFrame, the immediate - * parent IFrame is reported. - * @type string $final_url - * The URL where the browser lands when the vulnerability is detected. - * @type string $tracking_id - * The tracking ID uniquely identifies a vulnerability instance across - * multiple ScanRuns. - * @type \Google\Cloud\WebSecurityScanner\V1beta\Form $form - * An addon containing information reported for a vulnerability with an HTML - * form, if any. - * @type \Google\Cloud\WebSecurityScanner\V1beta\OutdatedLibrary $outdated_library - * An addon containing information about outdated libraries. - * @type \Google\Cloud\WebSecurityScanner\V1beta\ViolatingResource $violating_resource - * An addon containing detailed information regarding any resource causing the - * vulnerability such as JavaScript sources, image, audio files, etc. - * @type \Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders $vulnerable_headers - * An addon containing information about vulnerable or missing HTTP headers. - * @type \Google\Cloud\WebSecurityScanner\V1beta\VulnerableParameters $vulnerable_parameters - * An addon containing information about request parameters which were found - * to be vulnerable. - * @type \Google\Cloud\WebSecurityScanner\V1beta\Xss $xss - * An addon containing information reported for an XSS, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\Finding::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the Finding. The name follows the format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'. - * The finding IDs are generated by the system. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the Finding. The name follows the format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'. - * The finding IDs are generated by the system. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The type of the Finding. - * Detailed and up-to-date information on findings can be found here: - * https://cloud.google.com/security-scanner/docs/scan-result-details - * - * Generated from protobuf field string finding_type = 2; - * @return string - */ - public function getFindingType() - { - return $this->finding_type; - } - - /** - * The type of the Finding. - * Detailed and up-to-date information on findings can be found here: - * https://cloud.google.com/security-scanner/docs/scan-result-details - * - * Generated from protobuf field string finding_type = 2; - * @param string $var - * @return $this - */ - public function setFindingType($var) - { - GPBUtil::checkString($var, True); - $this->finding_type = $var; - - return $this; - } - - /** - * The http method of the request that triggered the vulnerability, in - * uppercase. - * - * Generated from protobuf field string http_method = 3; - * @return string - */ - public function getHttpMethod() - { - return $this->http_method; - } - - /** - * The http method of the request that triggered the vulnerability, in - * uppercase. - * - * Generated from protobuf field string http_method = 3; - * @param string $var - * @return $this - */ - public function setHttpMethod($var) - { - GPBUtil::checkString($var, True); - $this->http_method = $var; - - return $this; - } - - /** - * The URL produced by the server-side fuzzer and used in the request that - * triggered the vulnerability. - * - * Generated from protobuf field string fuzzed_url = 4; - * @return string - */ - public function getFuzzedUrl() - { - return $this->fuzzed_url; - } - - /** - * The URL produced by the server-side fuzzer and used in the request that - * triggered the vulnerability. - * - * Generated from protobuf field string fuzzed_url = 4; - * @param string $var - * @return $this - */ - public function setFuzzedUrl($var) - { - GPBUtil::checkString($var, True); - $this->fuzzed_url = $var; - - return $this; - } - - /** - * The body of the request that triggered the vulnerability. - * - * Generated from protobuf field string body = 5; - * @return string - */ - public function getBody() - { - return $this->body; - } - - /** - * The body of the request that triggered the vulnerability. - * - * Generated from protobuf field string body = 5; - * @param string $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkString($var, True); - $this->body = $var; - - return $this; - } - - /** - * The description of the vulnerability. - * - * Generated from protobuf field string description = 6; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description of the vulnerability. - * - * Generated from protobuf field string description = 6; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The URL containing human-readable payload that user can leverage to - * reproduce the vulnerability. - * - * Generated from protobuf field string reproduction_url = 7; - * @return string - */ - public function getReproductionUrl() - { - return $this->reproduction_url; - } - - /** - * The URL containing human-readable payload that user can leverage to - * reproduce the vulnerability. - * - * Generated from protobuf field string reproduction_url = 7; - * @param string $var - * @return $this - */ - public function setReproductionUrl($var) - { - GPBUtil::checkString($var, True); - $this->reproduction_url = $var; - - return $this; - } - - /** - * If the vulnerability was originated from nested IFrame, the immediate - * parent IFrame is reported. - * - * Generated from protobuf field string frame_url = 8; - * @return string - */ - public function getFrameUrl() - { - return $this->frame_url; - } - - /** - * If the vulnerability was originated from nested IFrame, the immediate - * parent IFrame is reported. - * - * Generated from protobuf field string frame_url = 8; - * @param string $var - * @return $this - */ - public function setFrameUrl($var) - { - GPBUtil::checkString($var, True); - $this->frame_url = $var; - - return $this; - } - - /** - * The URL where the browser lands when the vulnerability is detected. - * - * Generated from protobuf field string final_url = 9; - * @return string - */ - public function getFinalUrl() - { - return $this->final_url; - } - - /** - * The URL where the browser lands when the vulnerability is detected. - * - * Generated from protobuf field string final_url = 9; - * @param string $var - * @return $this - */ - public function setFinalUrl($var) - { - GPBUtil::checkString($var, True); - $this->final_url = $var; - - return $this; - } - - /** - * The tracking ID uniquely identifies a vulnerability instance across - * multiple ScanRuns. - * - * Generated from protobuf field string tracking_id = 10; - * @return string - */ - public function getTrackingId() - { - return $this->tracking_id; - } - - /** - * The tracking ID uniquely identifies a vulnerability instance across - * multiple ScanRuns. - * - * Generated from protobuf field string tracking_id = 10; - * @param string $var - * @return $this - */ - public function setTrackingId($var) - { - GPBUtil::checkString($var, True); - $this->tracking_id = $var; - - return $this; - } - - /** - * An addon containing information reported for a vulnerability with an HTML - * form, if any. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.Form form = 16; - * @return \Google\Cloud\WebSecurityScanner\V1beta\Form|null - */ - public function getForm() - { - return $this->form; - } - - public function hasForm() - { - return isset($this->form); - } - - public function clearForm() - { - unset($this->form); - } - - /** - * An addon containing information reported for a vulnerability with an HTML - * form, if any. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.Form form = 16; - * @param \Google\Cloud\WebSecurityScanner\V1beta\Form $var - * @return $this - */ - public function setForm($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\Form::class); - $this->form = $var; - - return $this; - } - - /** - * An addon containing information about outdated libraries. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.OutdatedLibrary outdated_library = 11; - * @return \Google\Cloud\WebSecurityScanner\V1beta\OutdatedLibrary|null - */ - public function getOutdatedLibrary() - { - return $this->outdated_library; - } - - public function hasOutdatedLibrary() - { - return isset($this->outdated_library); - } - - public function clearOutdatedLibrary() - { - unset($this->outdated_library); - } - - /** - * An addon containing information about outdated libraries. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.OutdatedLibrary outdated_library = 11; - * @param \Google\Cloud\WebSecurityScanner\V1beta\OutdatedLibrary $var - * @return $this - */ - public function setOutdatedLibrary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\OutdatedLibrary::class); - $this->outdated_library = $var; - - return $this; - } - - /** - * An addon containing detailed information regarding any resource causing the - * vulnerability such as JavaScript sources, image, audio files, etc. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ViolatingResource violating_resource = 12; - * @return \Google\Cloud\WebSecurityScanner\V1beta\ViolatingResource|null - */ - public function getViolatingResource() - { - return $this->violating_resource; - } - - public function hasViolatingResource() - { - return isset($this->violating_resource); - } - - public function clearViolatingResource() - { - unset($this->violating_resource); - } - - /** - * An addon containing detailed information regarding any resource causing the - * vulnerability such as JavaScript sources, image, audio files, etc. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ViolatingResource violating_resource = 12; - * @param \Google\Cloud\WebSecurityScanner\V1beta\ViolatingResource $var - * @return $this - */ - public function setViolatingResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\ViolatingResource::class); - $this->violating_resource = $var; - - return $this; - } - - /** - * An addon containing information about vulnerable or missing HTTP headers. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.VulnerableHeaders vulnerable_headers = 15; - * @return \Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders|null - */ - public function getVulnerableHeaders() - { - return $this->vulnerable_headers; - } - - public function hasVulnerableHeaders() - { - return isset($this->vulnerable_headers); - } - - public function clearVulnerableHeaders() - { - unset($this->vulnerable_headers); - } - - /** - * An addon containing information about vulnerable or missing HTTP headers. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.VulnerableHeaders vulnerable_headers = 15; - * @param \Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders $var - * @return $this - */ - public function setVulnerableHeaders($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders::class); - $this->vulnerable_headers = $var; - - return $this; - } - - /** - * An addon containing information about request parameters which were found - * to be vulnerable. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.VulnerableParameters vulnerable_parameters = 13; - * @return \Google\Cloud\WebSecurityScanner\V1beta\VulnerableParameters|null - */ - public function getVulnerableParameters() - { - return $this->vulnerable_parameters; - } - - public function hasVulnerableParameters() - { - return isset($this->vulnerable_parameters); - } - - public function clearVulnerableParameters() - { - unset($this->vulnerable_parameters); - } - - /** - * An addon containing information about request parameters which were found - * to be vulnerable. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.VulnerableParameters vulnerable_parameters = 13; - * @param \Google\Cloud\WebSecurityScanner\V1beta\VulnerableParameters $var - * @return $this - */ - public function setVulnerableParameters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\VulnerableParameters::class); - $this->vulnerable_parameters = $var; - - return $this; - } - - /** - * An addon containing information reported for an XSS, if any. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.Xss xss = 14; - * @return \Google\Cloud\WebSecurityScanner\V1beta\Xss|null - */ - public function getXss() - { - return $this->xss; - } - - public function hasXss() - { - return isset($this->xss); - } - - public function clearXss() - { - unset($this->xss); - } - - /** - * An addon containing information reported for an XSS, if any. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.Xss xss = 14; - * @param \Google\Cloud\WebSecurityScanner\V1beta\Xss $var - * @return $this - */ - public function setXss($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\Xss::class); - $this->xss = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/FindingTypeStats.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/FindingTypeStats.php deleted file mode 100644 index 7dcea1dd7c4a..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/FindingTypeStats.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.websecurityscanner.v1beta.FindingTypeStats - */ -class FindingTypeStats extends \Google\Protobuf\Internal\Message -{ - /** - * The finding type associated with the stats. - * - * Generated from protobuf field string finding_type = 1; - */ - protected $finding_type = ''; - /** - * The count of findings belonging to this finding type. - * - * Generated from protobuf field int32 finding_count = 2; - */ - protected $finding_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $finding_type - * The finding type associated with the stats. - * @type int $finding_count - * The count of findings belonging to this finding type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\FindingTypeStats::initOnce(); - parent::__construct($data); - } - - /** - * The finding type associated with the stats. - * - * Generated from protobuf field string finding_type = 1; - * @return string - */ - public function getFindingType() - { - return $this->finding_type; - } - - /** - * The finding type associated with the stats. - * - * Generated from protobuf field string finding_type = 1; - * @param string $var - * @return $this - */ - public function setFindingType($var) - { - GPBUtil::checkString($var, True); - $this->finding_type = $var; - - return $this; - } - - /** - * The count of findings belonging to this finding type. - * - * Generated from protobuf field int32 finding_count = 2; - * @return int - */ - public function getFindingCount() - { - return $this->finding_count; - } - - /** - * The count of findings belonging to this finding type. - * - * Generated from protobuf field int32 finding_count = 2; - * @param int $var - * @return $this - */ - public function setFindingCount($var) - { - GPBUtil::checkInt32($var); - $this->finding_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Form.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Form.php deleted file mode 100644 index 14784f2922c2..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Form.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.websecurityscanner.v1beta.Form - */ -class Form extends \Google\Protobuf\Internal\Message -{ - /** - * ! The URI where to send the form when it's submitted. - * - * Generated from protobuf field string action_uri = 1; - */ - protected $action_uri = ''; - /** - * ! The names of form fields related to the vulnerability. - * - * Generated from protobuf field repeated string fields = 2; - */ - private $fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $action_uri - * ! The URI where to send the form when it's submitted. - * @type array|\Google\Protobuf\Internal\RepeatedField $fields - * ! The names of form fields related to the vulnerability. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\FindingAddon::initOnce(); - parent::__construct($data); - } - - /** - * ! The URI where to send the form when it's submitted. - * - * Generated from protobuf field string action_uri = 1; - * @return string - */ - public function getActionUri() - { - return $this->action_uri; - } - - /** - * ! The URI where to send the form when it's submitted. - * - * Generated from protobuf field string action_uri = 1; - * @param string $var - * @return $this - */ - public function setActionUri($var) - { - GPBUtil::checkString($var, True); - $this->action_uri = $var; - - return $this; - } - - /** - * ! The names of form fields related to the vulnerability. - * - * Generated from protobuf field repeated string fields = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * ! The names of form fields related to the vulnerability. - * - * Generated from protobuf field repeated string fields = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->fields = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetFindingRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetFindingRequest.php deleted file mode 100644 index ed61d3a9a99e..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetFindingRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.websecurityscanner.v1beta.GetFindingRequest - */ -class GetFindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Finding to be returned. The name follows the - * format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the Finding to be returned. The name follows the - * format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Finding to be returned. The name follows the - * format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the Finding to be returned. The name follows the - * format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetScanConfigRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetScanConfigRequest.php deleted file mode 100644 index dac9b6f54469..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetScanConfigRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.websecurityscanner.v1beta.GetScanConfigRequest - */ -class GetScanConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the ScanConfig to be returned. The name follows the - * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the ScanConfig to be returned. The name follows the - * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the ScanConfig to be returned. The name follows the - * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the ScanConfig to be returned. The name follows the - * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetScanRunRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetScanRunRequest.php deleted file mode 100644 index 65ae02b47d21..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/GetScanRunRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.websecurityscanner.v1beta.GetScanRunRequest - */ -class GetScanRunRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the ScanRun to be returned. The name follows the - * format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the ScanRun to be returned. The name follows the - * format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the ScanRun to be returned. The name follows the - * format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the ScanRun to be returned. The name follows the - * format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListCrawledUrlsRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListCrawledUrlsRequest.php deleted file mode 100644 index 7f5942a653f1..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListCrawledUrlsRequest.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ListCrawledUrlsRequest - */ -class ListCrawledUrlsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name, which should be a scan run resource name in the - * format - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * A token identifying a page of results to be returned. This should be a - * `next_page_token` value returned from a previous List request. - * If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 2; - */ - protected $page_token = ''; - /** - * The maximum number of CrawledUrls to return, can be limited by server. - * If not specified or not positive, the implementation will select a - * reasonable value. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name, which should be a scan run resource name in the - * format - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * @type string $page_token - * A token identifying a page of results to be returned. This should be a - * `next_page_token` value returned from a previous List request. - * If unspecified, the first page of results is returned. - * @type int $page_size - * The maximum number of CrawledUrls to return, can be limited by server. - * If not specified or not positive, the implementation will select a - * reasonable value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name, which should be a scan run resource name in the - * format - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name, which should be a scan run resource name in the - * format - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * A token identifying a page of results to be returned. This should be a - * `next_page_token` value returned from a previous List request. - * If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 2; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results to be returned. This should be a - * `next_page_token` value returned from a previous List request. - * If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 2; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The maximum number of CrawledUrls to return, can be limited by server. - * If not specified or not positive, the implementation will select a - * reasonable value. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of CrawledUrls to return, can be limited by server. - * If not specified or not positive, the implementation will select a - * reasonable value. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListCrawledUrlsResponse.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListCrawledUrlsResponse.php deleted file mode 100644 index bfa730976b39..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListCrawledUrlsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ListCrawledUrlsResponse - */ -class ListCrawledUrlsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of CrawledUrls returned. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.CrawledUrl crawled_urls = 1; - */ - private $crawled_urls; - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\WebSecurityScanner\V1beta\CrawledUrl>|\Google\Protobuf\Internal\RepeatedField $crawled_urls - * The list of CrawledUrls returned. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); - parent::__construct($data); - } - - /** - * The list of CrawledUrls returned. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.CrawledUrl crawled_urls = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCrawledUrls() - { - return $this->crawled_urls; - } - - /** - * The list of CrawledUrls returned. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.CrawledUrl crawled_urls = 1; - * @param array<\Google\Cloud\WebSecurityScanner\V1beta\CrawledUrl>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCrawledUrls($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1beta\CrawledUrl::class); - $this->crawled_urls = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingTypeStatsRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingTypeStatsRequest.php deleted file mode 100644 index 66ff86bbad79..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingTypeStatsRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ListFindingTypeStatsRequest - */ -class ListFindingTypeStatsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name, which should be a scan run resource name in the - * format - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name, which should be a scan run resource name in the - * format - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name, which should be a scan run resource name in the - * format - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name, which should be a scan run resource name in the - * format - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingTypeStatsResponse.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingTypeStatsResponse.php deleted file mode 100644 index ae47be432e3d..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingTypeStatsResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ListFindingTypeStatsResponse - */ -class ListFindingTypeStatsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of FindingTypeStats returned. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.FindingTypeStats finding_type_stats = 1; - */ - private $finding_type_stats; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\WebSecurityScanner\V1beta\FindingTypeStats>|\Google\Protobuf\Internal\RepeatedField $finding_type_stats - * The list of FindingTypeStats returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); - parent::__construct($data); - } - - /** - * The list of FindingTypeStats returned. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.FindingTypeStats finding_type_stats = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFindingTypeStats() - { - return $this->finding_type_stats; - } - - /** - * The list of FindingTypeStats returned. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.FindingTypeStats finding_type_stats = 1; - * @param array<\Google\Cloud\WebSecurityScanner\V1beta\FindingTypeStats>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFindingTypeStats($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1beta\FindingTypeStats::class); - $this->finding_type_stats = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingsRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingsRequest.php deleted file mode 100644 index 12068b4439f0..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingsRequest.php +++ /dev/null @@ -1,205 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ListFindingsRequest - */ -class ListFindingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name, which should be a scan run resource name in the - * format - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The filter expression. The expression must be in the format: - * . - * Supported field: 'finding_type'. - * Supported operator: '='. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $filter = ''; - /** - * A token identifying a page of results to be returned. This should be a - * `next_page_token` value returned from a previous List request. - * If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The maximum number of Findings to return, can be limited by server. - * If not specified or not positive, the implementation will select a - * reasonable value. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name, which should be a scan run resource name in the - * format - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * @type string $filter - * Required. The filter expression. The expression must be in the format: - * . - * Supported field: 'finding_type'. - * Supported operator: '='. - * @type string $page_token - * A token identifying a page of results to be returned. This should be a - * `next_page_token` value returned from a previous List request. - * If unspecified, the first page of results is returned. - * @type int $page_size - * The maximum number of Findings to return, can be limited by server. - * If not specified or not positive, the implementation will select a - * reasonable value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name, which should be a scan run resource name in the - * format - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name, which should be a scan run resource name in the - * format - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The filter expression. The expression must be in the format: - * . - * Supported field: 'finding_type'. - * Supported operator: '='. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Required. The filter expression. The expression must be in the format: - * . - * Supported field: 'finding_type'. - * Supported operator: '='. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * A token identifying a page of results to be returned. This should be a - * `next_page_token` value returned from a previous List request. - * If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results to be returned. This should be a - * `next_page_token` value returned from a previous List request. - * If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The maximum number of Findings to return, can be limited by server. - * If not specified or not positive, the implementation will select a - * reasonable value. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of Findings to return, can be limited by server. - * If not specified or not positive, the implementation will select a - * reasonable value. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingsResponse.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingsResponse.php deleted file mode 100644 index 890a376588d8..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListFindingsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ListFindingsResponse - */ -class ListFindingsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Findings returned. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.Finding findings = 1; - */ - private $findings; - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\WebSecurityScanner\V1beta\Finding>|\Google\Protobuf\Internal\RepeatedField $findings - * The list of Findings returned. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); - parent::__construct($data); - } - - /** - * The list of Findings returned. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.Finding findings = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFindings() - { - return $this->findings; - } - - /** - * The list of Findings returned. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.Finding findings = 1; - * @param array<\Google\Cloud\WebSecurityScanner\V1beta\Finding>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFindings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1beta\Finding::class); - $this->findings = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanConfigsRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanConfigsRequest.php deleted file mode 100644 index 936da9a0f584..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanConfigsRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ListScanConfigsRequest - */ -class ListScanConfigsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name, which should be a project resource name in the - * format 'projects/{projectId}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * A token identifying a page of results to be returned. This should be a - * `next_page_token` value returned from a previous List request. - * If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 2; - */ - protected $page_token = ''; - /** - * The maximum number of ScanConfigs to return, can be limited by server. - * If not specified or not positive, the implementation will select a - * reasonable value. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name, which should be a project resource name in the - * format 'projects/{projectId}'. - * @type string $page_token - * A token identifying a page of results to be returned. This should be a - * `next_page_token` value returned from a previous List request. - * If unspecified, the first page of results is returned. - * @type int $page_size - * The maximum number of ScanConfigs to return, can be limited by server. - * If not specified or not positive, the implementation will select a - * reasonable value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name, which should be a project resource name in the - * format 'projects/{projectId}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name, which should be a project resource name in the - * format 'projects/{projectId}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * A token identifying a page of results to be returned. This should be a - * `next_page_token` value returned from a previous List request. - * If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 2; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results to be returned. This should be a - * `next_page_token` value returned from a previous List request. - * If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 2; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The maximum number of ScanConfigs to return, can be limited by server. - * If not specified or not positive, the implementation will select a - * reasonable value. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of ScanConfigs to return, can be limited by server. - * If not specified or not positive, the implementation will select a - * reasonable value. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanConfigsResponse.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanConfigsResponse.php deleted file mode 100644 index 1bc3d4de4e9c..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanConfigsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ListScanConfigsResponse - */ -class ListScanConfigsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of ScanConfigs returned. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanConfig scan_configs = 1; - */ - private $scan_configs; - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\WebSecurityScanner\V1beta\ScanConfig>|\Google\Protobuf\Internal\RepeatedField $scan_configs - * The list of ScanConfigs returned. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); - parent::__construct($data); - } - - /** - * The list of ScanConfigs returned. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanConfig scan_configs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getScanConfigs() - { - return $this->scan_configs; - } - - /** - * The list of ScanConfigs returned. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanConfig scan_configs = 1; - * @param array<\Google\Cloud\WebSecurityScanner\V1beta\ScanConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setScanConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig::class); - $this->scan_configs = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanRunsRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanRunsRequest.php deleted file mode 100644 index feb7ff339644..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanRunsRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ListScanRunsRequest - */ -class ListScanRunsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name, which should be a scan resource name in the - * format 'projects/{projectId}/scanConfigs/{scanConfigId}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * A token identifying a page of results to be returned. This should be a - * `next_page_token` value returned from a previous List request. - * If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 2; - */ - protected $page_token = ''; - /** - * The maximum number of ScanRuns to return, can be limited by server. - * If not specified or not positive, the implementation will select a - * reasonable value. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name, which should be a scan resource name in the - * format 'projects/{projectId}/scanConfigs/{scanConfigId}'. - * @type string $page_token - * A token identifying a page of results to be returned. This should be a - * `next_page_token` value returned from a previous List request. - * If unspecified, the first page of results is returned. - * @type int $page_size - * The maximum number of ScanRuns to return, can be limited by server. - * If not specified or not positive, the implementation will select a - * reasonable value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name, which should be a scan resource name in the - * format 'projects/{projectId}/scanConfigs/{scanConfigId}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name, which should be a scan resource name in the - * format 'projects/{projectId}/scanConfigs/{scanConfigId}'. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * A token identifying a page of results to be returned. This should be a - * `next_page_token` value returned from a previous List request. - * If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 2; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results to be returned. This should be a - * `next_page_token` value returned from a previous List request. - * If unspecified, the first page of results is returned. - * - * Generated from protobuf field string page_token = 2; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The maximum number of ScanRuns to return, can be limited by server. - * If not specified or not positive, the implementation will select a - * reasonable value. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of ScanRuns to return, can be limited by server. - * If not specified or not positive, the implementation will select a - * reasonable value. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanRunsResponse.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanRunsResponse.php deleted file mode 100644 index dba8c5beef27..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ListScanRunsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ListScanRunsResponse - */ -class ListScanRunsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of ScanRuns returned. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanRun scan_runs = 1; - */ - private $scan_runs; - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\WebSecurityScanner\V1beta\ScanRun>|\Google\Protobuf\Internal\RepeatedField $scan_runs - * The list of ScanRuns returned. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); - parent::__construct($data); - } - - /** - * The list of ScanRuns returned. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanRun scan_runs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getScanRuns() - { - return $this->scan_runs; - } - - /** - * The list of ScanRuns returned. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanRun scan_runs = 1; - * @param array<\Google\Cloud\WebSecurityScanner\V1beta\ScanRun>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setScanRuns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1beta\ScanRun::class); - $this->scan_runs = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/OutdatedLibrary.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/OutdatedLibrary.php deleted file mode 100644 index bc116a0e5333..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/OutdatedLibrary.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.websecurityscanner.v1beta.OutdatedLibrary - */ -class OutdatedLibrary extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the outdated library. - * - * Generated from protobuf field string library_name = 1; - */ - protected $library_name = ''; - /** - * The version number. - * - * Generated from protobuf field string version = 2; - */ - protected $version = ''; - /** - * URLs to learn more information about the vulnerabilities in the library. - * - * Generated from protobuf field repeated string learn_more_urls = 3; - */ - private $learn_more_urls; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $library_name - * The name of the outdated library. - * @type string $version - * The version number. - * @type array|\Google\Protobuf\Internal\RepeatedField $learn_more_urls - * URLs to learn more information about the vulnerabilities in the library. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\FindingAddon::initOnce(); - parent::__construct($data); - } - - /** - * The name of the outdated library. - * - * Generated from protobuf field string library_name = 1; - * @return string - */ - public function getLibraryName() - { - return $this->library_name; - } - - /** - * The name of the outdated library. - * - * Generated from protobuf field string library_name = 1; - * @param string $var - * @return $this - */ - public function setLibraryName($var) - { - GPBUtil::checkString($var, True); - $this->library_name = $var; - - return $this; - } - - /** - * The version number. - * - * Generated from protobuf field string version = 2; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The version number. - * - * Generated from protobuf field string version = 2; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * URLs to learn more information about the vulnerabilities in the library. - * - * Generated from protobuf field repeated string learn_more_urls = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLearnMoreUrls() - { - return $this->learn_more_urls; - } - - /** - * URLs to learn more information about the vulnerabilities in the library. - * - * Generated from protobuf field repeated string learn_more_urls = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLearnMoreUrls($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->learn_more_urls = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig.php deleted file mode 100644 index 1bbe2c13e6a4..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig.php +++ /dev/null @@ -1,507 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ScanConfig - */ -class ScanConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the ScanConfig. The name follows the format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are - * generated by the system. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The user provided display name of the ScanConfig. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * The maximum QPS during scanning. A valid value ranges from 5 to 20 - * inclusively. If the field is unspecified or its value is set 0, server will - * default to 15. Other values outside of [5, 20] range will be rejected with - * INVALID_ARGUMENT error. - * - * Generated from protobuf field int32 max_qps = 3; - */ - protected $max_qps = 0; - /** - * Required. The starting URLs from which the scanner finds site pages. - * - * Generated from protobuf field repeated string starting_urls = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private $starting_urls; - /** - * The authentication configuration. If specified, service will use the - * authentication configuration during scanning. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication authentication = 5; - */ - protected $authentication = null; - /** - * The user agent used during scanning. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.UserAgent user_agent = 6; - */ - protected $user_agent = 0; - /** - * The blacklist URL patterns as described in - * https://cloud.google.com/security-scanner/docs/excluded-urls - * - * Generated from protobuf field repeated string blacklist_patterns = 7; - */ - private $blacklist_patterns; - /** - * The schedule of the ScanConfig. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.Schedule schedule = 8; - */ - protected $schedule = null; - /** - * Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be - * used as a default. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanConfig.TargetPlatform target_platforms = 9; - */ - private $target_platforms; - /** - * Controls export of scan configurations and results to Cloud Security - * Command Center. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.ExportToSecurityCommandCenter export_to_security_command_center = 10; - */ - protected $export_to_security_command_center = 0; - /** - * Latest ScanRun if available. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRun latest_run = 11; - */ - protected $latest_run = null; - /** - * The risk level selected for the scan - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.RiskLevel risk_level = 12; - */ - protected $risk_level = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the ScanConfig. The name follows the format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are - * generated by the system. - * @type string $display_name - * Required. The user provided display name of the ScanConfig. - * @type int $max_qps - * The maximum QPS during scanning. A valid value ranges from 5 to 20 - * inclusively. If the field is unspecified or its value is set 0, server will - * default to 15. Other values outside of [5, 20] range will be rejected with - * INVALID_ARGUMENT error. - * @type array|\Google\Protobuf\Internal\RepeatedField $starting_urls - * Required. The starting URLs from which the scanner finds site pages. - * @type \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication $authentication - * The authentication configuration. If specified, service will use the - * authentication configuration during scanning. - * @type int $user_agent - * The user agent used during scanning. - * @type array|\Google\Protobuf\Internal\RepeatedField $blacklist_patterns - * The blacklist URL patterns as described in - * https://cloud.google.com/security-scanner/docs/excluded-urls - * @type \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Schedule $schedule - * The schedule of the ScanConfig. - * @type array|\Google\Protobuf\Internal\RepeatedField $target_platforms - * Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be - * used as a default. - * @type int $export_to_security_command_center - * Controls export of scan configurations and results to Cloud Security - * Command Center. - * @type \Google\Cloud\WebSecurityScanner\V1beta\ScanRun $latest_run - * Latest ScanRun if available. - * @type int $risk_level - * The risk level selected for the scan - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\ScanConfig::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the ScanConfig. The name follows the format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are - * generated by the system. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the ScanConfig. The name follows the format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are - * generated by the system. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The user provided display name of the ScanConfig. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The user provided display name of the ScanConfig. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The maximum QPS during scanning. A valid value ranges from 5 to 20 - * inclusively. If the field is unspecified or its value is set 0, server will - * default to 15. Other values outside of [5, 20] range will be rejected with - * INVALID_ARGUMENT error. - * - * Generated from protobuf field int32 max_qps = 3; - * @return int - */ - public function getMaxQps() - { - return $this->max_qps; - } - - /** - * The maximum QPS during scanning. A valid value ranges from 5 to 20 - * inclusively. If the field is unspecified or its value is set 0, server will - * default to 15. Other values outside of [5, 20] range will be rejected with - * INVALID_ARGUMENT error. - * - * Generated from protobuf field int32 max_qps = 3; - * @param int $var - * @return $this - */ - public function setMaxQps($var) - { - GPBUtil::checkInt32($var); - $this->max_qps = $var; - - return $this; - } - - /** - * Required. The starting URLs from which the scanner finds site pages. - * - * Generated from protobuf field repeated string starting_urls = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStartingUrls() - { - return $this->starting_urls; - } - - /** - * Required. The starting URLs from which the scanner finds site pages. - * - * Generated from protobuf field repeated string starting_urls = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStartingUrls($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->starting_urls = $arr; - - return $this; - } - - /** - * The authentication configuration. If specified, service will use the - * authentication configuration during scanning. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication authentication = 5; - * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication|null - */ - public function getAuthentication() - { - return $this->authentication; - } - - public function hasAuthentication() - { - return isset($this->authentication); - } - - public function clearAuthentication() - { - unset($this->authentication); - } - - /** - * The authentication configuration. If specified, service will use the - * authentication configuration during scanning. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication authentication = 5; - * @param \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication $var - * @return $this - */ - public function setAuthentication($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication::class); - $this->authentication = $var; - - return $this; - } - - /** - * The user agent used during scanning. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.UserAgent user_agent = 6; - * @return int - */ - public function getUserAgent() - { - return $this->user_agent; - } - - /** - * The user agent used during scanning. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.UserAgent user_agent = 6; - * @param int $var - * @return $this - */ - public function setUserAgent($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\UserAgent::class); - $this->user_agent = $var; - - return $this; - } - - /** - * The blacklist URL patterns as described in - * https://cloud.google.com/security-scanner/docs/excluded-urls - * - * Generated from protobuf field repeated string blacklist_patterns = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBlacklistPatterns() - { - return $this->blacklist_patterns; - } - - /** - * The blacklist URL patterns as described in - * https://cloud.google.com/security-scanner/docs/excluded-urls - * - * Generated from protobuf field repeated string blacklist_patterns = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBlacklistPatterns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->blacklist_patterns = $arr; - - return $this; - } - - /** - * The schedule of the ScanConfig. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.Schedule schedule = 8; - * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Schedule|null - */ - public function getSchedule() - { - return $this->schedule; - } - - public function hasSchedule() - { - return isset($this->schedule); - } - - public function clearSchedule() - { - unset($this->schedule); - } - - /** - * The schedule of the ScanConfig. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.Schedule schedule = 8; - * @param \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Schedule $var - * @return $this - */ - public function setSchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Schedule::class); - $this->schedule = $var; - - return $this; - } - - /** - * Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be - * used as a default. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanConfig.TargetPlatform target_platforms = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargetPlatforms() - { - return $this->target_platforms; - } - - /** - * Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be - * used as a default. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanConfig.TargetPlatform target_platforms = 9; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargetPlatforms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\TargetPlatform::class); - $this->target_platforms = $arr; - - return $this; - } - - /** - * Controls export of scan configurations and results to Cloud Security - * Command Center. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.ExportToSecurityCommandCenter export_to_security_command_center = 10; - * @return int - */ - public function getExportToSecurityCommandCenter() - { - return $this->export_to_security_command_center; - } - - /** - * Controls export of scan configurations and results to Cloud Security - * Command Center. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.ExportToSecurityCommandCenter export_to_security_command_center = 10; - * @param int $var - * @return $this - */ - public function setExportToSecurityCommandCenter($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\ExportToSecurityCommandCenter::class); - $this->export_to_security_command_center = $var; - - return $this; - } - - /** - * Latest ScanRun if available. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRun latest_run = 11; - * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanRun|null - */ - public function getLatestRun() - { - return $this->latest_run; - } - - public function hasLatestRun() - { - return isset($this->latest_run); - } - - public function clearLatestRun() - { - unset($this->latest_run); - } - - /** - * Latest ScanRun if available. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRun latest_run = 11; - * @param \Google\Cloud\WebSecurityScanner\V1beta\ScanRun $var - * @return $this - */ - public function setLatestRun($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanRun::class); - $this->latest_run = $var; - - return $this; - } - - /** - * The risk level selected for the scan - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.RiskLevel risk_level = 12; - * @return int - */ - public function getRiskLevel() - { - return $this->risk_level; - } - - /** - * The risk level selected for the scan - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.RiskLevel risk_level = 12; - * @param int $var - * @return $this - */ - public function setRiskLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\RiskLevel::class); - $this->risk_level = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication.php deleted file mode 100644 index 03ff0126000c..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication - */ -class Authentication extends \Google\Protobuf\Internal\Message -{ - protected $authentication; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication\GoogleAccount $google_account - * Authentication using a Google account. - * @type \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication\CustomAccount $custom_account - * Authentication using a custom account. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\ScanConfig::initOnce(); - parent::__construct($data); - } - - /** - * Authentication using a Google account. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.GoogleAccount google_account = 1; - * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication\GoogleAccount|null - */ - public function getGoogleAccount() - { - return $this->readOneof(1); - } - - public function hasGoogleAccount() - { - return $this->hasOneof(1); - } - - /** - * Authentication using a Google account. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.GoogleAccount google_account = 1; - * @param \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication\GoogleAccount $var - * @return $this - */ - public function setGoogleAccount($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication\GoogleAccount::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Authentication using a custom account. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.CustomAccount custom_account = 2; - * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication\CustomAccount|null - */ - public function getCustomAccount() - { - return $this->readOneof(2); - } - - public function hasCustomAccount() - { - return $this->hasOneof(2); - } - - /** - * Authentication using a custom account. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.CustomAccount custom_account = 2; - * @param \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication\CustomAccount $var - * @return $this - */ - public function setCustomAccount($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig\Authentication\CustomAccount::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getAuthentication() - { - return $this->whichOneof("authentication"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Authentication::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig_Authentication::class); - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication/CustomAccount.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication/CustomAccount.php deleted file mode 100644 index 8230fd5942e2..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication/CustomAccount.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.CustomAccount - */ -class CustomAccount extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The user name of the custom account. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $username = ''; - /** - * Required. Input only. The password of the custom account. The credential is stored encrypted - * and not returned in any response nor included in audit logs. - * - * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $password = ''; - /** - * Required. The login form URL of the website. - * - * Generated from protobuf field string login_url = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $login_url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $username - * Required. The user name of the custom account. - * @type string $password - * Required. Input only. The password of the custom account. The credential is stored encrypted - * and not returned in any response nor included in audit logs. - * @type string $login_url - * Required. The login form URL of the website. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\ScanConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The user name of the custom account. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Required. The user name of the custom account. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - - /** - * Required. Input only. The password of the custom account. The credential is stored encrypted - * and not returned in any response nor included in audit logs. - * - * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * Required. Input only. The password of the custom account. The credential is stored encrypted - * and not returned in any response nor included in audit logs. - * - * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPassword($var) - { - GPBUtil::checkString($var, True); - $this->password = $var; - - return $this; - } - - /** - * Required. The login form URL of the website. - * - * Generated from protobuf field string login_url = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLoginUrl() - { - return $this->login_url; - } - - /** - * Required. The login form URL of the website. - * - * Generated from protobuf field string login_url = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setLoginUrl($var) - { - GPBUtil::checkString($var, True); - $this->login_url = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CustomAccount::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig_Authentication_CustomAccount::class); - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication/GoogleAccount.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication/GoogleAccount.php deleted file mode 100644 index 7f20c4a18b4d..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Authentication/GoogleAccount.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.GoogleAccount - */ -class GoogleAccount extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The user name of the Google account. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $username = ''; - /** - * Required. Input only. The password of the Google account. The credential is stored encrypted - * and not returned in any response nor included in audit logs. - * - * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $password = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $username - * Required. The user name of the Google account. - * @type string $password - * Required. Input only. The password of the Google account. The credential is stored encrypted - * and not returned in any response nor included in audit logs. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\ScanConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The user name of the Google account. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Required. The user name of the Google account. - * - * Generated from protobuf field string username = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - - /** - * Required. Input only. The password of the Google account. The credential is stored encrypted - * and not returned in any response nor included in audit logs. - * - * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * Required. Input only. The password of the Google account. The credential is stored encrypted - * and not returned in any response nor included in audit logs. - * - * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPassword($var) - { - GPBUtil::checkString($var, True); - $this->password = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GoogleAccount::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig_Authentication_GoogleAccount::class); - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/ExportToSecurityCommandCenter.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/ExportToSecurityCommandCenter.php deleted file mode 100644 index 40b463f03644..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/ExportToSecurityCommandCenter.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ScanConfig.ExportToSecurityCommandCenter - */ -class ExportToSecurityCommandCenter -{ - /** - * Use default, which is ENABLED. - * - * Generated from protobuf enum EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED = 0; - */ - const EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED = 0; - /** - * Export results of this scan to Cloud Security Command Center. - * - * Generated from protobuf enum ENABLED = 1; - */ - const ENABLED = 1; - /** - * Do not export results of this scan to Cloud Security Command Center. - * - * Generated from protobuf enum DISABLED = 2; - */ - const DISABLED = 2; - - private static $valueToName = [ - self::EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED => 'EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED', - self::ENABLED => 'ENABLED', - self::DISABLED => 'DISABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ExportToSecurityCommandCenter::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig_ExportToSecurityCommandCenter::class); - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/RiskLevel.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/RiskLevel.php deleted file mode 100644 index 5c916d63b631..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/RiskLevel.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ScanConfig.RiskLevel - */ -class RiskLevel -{ - /** - * Use default, which is NORMAL. - * - * Generated from protobuf enum RISK_LEVEL_UNSPECIFIED = 0; - */ - const RISK_LEVEL_UNSPECIFIED = 0; - /** - * Normal scanning (Recommended) - * - * Generated from protobuf enum NORMAL = 1; - */ - const NORMAL = 1; - /** - * Lower impact scanning - * - * Generated from protobuf enum LOW = 2; - */ - const LOW = 2; - - private static $valueToName = [ - self::RISK_LEVEL_UNSPECIFIED => 'RISK_LEVEL_UNSPECIFIED', - self::NORMAL => 'NORMAL', - self::LOW => 'LOW', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RiskLevel::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig_RiskLevel::class); - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Schedule.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Schedule.php deleted file mode 100644 index aaadac26c269..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/Schedule.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ScanConfig.Schedule - */ -class Schedule extends \Google\Protobuf\Internal\Message -{ - /** - * A timestamp indicates when the next run will be scheduled. The value is - * refreshed by the server after each run. If unspecified, it will default - * to current server time, which means the scan will be scheduled to start - * immediately. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; - */ - protected $schedule_time = null; - /** - * Required. The duration of time between executions in days. - * - * Generated from protobuf field int32 interval_duration_days = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $interval_duration_days = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $schedule_time - * A timestamp indicates when the next run will be scheduled. The value is - * refreshed by the server after each run. If unspecified, it will default - * to current server time, which means the scan will be scheduled to start - * immediately. - * @type int $interval_duration_days - * Required. The duration of time between executions in days. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\ScanConfig::initOnce(); - parent::__construct($data); - } - - /** - * A timestamp indicates when the next run will be scheduled. The value is - * refreshed by the server after each run. If unspecified, it will default - * to current server time, which means the scan will be scheduled to start - * immediately. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getScheduleTime() - { - return $this->schedule_time; - } - - public function hasScheduleTime() - { - return isset($this->schedule_time); - } - - public function clearScheduleTime() - { - unset($this->schedule_time); - } - - /** - * A timestamp indicates when the next run will be scheduled. The value is - * refreshed by the server after each run. If unspecified, it will default - * to current server time, which means the scan will be scheduled to start - * immediately. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setScheduleTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->schedule_time = $var; - - return $this; - } - - /** - * Required. The duration of time between executions in days. - * - * Generated from protobuf field int32 interval_duration_days = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getIntervalDurationDays() - { - return $this->interval_duration_days; - } - - /** - * Required. The duration of time between executions in days. - * - * Generated from protobuf field int32 interval_duration_days = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setIntervalDurationDays($var) - { - GPBUtil::checkInt32($var); - $this->interval_duration_days = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Schedule::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig_Schedule::class); - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/TargetPlatform.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/TargetPlatform.php deleted file mode 100644 index 30d0f1f2c73f..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/TargetPlatform.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ScanConfig.TargetPlatform - */ -class TargetPlatform -{ - /** - * The target platform is unknown. Requests with this enum value will be - * rejected with INVALID_ARGUMENT error. - * - * Generated from protobuf enum TARGET_PLATFORM_UNSPECIFIED = 0; - */ - const TARGET_PLATFORM_UNSPECIFIED = 0; - /** - * Google App Engine service. - * - * Generated from protobuf enum APP_ENGINE = 1; - */ - const APP_ENGINE = 1; - /** - * Google Compute Engine service. - * - * Generated from protobuf enum COMPUTE = 2; - */ - const COMPUTE = 2; - - private static $valueToName = [ - self::TARGET_PLATFORM_UNSPECIFIED => 'TARGET_PLATFORM_UNSPECIFIED', - self::APP_ENGINE => 'APP_ENGINE', - self::COMPUTE => 'COMPUTE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TargetPlatform::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig_TargetPlatform::class); - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/UserAgent.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/UserAgent.php deleted file mode 100644 index 9cd064a73aec..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfig/UserAgent.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ScanConfig.UserAgent - */ -class UserAgent -{ - /** - * The user agent is unknown. Service will default to CHROME_LINUX. - * - * Generated from protobuf enum USER_AGENT_UNSPECIFIED = 0; - */ - const USER_AGENT_UNSPECIFIED = 0; - /** - * Chrome on Linux. This is the service default if unspecified. - * - * Generated from protobuf enum CHROME_LINUX = 1; - */ - const CHROME_LINUX = 1; - /** - * Chrome on Android. - * - * Generated from protobuf enum CHROME_ANDROID = 2; - */ - const CHROME_ANDROID = 2; - /** - * Safari on IPhone. - * - * Generated from protobuf enum SAFARI_IPHONE = 3; - */ - const SAFARI_IPHONE = 3; - - private static $valueToName = [ - self::USER_AGENT_UNSPECIFIED => 'USER_AGENT_UNSPECIFIED', - self::CHROME_LINUX => 'CHROME_LINUX', - self::CHROME_ANDROID => 'CHROME_ANDROID', - self::SAFARI_IPHONE => 'SAFARI_IPHONE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(UserAgent::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig_UserAgent::class); - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfigError.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfigError.php deleted file mode 100644 index 7cfb778f8c6f..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfigError.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ScanConfigError - */ -class ScanConfigError extends \Google\Protobuf\Internal\Message -{ - /** - * Indicates the reason code for a configuration failure. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfigError.Code code = 1; - */ - protected $code = 0; - /** - * Indicates the full name of the ScanConfig field that triggers this error, - * for example "scan_config.max_qps". This field is provided for - * troubleshooting purposes only and its actual value can change in the - * future. - * - * Generated from protobuf field string field_name = 2; - */ - protected $field_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * Indicates the reason code for a configuration failure. - * @type string $field_name - * Indicates the full name of the ScanConfig field that triggers this error, - * for example "scan_config.max_qps". This field is provided for - * troubleshooting purposes only and its actual value can change in the - * future. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\ScanConfigError::initOnce(); - parent::__construct($data); - } - - /** - * Indicates the reason code for a configuration failure. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfigError.Code code = 1; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Indicates the reason code for a configuration failure. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfigError.Code code = 1; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfigError\Code::class); - $this->code = $var; - - return $this; - } - - /** - * Indicates the full name of the ScanConfig field that triggers this error, - * for example "scan_config.max_qps". This field is provided for - * troubleshooting purposes only and its actual value can change in the - * future. - * - * Generated from protobuf field string field_name = 2; - * @return string - */ - public function getFieldName() - { - return $this->field_name; - } - - /** - * Indicates the full name of the ScanConfig field that triggers this error, - * for example "scan_config.max_qps". This field is provided for - * troubleshooting purposes only and its actual value can change in the - * future. - * - * Generated from protobuf field string field_name = 2; - * @param string $var - * @return $this - */ - public function setFieldName($var) - { - GPBUtil::checkString($var, True); - $this->field_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfigError/Code.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfigError/Code.php deleted file mode 100644 index 784be1b6cbc9..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanConfigError/Code.php +++ /dev/null @@ -1,355 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ScanConfigError.Code - */ -class Code -{ - /** - * There is no error. - * - * Generated from protobuf enum CODE_UNSPECIFIED = 0; - */ - const CODE_UNSPECIFIED = 0; - /** - * There is no error. - * - * Generated from protobuf enum OK = 0; - */ - const OK = 0; - /** - * Indicates an internal server error. - * Please DO NOT USE THIS ERROR CODE unless the root cause is truly unknown. - * - * Generated from protobuf enum INTERNAL_ERROR = 1; - */ - const INTERNAL_ERROR = 1; - /** - * One of the seed URLs is an App Engine URL but we cannot validate the scan - * settings due to an App Engine API backend error. - * - * Generated from protobuf enum APPENGINE_API_BACKEND_ERROR = 2; - */ - const APPENGINE_API_BACKEND_ERROR = 2; - /** - * One of the seed URLs is an App Engine URL but we cannot access the - * App Engine API to validate scan settings. - * - * Generated from protobuf enum APPENGINE_API_NOT_ACCESSIBLE = 3; - */ - const APPENGINE_API_NOT_ACCESSIBLE = 3; - /** - * One of the seed URLs is an App Engine URL but the Default Host of the - * App Engine is not set. - * - * Generated from protobuf enum APPENGINE_DEFAULT_HOST_MISSING = 4; - */ - const APPENGINE_DEFAULT_HOST_MISSING = 4; - /** - * Google corporate accounts can not be used for scanning. - * - * Generated from protobuf enum CANNOT_USE_GOOGLE_COM_ACCOUNT = 6; - */ - const CANNOT_USE_GOOGLE_COM_ACCOUNT = 6; - /** - * The account of the scan creator can not be used for scanning. - * - * Generated from protobuf enum CANNOT_USE_OWNER_ACCOUNT = 7; - */ - const CANNOT_USE_OWNER_ACCOUNT = 7; - /** - * This scan targets Compute Engine, but we cannot validate scan settings - * due to a Compute Engine API backend error. - * - * Generated from protobuf enum COMPUTE_API_BACKEND_ERROR = 8; - */ - const COMPUTE_API_BACKEND_ERROR = 8; - /** - * This scan targets Compute Engine, but we cannot access the Compute Engine - * API to validate the scan settings. - * - * Generated from protobuf enum COMPUTE_API_NOT_ACCESSIBLE = 9; - */ - const COMPUTE_API_NOT_ACCESSIBLE = 9; - /** - * The Custom Login URL does not belong to the current project. - * - * Generated from protobuf enum CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 10; - */ - const CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 10; - /** - * The Custom Login URL is malformed (can not be parsed). - * - * Generated from protobuf enum CUSTOM_LOGIN_URL_MALFORMED = 11; - */ - const CUSTOM_LOGIN_URL_MALFORMED = 11; - /** - * The Custom Login URL is mapped to a non-routable IP address in DNS. - * - * Generated from protobuf enum CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 12; - */ - const CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 12; - /** - * The Custom Login URL is mapped to an IP address which is not reserved for - * the current project. - * - * Generated from protobuf enum CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS = 13; - */ - const CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS = 13; - /** - * The Custom Login URL has a non-routable IP address. - * - * Generated from protobuf enum CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 14; - */ - const CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 14; - /** - * The Custom Login URL has an IP address which is not reserved for the - * current project. - * - * Generated from protobuf enum CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS = 15; - */ - const CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS = 15; - /** - * Another scan with the same name (case-sensitive) already exists. - * - * Generated from protobuf enum DUPLICATE_SCAN_NAME = 16; - */ - const DUPLICATE_SCAN_NAME = 16; - /** - * A field is set to an invalid value. - * - * Generated from protobuf enum INVALID_FIELD_VALUE = 18; - */ - const INVALID_FIELD_VALUE = 18; - /** - * There was an error trying to authenticate to the scan target. - * - * Generated from protobuf enum FAILED_TO_AUTHENTICATE_TO_TARGET = 19; - */ - const FAILED_TO_AUTHENTICATE_TO_TARGET = 19; - /** - * Finding type value is not specified in the list findings request. - * - * Generated from protobuf enum FINDING_TYPE_UNSPECIFIED = 20; - */ - const FINDING_TYPE_UNSPECIFIED = 20; - /** - * Scan targets Compute Engine, yet current project was not whitelisted for - * Google Compute Engine Scanning Alpha access. - * - * Generated from protobuf enum FORBIDDEN_TO_SCAN_COMPUTE = 21; - */ - const FORBIDDEN_TO_SCAN_COMPUTE = 21; - /** - * User tries to update managed scan - * - * Generated from protobuf enum FORBIDDEN_UPDATE_TO_MANAGED_SCAN = 43; - */ - const FORBIDDEN_UPDATE_TO_MANAGED_SCAN = 43; - /** - * The supplied filter is malformed. For example, it can not be parsed, does - * not have a filter type in expression, or the same filter type appears - * more than once. - * - * Generated from protobuf enum MALFORMED_FILTER = 22; - */ - const MALFORMED_FILTER = 22; - /** - * The supplied resource name is malformed (can not be parsed). - * - * Generated from protobuf enum MALFORMED_RESOURCE_NAME = 23; - */ - const MALFORMED_RESOURCE_NAME = 23; - /** - * The current project is not in an active state. - * - * Generated from protobuf enum PROJECT_INACTIVE = 24; - */ - const PROJECT_INACTIVE = 24; - /** - * A required field is not set. - * - * Generated from protobuf enum REQUIRED_FIELD = 25; - */ - const REQUIRED_FIELD = 25; - /** - * Project id, scanconfig id, scanrun id, or finding id are not consistent - * with each other in resource name. - * - * Generated from protobuf enum RESOURCE_NAME_INCONSISTENT = 26; - */ - const RESOURCE_NAME_INCONSISTENT = 26; - /** - * The scan being requested to start is already running. - * - * Generated from protobuf enum SCAN_ALREADY_RUNNING = 27; - */ - const SCAN_ALREADY_RUNNING = 27; - /** - * The scan that was requested to be stopped is not running. - * - * Generated from protobuf enum SCAN_NOT_RUNNING = 28; - */ - const SCAN_NOT_RUNNING = 28; - /** - * One of the seed URLs does not belong to the current project. - * - * Generated from protobuf enum SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 29; - */ - const SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 29; - /** - * One of the seed URLs is malformed (can not be parsed). - * - * Generated from protobuf enum SEED_URL_MALFORMED = 30; - */ - const SEED_URL_MALFORMED = 30; - /** - * One of the seed URLs is mapped to a non-routable IP address in DNS. - * - * Generated from protobuf enum SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 31; - */ - const SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 31; - /** - * One of the seed URLs is mapped to an IP address which is not reserved - * for the current project. - * - * Generated from protobuf enum SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS = 32; - */ - const SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS = 32; - /** - * One of the seed URLs has on-routable IP address. - * - * Generated from protobuf enum SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 33; - */ - const SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 33; - /** - * One of the seed URLs has an IP address that is not reserved - * for the current project. - * - * Generated from protobuf enum SEED_URL_HAS_UNRESERVED_IP_ADDRESS = 35; - */ - const SEED_URL_HAS_UNRESERVED_IP_ADDRESS = 35; - /** - * The Cloud Security Scanner service account is not configured under the - * project. - * - * Generated from protobuf enum SERVICE_ACCOUNT_NOT_CONFIGURED = 36; - */ - const SERVICE_ACCOUNT_NOT_CONFIGURED = 36; - /** - * A project has reached the maximum number of scans. - * - * Generated from protobuf enum TOO_MANY_SCANS = 37; - */ - const TOO_MANY_SCANS = 37; - /** - * Resolving the details of the current project fails. - * - * Generated from protobuf enum UNABLE_TO_RESOLVE_PROJECT_INFO = 38; - */ - const UNABLE_TO_RESOLVE_PROJECT_INFO = 38; - /** - * One or more blacklist patterns were in the wrong format. - * - * Generated from protobuf enum UNSUPPORTED_BLACKLIST_PATTERN_FORMAT = 39; - */ - const UNSUPPORTED_BLACKLIST_PATTERN_FORMAT = 39; - /** - * The supplied filter is not supported. - * - * Generated from protobuf enum UNSUPPORTED_FILTER = 40; - */ - const UNSUPPORTED_FILTER = 40; - /** - * The supplied finding type is not supported. For example, we do not - * provide findings of the given finding type. - * - * Generated from protobuf enum UNSUPPORTED_FINDING_TYPE = 41; - */ - const UNSUPPORTED_FINDING_TYPE = 41; - /** - * The URL scheme of one or more of the supplied URLs is not supported. - * - * Generated from protobuf enum UNSUPPORTED_URL_SCHEME = 42; - */ - const UNSUPPORTED_URL_SCHEME = 42; - - private static $valueToName = [ - self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', - self::OK => 'OK', - self::INTERNAL_ERROR => 'INTERNAL_ERROR', - self::APPENGINE_API_BACKEND_ERROR => 'APPENGINE_API_BACKEND_ERROR', - self::APPENGINE_API_NOT_ACCESSIBLE => 'APPENGINE_API_NOT_ACCESSIBLE', - self::APPENGINE_DEFAULT_HOST_MISSING => 'APPENGINE_DEFAULT_HOST_MISSING', - self::CANNOT_USE_GOOGLE_COM_ACCOUNT => 'CANNOT_USE_GOOGLE_COM_ACCOUNT', - self::CANNOT_USE_OWNER_ACCOUNT => 'CANNOT_USE_OWNER_ACCOUNT', - self::COMPUTE_API_BACKEND_ERROR => 'COMPUTE_API_BACKEND_ERROR', - self::COMPUTE_API_NOT_ACCESSIBLE => 'COMPUTE_API_NOT_ACCESSIBLE', - self::CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT => 'CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT', - self::CUSTOM_LOGIN_URL_MALFORMED => 'CUSTOM_LOGIN_URL_MALFORMED', - self::CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS => 'CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS', - self::CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS => 'CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS', - self::CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS => 'CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS', - self::CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS => 'CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS', - self::DUPLICATE_SCAN_NAME => 'DUPLICATE_SCAN_NAME', - self::INVALID_FIELD_VALUE => 'INVALID_FIELD_VALUE', - self::FAILED_TO_AUTHENTICATE_TO_TARGET => 'FAILED_TO_AUTHENTICATE_TO_TARGET', - self::FINDING_TYPE_UNSPECIFIED => 'FINDING_TYPE_UNSPECIFIED', - self::FORBIDDEN_TO_SCAN_COMPUTE => 'FORBIDDEN_TO_SCAN_COMPUTE', - self::FORBIDDEN_UPDATE_TO_MANAGED_SCAN => 'FORBIDDEN_UPDATE_TO_MANAGED_SCAN', - self::MALFORMED_FILTER => 'MALFORMED_FILTER', - self::MALFORMED_RESOURCE_NAME => 'MALFORMED_RESOURCE_NAME', - self::PROJECT_INACTIVE => 'PROJECT_INACTIVE', - self::REQUIRED_FIELD => 'REQUIRED_FIELD', - self::RESOURCE_NAME_INCONSISTENT => 'RESOURCE_NAME_INCONSISTENT', - self::SCAN_ALREADY_RUNNING => 'SCAN_ALREADY_RUNNING', - self::SCAN_NOT_RUNNING => 'SCAN_NOT_RUNNING', - self::SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT => 'SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT', - self::SEED_URL_MALFORMED => 'SEED_URL_MALFORMED', - self::SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS => 'SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS', - self::SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS => 'SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS', - self::SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS => 'SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS', - self::SEED_URL_HAS_UNRESERVED_IP_ADDRESS => 'SEED_URL_HAS_UNRESERVED_IP_ADDRESS', - self::SERVICE_ACCOUNT_NOT_CONFIGURED => 'SERVICE_ACCOUNT_NOT_CONFIGURED', - self::TOO_MANY_SCANS => 'TOO_MANY_SCANS', - self::UNABLE_TO_RESOLVE_PROJECT_INFO => 'UNABLE_TO_RESOLVE_PROJECT_INFO', - self::UNSUPPORTED_BLACKLIST_PATTERN_FORMAT => 'UNSUPPORTED_BLACKLIST_PATTERN_FORMAT', - self::UNSUPPORTED_FILTER => 'UNSUPPORTED_FILTER', - self::UNSUPPORTED_FINDING_TYPE => 'UNSUPPORTED_FINDING_TYPE', - self::UNSUPPORTED_URL_SCHEME => 'UNSUPPORTED_URL_SCHEME', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Code::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfigError_Code::class); - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun.php deleted file mode 100644 index 9509062c159d..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun.php +++ /dev/null @@ -1,486 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ScanRun - */ -class ScanRun extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the ScanRun. The name follows the format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * The ScanRun IDs are generated by the system. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The execution state of the ScanRun. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRun.ExecutionState execution_state = 2; - */ - protected $execution_state = 0; - /** - * The result state of the ScanRun. This field is only available after the - * execution state reaches "FINISHED". - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRun.ResultState result_state = 3; - */ - protected $result_state = 0; - /** - * The time at which the ScanRun started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - */ - protected $start_time = null; - /** - * The time at which the ScanRun reached termination state - that the ScanRun - * is either finished or stopped by user. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; - */ - protected $end_time = null; - /** - * The number of URLs crawled during this ScanRun. If the scan is in progress, - * the value represents the number of URLs crawled up to now. - * - * Generated from protobuf field int64 urls_crawled_count = 6; - */ - protected $urls_crawled_count = 0; - /** - * The number of URLs tested during this ScanRun. If the scan is in progress, - * the value represents the number of URLs tested up to now. The number of - * URLs tested is usually larger than the number URLS crawled because - * typically a crawled URL is tested with multiple test payloads. - * - * Generated from protobuf field int64 urls_tested_count = 7; - */ - protected $urls_tested_count = 0; - /** - * Whether the scan run has found any vulnerabilities. - * - * Generated from protobuf field bool has_vulnerabilities = 8; - */ - protected $has_vulnerabilities = false; - /** - * The percentage of total completion ranging from 0 to 100. - * If the scan is in queue, the value is 0. - * If the scan is running, the value ranges from 0 to 100. - * If the scan is finished, the value is 100. - * - * Generated from protobuf field int32 progress_percent = 9; - */ - protected $progress_percent = 0; - /** - * If result_state is an ERROR, this field provides the primary reason for - * scan's termination and more details, if such are available. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace error_trace = 10; - */ - protected $error_trace = null; - /** - * A list of warnings, if such are encountered during this scan run. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace warning_traces = 11; - */ - private $warning_traces; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the ScanRun. The name follows the format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * The ScanRun IDs are generated by the system. - * @type int $execution_state - * The execution state of the ScanRun. - * @type int $result_state - * The result state of the ScanRun. This field is only available after the - * execution state reaches "FINISHED". - * @type \Google\Protobuf\Timestamp $start_time - * The time at which the ScanRun started. - * @type \Google\Protobuf\Timestamp $end_time - * The time at which the ScanRun reached termination state - that the ScanRun - * is either finished or stopped by user. - * @type int|string $urls_crawled_count - * The number of URLs crawled during this ScanRun. If the scan is in progress, - * the value represents the number of URLs crawled up to now. - * @type int|string $urls_tested_count - * The number of URLs tested during this ScanRun. If the scan is in progress, - * the value represents the number of URLs tested up to now. The number of - * URLs tested is usually larger than the number URLS crawled because - * typically a crawled URL is tested with multiple test payloads. - * @type bool $has_vulnerabilities - * Whether the scan run has found any vulnerabilities. - * @type int $progress_percent - * The percentage of total completion ranging from 0 to 100. - * If the scan is in queue, the value is 0. - * If the scan is running, the value ranges from 0 to 100. - * If the scan is finished, the value is 100. - * @type \Google\Cloud\WebSecurityScanner\V1beta\ScanRunErrorTrace $error_trace - * If result_state is an ERROR, this field provides the primary reason for - * scan's termination and more details, if such are available. - * @type array<\Google\Cloud\WebSecurityScanner\V1beta\ScanRunWarningTrace>|\Google\Protobuf\Internal\RepeatedField $warning_traces - * A list of warnings, if such are encountered during this scan run. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\ScanRun::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the ScanRun. The name follows the format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * The ScanRun IDs are generated by the system. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the ScanRun. The name follows the format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * The ScanRun IDs are generated by the system. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The execution state of the ScanRun. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRun.ExecutionState execution_state = 2; - * @return int - */ - public function getExecutionState() - { - return $this->execution_state; - } - - /** - * The execution state of the ScanRun. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRun.ExecutionState execution_state = 2; - * @param int $var - * @return $this - */ - public function setExecutionState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanRun\ExecutionState::class); - $this->execution_state = $var; - - return $this; - } - - /** - * The result state of the ScanRun. This field is only available after the - * execution state reaches "FINISHED". - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRun.ResultState result_state = 3; - * @return int - */ - public function getResultState() - { - return $this->result_state; - } - - /** - * The result state of the ScanRun. This field is only available after the - * execution state reaches "FINISHED". - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRun.ResultState result_state = 3; - * @param int $var - * @return $this - */ - public function setResultState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanRun\ResultState::class); - $this->result_state = $var; - - return $this; - } - - /** - * The time at which the ScanRun started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time at which the ScanRun started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time at which the ScanRun reached termination state - that the ScanRun - * is either finished or stopped by user. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time at which the ScanRun reached termination state - that the ScanRun - * is either finished or stopped by user. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The number of URLs crawled during this ScanRun. If the scan is in progress, - * the value represents the number of URLs crawled up to now. - * - * Generated from protobuf field int64 urls_crawled_count = 6; - * @return int|string - */ - public function getUrlsCrawledCount() - { - return $this->urls_crawled_count; - } - - /** - * The number of URLs crawled during this ScanRun. If the scan is in progress, - * the value represents the number of URLs crawled up to now. - * - * Generated from protobuf field int64 urls_crawled_count = 6; - * @param int|string $var - * @return $this - */ - public function setUrlsCrawledCount($var) - { - GPBUtil::checkInt64($var); - $this->urls_crawled_count = $var; - - return $this; - } - - /** - * The number of URLs tested during this ScanRun. If the scan is in progress, - * the value represents the number of URLs tested up to now. The number of - * URLs tested is usually larger than the number URLS crawled because - * typically a crawled URL is tested with multiple test payloads. - * - * Generated from protobuf field int64 urls_tested_count = 7; - * @return int|string - */ - public function getUrlsTestedCount() - { - return $this->urls_tested_count; - } - - /** - * The number of URLs tested during this ScanRun. If the scan is in progress, - * the value represents the number of URLs tested up to now. The number of - * URLs tested is usually larger than the number URLS crawled because - * typically a crawled URL is tested with multiple test payloads. - * - * Generated from protobuf field int64 urls_tested_count = 7; - * @param int|string $var - * @return $this - */ - public function setUrlsTestedCount($var) - { - GPBUtil::checkInt64($var); - $this->urls_tested_count = $var; - - return $this; - } - - /** - * Whether the scan run has found any vulnerabilities. - * - * Generated from protobuf field bool has_vulnerabilities = 8; - * @return bool - */ - public function getHasVulnerabilities() - { - return $this->has_vulnerabilities; - } - - /** - * Whether the scan run has found any vulnerabilities. - * - * Generated from protobuf field bool has_vulnerabilities = 8; - * @param bool $var - * @return $this - */ - public function setHasVulnerabilities($var) - { - GPBUtil::checkBool($var); - $this->has_vulnerabilities = $var; - - return $this; - } - - /** - * The percentage of total completion ranging from 0 to 100. - * If the scan is in queue, the value is 0. - * If the scan is running, the value ranges from 0 to 100. - * If the scan is finished, the value is 100. - * - * Generated from protobuf field int32 progress_percent = 9; - * @return int - */ - public function getProgressPercent() - { - return $this->progress_percent; - } - - /** - * The percentage of total completion ranging from 0 to 100. - * If the scan is in queue, the value is 0. - * If the scan is running, the value ranges from 0 to 100. - * If the scan is finished, the value is 100. - * - * Generated from protobuf field int32 progress_percent = 9; - * @param int $var - * @return $this - */ - public function setProgressPercent($var) - { - GPBUtil::checkInt32($var); - $this->progress_percent = $var; - - return $this; - } - - /** - * If result_state is an ERROR, this field provides the primary reason for - * scan's termination and more details, if such are available. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace error_trace = 10; - * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanRunErrorTrace|null - */ - public function getErrorTrace() - { - return $this->error_trace; - } - - public function hasErrorTrace() - { - return isset($this->error_trace); - } - - public function clearErrorTrace() - { - unset($this->error_trace); - } - - /** - * If result_state is an ERROR, this field provides the primary reason for - * scan's termination and more details, if such are available. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace error_trace = 10; - * @param \Google\Cloud\WebSecurityScanner\V1beta\ScanRunErrorTrace $var - * @return $this - */ - public function setErrorTrace($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanRunErrorTrace::class); - $this->error_trace = $var; - - return $this; - } - - /** - * A list of warnings, if such are encountered during this scan run. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace warning_traces = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWarningTraces() - { - return $this->warning_traces; - } - - /** - * A list of warnings, if such are encountered during this scan run. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace warning_traces = 11; - * @param array<\Google\Cloud\WebSecurityScanner\V1beta\ScanRunWarningTrace>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWarningTraces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1beta\ScanRunWarningTrace::class); - $this->warning_traces = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun/ExecutionState.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun/ExecutionState.php deleted file mode 100644 index b2d9504fcff5..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun/ExecutionState.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ScanRun.ExecutionState - */ -class ExecutionState -{ - /** - * Represents an invalid state caused by internal server error. This value - * should never be returned. - * - * Generated from protobuf enum EXECUTION_STATE_UNSPECIFIED = 0; - */ - const EXECUTION_STATE_UNSPECIFIED = 0; - /** - * The scan is waiting in the queue. - * - * Generated from protobuf enum QUEUED = 1; - */ - const QUEUED = 1; - /** - * The scan is in progress. - * - * Generated from protobuf enum SCANNING = 2; - */ - const SCANNING = 2; - /** - * The scan is either finished or stopped by user. - * - * Generated from protobuf enum FINISHED = 3; - */ - const FINISHED = 3; - - private static $valueToName = [ - self::EXECUTION_STATE_UNSPECIFIED => 'EXECUTION_STATE_UNSPECIFIED', - self::QUEUED => 'QUEUED', - self::SCANNING => 'SCANNING', - self::FINISHED => 'FINISHED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ExecutionState::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanRun_ExecutionState::class); - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun/ResultState.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun/ResultState.php deleted file mode 100644 index 4b8395346de5..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRun/ResultState.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ScanRun.ResultState - */ -class ResultState -{ - /** - * Default value. This value is returned when the ScanRun is not yet - * finished. - * - * Generated from protobuf enum RESULT_STATE_UNSPECIFIED = 0; - */ - const RESULT_STATE_UNSPECIFIED = 0; - /** - * The scan finished without errors. - * - * Generated from protobuf enum SUCCESS = 1; - */ - const SUCCESS = 1; - /** - * The scan finished with errors. - * - * Generated from protobuf enum ERROR = 2; - */ - const ERROR = 2; - /** - * The scan was terminated by user. - * - * Generated from protobuf enum KILLED = 3; - */ - const KILLED = 3; - - private static $valueToName = [ - self::RESULT_STATE_UNSPECIFIED => 'RESULT_STATE_UNSPECIFIED', - self::SUCCESS => 'SUCCESS', - self::ERROR => 'ERROR', - self::KILLED => 'KILLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ResultState::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanRun_ResultState::class); - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunErrorTrace.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunErrorTrace.php deleted file mode 100644 index 7d229134c53e..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunErrorTrace.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace - */ -class ScanRunErrorTrace extends \Google\Protobuf\Internal\Message -{ - /** - * Indicates the error reason code. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace.Code code = 1; - */ - protected $code = 0; - /** - * If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error - * message encountered during scan configuration validation that is performed - * before each scan run. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfigError scan_config_error = 2; - */ - protected $scan_config_error = null; - /** - * If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most - * common HTTP error code, if such is available. For example, if this code is - * 404, the scan has encountered too many NOT_FOUND responses. - * - * Generated from protobuf field int32 most_common_http_error_code = 3; - */ - protected $most_common_http_error_code = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * Indicates the error reason code. - * @type \Google\Cloud\WebSecurityScanner\V1beta\ScanConfigError $scan_config_error - * If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error - * message encountered during scan configuration validation that is performed - * before each scan run. - * @type int $most_common_http_error_code - * If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most - * common HTTP error code, if such is available. For example, if this code is - * 404, the scan has encountered too many NOT_FOUND responses. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\ScanRunErrorTrace::initOnce(); - parent::__construct($data); - } - - /** - * Indicates the error reason code. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace.Code code = 1; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Indicates the error reason code. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace.Code code = 1; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanRunErrorTrace\Code::class); - $this->code = $var; - - return $this; - } - - /** - * If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error - * message encountered during scan configuration validation that is performed - * before each scan run. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfigError scan_config_error = 2; - * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanConfigError|null - */ - public function getScanConfigError() - { - return $this->scan_config_error; - } - - public function hasScanConfigError() - { - return isset($this->scan_config_error); - } - - public function clearScanConfigError() - { - unset($this->scan_config_error); - } - - /** - * If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error - * message encountered during scan configuration validation that is performed - * before each scan run. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfigError scan_config_error = 2; - * @param \Google\Cloud\WebSecurityScanner\V1beta\ScanConfigError $var - * @return $this - */ - public function setScanConfigError($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfigError::class); - $this->scan_config_error = $var; - - return $this; - } - - /** - * If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most - * common HTTP error code, if such is available. For example, if this code is - * 404, the scan has encountered too many NOT_FOUND responses. - * - * Generated from protobuf field int32 most_common_http_error_code = 3; - * @return int - */ - public function getMostCommonHttpErrorCode() - { - return $this->most_common_http_error_code; - } - - /** - * If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most - * common HTTP error code, if such is available. For example, if this code is - * 404, the scan has encountered too many NOT_FOUND responses. - * - * Generated from protobuf field int32 most_common_http_error_code = 3; - * @param int $var - * @return $this - */ - public function setMostCommonHttpErrorCode($var) - { - GPBUtil::checkInt32($var); - $this->most_common_http_error_code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunErrorTrace/Code.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunErrorTrace/Code.php deleted file mode 100644 index f4290adb07be..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunErrorTrace/Code.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace.Code - */ -class Code -{ - /** - * Default value is never used. - * - * Generated from protobuf enum CODE_UNSPECIFIED = 0; - */ - const CODE_UNSPECIFIED = 0; - /** - * Indicates that the scan run failed due to an internal server error. - * - * Generated from protobuf enum INTERNAL_ERROR = 1; - */ - const INTERNAL_ERROR = 1; - /** - * Indicates a scan configuration error, usually due to outdated ScanConfig - * settings, such as starting_urls or the DNS configuration. - * - * Generated from protobuf enum SCAN_CONFIG_ISSUE = 2; - */ - const SCAN_CONFIG_ISSUE = 2; - /** - * Indicates an authentication error, usually due to outdated ScanConfig - * authentication settings. - * - * Generated from protobuf enum AUTHENTICATION_CONFIG_ISSUE = 3; - */ - const AUTHENTICATION_CONFIG_ISSUE = 3; - /** - * Indicates a scan operation timeout, usually caused by a very large site. - * - * Generated from protobuf enum TIMED_OUT_WHILE_SCANNING = 4; - */ - const TIMED_OUT_WHILE_SCANNING = 4; - /** - * Indicates that a scan encountered excessive redirects, either to - * authentication or some other page outside of the scan scope. - * - * Generated from protobuf enum TOO_MANY_REDIRECTS = 5; - */ - const TOO_MANY_REDIRECTS = 5; - /** - * Indicates that a scan encountered numerous errors from the web site - * pages. When available, most_common_http_error_code field indicates the - * most common HTTP error code encountered during the scan. - * - * Generated from protobuf enum TOO_MANY_HTTP_ERRORS = 6; - */ - const TOO_MANY_HTTP_ERRORS = 6; - - private static $valueToName = [ - self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', - self::INTERNAL_ERROR => 'INTERNAL_ERROR', - self::SCAN_CONFIG_ISSUE => 'SCAN_CONFIG_ISSUE', - self::AUTHENTICATION_CONFIG_ISSUE => 'AUTHENTICATION_CONFIG_ISSUE', - self::TIMED_OUT_WHILE_SCANNING => 'TIMED_OUT_WHILE_SCANNING', - self::TOO_MANY_REDIRECTS => 'TOO_MANY_REDIRECTS', - self::TOO_MANY_HTTP_ERRORS => 'TOO_MANY_HTTP_ERRORS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Code::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanRunErrorTrace_Code::class); - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunWarningTrace.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunWarningTrace.php deleted file mode 100644 index 35402b245a0c..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunWarningTrace.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace - */ -class ScanRunWarningTrace extends \Google\Protobuf\Internal\Message -{ - /** - * Indicates the warning code. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace.Code code = 1; - */ - protected $code = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * Indicates the warning code. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\ScanRunWarningTrace::initOnce(); - parent::__construct($data); - } - - /** - * Indicates the warning code. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace.Code code = 1; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Indicates the warning code. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace.Code code = 1; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanRunWarningTrace\Code::class); - $this->code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunWarningTrace/Code.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunWarningTrace/Code.php deleted file mode 100644 index 91ec840d3170..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ScanRunWarningTrace/Code.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace.Code - */ -class Code -{ - /** - * Default value is never used. - * - * Generated from protobuf enum CODE_UNSPECIFIED = 0; - */ - const CODE_UNSPECIFIED = 0; - /** - * Indicates that a scan discovered an unexpectedly low number of URLs. This - * is sometimes caused by complex navigation features or by using a single - * URL for numerous pages. - * - * Generated from protobuf enum INSUFFICIENT_CRAWL_RESULTS = 1; - */ - const INSUFFICIENT_CRAWL_RESULTS = 1; - /** - * Indicates that a scan discovered too many URLs to test, or excessive - * redundant URLs. - * - * Generated from protobuf enum TOO_MANY_CRAWL_RESULTS = 2; - */ - const TOO_MANY_CRAWL_RESULTS = 2; - /** - * Indicates that too many tests have been generated for the scan. Customer - * should try reducing the number of starting URLs, increasing the QPS rate, - * or narrowing down the scope of the scan using the excluded patterns. - * - * Generated from protobuf enum TOO_MANY_FUZZ_TASKS = 3; - */ - const TOO_MANY_FUZZ_TASKS = 3; - /** - * Indicates that a scan is blocked by IAP. - * - * Generated from protobuf enum BLOCKED_BY_IAP = 4; - */ - const BLOCKED_BY_IAP = 4; - - private static $valueToName = [ - self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', - self::INSUFFICIENT_CRAWL_RESULTS => 'INSUFFICIENT_CRAWL_RESULTS', - self::TOO_MANY_CRAWL_RESULTS => 'TOO_MANY_CRAWL_RESULTS', - self::TOO_MANY_FUZZ_TASKS => 'TOO_MANY_FUZZ_TASKS', - self::BLOCKED_BY_IAP => 'BLOCKED_BY_IAP', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Code::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanRunWarningTrace_Code::class); - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/StartScanRunRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/StartScanRunRequest.php deleted file mode 100644 index ba7617eae7ce..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/StartScanRunRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.websecurityscanner.v1beta.StartScanRunRequest - */ -class StartScanRunRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the ScanConfig to be used. The name follows the - * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the ScanConfig to be used. The name follows the - * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the ScanConfig to be used. The name follows the - * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the ScanConfig to be used. The name follows the - * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/StopScanRunRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/StopScanRunRequest.php deleted file mode 100644 index 04ad4e12c5ff..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/StopScanRunRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.websecurityscanner.v1beta.StopScanRunRequest - */ -class StopScanRunRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the ScanRun to be stopped. The name follows the - * format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the ScanRun to be stopped. The name follows the - * format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the ScanRun to be stopped. The name follows the - * format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the ScanRun to be stopped. The name follows the - * format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/UpdateScanConfigRequest.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/UpdateScanConfigRequest.php deleted file mode 100644 index 6446f709c20e..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/UpdateScanConfigRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.websecurityscanner.v1beta.UpdateScanConfigRequest - */ -class UpdateScanConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ScanConfig to be updated. The name field must be set to identify the - * resource to be updated. The values of fields not covered by the mask - * will be ignored. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig scan_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scan_config = null; - /** - * Required. The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig $scan_config - * Required. The ScanConfig to be updated. The name field must be set to identify the - * resource to be updated. The values of fields not covered by the mask - * will be ignored. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\WebSecurityScanner::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ScanConfig to be updated. The name field must be set to identify the - * resource to be updated. The values of fields not covered by the mask - * will be ignored. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig scan_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig|null - */ - public function getScanConfig() - { - return $this->scan_config; - } - - public function hasScanConfig() - { - return isset($this->scan_config); - } - - public function clearScanConfig() - { - unset($this->scan_config); - } - - /** - * Required. The ScanConfig to be updated. The name field must be set to identify the - * resource to be updated. The values of fields not covered by the mask - * will be ignored. - * - * Generated from protobuf field .google.cloud.websecurityscanner.v1beta.ScanConfig scan_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig $var - * @return $this - */ - public function setScanConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig::class); - $this->scan_config = $var; - - return $this; - } - - /** - * Required. The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ViolatingResource.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ViolatingResource.php deleted file mode 100644 index e1e3a3cd0c1c..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/ViolatingResource.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.websecurityscanner.v1beta.ViolatingResource - */ -class ViolatingResource extends \Google\Protobuf\Internal\Message -{ - /** - * The MIME type of this resource. - * - * Generated from protobuf field string content_type = 1; - */ - protected $content_type = ''; - /** - * URL of this violating resource. - * - * Generated from protobuf field string resource_url = 2; - */ - protected $resource_url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $content_type - * The MIME type of this resource. - * @type string $resource_url - * URL of this violating resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\FindingAddon::initOnce(); - parent::__construct($data); - } - - /** - * The MIME type of this resource. - * - * Generated from protobuf field string content_type = 1; - * @return string - */ - public function getContentType() - { - return $this->content_type; - } - - /** - * The MIME type of this resource. - * - * Generated from protobuf field string content_type = 1; - * @param string $var - * @return $this - */ - public function setContentType($var) - { - GPBUtil::checkString($var, True); - $this->content_type = $var; - - return $this; - } - - /** - * URL of this violating resource. - * - * Generated from protobuf field string resource_url = 2; - * @return string - */ - public function getResourceUrl() - { - return $this->resource_url; - } - - /** - * URL of this violating resource. - * - * Generated from protobuf field string resource_url = 2; - * @param string $var - * @return $this - */ - public function setResourceUrl($var) - { - GPBUtil::checkString($var, True); - $this->resource_url = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableHeaders.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableHeaders.php deleted file mode 100644 index 9f1a8f040533..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableHeaders.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.websecurityscanner.v1beta.VulnerableHeaders - */ -class VulnerableHeaders extends \Google\Protobuf\Internal\Message -{ - /** - * List of vulnerable headers. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header headers = 1; - */ - private $headers; - /** - * List of missing headers. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header missing_headers = 2; - */ - private $missing_headers; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders\Header>|\Google\Protobuf\Internal\RepeatedField $headers - * List of vulnerable headers. - * @type array<\Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders\Header>|\Google\Protobuf\Internal\RepeatedField $missing_headers - * List of missing headers. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\FindingAddon::initOnce(); - parent::__construct($data); - } - - /** - * List of vulnerable headers. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header headers = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHeaders() - { - return $this->headers; - } - - /** - * List of vulnerable headers. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header headers = 1; - * @param array<\Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders\Header>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHeaders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders\Header::class); - $this->headers = $arr; - - return $this; - } - - /** - * List of missing headers. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header missing_headers = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMissingHeaders() - { - return $this->missing_headers; - } - - /** - * List of missing headers. - * - * Generated from protobuf field repeated .google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header missing_headers = 2; - * @param array<\Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders\Header>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMissingHeaders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders\Header::class); - $this->missing_headers = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableHeaders/Header.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableHeaders/Header.php deleted file mode 100644 index 5a1aa140705a..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableHeaders/Header.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header - */ -class Header extends \Google\Protobuf\Internal\Message -{ - /** - * Header name. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Header value. - * - * Generated from protobuf field string value = 2; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Header name. - * @type string $value - * Header value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\FindingAddon::initOnce(); - parent::__construct($data); - } - - /** - * Header name. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Header name. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Header value. - * - * Generated from protobuf field string value = 2; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Header value. - * - * Generated from protobuf field string value = 2; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Header::class, \Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders_Header::class); - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableParameters.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableParameters.php deleted file mode 100644 index 97f40daec8ea..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/VulnerableParameters.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.websecurityscanner.v1beta.VulnerableParameters - */ -class VulnerableParameters extends \Google\Protobuf\Internal\Message -{ - /** - * The vulnerable parameter names. - * - * Generated from protobuf field repeated string parameter_names = 1; - */ - private $parameter_names; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $parameter_names - * The vulnerable parameter names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\FindingAddon::initOnce(); - parent::__construct($data); - } - - /** - * The vulnerable parameter names. - * - * Generated from protobuf field repeated string parameter_names = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getParameterNames() - { - return $this->parameter_names; - } - - /** - * The vulnerable parameter names. - * - * Generated from protobuf field repeated string parameter_names = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setParameterNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->parameter_names = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/WebSecurityScannerGrpcClient.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/WebSecurityScannerGrpcClient.php deleted file mode 100644 index 2f4e3d914cd6..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/WebSecurityScannerGrpcClient.php +++ /dev/null @@ -1,234 +0,0 @@ -_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/CreateScanConfig', - $argument, - ['\Google\Cloud\WebSecurityScanner\V1beta\ScanConfig', 'decode'], - $metadata, $options); - } - - /** - * Deletes an existing ScanConfig and its child resources. - * @param \Google\Cloud\WebSecurityScanner\V1beta\DeleteScanConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteScanConfig(\Google\Cloud\WebSecurityScanner\V1beta\DeleteScanConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/DeleteScanConfig', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Gets a ScanConfig. - * @param \Google\Cloud\WebSecurityScanner\V1beta\GetScanConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetScanConfig(\Google\Cloud\WebSecurityScanner\V1beta\GetScanConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/GetScanConfig', - $argument, - ['\Google\Cloud\WebSecurityScanner\V1beta\ScanConfig', 'decode'], - $metadata, $options); - } - - /** - * Lists ScanConfigs under a given project. - * @param \Google\Cloud\WebSecurityScanner\V1beta\ListScanConfigsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListScanConfigs(\Google\Cloud\WebSecurityScanner\V1beta\ListScanConfigsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListScanConfigs', - $argument, - ['\Google\Cloud\WebSecurityScanner\V1beta\ListScanConfigsResponse', 'decode'], - $metadata, $options); - } - - /** - * Updates a ScanConfig. This method support partial update of a ScanConfig. - * @param \Google\Cloud\WebSecurityScanner\V1beta\UpdateScanConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateScanConfig(\Google\Cloud\WebSecurityScanner\V1beta\UpdateScanConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/UpdateScanConfig', - $argument, - ['\Google\Cloud\WebSecurityScanner\V1beta\ScanConfig', 'decode'], - $metadata, $options); - } - - /** - * Start a ScanRun according to the given ScanConfig. - * @param \Google\Cloud\WebSecurityScanner\V1beta\StartScanRunRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function StartScanRun(\Google\Cloud\WebSecurityScanner\V1beta\StartScanRunRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/StartScanRun', - $argument, - ['\Google\Cloud\WebSecurityScanner\V1beta\ScanRun', 'decode'], - $metadata, $options); - } - - /** - * Gets a ScanRun. - * @param \Google\Cloud\WebSecurityScanner\V1beta\GetScanRunRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetScanRun(\Google\Cloud\WebSecurityScanner\V1beta\GetScanRunRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/GetScanRun', - $argument, - ['\Google\Cloud\WebSecurityScanner\V1beta\ScanRun', 'decode'], - $metadata, $options); - } - - /** - * Lists ScanRuns under a given ScanConfig, in descending order of ScanRun - * stop time. - * @param \Google\Cloud\WebSecurityScanner\V1beta\ListScanRunsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListScanRuns(\Google\Cloud\WebSecurityScanner\V1beta\ListScanRunsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListScanRuns', - $argument, - ['\Google\Cloud\WebSecurityScanner\V1beta\ListScanRunsResponse', 'decode'], - $metadata, $options); - } - - /** - * Stops a ScanRun. The stopped ScanRun is returned. - * @param \Google\Cloud\WebSecurityScanner\V1beta\StopScanRunRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function StopScanRun(\Google\Cloud\WebSecurityScanner\V1beta\StopScanRunRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/StopScanRun', - $argument, - ['\Google\Cloud\WebSecurityScanner\V1beta\ScanRun', 'decode'], - $metadata, $options); - } - - /** - * List CrawledUrls under a given ScanRun. - * @param \Google\Cloud\WebSecurityScanner\V1beta\ListCrawledUrlsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListCrawledUrls(\Google\Cloud\WebSecurityScanner\V1beta\ListCrawledUrlsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListCrawledUrls', - $argument, - ['\Google\Cloud\WebSecurityScanner\V1beta\ListCrawledUrlsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets a Finding. - * @param \Google\Cloud\WebSecurityScanner\V1beta\GetFindingRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetFinding(\Google\Cloud\WebSecurityScanner\V1beta\GetFindingRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/GetFinding', - $argument, - ['\Google\Cloud\WebSecurityScanner\V1beta\Finding', 'decode'], - $metadata, $options); - } - - /** - * List Findings under a given ScanRun. - * @param \Google\Cloud\WebSecurityScanner\V1beta\ListFindingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListFindings(\Google\Cloud\WebSecurityScanner\V1beta\ListFindingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListFindings', - $argument, - ['\Google\Cloud\WebSecurityScanner\V1beta\ListFindingsResponse', 'decode'], - $metadata, $options); - } - - /** - * List all FindingTypeStats under a given ScanRun. - * @param \Google\Cloud\WebSecurityScanner\V1beta\ListFindingTypeStatsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListFindingTypeStats(\Google\Cloud\WebSecurityScanner\V1beta\ListFindingTypeStatsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListFindingTypeStats', - $argument, - ['\Google\Cloud\WebSecurityScanner\V1beta\ListFindingTypeStatsResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Xss.php b/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Xss.php deleted file mode 100644 index c3a460821dfc..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/proto/src/Google/Cloud/WebSecurityScanner/V1beta/Xss.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.websecurityscanner.v1beta.Xss - */ -class Xss extends \Google\Protobuf\Internal\Message -{ - /** - * Stack traces leading to the point where the XSS occurred. - * - * Generated from protobuf field repeated string stack_traces = 1; - */ - private $stack_traces; - /** - * An error message generated by a javascript breakage. - * - * Generated from protobuf field string error_message = 2; - */ - protected $error_message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $stack_traces - * Stack traces leading to the point where the XSS occurred. - * @type string $error_message - * An error message generated by a javascript breakage. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\FindingAddon::initOnce(); - parent::__construct($data); - } - - /** - * Stack traces leading to the point where the XSS occurred. - * - * Generated from protobuf field repeated string stack_traces = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStackTraces() - { - return $this->stack_traces; - } - - /** - * Stack traces leading to the point where the XSS occurred. - * - * Generated from protobuf field repeated string stack_traces = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStackTraces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->stack_traces = $arr; - - return $this; - } - - /** - * An error message generated by a javascript breakage. - * - * Generated from protobuf field string error_message = 2; - * @return string - */ - public function getErrorMessage() - { - return $this->error_message; - } - - /** - * An error message generated by a javascript breakage. - * - * Generated from protobuf field string error_message = 2; - * @param string $var - * @return $this - */ - public function setErrorMessage($var) - { - GPBUtil::checkString($var, True); - $this->error_message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/create_scan_config.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/create_scan_config.php deleted file mode 100644 index e48d877c2456..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/create_scan_config.php +++ /dev/null @@ -1,80 +0,0 @@ -setDisplayName($scanConfigDisplayName) - ->setStartingUrls($scanConfigStartingUrls); - - // Call the API and handle any network failures. - try { - /** @var ScanConfig $response */ - $response = $webSecurityScannerClient->createScanConfig($formattedParent, $scanConfig); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = WebSecurityScannerClient::projectName('[PROJECT]'); - $scanConfigDisplayName = '[DISPLAY_NAME]'; - $scanConfigStartingUrlsElement = '[STARTING_URLS]'; - - create_scan_config_sample($formattedParent, $scanConfigDisplayName, $scanConfigStartingUrlsElement); -} -// [END websecurityscanner_v1beta_generated_WebSecurityScanner_CreateScanConfig_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/delete_scan_config.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/delete_scan_config.php deleted file mode 100644 index 24ace5752324..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/delete_scan_config.php +++ /dev/null @@ -1,65 +0,0 @@ -deleteScanConfig($formattedName); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WebSecurityScannerClient::scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); - - delete_scan_config_sample($formattedName); -} -// [END websecurityscanner_v1beta_generated_WebSecurityScanner_DeleteScanConfig_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_finding.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_finding.php deleted file mode 100644 index 5169cc720cd1..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_finding.php +++ /dev/null @@ -1,73 +0,0 @@ -getFinding($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WebSecurityScannerClient::findingName( - '[PROJECT]', - '[SCAN_CONFIG]', - '[SCAN_RUN]', - '[FINDING]' - ); - - get_finding_sample($formattedName); -} -// [END websecurityscanner_v1beta_generated_WebSecurityScanner_GetFinding_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_scan_config.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_scan_config.php deleted file mode 100644 index 4b190f910d42..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_scan_config.php +++ /dev/null @@ -1,67 +0,0 @@ -getScanConfig($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WebSecurityScannerClient::scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); - - get_scan_config_sample($formattedName); -} -// [END websecurityscanner_v1beta_generated_WebSecurityScanner_GetScanConfig_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_scan_run.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_scan_run.php deleted file mode 100644 index 85d39822d547..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/get_scan_run.php +++ /dev/null @@ -1,68 +0,0 @@ -getScanRun($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WebSecurityScannerClient::scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); - - get_scan_run_sample($formattedName); -} -// [END websecurityscanner_v1beta_generated_WebSecurityScanner_GetScanRun_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_crawled_urls.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_crawled_urls.php deleted file mode 100644 index 681f51deea18..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_crawled_urls.php +++ /dev/null @@ -1,77 +0,0 @@ -listCrawledUrls($formattedParent); - - /** @var CrawledUrl $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = WebSecurityScannerClient::scanRunName( - '[PROJECT]', - '[SCAN_CONFIG]', - '[SCAN_RUN]' - ); - - list_crawled_urls_sample($formattedParent); -} -// [END websecurityscanner_v1beta_generated_WebSecurityScanner_ListCrawledUrls_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_finding_type_stats.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_finding_type_stats.php deleted file mode 100644 index 075d9817bf03..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_finding_type_stats.php +++ /dev/null @@ -1,72 +0,0 @@ -listFindingTypeStats($formattedParent); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = WebSecurityScannerClient::scanRunName( - '[PROJECT]', - '[SCAN_CONFIG]', - '[SCAN_RUN]' - ); - - list_finding_type_stats_sample($formattedParent); -} -// [END websecurityscanner_v1beta_generated_WebSecurityScanner_ListFindingTypeStats_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_findings.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_findings.php deleted file mode 100644 index 3fc481532b76..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_findings.php +++ /dev/null @@ -1,82 +0,0 @@ - - * . - * Supported field: 'finding_type'. - * Supported operator: '='. - */ -function list_findings_sample(string $formattedParent, string $filter): void -{ - // Create a client. - $webSecurityScannerClient = new WebSecurityScannerClient(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $webSecurityScannerClient->listFindings($formattedParent, $filter); - - /** @var Finding $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = WebSecurityScannerClient::scanRunName( - '[PROJECT]', - '[SCAN_CONFIG]', - '[SCAN_RUN]' - ); - $filter = '[FILTER]'; - - list_findings_sample($formattedParent, $filter); -} -// [END websecurityscanner_v1beta_generated_WebSecurityScanner_ListFindings_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_scan_configs.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_scan_configs.php deleted file mode 100644 index b5585263b8ca..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_scan_configs.php +++ /dev/null @@ -1,72 +0,0 @@ -listScanConfigs($formattedParent); - - /** @var ScanConfig $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = WebSecurityScannerClient::projectName('[PROJECT]'); - - list_scan_configs_sample($formattedParent); -} -// [END websecurityscanner_v1beta_generated_WebSecurityScanner_ListScanConfigs_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_scan_runs.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_scan_runs.php deleted file mode 100644 index f7c608510ee5..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/list_scan_runs.php +++ /dev/null @@ -1,73 +0,0 @@ -listScanRuns($formattedParent); - - /** @var ScanRun $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = WebSecurityScannerClient::scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); - - list_scan_runs_sample($formattedParent); -} -// [END websecurityscanner_v1beta_generated_WebSecurityScanner_ListScanRuns_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/start_scan_run.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/start_scan_run.php deleted file mode 100644 index 3598bce690f9..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/start_scan_run.php +++ /dev/null @@ -1,67 +0,0 @@ -startScanRun($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WebSecurityScannerClient::scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); - - start_scan_run_sample($formattedName); -} -// [END websecurityscanner_v1beta_generated_WebSecurityScanner_StartScanRun_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/stop_scan_run.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/stop_scan_run.php deleted file mode 100644 index 4e5c25833c7f..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/stop_scan_run.php +++ /dev/null @@ -1,68 +0,0 @@ -stopScanRun($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WebSecurityScannerClient::scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); - - stop_scan_run_sample($formattedName); -} -// [END websecurityscanner_v1beta_generated_WebSecurityScanner_StopScanRun_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/update_scan_config.php b/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/update_scan_config.php deleted file mode 100644 index 91e0cd43e367..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/samples/V1beta/WebSecurityScannerClient/update_scan_config.php +++ /dev/null @@ -1,77 +0,0 @@ -setDisplayName($scanConfigDisplayName) - ->setStartingUrls($scanConfigStartingUrls); - $updateMask = new FieldMask(); - - // Call the API and handle any network failures. - try { - /** @var ScanConfig $response */ - $response = $webSecurityScannerClient->updateScanConfig($scanConfig, $updateMask); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $scanConfigDisplayName = '[DISPLAY_NAME]'; - $scanConfigStartingUrlsElement = '[STARTING_URLS]'; - - update_scan_config_sample($scanConfigDisplayName, $scanConfigStartingUrlsElement); -} -// [END websecurityscanner_v1beta_generated_WebSecurityScanner_UpdateScanConfig_sync] diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/Gapic/WebSecurityScannerGapicClient.php b/owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/Gapic/WebSecurityScannerGapicClient.php deleted file mode 100644 index 951f4aca3e54..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/Gapic/WebSecurityScannerGapicClient.php +++ /dev/null @@ -1,1057 +0,0 @@ -projectName('[PROJECT]'); - * $scanConfig = new ScanConfig(); - * $response = $webSecurityScannerClient->createScanConfig($formattedParent, $scanConfig); - * } finally { - * $webSecurityScannerClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @experimental - */ -class WebSecurityScannerGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.websecurityscanner.v1beta.WebSecurityScanner'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'websecurityscanner.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $findingNameTemplate; - - private static $projectNameTemplate; - - private static $scanConfigNameTemplate; - - private static $scanRunNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/web_security_scanner_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/web_security_scanner_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/web_security_scanner_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/web_security_scanner_rest_client_config.php', - ], - ], - ]; - } - - private static function getFindingNameTemplate() - { - if (self::$findingNameTemplate == null) { - self::$findingNameTemplate = new PathTemplate('projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding}'); - } - - return self::$findingNameTemplate; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getScanConfigNameTemplate() - { - if (self::$scanConfigNameTemplate == null) { - self::$scanConfigNameTemplate = new PathTemplate('projects/{project}/scanConfigs/{scan_config}'); - } - - return self::$scanConfigNameTemplate; - } - - private static function getScanRunNameTemplate() - { - if (self::$scanRunNameTemplate == null) { - self::$scanRunNameTemplate = new PathTemplate('projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}'); - } - - return self::$scanRunNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'finding' => self::getFindingNameTemplate(), - 'project' => self::getProjectNameTemplate(), - 'scanConfig' => self::getScanConfigNameTemplate(), - 'scanRun' => self::getScanRunNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a finding - * resource. - * - * @param string $project - * @param string $scanConfig - * @param string $scanRun - * @param string $finding - * - * @return string The formatted finding resource. - * - * @experimental - */ - public static function findingName($project, $scanConfig, $scanRun, $finding) - { - return self::getFindingNameTemplate()->render([ - 'project' => $project, - 'scan_config' => $scanConfig, - 'scan_run' => $scanRun, - 'finding' => $finding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - * - * @experimental - */ - public static function projectName($project) - { - return self::getProjectNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a scan_config - * resource. - * - * @param string $project - * @param string $scanConfig - * - * @return string The formatted scan_config resource. - * - * @experimental - */ - public static function scanConfigName($project, $scanConfig) - { - return self::getScanConfigNameTemplate()->render([ - 'project' => $project, - 'scan_config' => $scanConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a scan_run - * resource. - * - * @param string $project - * @param string $scanConfig - * @param string $scanRun - * - * @return string The formatted scan_run resource. - * - * @experimental - */ - public static function scanRunName($project, $scanConfig, $scanRun) - { - return self::getScanRunNameTemplate()->render([ - 'project' => $project, - 'scan_config' => $scanConfig, - 'scan_run' => $scanRun, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - finding: projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding} - * - project: projects/{project} - * - scanConfig: projects/{project}/scanConfigs/{scan_config} - * - scanRun: projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - * - * @experimental - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'websecurityscanner.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Creates a new ScanConfig. - * - * Sample code: - * ``` - * $webSecurityScannerClient = new WebSecurityScannerClient(); - * try { - * $formattedParent = $webSecurityScannerClient->projectName('[PROJECT]'); - * $scanConfig = new ScanConfig(); - * $response = $webSecurityScannerClient->createScanConfig($formattedParent, $scanConfig); - * } finally { - * $webSecurityScannerClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name where the scan is created, which should be a - * project resource name in the format 'projects/{projectId}'. - * @param ScanConfig $scanConfig Required. The ScanConfig to be created. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createScanConfig($parent, $scanConfig, array $optionalArgs = []) - { - $request = new CreateScanConfigRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setScanConfig($scanConfig); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateScanConfig', ScanConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes an existing ScanConfig and its child resources. - * - * Sample code: - * ``` - * $webSecurityScannerClient = new WebSecurityScannerClient(); - * try { - * $formattedName = $webSecurityScannerClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); - * $webSecurityScannerClient->deleteScanConfig($formattedName); - * } finally { - * $webSecurityScannerClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the ScanConfig to be deleted. The name follows the - * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteScanConfig($name, array $optionalArgs = []) - { - $request = new DeleteScanConfigRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteScanConfig', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a Finding. - * - * Sample code: - * ``` - * $webSecurityScannerClient = new WebSecurityScannerClient(); - * try { - * $formattedName = $webSecurityScannerClient->findingName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]', '[FINDING]'); - * $response = $webSecurityScannerClient->getFinding($formattedName); - * } finally { - * $webSecurityScannerClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the Finding to be returned. The name follows the - * format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\WebSecurityScanner\V1beta\Finding - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getFinding($name, array $optionalArgs = []) - { - $request = new GetFindingRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetFinding', Finding::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a ScanConfig. - * - * Sample code: - * ``` - * $webSecurityScannerClient = new WebSecurityScannerClient(); - * try { - * $formattedName = $webSecurityScannerClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); - * $response = $webSecurityScannerClient->getScanConfig($formattedName); - * } finally { - * $webSecurityScannerClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the ScanConfig to be returned. The name follows the - * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getScanConfig($name, array $optionalArgs = []) - { - $request = new GetScanConfigRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetScanConfig', ScanConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a ScanRun. - * - * Sample code: - * ``` - * $webSecurityScannerClient = new WebSecurityScannerClient(); - * try { - * $formattedName = $webSecurityScannerClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); - * $response = $webSecurityScannerClient->getScanRun($formattedName); - * } finally { - * $webSecurityScannerClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the ScanRun to be returned. The name follows the - * format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanRun - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getScanRun($name, array $optionalArgs = []) - { - $request = new GetScanRunRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetScanRun', ScanRun::class, $optionalArgs, $request)->wait(); - } - - /** - * List CrawledUrls under a given ScanRun. - * - * Sample code: - * ``` - * $webSecurityScannerClient = new WebSecurityScannerClient(); - * try { - * $formattedParent = $webSecurityScannerClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); - * // Iterate over pages of elements - * $pagedResponse = $webSecurityScannerClient->listCrawledUrls($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $webSecurityScannerClient->listCrawledUrls($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $webSecurityScannerClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name, which should be a scan run resource name in the - * format - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * @param array $optionalArgs { - * Optional. - * - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listCrawledUrls($parent, array $optionalArgs = []) - { - $request = new ListCrawledUrlsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListCrawledUrls', $optionalArgs, ListCrawledUrlsResponse::class, $request); - } - - /** - * List all FindingTypeStats under a given ScanRun. - * - * Sample code: - * ``` - * $webSecurityScannerClient = new WebSecurityScannerClient(); - * try { - * $formattedParent = $webSecurityScannerClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); - * $response = $webSecurityScannerClient->listFindingTypeStats($formattedParent); - * } finally { - * $webSecurityScannerClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name, which should be a scan run resource name in the - * format - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\WebSecurityScanner\V1beta\ListFindingTypeStatsResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listFindingTypeStats($parent, array $optionalArgs = []) - { - $request = new ListFindingTypeStatsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ListFindingTypeStats', ListFindingTypeStatsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * List Findings under a given ScanRun. - * - * Sample code: - * ``` - * $webSecurityScannerClient = new WebSecurityScannerClient(); - * try { - * $formattedParent = $webSecurityScannerClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); - * $filter = 'filter'; - * // Iterate over pages of elements - * $pagedResponse = $webSecurityScannerClient->listFindings($formattedParent, $filter); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $webSecurityScannerClient->listFindings($formattedParent, $filter); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $webSecurityScannerClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name, which should be a scan run resource name in the - * format - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * @param string $filter Required. The filter expression. The expression must be in the format: - * . - * Supported field: 'finding_type'. - * Supported operator: '='. - * @param array $optionalArgs { - * Optional. - * - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listFindings($parent, $filter, array $optionalArgs = []) - { - $request = new ListFindingsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setFilter($filter); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListFindings', $optionalArgs, ListFindingsResponse::class, $request); - } - - /** - * Lists ScanConfigs under a given project. - * - * Sample code: - * ``` - * $webSecurityScannerClient = new WebSecurityScannerClient(); - * try { - * $formattedParent = $webSecurityScannerClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $webSecurityScannerClient->listScanConfigs($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $webSecurityScannerClient->listScanConfigs($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $webSecurityScannerClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name, which should be a project resource name in the - * format 'projects/{projectId}'. - * @param array $optionalArgs { - * Optional. - * - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listScanConfigs($parent, array $optionalArgs = []) - { - $request = new ListScanConfigsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListScanConfigs', $optionalArgs, ListScanConfigsResponse::class, $request); - } - - /** - * Lists ScanRuns under a given ScanConfig, in descending order of ScanRun - * stop time. - * - * Sample code: - * ``` - * $webSecurityScannerClient = new WebSecurityScannerClient(); - * try { - * $formattedParent = $webSecurityScannerClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); - * // Iterate over pages of elements - * $pagedResponse = $webSecurityScannerClient->listScanRuns($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $webSecurityScannerClient->listScanRuns($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $webSecurityScannerClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name, which should be a scan resource name in the - * format 'projects/{projectId}/scanConfigs/{scanConfigId}'. - * @param array $optionalArgs { - * Optional. - * - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listScanRuns($parent, array $optionalArgs = []) - { - $request = new ListScanRunsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListScanRuns', $optionalArgs, ListScanRunsResponse::class, $request); - } - - /** - * Start a ScanRun according to the given ScanConfig. - * - * Sample code: - * ``` - * $webSecurityScannerClient = new WebSecurityScannerClient(); - * try { - * $formattedName = $webSecurityScannerClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); - * $response = $webSecurityScannerClient->startScanRun($formattedName); - * } finally { - * $webSecurityScannerClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the ScanConfig to be used. The name follows the - * format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanRun - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function startScanRun($name, array $optionalArgs = []) - { - $request = new StartScanRunRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('StartScanRun', ScanRun::class, $optionalArgs, $request)->wait(); - } - - /** - * Stops a ScanRun. The stopped ScanRun is returned. - * - * Sample code: - * ``` - * $webSecurityScannerClient = new WebSecurityScannerClient(); - * try { - * $formattedName = $webSecurityScannerClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); - * $response = $webSecurityScannerClient->stopScanRun($formattedName); - * } finally { - * $webSecurityScannerClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the ScanRun to be stopped. The name follows the - * format of - * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanRun - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function stopScanRun($name, array $optionalArgs = []) - { - $request = new StopScanRunRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('StopScanRun', ScanRun::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a ScanConfig. This method support partial update of a ScanConfig. - * - * Sample code: - * ``` - * $webSecurityScannerClient = new WebSecurityScannerClient(); - * try { - * $scanConfig = new ScanConfig(); - * $updateMask = new FieldMask(); - * $response = $webSecurityScannerClient->updateScanConfig($scanConfig, $updateMask); - * } finally { - * $webSecurityScannerClient->close(); - * } - * ``` - * - * @param ScanConfig $scanConfig Required. The ScanConfig to be updated. The name field must be set to identify the - * resource to be updated. The values of fields not covered by the mask - * will be ignored. - * @param FieldMask $updateMask Required. The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateScanConfig($scanConfig, $updateMask, array $optionalArgs = []) - { - $request = new UpdateScanConfigRequest(); - $requestParamHeaders = []; - $request->setScanConfig($scanConfig); - $request->setUpdateMask($updateMask); - $requestParamHeaders['scan_config.name'] = $scanConfig->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateScanConfig', ScanConfig::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/WebSecurityScannerClient.php b/owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/WebSecurityScannerClient.php deleted file mode 100644 index 4db8a8ac330b..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/WebSecurityScannerClient.php +++ /dev/null @@ -1,36 +0,0 @@ - [ - 'google.cloud.websecurityscanner.v1beta.WebSecurityScanner' => [ - 'ListCrawledUrls' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCrawledUrls', - ], - ], - 'ListFindings' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getFindings', - ], - ], - 'ListScanConfigs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getScanConfigs', - ], - ], - 'ListScanRuns' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getScanRuns', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/resources/web_security_scanner_rest_client_config.php b/owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/resources/web_security_scanner_rest_client_config.php deleted file mode 100644 index e3cc5c7648f0..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/src/V1beta/resources/web_security_scanner_rest_client_config.php +++ /dev/null @@ -1,163 +0,0 @@ - [ - 'google.cloud.websecurityscanner.v1beta.WebSecurityScanner' => [ - 'CreateScanConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*}/scanConfigs', - 'body' => 'scan_config', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteScanConfig' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1beta/{name=projects/*/scanConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetFinding' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*/findings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetScanConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/scanConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetScanRun' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListCrawledUrls' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/crawledUrls', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListFindingTypeStats' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/findingTypeStats', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListFindings' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/findings', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'filter', - ], - ], - 'ListScanConfigs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{parent=projects/*}/scanConfigs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListScanRuns' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{parent=projects/*/scanConfigs/*}/scanRuns', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'StartScanRun' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{name=projects/*/scanConfigs/*}:start', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'StopScanRun' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*}:stop', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateScanConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1beta/{scan_config.name=projects/*/scanConfigs/*}', - 'body' => 'scan_config', - 'placeholders' => [ - 'scan_config.name' => [ - 'getters' => [ - 'getScanConfig', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/WebSecurityScanner/v1beta/tests/Unit/V1beta/WebSecurityScannerClientTest.php b/owl-bot-staging/WebSecurityScanner/v1beta/tests/Unit/V1beta/WebSecurityScannerClientTest.php deleted file mode 100644 index 16620a2ae074..000000000000 --- a/owl-bot-staging/WebSecurityScanner/v1beta/tests/Unit/V1beta/WebSecurityScannerClientTest.php +++ /dev/null @@ -1,960 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return WebSecurityScannerClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new WebSecurityScannerClient($options); - } - - /** @test */ - public function createScanConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $maxQps = 844445913; - $expectedResponse = new ScanConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setMaxQps($maxQps); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $scanConfig = new ScanConfig(); - $scanConfigDisplayName = 'scanConfigDisplayName-609132338'; - $scanConfig->setDisplayName($scanConfigDisplayName); - $scanConfigStartingUrls = []; - $scanConfig->setStartingUrls($scanConfigStartingUrls); - $response = $gapicClient->createScanConfig($formattedParent, $scanConfig); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/CreateScanConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getScanConfig(); - $this->assertProtobufEquals($scanConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createScanConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $scanConfig = new ScanConfig(); - $scanConfigDisplayName = 'scanConfigDisplayName-609132338'; - $scanConfig->setDisplayName($scanConfigDisplayName); - $scanConfigStartingUrls = []; - $scanConfig->setStartingUrls($scanConfigStartingUrls); - try { - $gapicClient->createScanConfig($formattedParent, $scanConfig); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteScanConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); - $gapicClient->deleteScanConfig($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/DeleteScanConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteScanConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); - try { - $gapicClient->deleteScanConfig($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFindingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $findingType = 'findingType274496048'; - $httpMethod = 'httpMethod820747384'; - $fuzzedUrl = 'fuzzedUrl-2120677666'; - $body = 'body3029410'; - $description = 'description-1724546052'; - $reproductionUrl = 'reproductionUrl-244934180'; - $frameUrl = 'frameUrl545464221'; - $finalUrl = 'finalUrl355601190'; - $trackingId = 'trackingId1878901667'; - $expectedResponse = new Finding(); - $expectedResponse->setName($name2); - $expectedResponse->setFindingType($findingType); - $expectedResponse->setHttpMethod($httpMethod); - $expectedResponse->setFuzzedUrl($fuzzedUrl); - $expectedResponse->setBody($body); - $expectedResponse->setDescription($description); - $expectedResponse->setReproductionUrl($reproductionUrl); - $expectedResponse->setFrameUrl($frameUrl); - $expectedResponse->setFinalUrl($finalUrl); - $expectedResponse->setTrackingId($trackingId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->findingName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]', '[FINDING]'); - $response = $gapicClient->getFinding($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/GetFinding', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFindingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->findingName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]', '[FINDING]'); - try { - $gapicClient->getFinding($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getScanConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $maxQps = 844445913; - $expectedResponse = new ScanConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setMaxQps($maxQps); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); - $response = $gapicClient->getScanConfig($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/GetScanConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getScanConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); - try { - $gapicClient->getScanConfig($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getScanRunTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $urlsCrawledCount = 1749797253; - $urlsTestedCount = 1498664068; - $hasVulnerabilities = false; - $progressPercent = 2137894861; - $expectedResponse = new ScanRun(); - $expectedResponse->setName($name2); - $expectedResponse->setUrlsCrawledCount($urlsCrawledCount); - $expectedResponse->setUrlsTestedCount($urlsTestedCount); - $expectedResponse->setHasVulnerabilities($hasVulnerabilities); - $expectedResponse->setProgressPercent($progressPercent); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); - $response = $gapicClient->getScanRun($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/GetScanRun', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getScanRunExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); - try { - $gapicClient->getScanRun($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCrawledUrlsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $crawledUrlsElement = new CrawledUrl(); - $crawledUrls = [ - $crawledUrlsElement, - ]; - $expectedResponse = new ListCrawledUrlsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCrawledUrls($crawledUrls); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); - $response = $gapicClient->listCrawledUrls($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCrawledUrls()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListCrawledUrls', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCrawledUrlsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); - try { - $gapicClient->listCrawledUrls($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFindingTypeStatsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListFindingTypeStatsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); - $response = $gapicClient->listFindingTypeStats($formattedParent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListFindingTypeStats', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFindingTypeStatsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); - try { - $gapicClient->listFindingTypeStats($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFindingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $findingsElement = new Finding(); - $findings = [ - $findingsElement, - ]; - $expectedResponse = new ListFindingsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFindings($findings); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); - $filter = 'filter-1274492040'; - $response = $gapicClient->listFindings($formattedParent, $filter); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFindings()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListFindings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getFilter(); - $this->assertProtobufEquals($filter, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFindingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); - $filter = 'filter-1274492040'; - try { - $gapicClient->listFindings($formattedParent, $filter); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listScanConfigsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $scanConfigsElement = new ScanConfig(); - $scanConfigs = [ - $scanConfigsElement, - ]; - $expectedResponse = new ListScanConfigsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setScanConfigs($scanConfigs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listScanConfigs($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getScanConfigs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListScanConfigs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listScanConfigsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - try { - $gapicClient->listScanConfigs($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listScanRunsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $scanRunsElement = new ScanRun(); - $scanRuns = [ - $scanRunsElement, - ]; - $expectedResponse = new ListScanRunsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setScanRuns($scanRuns); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); - $response = $gapicClient->listScanRuns($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getScanRuns()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListScanRuns', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listScanRunsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); - try { - $gapicClient->listScanRuns($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function startScanRunTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $urlsCrawledCount = 1749797253; - $urlsTestedCount = 1498664068; - $hasVulnerabilities = false; - $progressPercent = 2137894861; - $expectedResponse = new ScanRun(); - $expectedResponse->setName($name2); - $expectedResponse->setUrlsCrawledCount($urlsCrawledCount); - $expectedResponse->setUrlsTestedCount($urlsTestedCount); - $expectedResponse->setHasVulnerabilities($hasVulnerabilities); - $expectedResponse->setProgressPercent($progressPercent); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); - $response = $gapicClient->startScanRun($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/StartScanRun', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function startScanRunExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->scanConfigName('[PROJECT]', '[SCAN_CONFIG]'); - try { - $gapicClient->startScanRun($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function stopScanRunTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $urlsCrawledCount = 1749797253; - $urlsTestedCount = 1498664068; - $hasVulnerabilities = false; - $progressPercent = 2137894861; - $expectedResponse = new ScanRun(); - $expectedResponse->setName($name2); - $expectedResponse->setUrlsCrawledCount($urlsCrawledCount); - $expectedResponse->setUrlsTestedCount($urlsTestedCount); - $expectedResponse->setHasVulnerabilities($hasVulnerabilities); - $expectedResponse->setProgressPercent($progressPercent); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); - $response = $gapicClient->stopScanRun($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/StopScanRun', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function stopScanRunExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->scanRunName('[PROJECT]', '[SCAN_CONFIG]', '[SCAN_RUN]'); - try { - $gapicClient->stopScanRun($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateScanConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $maxQps = 844445913; - $expectedResponse = new ScanConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setMaxQps($maxQps); - $transport->addResponse($expectedResponse); - // Mock request - $scanConfig = new ScanConfig(); - $scanConfigDisplayName = 'scanConfigDisplayName-609132338'; - $scanConfig->setDisplayName($scanConfigDisplayName); - $scanConfigStartingUrls = []; - $scanConfig->setStartingUrls($scanConfigStartingUrls); - $updateMask = new FieldMask(); - $response = $gapicClient->updateScanConfig($scanConfig, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/UpdateScanConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getScanConfig(); - $this->assertProtobufEquals($scanConfig, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateScanConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $scanConfig = new ScanConfig(); - $scanConfigDisplayName = 'scanConfigDisplayName-609132338'; - $scanConfig->setDisplayName($scanConfigDisplayName); - $scanConfigStartingUrls = []; - $scanConfig->setStartingUrls($scanConfigStartingUrls); - $updateMask = new FieldMask(); - try { - $gapicClient->updateScanConfig($scanConfig, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/cancel_execution.php b/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/cancel_execution.php deleted file mode 100644 index cdb9e9234478..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/cancel_execution.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Execution $response */ - $response = $executionsClient->cancelExecution($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ExecutionsClient::executionName( - '[PROJECT]', - '[LOCATION]', - '[WORKFLOW]', - '[EXECUTION]' - ); - - cancel_execution_sample($formattedName); -} -// [END workflowexecutions_v1_generated_Executions_CancelExecution_sync] diff --git a/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/create_execution.php b/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/create_execution.php deleted file mode 100644 index 0b317eb189cc..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/create_execution.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($formattedParent) - ->setExecution($execution); - - // Call the API and handle any network failures. - try { - /** @var Execution $response */ - $response = $executionsClient->createExecution($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ExecutionsClient::workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - - create_execution_sample($formattedParent); -} -// [END workflowexecutions_v1_generated_Executions_CreateExecution_sync] diff --git a/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/get_execution.php b/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/get_execution.php deleted file mode 100644 index c13b2df91460..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/get_execution.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Execution $response */ - $response = $executionsClient->getExecution($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ExecutionsClient::executionName( - '[PROJECT]', - '[LOCATION]', - '[WORKFLOW]', - '[EXECUTION]' - ); - - get_execution_sample($formattedName); -} -// [END workflowexecutions_v1_generated_Executions_GetExecution_sync] diff --git a/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/list_executions.php b/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/list_executions.php deleted file mode 100644 index 2a9f644e779e..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1/samples/V1/ExecutionsClient/list_executions.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $executionsClient->listExecutions($request); - - /** @var Execution $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ExecutionsClient::workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - - list_executions_sample($formattedParent); -} -// [END workflowexecutions_v1_generated_Executions_ListExecutions_sync] diff --git a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/GPBMetadata/Google/Cloud/Workflows/Executions/V1Beta/Executions.php b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/GPBMetadata/Google/Cloud/Workflows/Executions/V1Beta/Executions.php deleted file mode 100644 index 9e6db986aa75114b43d2ce37a731288f062dd1cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3803 zcmb_fO;g)O7_N*B_-zA3X^87XE1b;4xL^%%=wLz;*%piw1D@DGr}d0Sme)p&kW^_6 zNj$#f&_B>W&_n-9FTJ(BaY|=$%AuEBI_;&q`dAA?r^b{Evb68l^FGhJyAK{&M;6=_ zwvmBs1*4YGd@0}~Bv`hIP1V$eX1Co&wxF8FmZl>+D+t9sVRx@4$i-4^ftWgG*H%$Z z=$K|lN202m-IjQ2+Rxj%dFqJh1yZ|MGYv;PS!p7ygx+M`C;*0Xj2uf*k+5CK?~pYu z1uOM!*I~Ut9o7#6hjp1btRJl8$>I$FRaYEG7<_>q2;|S|Hg!!E9IRmS@1Eu~G(*Fh zqHC{6rJF)q(H%t0FRpEO4V5M>P=h@~Md?Ms^GVmLmjs+fej+ z5jm=@S=h8IWN9wfL6|{I-=r7)u+*K_7Sdjhx!i>$HwA2WQ8>CF*a&xRW5dmxI_R^f z`XvBLmR6Sx!=xyXHso@Hng%ZZ&9I#+0u~S%A+IYL^JKHnLa~4okmWQVPDe- ziLi2PT^`Zx+44ip?~v4Lv4(6BVy78|6wv$d_dKkR&1gRDnPy!vWSJPU12JShF(mK! zK@>|P(xF&;qDX!g`p~9;Hkv-7{(?_J3v3^@AzN2ogqI=?u<;h8{)|GLsfE7@QL4ZM zCvfR_e&UTZ!LI=jEN$GNmWc@Y@ZoAQ>sJ-H%`(V6qZOD&M$0pq7|mn{VwCwP5hd$q zR@Z|N{|Q`{rJt=*2VMqqFs;~~?lFNe5u?@cw_uWh)75celK%FVk*LVFO*=8=W;s?= znL6;?Ex^Y?iyJmN(HtVPhSo|h`9#*EKFI-OWjmj9^CYWY7$buz%I=3R1IQo zMf`2JS*=Mmxv{@nt;mJaR!J_-eZT`uN`+eKK%V3H8xXJV7YedmB%dPm)0R{!ljjNg zsUYnZZaFs3uBBYV7RZa`5YMuO2;_=1fnMzI`zr+#TaBeAm+5`TdEjLitnKb9Yv&00)|H8pXVZrd5qc+HSxUZwJJMwD|?cX89~RYET_6T<+zMrV{-pziEU7< zo5MTRuTu61W6Q~j;_2zB-&nSdDP4Tz-J6yzUBPYBKF+`AV2SL;BXb}>JD3p_dL5~7 zUzNR6lz(cYdwa(WDQ}RiNK(0QIkTD@gB4cuourJi6F*>rALGo>oFvxRT)WQ><4fM{ XCv;h&$3;!O}G+ diff --git a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/CancelExecutionRequest.php b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/CancelExecutionRequest.php deleted file mode 100644 index 28c9ab2611dc..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/CancelExecutionRequest.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.workflows.executions.v1beta.CancelExecutionRequest - */ -class CancelExecutionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the execution to be cancelled. - * Format: - * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the execution to be cancelled. - * Format: - * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Workflows\Executions\V1Beta\Executions::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the execution to be cancelled. - * Format: - * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the execution to be cancelled. - * Format: - * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/CreateExecutionRequest.php b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/CreateExecutionRequest.php deleted file mode 100644 index 0ce4e08aa9b5..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/CreateExecutionRequest.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.workflows.executions.v1beta.CreateExecutionRequest - */ -class CreateExecutionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the workflow for which an execution should be created. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * The latest revision of the workflow will be used. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Execution to be created. - * - * Generated from protobuf field .google.cloud.workflows.executions.v1beta.Execution execution = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $execution = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the workflow for which an execution should be created. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * The latest revision of the workflow will be used. - * @type \Google\Cloud\Workflows\Executions\V1beta\Execution $execution - * Required. Execution to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Workflows\Executions\V1Beta\Executions::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the workflow for which an execution should be created. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * The latest revision of the workflow will be used. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Name of the workflow for which an execution should be created. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * The latest revision of the workflow will be used. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Execution to be created. - * - * Generated from protobuf field .google.cloud.workflows.executions.v1beta.Execution execution = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Workflows\Executions\V1beta\Execution|null - */ - public function getExecution() - { - return $this->execution; - } - - public function hasExecution() - { - return isset($this->execution); - } - - public function clearExecution() - { - unset($this->execution); - } - - /** - * Required. Execution to be created. - * - * Generated from protobuf field .google.cloud.workflows.executions.v1beta.Execution execution = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Workflows\Executions\V1beta\Execution $var - * @return $this - */ - public function setExecution($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Workflows\Executions\V1beta\Execution::class); - $this->execution = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution.php b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution.php deleted file mode 100644 index a7c7ff753389..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution.php +++ /dev/null @@ -1,359 +0,0 @@ -google.cloud.workflows.executions.v1beta.Execution - */ -class Execution extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the execution. - * Format: - * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Marks the beginning of execution. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. Marks the end of execution, successful or not. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Current state of the execution. - * - * Generated from protobuf field .google.cloud.workflows.executions.v1beta.Execution.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Input parameters of the execution represented as a JSON string. - * The size limit is 32KB. - * - * Generated from protobuf field string argument = 5; - */ - protected $argument = ''; - /** - * Output only. Output of the execution represented as a JSON string. The - * value can only be present if the execution's state is `SUCCEEDED`. - * - * Generated from protobuf field string result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $result = ''; - /** - * Output only. The error which caused the execution to finish prematurely. - * The value is only present if the execution's state is `FAILED` - * or `CANCELLED`. - * - * Generated from protobuf field .google.cloud.workflows.executions.v1beta.Execution.Error error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - /** - * Output only. Revision of the workflow this execution is using. - * - * Generated from protobuf field string workflow_revision_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $workflow_revision_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the execution. - * Format: - * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} - * @type \Google\Protobuf\Timestamp $start_time - * Output only. Marks the beginning of execution. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. Marks the end of execution, successful or not. - * @type int $state - * Output only. Current state of the execution. - * @type string $argument - * Input parameters of the execution represented as a JSON string. - * The size limit is 32KB. - * @type string $result - * Output only. Output of the execution represented as a JSON string. The - * value can only be present if the execution's state is `SUCCEEDED`. - * @type \Google\Cloud\Workflows\Executions\V1beta\Execution\Error $error - * Output only. The error which caused the execution to finish prematurely. - * The value is only present if the execution's state is `FAILED` - * or `CANCELLED`. - * @type string $workflow_revision_id - * Output only. Revision of the workflow this execution is using. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Workflows\Executions\V1Beta\Executions::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the execution. - * Format: - * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of the execution. - * Format: - * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Marks the beginning of execution. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Output only. Marks the beginning of execution. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Output only. Marks the end of execution, successful or not. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. Marks the end of execution, successful or not. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Current state of the execution. - * - * Generated from protobuf field .google.cloud.workflows.executions.v1beta.Execution.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the execution. - * - * Generated from protobuf field .google.cloud.workflows.executions.v1beta.Execution.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Workflows\Executions\V1beta\Execution\State::class); - $this->state = $var; - - return $this; - } - - /** - * Input parameters of the execution represented as a JSON string. - * The size limit is 32KB. - * - * Generated from protobuf field string argument = 5; - * @return string - */ - public function getArgument() - { - return $this->argument; - } - - /** - * Input parameters of the execution represented as a JSON string. - * The size limit is 32KB. - * - * Generated from protobuf field string argument = 5; - * @param string $var - * @return $this - */ - public function setArgument($var) - { - GPBUtil::checkString($var, True); - $this->argument = $var; - - return $this; - } - - /** - * Output only. Output of the execution represented as a JSON string. The - * value can only be present if the execution's state is `SUCCEEDED`. - * - * Generated from protobuf field string result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getResult() - { - return $this->result; - } - - /** - * Output only. Output of the execution represented as a JSON string. The - * value can only be present if the execution's state is `SUCCEEDED`. - * - * Generated from protobuf field string result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setResult($var) - { - GPBUtil::checkString($var, True); - $this->result = $var; - - return $this; - } - - /** - * Output only. The error which caused the execution to finish prematurely. - * The value is only present if the execution's state is `FAILED` - * or `CANCELLED`. - * - * Generated from protobuf field .google.cloud.workflows.executions.v1beta.Execution.Error error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Workflows\Executions\V1beta\Execution\Error|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. The error which caused the execution to finish prematurely. - * The value is only present if the execution's state is `FAILED` - * or `CANCELLED`. - * - * Generated from protobuf field .google.cloud.workflows.executions.v1beta.Execution.Error error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Workflows\Executions\V1beta\Execution\Error $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Workflows\Executions\V1beta\Execution\Error::class); - $this->error = $var; - - return $this; - } - - /** - * Output only. Revision of the workflow this execution is using. - * - * Generated from protobuf field string workflow_revision_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getWorkflowRevisionId() - { - return $this->workflow_revision_id; - } - - /** - * Output only. Revision of the workflow this execution is using. - * - * Generated from protobuf field string workflow_revision_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setWorkflowRevisionId($var) - { - GPBUtil::checkString($var, True); - $this->workflow_revision_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution/Error.php b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution/Error.php deleted file mode 100644 index c8f9da2bfc7f..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution/Error.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.workflows.executions.v1beta.Execution.Error - */ -class Error extends \Google\Protobuf\Internal\Message -{ - /** - * Error payload returned by the execution, represented as a JSON string. - * - * Generated from protobuf field string payload = 1; - */ - protected $payload = ''; - /** - * Human readable error context, helpful for debugging purposes. - * - * Generated from protobuf field string context = 2; - */ - protected $context = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $payload - * Error payload returned by the execution, represented as a JSON string. - * @type string $context - * Human readable error context, helpful for debugging purposes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Workflows\Executions\V1Beta\Executions::initOnce(); - parent::__construct($data); - } - - /** - * Error payload returned by the execution, represented as a JSON string. - * - * Generated from protobuf field string payload = 1; - * @return string - */ - public function getPayload() - { - return $this->payload; - } - - /** - * Error payload returned by the execution, represented as a JSON string. - * - * Generated from protobuf field string payload = 1; - * @param string $var - * @return $this - */ - public function setPayload($var) - { - GPBUtil::checkString($var, True); - $this->payload = $var; - - return $this; - } - - /** - * Human readable error context, helpful for debugging purposes. - * - * Generated from protobuf field string context = 2; - * @return string - */ - public function getContext() - { - return $this->context; - } - - /** - * Human readable error context, helpful for debugging purposes. - * - * Generated from protobuf field string context = 2; - * @param string $var - * @return $this - */ - public function setContext($var) - { - GPBUtil::checkString($var, True); - $this->context = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Error::class, \Google\Cloud\Workflows\Executions\V1beta\Execution_Error::class); - diff --git a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution/State.php b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution/State.php deleted file mode 100644 index cb9bfc9bd8b8..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/Execution/State.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.workflows.executions.v1beta.Execution.State - */ -class State -{ - /** - * Invalid state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The execution is in progress. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The execution finished successfully. - * - * Generated from protobuf enum SUCCEEDED = 2; - */ - const SUCCEEDED = 2; - /** - * The execution failed with an error. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * The execution was stopped intentionally. - * - * Generated from protobuf enum CANCELLED = 4; - */ - const CANCELLED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::CANCELLED => 'CANCELLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Workflows\Executions\V1beta\Execution_State::class); - diff --git a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ExecutionView.php b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ExecutionView.php deleted file mode 100644 index 22912dec5990..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ExecutionView.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.workflows.executions.v1beta.ExecutionView - */ -class ExecutionView -{ - /** - * The default / unset value. - * - * Generated from protobuf enum EXECUTION_VIEW_UNSPECIFIED = 0; - */ - const EXECUTION_VIEW_UNSPECIFIED = 0; - /** - * Includes only basic metadata about the execution. - * Following fields are returned: name, start_time, end_time, state - * and workflow_revision_id. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * Includes all data. - * - * Generated from protobuf enum FULL = 2; - */ - const FULL = 2; - - private static $valueToName = [ - self::EXECUTION_VIEW_UNSPECIFIED => 'EXECUTION_VIEW_UNSPECIFIED', - self::BASIC => 'BASIC', - self::FULL => 'FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ExecutionsGrpcClient.php b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ExecutionsGrpcClient.php deleted file mode 100644 index 99ea0d911ef1..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ExecutionsGrpcClient.php +++ /dev/null @@ -1,99 +0,0 @@ -_simpleRequest('/google.cloud.workflows.executions.v1beta.Executions/ListExecutions', - $argument, - ['\Google\Cloud\Workflows\Executions\V1beta\ListExecutionsResponse', 'decode'], - $metadata, $options); - } - - /** - * Creates a new execution using the latest revision of the given workflow. - * @param \Google\Cloud\Workflows\Executions\V1beta\CreateExecutionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateExecution(\Google\Cloud\Workflows\Executions\V1beta\CreateExecutionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.workflows.executions.v1beta.Executions/CreateExecution', - $argument, - ['\Google\Cloud\Workflows\Executions\V1beta\Execution', 'decode'], - $metadata, $options); - } - - /** - * Returns an execution of the given name. - * @param \Google\Cloud\Workflows\Executions\V1beta\GetExecutionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetExecution(\Google\Cloud\Workflows\Executions\V1beta\GetExecutionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.workflows.executions.v1beta.Executions/GetExecution', - $argument, - ['\Google\Cloud\Workflows\Executions\V1beta\Execution', 'decode'], - $metadata, $options); - } - - /** - * Cancels an execution of the given name. - * @param \Google\Cloud\Workflows\Executions\V1beta\CancelExecutionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CancelExecution(\Google\Cloud\Workflows\Executions\V1beta\CancelExecutionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.workflows.executions.v1beta.Executions/CancelExecution', - $argument, - ['\Google\Cloud\Workflows\Executions\V1beta\Execution', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/GetExecutionRequest.php b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/GetExecutionRequest.php deleted file mode 100644 index 7f1b36d86bbf..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/GetExecutionRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.workflows.executions.v1beta.GetExecutionRequest - */ -class GetExecutionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the execution to be retrieved. - * Format: - * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A view defining which fields should be filled in the returned execution. - * The API will default to the FULL view. - * - * Generated from protobuf field .google.cloud.workflows.executions.v1beta.ExecutionView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the execution to be retrieved. - * Format: - * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} - * @type int $view - * Optional. A view defining which fields should be filled in the returned execution. - * The API will default to the FULL view. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Workflows\Executions\V1Beta\Executions::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the execution to be retrieved. - * Format: - * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the execution to be retrieved. - * Format: - * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A view defining which fields should be filled in the returned execution. - * The API will default to the FULL view. - * - * Generated from protobuf field .google.cloud.workflows.executions.v1beta.ExecutionView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. A view defining which fields should be filled in the returned execution. - * The API will default to the FULL view. - * - * Generated from protobuf field .google.cloud.workflows.executions.v1beta.ExecutionView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Workflows\Executions\V1beta\ExecutionView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ListExecutionsRequest.php b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ListExecutionsRequest.php deleted file mode 100644 index 077109024a4b..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ListExecutionsRequest.php +++ /dev/null @@ -1,207 +0,0 @@ -google.cloud.workflows.executions.v1beta.ListExecutionsRequest - */ -class ListExecutionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the workflow for which the executions should be listed. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of executions to return per call. - * Max supported value depends on the selected Execution view: it's 10000 for - * BASIC and 100 for FULL. The default value used if the field is not - * specified is 100, regardless of the selected view. Values greater than - * the max value will be coerced down to it. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListExecutions` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListExecutions` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Optional. A view defining which fields should be filled in the returned executions. - * The API will default to the BASIC view. - * - * Generated from protobuf field .google.cloud.workflows.executions.v1beta.ExecutionView view = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the workflow for which the executions should be listed. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * @type int $page_size - * Maximum number of executions to return per call. - * Max supported value depends on the selected Execution view: it's 10000 for - * BASIC and 100 for FULL. The default value used if the field is not - * specified is 100, regardless of the selected view. Values greater than - * the max value will be coerced down to it. - * @type string $page_token - * A page token, received from a previous `ListExecutions` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListExecutions` must - * match the call that provided the page token. - * @type int $view - * Optional. A view defining which fields should be filled in the returned executions. - * The API will default to the BASIC view. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Workflows\Executions\V1Beta\Executions::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the workflow for which the executions should be listed. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Name of the workflow for which the executions should be listed. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of executions to return per call. - * Max supported value depends on the selected Execution view: it's 10000 for - * BASIC and 100 for FULL. The default value used if the field is not - * specified is 100, regardless of the selected view. Values greater than - * the max value will be coerced down to it. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of executions to return per call. - * Max supported value depends on the selected Execution view: it's 10000 for - * BASIC and 100 for FULL. The default value used if the field is not - * specified is 100, regardless of the selected view. Values greater than - * the max value will be coerced down to it. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListExecutions` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListExecutions` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListExecutions` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListExecutions` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. A view defining which fields should be filled in the returned executions. - * The API will default to the BASIC view. - * - * Generated from protobuf field .google.cloud.workflows.executions.v1beta.ExecutionView view = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. A view defining which fields should be filled in the returned executions. - * The API will default to the BASIC view. - * - * Generated from protobuf field .google.cloud.workflows.executions.v1beta.ExecutionView view = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Workflows\Executions\V1beta\ExecutionView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ListExecutionsResponse.php b/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ListExecutionsResponse.php deleted file mode 100644 index 9858451191f4..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1beta/proto/src/Google/Cloud/Workflows/Executions/V1beta/ListExecutionsResponse.php +++ /dev/null @@ -1,107 +0,0 @@ -google.cloud.workflows.executions.v1beta.ListExecutionsResponse - */ -class ListExecutionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The executions which match the request. - * - * Generated from protobuf field repeated .google.cloud.workflows.executions.v1beta.Execution executions = 1; - */ - private $executions; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Workflows\Executions\V1beta\Execution>|\Google\Protobuf\Internal\RepeatedField $executions - * The executions which match the request. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Workflows\Executions\V1Beta\Executions::initOnce(); - parent::__construct($data); - } - - /** - * The executions which match the request. - * - * Generated from protobuf field repeated .google.cloud.workflows.executions.v1beta.Execution executions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExecutions() - { - return $this->executions; - } - - /** - * The executions which match the request. - * - * Generated from protobuf field repeated .google.cloud.workflows.executions.v1beta.Execution executions = 1; - * @param array<\Google\Cloud\Workflows\Executions\V1beta\Execution>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExecutions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Workflows\Executions\V1beta\Execution::class); - $this->executions = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/cancel_execution.php b/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/cancel_execution.php deleted file mode 100644 index 716b3a2daf1d..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/cancel_execution.php +++ /dev/null @@ -1,73 +0,0 @@ -cancelExecution($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ExecutionsClient::executionName( - '[PROJECT]', - '[LOCATION]', - '[WORKFLOW]', - '[EXECUTION]' - ); - - cancel_execution_sample($formattedName); -} -// [END workflowexecutions_v1beta_generated_Executions_CancelExecution_sync] diff --git a/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/create_execution.php b/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/create_execution.php deleted file mode 100644 index 9f65c09d2b2e..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/create_execution.php +++ /dev/null @@ -1,71 +0,0 @@ -createExecution($formattedParent, $execution); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ExecutionsClient::workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - - create_execution_sample($formattedParent); -} -// [END workflowexecutions_v1beta_generated_Executions_CreateExecution_sync] diff --git a/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/get_execution.php b/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/get_execution.php deleted file mode 100644 index 1ff13e38f564..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/get_execution.php +++ /dev/null @@ -1,73 +0,0 @@ -getExecution($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ExecutionsClient::executionName( - '[PROJECT]', - '[LOCATION]', - '[WORKFLOW]', - '[EXECUTION]' - ); - - get_execution_sample($formattedName); -} -// [END workflowexecutions_v1beta_generated_Executions_GetExecution_sync] diff --git a/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/list_executions.php b/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/list_executions.php deleted file mode 100644 index f6ac20c7208c..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1beta/samples/V1beta/ExecutionsClient/list_executions.php +++ /dev/null @@ -1,75 +0,0 @@ -listExecutions($formattedParent); - - /** @var Execution $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ExecutionsClient::workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - - list_executions_sample($formattedParent); -} -// [END workflowexecutions_v1beta_generated_Executions_ListExecutions_sync] diff --git a/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/ExecutionsClient.php b/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/ExecutionsClient.php deleted file mode 100644 index 1e4a13ee7b14..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/ExecutionsClient.php +++ /dev/null @@ -1,36 +0,0 @@ -executionName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[EXECUTION]'); - * $response = $executionsClient->cancelExecution($formattedName); - * } finally { - * $executionsClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @experimental - */ -class ExecutionsGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.workflows.executions.v1beta.Executions'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'workflowexecutions.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $executionNameTemplate; - - private static $workflowNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/executions_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/executions_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/executions_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/executions_rest_client_config.php', - ], - ], - ]; - } - - private static function getExecutionNameTemplate() - { - if (self::$executionNameTemplate == null) { - self::$executionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}'); - } - - return self::$executionNameTemplate; - } - - private static function getWorkflowNameTemplate() - { - if (self::$workflowNameTemplate == null) { - self::$workflowNameTemplate = new PathTemplate('projects/{project}/locations/{location}/workflows/{workflow}'); - } - - return self::$workflowNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'execution' => self::getExecutionNameTemplate(), - 'workflow' => self::getWorkflowNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a execution - * resource. - * - * @param string $project - * @param string $location - * @param string $workflow - * @param string $execution - * - * @return string The formatted execution resource. - * - * @experimental - */ - public static function executionName($project, $location, $workflow, $execution) - { - return self::getExecutionNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'workflow' => $workflow, - 'execution' => $execution, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a workflow - * resource. - * - * @param string $project - * @param string $location - * @param string $workflow - * - * @return string The formatted workflow resource. - * - * @experimental - */ - public static function workflowName($project, $location, $workflow) - { - return self::getWorkflowNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'workflow' => $workflow, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - execution: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} - * - workflow: projects/{project}/locations/{location}/workflows/{workflow} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - * - * @experimental - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'workflowexecutions.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Cancels an execution of the given name. - * - * Sample code: - * ``` - * $executionsClient = new ExecutionsClient(); - * try { - * $formattedName = $executionsClient->executionName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[EXECUTION]'); - * $response = $executionsClient->cancelExecution($formattedName); - * } finally { - * $executionsClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the execution to be cancelled. - * Format: - * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Workflows\Executions\V1beta\Execution - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function cancelExecution($name, array $optionalArgs = []) - { - $request = new CancelExecutionRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CancelExecution', Execution::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a new execution using the latest revision of the given workflow. - * - * Sample code: - * ``` - * $executionsClient = new ExecutionsClient(); - * try { - * $formattedParent = $executionsClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - * $execution = new Execution(); - * $response = $executionsClient->createExecution($formattedParent, $execution); - * } finally { - * $executionsClient->close(); - * } - * ``` - * - * @param string $parent Required. Name of the workflow for which an execution should be created. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * The latest revision of the workflow will be used. - * @param Execution $execution Required. Execution to be created. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Workflows\Executions\V1beta\Execution - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createExecution($parent, $execution, array $optionalArgs = []) - { - $request = new CreateExecutionRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setExecution($execution); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateExecution', Execution::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns an execution of the given name. - * - * Sample code: - * ``` - * $executionsClient = new ExecutionsClient(); - * try { - * $formattedName = $executionsClient->executionName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[EXECUTION]'); - * $response = $executionsClient->getExecution($formattedName); - * } finally { - * $executionsClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the execution to be retrieved. - * Format: - * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution} - * @param array $optionalArgs { - * Optional. - * - * @type int $view - * Optional. A view defining which fields should be filled in the returned execution. - * The API will default to the FULL view. - * For allowed values, use constants defined on {@see \Google\Cloud\Workflows\Executions\V1beta\ExecutionView} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Workflows\Executions\V1beta\Execution - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getExecution($name, array $optionalArgs = []) - { - $request = new GetExecutionRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetExecution', Execution::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns a list of executions which belong to the workflow with - * the given name. The method returns executions of all workflow - * revisions. Returned executions are ordered by their start time (newest - * first). - * - * Sample code: - * ``` - * $executionsClient = new ExecutionsClient(); - * try { - * $formattedParent = $executionsClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - * // Iterate over pages of elements - * $pagedResponse = $executionsClient->listExecutions($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $executionsClient->listExecutions($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $executionsClient->close(); - * } - * ``` - * - * @param string $parent Required. Name of the workflow for which the executions should be listed. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $view - * Optional. A view defining which fields should be filled in the returned executions. - * The API will default to the BASIC view. - * For allowed values, use constants defined on {@see \Google\Cloud\Workflows\Executions\V1beta\ExecutionView} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listExecutions($parent, array $optionalArgs = []) - { - $request = new ListExecutionsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListExecutions', $optionalArgs, ListExecutionsResponse::class, $request); - } -} diff --git a/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/gapic_metadata.json b/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/gapic_metadata.json deleted file mode 100644 index 81c967306926..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/gapic_metadata.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.workflows.executions.v1beta", - "libraryPackage": "Google\\Cloud\\Workflows\\Executions\\V1beta", - "services": { - "Executions": { - "clients": { - "grpc": { - "libraryClient": "ExecutionsGapicClient", - "rpcs": { - "CancelExecution": { - "methods": [ - "cancelExecution" - ] - }, - "CreateExecution": { - "methods": [ - "createExecution" - ] - }, - "GetExecution": { - "methods": [ - "getExecution" - ] - }, - "ListExecutions": { - "methods": [ - "listExecutions" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_client_config.json b/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_client_config.json deleted file mode 100644 index a3c456bd2230..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_client_config.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "interfaces": { - "google.cloud.workflows.executions.v1beta.Executions": { - "retry_codes": { - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "non_idempotent": [] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CancelExecution": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateExecution": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetExecution": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListExecutions": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_descriptor_config.php b/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_descriptor_config.php deleted file mode 100644 index 0836e4ff2d47..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_descriptor_config.php +++ /dev/null @@ -1,18 +0,0 @@ - [ - 'google.cloud.workflows.executions.v1beta.Executions' => [ - 'ListExecutions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getExecutions', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_rest_client_config.php b/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_rest_client_config.php deleted file mode 100644 index 1a24fec7f007..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1beta/src/V1beta/resources/executions_rest_client_config.php +++ /dev/null @@ -1,54 +0,0 @@ - [ - 'google.cloud.workflows.executions.v1beta.Executions' => [ - 'CancelExecution' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/workflows/*/executions/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateExecution' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/workflows/*}/executions', - 'body' => 'execution', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetExecution' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/workflows/*/executions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListExecutions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/workflows/*}/executions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Workflows/Executions/v1beta/tests/Unit/V1beta/ExecutionsClientTest.php b/owl-bot-staging/Workflows/Executions/v1beta/tests/Unit/V1beta/ExecutionsClientTest.php deleted file mode 100644 index 9db7bf3fc1ab..000000000000 --- a/owl-bot-staging/Workflows/Executions/v1beta/tests/Unit/V1beta/ExecutionsClientTest.php +++ /dev/null @@ -1,332 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ExecutionsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ExecutionsClient($options); - } - - /** @test */ - public function cancelExecutionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $argument = 'argument-1589682499'; - $result = 'result-934426595'; - $workflowRevisionId = 'workflowRevisionId-1453295745'; - $expectedResponse = new Execution(); - $expectedResponse->setName($name2); - $expectedResponse->setArgument($argument); - $expectedResponse->setResult($result); - $expectedResponse->setWorkflowRevisionId($workflowRevisionId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[EXECUTION]'); - $response = $gapicClient->cancelExecution($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.workflows.executions.v1beta.Executions/CancelExecution', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cancelExecutionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[EXECUTION]'); - try { - $gapicClient->cancelExecution($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createExecutionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $argument = 'argument-1589682499'; - $result = 'result-934426595'; - $workflowRevisionId = 'workflowRevisionId-1453295745'; - $expectedResponse = new Execution(); - $expectedResponse->setName($name); - $expectedResponse->setArgument($argument); - $expectedResponse->setResult($result); - $expectedResponse->setWorkflowRevisionId($workflowRevisionId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - $execution = new Execution(); - $response = $gapicClient->createExecution($formattedParent, $execution); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.workflows.executions.v1beta.Executions/CreateExecution', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getExecution(); - $this->assertProtobufEquals($execution, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createExecutionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - $execution = new Execution(); - try { - $gapicClient->createExecution($formattedParent, $execution); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getExecutionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $argument = 'argument-1589682499'; - $result = 'result-934426595'; - $workflowRevisionId = 'workflowRevisionId-1453295745'; - $expectedResponse = new Execution(); - $expectedResponse->setName($name2); - $expectedResponse->setArgument($argument); - $expectedResponse->setResult($result); - $expectedResponse->setWorkflowRevisionId($workflowRevisionId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[EXECUTION]'); - $response = $gapicClient->getExecution($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.workflows.executions.v1beta.Executions/GetExecution', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getExecutionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[WORKFLOW]', '[EXECUTION]'); - try { - $gapicClient->getExecution($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExecutionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $executionsElement = new Execution(); - $executions = [ - $executionsElement, - ]; - $expectedResponse = new ListExecutionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setExecutions($executions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - $response = $gapicClient->listExecutions($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getExecutions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.workflows.executions.v1beta.Executions/ListExecutions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExecutionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - try { - $gapicClient->listExecutions($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Workflows/v1beta/proto/src/GPBMetadata/Google/Cloud/Workflows/V1Beta/Workflows.php b/owl-bot-staging/Workflows/v1beta/proto/src/GPBMetadata/Google/Cloud/Workflows/V1Beta/Workflows.php deleted file mode 100644 index a0693520bcad216d4bd8e88bb0fc3172df9a901b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4084 zcmbtXL37(g6t0sd#A_PbrJ1^6Iw)>unr0Gdl6D4An-)27LS~Z2)28hV;~9@EuN@It z64J^cWPAWF+_`b*M1KQ6phw`;Qx9B#Ur-JVZ?)RB?6}y5Tq0}VdwTDC@B4Q5-UI*8 zN7t2Y;*!9mq^{IX6naP$Kk%q$d5%(x8VwRCme=xahXkskZ0;)$_YaiP=FY(axQ1R7 zSVUKvp4W7UW;tF|*N(m5sNs0Wq1Ill5o&f{sBvV3T(d<&-?WIbT`ul{N!_GoWjhX1 z*Q)72ta+(pQ8%rI2s0y;$s{P|JMu`MN}CWU`D?67LPHnmO1{t_x$R~n`h z67W82+lX9?+McU0hke%~i?IG#m z)%7N!5=!=F@mBI#7S3)ci#$hNKa=FTLW78;zpf|&p;6%8jq_#!I`XM905rq5D~9WO z3h6%IW*h07mVlnh$Le(a+15A+YBPtwcTcA-)F-* zUXikQan^fgcr<#(()YlIp`~WaAM6{?%gTK_nGT~~m&33H4Imza)B+*RY1|G78a<K!a^+YRm+31c4?SLY~ho0^D8Kq4v|BX zN8}{w*abAzHl2v@Ug;AbW(rGaDuy1v2n2T zv~)3}*Z(j~w9uVz-dY&zP=$?16TQUupc9`Fi-y{1^3>5B&*Ivkor=d!cl*&!Mbu95 z0?NtS>ZI^}23_8@Ln@+&kI3f{&>eq-rhPMj+IexsTd$0Xzl`f>LBtOe$Yp}NNe=iD z%KB!LR72Q_Vl1XG6dJ#x-Vt%*;mzV%G~KWr*i-ln;)`g;3+g1O)=uKt%ND-Mpt-)} zLLXF~U>#*eNg*W2Mxb(Y#2H|HcgYvDn#zc?3n&-4zyRyetT~KhlZ)BH9>Uv1;v?Ys zAkEb-I5Meza0I@E=TOr|%rfyxg!~_f-$ygz%Q4_%putEy!9+m>V4}d(B^HH=LK)3% z5{FRIpYDG~;9Ef8Nvs(CA=70r5gfY=4I0R`h>36l#aRWDyJ6vn47wyYR&gN15GJij zJe9Lyq!8j|G(+4vmrXWG|0=zg07wS)#Rgg~h(ykQc}nXvYH24w|W zA^s_YF7)sM57WOM>tx{O?+hVKpA)BEq4@PLzkN4x8?TB}?kU%abty|rDLGn7$<1-1fUG@#>rbKh8^U{bnWc+&u&GvE@55un4TqJ!> z)R{V0sB->5@8VR~3*%#}O96OkyvG}|EEp{xfZ8vNYpD~*fZ6{QYV9Tb&{})VN36BQ zyRy_Rb+Fi}n6%*qtzsK3zyU;z z?%)$varT+GxR%+4v7Gtz0k;$google.cloud.workflows.v1beta.CreateWorkflowRequest - */ -class CreateWorkflowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Project and location in which the workflow should be created. - * Format: projects/{project}/locations/{location} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Workflow to be created. - * - * Generated from protobuf field .google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $workflow = null; - /** - * Required. The ID of the workflow to be created. It has to fulfill the - * following requirements: - * * Must contain only letters, numbers, underscores and hyphens. - * * Must start with a letter. - * * Must be between 1-64 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project and location. - * - * Generated from protobuf field string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $workflow_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Project and location in which the workflow should be created. - * Format: projects/{project}/locations/{location} - * @type \Google\Cloud\Workflows\V1beta\Workflow $workflow - * Required. Workflow to be created. - * @type string $workflow_id - * Required. The ID of the workflow to be created. It has to fulfill the - * following requirements: - * * Must contain only letters, numbers, underscores and hyphens. - * * Must start with a letter. - * * Must be between 1-64 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project and location. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Workflows\V1Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * Required. Project and location in which the workflow should be created. - * Format: projects/{project}/locations/{location} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Project and location in which the workflow should be created. - * Format: projects/{project}/locations/{location} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Workflow to be created. - * - * Generated from protobuf field .google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Workflows\V1beta\Workflow|null - */ - public function getWorkflow() - { - return $this->workflow; - } - - public function hasWorkflow() - { - return isset($this->workflow); - } - - public function clearWorkflow() - { - unset($this->workflow); - } - - /** - * Required. Workflow to be created. - * - * Generated from protobuf field .google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Workflows\V1beta\Workflow $var - * @return $this - */ - public function setWorkflow($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Workflows\V1beta\Workflow::class); - $this->workflow = $var; - - return $this; - } - - /** - * Required. The ID of the workflow to be created. It has to fulfill the - * following requirements: - * * Must contain only letters, numbers, underscores and hyphens. - * * Must start with a letter. - * * Must be between 1-64 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project and location. - * - * Generated from protobuf field string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getWorkflowId() - { - return $this->workflow_id; - } - - /** - * Required. The ID of the workflow to be created. It has to fulfill the - * following requirements: - * * Must contain only letters, numbers, underscores and hyphens. - * * Must start with a letter. - * * Must be between 1-64 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project and location. - * - * Generated from protobuf field string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setWorkflowId($var) - { - GPBUtil::checkString($var, True); - $this->workflow_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/DeleteWorkflowRequest.php b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/DeleteWorkflowRequest.php deleted file mode 100644 index 8eed6f4b51e7..000000000000 --- a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/DeleteWorkflowRequest.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.workflows.v1beta.DeleteWorkflowRequest - */ -class DeleteWorkflowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the workflow to be deleted. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the workflow to be deleted. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Workflows\V1Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the workflow to be deleted. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the workflow to be deleted. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/GetWorkflowRequest.php b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/GetWorkflowRequest.php deleted file mode 100644 index aa97008d3024..000000000000 --- a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/GetWorkflowRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.workflows.v1beta.GetWorkflowRequest - */ -class GetWorkflowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the workflow which information should be retrieved. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the workflow which information should be retrieved. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Workflows\V1Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the workflow which information should be retrieved. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the workflow which information should be retrieved. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/ListWorkflowsRequest.php b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/ListWorkflowsRequest.php deleted file mode 100644 index a7864f89afd7..000000000000 --- a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/ListWorkflowsRequest.php +++ /dev/null @@ -1,245 +0,0 @@ -google.cloud.workflows.v1beta.ListWorkflowsRequest - */ -class ListWorkflowsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Project and location from which the workflows should be listed. - * Format: projects/{project}/locations/{location} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of workflows to return per call. The service may return - * fewer than this value. If the value is not specified, a default value of - * 500 will be used. The maximum permitted value is 1000 and values greater - * than 1000 will be coerced down to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListWorkflows` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListWorkflows` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filter to restrict results to specific workflows. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Comma-separated list of fields that that specify the order of the results. - * Default sorting order for a field is ascending. To specify descending order - * for a field, append a " desc" suffix. - * If not specified, the results will be returned in an unspecified order. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Project and location from which the workflows should be listed. - * Format: projects/{project}/locations/{location} - * @type int $page_size - * Maximum number of workflows to return per call. The service may return - * fewer than this value. If the value is not specified, a default value of - * 500 will be used. The maximum permitted value is 1000 and values greater - * than 1000 will be coerced down to 1000. - * @type string $page_token - * A page token, received from a previous `ListWorkflows` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListWorkflows` must - * match the call that provided the page token. - * @type string $filter - * Filter to restrict results to specific workflows. - * @type string $order_by - * Comma-separated list of fields that that specify the order of the results. - * Default sorting order for a field is ascending. To specify descending order - * for a field, append a " desc" suffix. - * If not specified, the results will be returned in an unspecified order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Workflows\V1Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * Required. Project and location from which the workflows should be listed. - * Format: projects/{project}/locations/{location} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Project and location from which the workflows should be listed. - * Format: projects/{project}/locations/{location} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of workflows to return per call. The service may return - * fewer than this value. If the value is not specified, a default value of - * 500 will be used. The maximum permitted value is 1000 and values greater - * than 1000 will be coerced down to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of workflows to return per call. The service may return - * fewer than this value. If the value is not specified, a default value of - * 500 will be used. The maximum permitted value is 1000 and values greater - * than 1000 will be coerced down to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListWorkflows` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListWorkflows` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListWorkflows` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListWorkflows` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filter to restrict results to specific workflows. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filter to restrict results to specific workflows. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Comma-separated list of fields that that specify the order of the results. - * Default sorting order for a field is ascending. To specify descending order - * for a field, append a " desc" suffix. - * If not specified, the results will be returned in an unspecified order. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Comma-separated list of fields that that specify the order of the results. - * Default sorting order for a field is ascending. To specify descending order - * for a field, append a " desc" suffix. - * If not specified, the results will be returned in an unspecified order. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/ListWorkflowsResponse.php b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/ListWorkflowsResponse.php deleted file mode 100644 index 50f2cadd0328..000000000000 --- a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/ListWorkflowsResponse.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.workflows.v1beta.ListWorkflowsResponse - */ -class ListWorkflowsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The workflows which match the request. - * - * Generated from protobuf field repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - private $workflows; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Unreachable resources. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Workflows\V1beta\Workflow>|\Google\Protobuf\Internal\RepeatedField $workflows - * The workflows which match the request. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Unreachable resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Workflows\V1Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * The workflows which match the request. - * - * Generated from protobuf field repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWorkflows() - { - return $this->workflows; - } - - /** - * The workflows which match the request. - * - * Generated from protobuf field repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - * @param array<\Google\Cloud\Workflows\V1beta\Workflow>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWorkflows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Workflows\V1beta\Workflow::class); - $this->workflows = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Unreachable resources. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Unreachable resources. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/OperationMetadata.php b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/OperationMetadata.php deleted file mode 100644 index b4e7df568749..000000000000 --- a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/OperationMetadata.php +++ /dev/null @@ -1,223 +0,0 @@ -google.cloud.workflows.v1beta.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3; - */ - protected $target = ''; - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - */ - protected $verb = ''; - /** - * API version used to start the operation. - * - * Generated from protobuf field string api_version = 5; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * The time the operation finished running. - * @type string $target - * Server-defined resource path for the target of the operation. - * @type string $verb - * Name of the verb executed by the operation. - * @type string $api_version - * API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Workflows\V1Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * API version used to start the operation. - * - * Generated from protobuf field string api_version = 5; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * API version used to start the operation. - * - * Generated from protobuf field string api_version = 5; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/UpdateWorkflowRequest.php b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/UpdateWorkflowRequest.php deleted file mode 100644 index eedfd1e55dd6..000000000000 --- a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/UpdateWorkflowRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.workflows.v1beta.UpdateWorkflowRequest - */ -class UpdateWorkflowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Workflow to be updated. - * - * Generated from protobuf field .google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $workflow = null; - /** - * List of fields to be updated. If not present, the entire workflow - * will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Workflows\V1beta\Workflow $workflow - * Required. Workflow to be updated. - * @type \Google\Protobuf\FieldMask $update_mask - * List of fields to be updated. If not present, the entire workflow - * will be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Workflows\V1Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * Required. Workflow to be updated. - * - * Generated from protobuf field .google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Workflows\V1beta\Workflow|null - */ - public function getWorkflow() - { - return $this->workflow; - } - - public function hasWorkflow() - { - return isset($this->workflow); - } - - public function clearWorkflow() - { - unset($this->workflow); - } - - /** - * Required. Workflow to be updated. - * - * Generated from protobuf field .google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Workflows\V1beta\Workflow $var - * @return $this - */ - public function setWorkflow($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Workflows\V1beta\Workflow::class); - $this->workflow = $var; - - return $this; - } - - /** - * List of fields to be updated. If not present, the entire workflow - * will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * List of fields to be updated. If not present, the entire workflow - * will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/Workflow.php b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/Workflow.php deleted file mode 100644 index b4dcfbd75c43..000000000000 --- a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/Workflow.php +++ /dev/null @@ -1,503 +0,0 @@ -google.cloud.workflows.v1beta.Workflow - */ -class Workflow extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the workflow. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Description of the workflow provided by the user. - * Must be at most 1000 unicode characters long. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Output only. State of the workflow deployment. - * - * Generated from protobuf field .google.cloud.workflows.v1beta.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The revision of the workflow. - * A new revision of a workflow is created as a result of updating the - * following fields of a workflow: - * - `source_code` - * - `service_account` - * The format is "000001-a4d", where the first 6 characters define - * the zero-padded revision ordinal number. They are followed by a hyphen and - * 3 hexadecimal random characters. - * - * Generated from protobuf field string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $revision_id = ''; - /** - * Output only. The timestamp of when the workflow was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last update timestamp of the workflow. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The timestamp that the latest revision of the workflow - * was created. - * - * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $revision_create_time = null; - /** - * Labels associated with this workflow. - * Labels can contain at most 64 entries. Keys and values can be no longer - * than 63 characters and can only contain lowercase letters, numeric - * characters, underscores and dashes. Label keys must start with a letter. - * International characters are allowed. - * - * Generated from protobuf field map labels = 8; - */ - private $labels; - /** - * Name of the service account associated with the latest workflow version. - * This service account represents the identity of the workflow and determines - * what permissions the workflow has. - * Format: projects/{project}/serviceAccounts/{account} - * Using `-` as a wildcard for the `{project}` will infer the project from - * the account. The `{account}` value can be the `email` address or the - * `unique_id` of the service account. - * If not provided, workflow will use the project's default service account. - * Modifying this field for an existing workflow results in a new workflow - * revision. - * - * Generated from protobuf field string service_account = 9; - */ - protected $service_account = ''; - protected $source_code; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the workflow. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * @type string $description - * Description of the workflow provided by the user. - * Must be at most 1000 unicode characters long. - * @type int $state - * Output only. State of the workflow deployment. - * @type string $revision_id - * Output only. The revision of the workflow. - * A new revision of a workflow is created as a result of updating the - * following fields of a workflow: - * - `source_code` - * - `service_account` - * The format is "000001-a4d", where the first 6 characters define - * the zero-padded revision ordinal number. They are followed by a hyphen and - * 3 hexadecimal random characters. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp of when the workflow was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update timestamp of the workflow. - * @type \Google\Protobuf\Timestamp $revision_create_time - * Output only. The timestamp that the latest revision of the workflow - * was created. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels associated with this workflow. - * Labels can contain at most 64 entries. Keys and values can be no longer - * than 63 characters and can only contain lowercase letters, numeric - * characters, underscores and dashes. Label keys must start with a letter. - * International characters are allowed. - * @type string $service_account - * Name of the service account associated with the latest workflow version. - * This service account represents the identity of the workflow and determines - * what permissions the workflow has. - * Format: projects/{project}/serviceAccounts/{account} - * Using `-` as a wildcard for the `{project}` will infer the project from - * the account. The `{account}` value can be the `email` address or the - * `unique_id` of the service account. - * If not provided, workflow will use the project's default service account. - * Modifying this field for an existing workflow results in a new workflow - * revision. - * @type string $source_contents - * Workflow code to be executed. The size limit is 32KB. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Workflows\V1Beta\Workflows::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the workflow. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the workflow. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Description of the workflow provided by the user. - * Must be at most 1000 unicode characters long. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Description of the workflow provided by the user. - * Must be at most 1000 unicode characters long. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. State of the workflow deployment. - * - * Generated from protobuf field .google.cloud.workflows.v1beta.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the workflow deployment. - * - * Generated from protobuf field .google.cloud.workflows.v1beta.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Workflows\V1beta\Workflow\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The revision of the workflow. - * A new revision of a workflow is created as a result of updating the - * following fields of a workflow: - * - `source_code` - * - `service_account` - * The format is "000001-a4d", where the first 6 characters define - * the zero-padded revision ordinal number. They are followed by a hyphen and - * 3 hexadecimal random characters. - * - * Generated from protobuf field string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getRevisionId() - { - return $this->revision_id; - } - - /** - * Output only. The revision of the workflow. - * A new revision of a workflow is created as a result of updating the - * following fields of a workflow: - * - `source_code` - * - `service_account` - * The format is "000001-a4d", where the first 6 characters define - * the zero-padded revision ordinal number. They are followed by a hyphen and - * 3 hexadecimal random characters. - * - * Generated from protobuf field string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setRevisionId($var) - { - GPBUtil::checkString($var, True); - $this->revision_id = $var; - - return $this; - } - - /** - * Output only. The timestamp of when the workflow was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp of when the workflow was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The last update timestamp of the workflow. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last update timestamp of the workflow. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. The timestamp that the latest revision of the workflow - * was created. - * - * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRevisionCreateTime() - { - return $this->revision_create_time; - } - - public function hasRevisionCreateTime() - { - return isset($this->revision_create_time); - } - - public function clearRevisionCreateTime() - { - unset($this->revision_create_time); - } - - /** - * Output only. The timestamp that the latest revision of the workflow - * was created. - * - * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRevisionCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->revision_create_time = $var; - - return $this; - } - - /** - * Labels associated with this workflow. - * Labels can contain at most 64 entries. Keys and values can be no longer - * than 63 characters and can only contain lowercase letters, numeric - * characters, underscores and dashes. Label keys must start with a letter. - * International characters are allowed. - * - * Generated from protobuf field map labels = 8; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels associated with this workflow. - * Labels can contain at most 64 entries. Keys and values can be no longer - * than 63 characters and can only contain lowercase letters, numeric - * characters, underscores and dashes. Label keys must start with a letter. - * International characters are allowed. - * - * Generated from protobuf field map labels = 8; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Name of the service account associated with the latest workflow version. - * This service account represents the identity of the workflow and determines - * what permissions the workflow has. - * Format: projects/{project}/serviceAccounts/{account} - * Using `-` as a wildcard for the `{project}` will infer the project from - * the account. The `{account}` value can be the `email` address or the - * `unique_id` of the service account. - * If not provided, workflow will use the project's default service account. - * Modifying this field for an existing workflow results in a new workflow - * revision. - * - * Generated from protobuf field string service_account = 9; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Name of the service account associated with the latest workflow version. - * This service account represents the identity of the workflow and determines - * what permissions the workflow has. - * Format: projects/{project}/serviceAccounts/{account} - * Using `-` as a wildcard for the `{project}` will infer the project from - * the account. The `{account}` value can be the `email` address or the - * `unique_id` of the service account. - * If not provided, workflow will use the project's default service account. - * Modifying this field for an existing workflow results in a new workflow - * revision. - * - * Generated from protobuf field string service_account = 9; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * Workflow code to be executed. The size limit is 32KB. - * - * Generated from protobuf field string source_contents = 10; - * @return string - */ - public function getSourceContents() - { - return $this->readOneof(10); - } - - public function hasSourceContents() - { - return $this->hasOneof(10); - } - - /** - * Workflow code to be executed. The size limit is 32KB. - * - * Generated from protobuf field string source_contents = 10; - * @param string $var - * @return $this - */ - public function setSourceContents($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * @return string - */ - public function getSourceCode() - { - return $this->whichOneof("source_code"); - } - -} - diff --git a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/Workflow/State.php b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/Workflow/State.php deleted file mode 100644 index ded042b45d2c..000000000000 --- a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/Workflow/State.php +++ /dev/null @@ -1,58 +0,0 @@ -google.cloud.workflows.v1beta.Workflow.State - */ -class State -{ - /** - * Invalid state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The workflow has been deployed successfully and is serving. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Workflows\V1beta\Workflow_State::class); - diff --git a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/WorkflowsGrpcClient.php b/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/WorkflowsGrpcClient.php deleted file mode 100644 index ff22ee4e2b84..000000000000 --- a/owl-bot-staging/Workflows/v1beta/proto/src/Google/Cloud/Workflows/V1beta/WorkflowsGrpcClient.php +++ /dev/null @@ -1,121 +0,0 @@ -_simpleRequest('/google.cloud.workflows.v1beta.Workflows/ListWorkflows', - $argument, - ['\Google\Cloud\Workflows\V1beta\ListWorkflowsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets details of a single Workflow. - * @param \Google\Cloud\Workflows\V1beta\GetWorkflowRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetWorkflow(\Google\Cloud\Workflows\V1beta\GetWorkflowRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.workflows.v1beta.Workflows/GetWorkflow', - $argument, - ['\Google\Cloud\Workflows\V1beta\Workflow', 'decode'], - $metadata, $options); - } - - /** - * Creates a new workflow. If a workflow with the specified name already - * exists in the specified project and location, the long running operation - * will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - * @param \Google\Cloud\Workflows\V1beta\CreateWorkflowRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateWorkflow(\Google\Cloud\Workflows\V1beta\CreateWorkflowRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.workflows.v1beta.Workflows/CreateWorkflow', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes a workflow with the specified name. - * This method also cancels and deletes all running executions of the - * workflow. - * @param \Google\Cloud\Workflows\V1beta\DeleteWorkflowRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteWorkflow(\Google\Cloud\Workflows\V1beta\DeleteWorkflowRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.workflows.v1beta.Workflows/DeleteWorkflow', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates an existing workflow. - * Running this method has no impact on already running executions of the - * workflow. A new revision of the workflow may be created as a result of a - * successful update operation. In that case, such revision will be used - * in new workflow executions. - * @param \Google\Cloud\Workflows\V1beta\UpdateWorkflowRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateWorkflow(\Google\Cloud\Workflows\V1beta\UpdateWorkflowRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.workflows.v1beta.Workflows/UpdateWorkflow', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/create_workflow.php b/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/create_workflow.php deleted file mode 100644 index bc06e2f97d09..000000000000 --- a/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/create_workflow.php +++ /dev/null @@ -1,93 +0,0 @@ -createWorkflow($formattedParent, $workflow, $workflowId); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Workflow $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = WorkflowsClient::locationName('[PROJECT]', '[LOCATION]'); - $workflowId = '[WORKFLOW_ID]'; - - create_workflow_sample($formattedParent, $workflowId); -} -// [END workflows_v1beta_generated_Workflows_CreateWorkflow_sync] diff --git a/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/delete_workflow.php b/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/delete_workflow.php deleted file mode 100644 index c46edf18f0b8..000000000000 --- a/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/delete_workflow.php +++ /dev/null @@ -1,78 +0,0 @@ -deleteWorkflow($formattedName); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WorkflowsClient::workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - - delete_workflow_sample($formattedName); -} -// [END workflows_v1beta_generated_Workflows_DeleteWorkflow_sync] diff --git a/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/get_workflow.php b/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/get_workflow.php deleted file mode 100644 index 98d3980788ce..000000000000 --- a/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/get_workflow.php +++ /dev/null @@ -1,67 +0,0 @@ -getWorkflow($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WorkflowsClient::workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - - get_workflow_sample($formattedName); -} -// [END workflows_v1beta_generated_Workflows_GetWorkflow_sync] diff --git a/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/list_workflows.php b/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/list_workflows.php deleted file mode 100644 index 2c50ff843aa7..000000000000 --- a/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/list_workflows.php +++ /dev/null @@ -1,73 +0,0 @@ -listWorkflows($formattedParent); - - /** @var Workflow $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = WorkflowsClient::locationName('[PROJECT]', '[LOCATION]'); - - list_workflows_sample($formattedParent); -} -// [END workflows_v1beta_generated_Workflows_ListWorkflows_sync] diff --git a/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/update_workflow.php b/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/update_workflow.php deleted file mode 100644 index 82e8d02f4c18..000000000000 --- a/owl-bot-staging/Workflows/v1beta/samples/V1beta/WorkflowsClient/update_workflow.php +++ /dev/null @@ -1,72 +0,0 @@ -updateWorkflow($workflow); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Workflow $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END workflows_v1beta_generated_Workflows_UpdateWorkflow_sync] diff --git a/owl-bot-staging/Workflows/v1beta/src/V1beta/Gapic/WorkflowsGapicClient.php b/owl-bot-staging/Workflows/v1beta/src/V1beta/Gapic/WorkflowsGapicClient.php deleted file mode 100644 index 2914615fb4eb..000000000000 --- a/owl-bot-staging/Workflows/v1beta/src/V1beta/Gapic/WorkflowsGapicClient.php +++ /dev/null @@ -1,714 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $workflow = new Workflow(); - * $workflowId = 'workflow_id'; - * $operationResponse = $workflowsClient->createWorkflow($formattedParent, $workflow, $workflowId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $workflowsClient->createWorkflow($formattedParent, $workflow, $workflowId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $workflowsClient->resumeOperation($operationName, 'createWorkflow'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $workflowsClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @experimental - */ -class WorkflowsGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.workflows.v1beta.Workflows'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'workflows.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $locationNameTemplate; - - private static $workflowNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/workflows_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/workflows_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/workflows_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/workflows_rest_client_config.php', - ], - ], - ]; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getWorkflowNameTemplate() - { - if (self::$workflowNameTemplate == null) { - self::$workflowNameTemplate = new PathTemplate('projects/{project}/locations/{location}/workflows/{workflow}'); - } - - return self::$workflowNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'location' => self::getLocationNameTemplate(), - 'workflow' => self::getWorkflowNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - * - * @experimental - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a workflow - * resource. - * - * @param string $project - * @param string $location - * @param string $workflow - * - * @return string The formatted workflow resource. - * - * @experimental - */ - public static function workflowName($project, $location, $workflow) - { - return self::getWorkflowNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'workflow' => $workflow, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - location: projects/{project}/locations/{location} - * - workflow: projects/{project}/locations/{location}/workflows/{workflow} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - * - * @experimental - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - * - * @experimental - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - * - * @experimental - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'workflows.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a new workflow. If a workflow with the specified name already - * exists in the specified project and location, the long running operation - * will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - * - * Sample code: - * ``` - * $workflowsClient = new WorkflowsClient(); - * try { - * $formattedParent = $workflowsClient->locationName('[PROJECT]', '[LOCATION]'); - * $workflow = new Workflow(); - * $workflowId = 'workflow_id'; - * $operationResponse = $workflowsClient->createWorkflow($formattedParent, $workflow, $workflowId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $workflowsClient->createWorkflow($formattedParent, $workflow, $workflowId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $workflowsClient->resumeOperation($operationName, 'createWorkflow'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $workflowsClient->close(); - * } - * ``` - * - * @param string $parent Required. Project and location in which the workflow should be created. - * Format: projects/{project}/locations/{location} - * @param Workflow $workflow Required. Workflow to be created. - * @param string $workflowId Required. The ID of the workflow to be created. It has to fulfill the - * following requirements: - * - * * Must contain only letters, numbers, underscores and hyphens. - * * Must start with a letter. - * * Must be between 1-64 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project and location. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createWorkflow($parent, $workflow, $workflowId, array $optionalArgs = []) - { - $request = new CreateWorkflowRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setWorkflow($workflow); - $request->setWorkflowId($workflowId); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateWorkflow', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a workflow with the specified name. - * This method also cancels and deletes all running executions of the - * workflow. - * - * Sample code: - * ``` - * $workflowsClient = new WorkflowsClient(); - * try { - * $formattedName = $workflowsClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - * $operationResponse = $workflowsClient->deleteWorkflow($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $workflowsClient->deleteWorkflow($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $workflowsClient->resumeOperation($operationName, 'deleteWorkflow'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $workflowsClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the workflow to be deleted. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteWorkflow($name, array $optionalArgs = []) - { - $request = new DeleteWorkflowRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteWorkflow', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets details of a single Workflow. - * - * Sample code: - * ``` - * $workflowsClient = new WorkflowsClient(); - * try { - * $formattedName = $workflowsClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - * $response = $workflowsClient->getWorkflow($formattedName); - * } finally { - * $workflowsClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the workflow which information should be retrieved. - * Format: projects/{project}/locations/{location}/workflows/{workflow} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Workflows\V1beta\Workflow - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getWorkflow($name, array $optionalArgs = []) - { - $request = new GetWorkflowRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetWorkflow', Workflow::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists Workflows in a given project and location. - * The default order is not specified. - * - * Sample code: - * ``` - * $workflowsClient = new WorkflowsClient(); - * try { - * $formattedParent = $workflowsClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $workflowsClient->listWorkflows($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $workflowsClient->listWorkflows($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $workflowsClient->close(); - * } - * ``` - * - * @param string $parent Required. Project and location from which the workflows should be listed. - * Format: projects/{project}/locations/{location} - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Filter to restrict results to specific workflows. - * @type string $orderBy - * Comma-separated list of fields that that specify the order of the results. - * Default sorting order for a field is ascending. To specify descending order - * for a field, append a " desc" suffix. - * If not specified, the results will be returned in an unspecified order. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listWorkflows($parent, array $optionalArgs = []) - { - $request = new ListWorkflowsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListWorkflows', $optionalArgs, ListWorkflowsResponse::class, $request); - } - - /** - * Updates an existing workflow. - * Running this method has no impact on already running executions of the - * workflow. A new revision of the workflow may be created as a result of a - * successful update operation. In that case, such revision will be used - * in new workflow executions. - * - * Sample code: - * ``` - * $workflowsClient = new WorkflowsClient(); - * try { - * $workflow = new Workflow(); - * $operationResponse = $workflowsClient->updateWorkflow($workflow); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $workflowsClient->updateWorkflow($workflow); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $workflowsClient->resumeOperation($operationName, 'updateWorkflow'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $workflowsClient->close(); - * } - * ``` - * - * @param Workflow $workflow Required. Workflow to be updated. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * List of fields to be updated. If not present, the entire workflow - * will be updated. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateWorkflow($workflow, array $optionalArgs = []) - { - $request = new UpdateWorkflowRequest(); - $requestParamHeaders = []; - $request->setWorkflow($workflow); - $requestParamHeaders['workflow.name'] = $workflow->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateWorkflow', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } -} diff --git a/owl-bot-staging/Workflows/v1beta/src/V1beta/WorkflowsClient.php b/owl-bot-staging/Workflows/v1beta/src/V1beta/WorkflowsClient.php deleted file mode 100644 index 866499e8fc40..000000000000 --- a/owl-bot-staging/Workflows/v1beta/src/V1beta/WorkflowsClient.php +++ /dev/null @@ -1,36 +0,0 @@ - [ - 'google.cloud.workflows.v1beta.Workflows' => [ - 'CreateWorkflow' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Workflows\V1beta\Workflow', - 'metadataReturnType' => '\Google\Cloud\Workflows\V1beta\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteWorkflow' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Workflows\V1beta\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UpdateWorkflow' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Workflows\V1beta\Workflow', - 'metadataReturnType' => '\Google\Cloud\Workflows\V1beta\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ListWorkflows' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getWorkflows', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Workflows/v1beta/src/V1beta/resources/workflows_rest_client_config.php b/owl-bot-staging/Workflows/v1beta/src/V1beta/resources/workflows_rest_client_config.php deleted file mode 100644 index 35bd2027c0e3..000000000000 --- a/owl-bot-staging/Workflows/v1beta/src/V1beta/resources/workflows_rest_client_config.php +++ /dev/null @@ -1,129 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.workflows.v1beta.Workflows' => [ - 'CreateWorkflow' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}/workflows', - 'body' => 'workflow', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'workflow_id', - ], - ], - 'DeleteWorkflow' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/workflows/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetWorkflow' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/workflows/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListWorkflows' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}/workflows', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateWorkflow' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1beta/{workflow.name=projects/*/locations/*/workflows/*}', - 'body' => 'workflow', - 'placeholders' => [ - 'workflow.name' => [ - 'getters' => [ - 'getWorkflow', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Workflows/v1beta/tests/Unit/V1beta/WorkflowsClientTest.php b/owl-bot-staging/Workflows/v1beta/tests/Unit/V1beta/WorkflowsClientTest.php deleted file mode 100644 index 2bb06cc9c188..000000000000 --- a/owl-bot-staging/Workflows/v1beta/tests/Unit/V1beta/WorkflowsClientTest.php +++ /dev/null @@ -1,582 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return WorkflowsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new WorkflowsClient($options); - } - - /** @test */ - public function createWorkflowTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createWorkflowTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $revisionId = 'revisionId513861631'; - $serviceAccount = 'serviceAccount-1948028253'; - $sourceContents = 'sourceContents-1799875906'; - $expectedResponse = new Workflow(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setSourceContents($sourceContents); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createWorkflowTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $workflow = new Workflow(); - $workflowId = 'workflowId1712917915'; - $response = $gapicClient->createWorkflow($formattedParent, $workflow, $workflowId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.workflows.v1beta.Workflows/CreateWorkflow', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getWorkflow(); - $this->assertProtobufEquals($workflow, $actualValue); - $actualValue = $actualApiRequestObject->getWorkflowId(); - $this->assertProtobufEquals($workflowId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createWorkflowTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createWorkflowExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createWorkflowTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $workflow = new Workflow(); - $workflowId = 'workflowId1712917915'; - $response = $gapicClient->createWorkflow($formattedParent, $workflow, $workflowId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createWorkflowTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteWorkflowTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteWorkflowTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteWorkflowTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - $response = $gapicClient->deleteWorkflow($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.workflows.v1beta.Workflows/DeleteWorkflow', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteWorkflowTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteWorkflowExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteWorkflowTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - $response = $gapicClient->deleteWorkflow($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteWorkflowTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getWorkflowTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $revisionId = 'revisionId513861631'; - $serviceAccount = 'serviceAccount-1948028253'; - $sourceContents = 'sourceContents-1799875906'; - $expectedResponse = new Workflow(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setSourceContents($sourceContents); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - $response = $gapicClient->getWorkflow($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.workflows.v1beta.Workflows/GetWorkflow', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getWorkflowExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->workflowName('[PROJECT]', '[LOCATION]', '[WORKFLOW]'); - try { - $gapicClient->getWorkflow($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listWorkflowsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $workflowsElement = new Workflow(); - $workflows = [ - $workflowsElement, - ]; - $expectedResponse = new ListWorkflowsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setWorkflows($workflows); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listWorkflows($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getWorkflows()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.workflows.v1beta.Workflows/ListWorkflows', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listWorkflowsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listWorkflows($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateWorkflowTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateWorkflowTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $revisionId = 'revisionId513861631'; - $serviceAccount = 'serviceAccount-1948028253'; - $sourceContents = 'sourceContents-1799875906'; - $expectedResponse = new Workflow(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setSourceContents($sourceContents); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateWorkflowTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $workflow = new Workflow(); - $response = $gapicClient->updateWorkflow($workflow); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.workflows.v1beta.Workflows/UpdateWorkflow', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getWorkflow(); - $this->assertProtobufEquals($workflow, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateWorkflowTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateWorkflowExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateWorkflowTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $workflow = new Workflow(); - $response = $gapicClient->updateWorkflow($workflow); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateWorkflowTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -}